Skip to content

Appending to referenced enum #2941

Closed
Closed

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

Activity

  1. locked and limited conversation to collaborators on Jun 13, 2022
  2. converted this issue into a discussion #2943 on Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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