Skip to content

Enums and/or Constants #16

Open
Open
@willstott101

Description

@willstott101

I really like the look of typeschema, but the lack of enum support is a little unfortunate for me.

As I see it, a simple constant type which can only be the value of a given constant would enable enums quite easily.

{
  "definitions": {
    "Message": {
      "type": "object",
      "properties": {
        "encoding": {
          "oneOf": [{
            "constant": "BASE64"
          }, {
            "constant": "STRING"
          }]
        },
        "data": {
          "type": "string"
        }
      }
    }
  },
  "$ref": "Message"
}

Are you looking to add limited extensions to typeschema?

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