Skip to content

Appending to referenced enum #2941

@martinwangen

Description

@martinwangen

Would love to be able to append to an existing enum. Not all values are applickable in all cases, this means that i need to redefine the enum. Especially when used together with deepmap's oapi-gen this would be nice.

Example:
SensorType.yaml:
type: string
enum: [Motion, Push, Voice]

Doorbell.yaml:
schema:
$ref: "#/shared/components/schemas/SensorType.yaml"
description: Sensor to trigger doorbell

Alarm.yaml:
schema:
$ref: "#/shared/components/schemas/SensorType.yaml"
append: [ Temp, Vibration, SignalLoss ]
description: Sensor to trigger alarm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions