Skip to content

Instantly share code, notes, and snippets.

@domoritz
Last active January 29, 2020 21:17
Show Gist options
  • Save domoritz/3cd0ddb8cad62ad611f301b2a8743ebf to your computer and use it in GitHub Desktop.
Save domoritz/3cd0ddb8cad62ad611f301b2a8743ebf to your computer and use it in GitHub Desktop.
Schema with encoded refs
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Foo<number>": {
"type": "object",
"properties": {"q1": {"enum": ["x1", "x2"]}}
}
},
"type": "object",
"properties": {
"p1": {"enum": ["v1", "v2"]},
"p2": {"$ref": "#/definitions/Foo%3Cnumber%3E"}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment