-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON Schema version? #13
Comments
I am not aware of such a schema! Good luck with this effort, this seems
valuable!
…On Thu, Apr 28, 2022 at 7:14 PM Delaney ***@***.***> wrote:
I'd like to enable auto completion tooling in VSCode
<https://code.visualstudio.com/docs/languages/json>. Do you know if there
is a JSON Schema DraftV7 version of the JTD definition? I know it seems
like at odd ask but would make editing and validating schema in an IDE on a
team much easier.
I had started one but then thought I'd reach out first
{
"$schema": "http://json-schema.org/draft-07/schema",
"$comment": "A JSON Schema for a JSON Type Definition RFC 8927",
"title": "JSON Type Definition",
"definitions": {
"empty": {
"type": "object",
"properties": {},
"additionalProperties": false
},
"type": {
"type": "object",
"properties": {
"type": {
"enum": [
"boolean",
"string",
"timestamp",
"float32",
"float64",
"int8",
"uint8",
"int16",
"uint16",
"int32",
"uint32"
]
}
},
"required": ["properties"],
"additionalProperties": false
},
"enum": {
"type": "object",
"properties": {
"enum": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
},
"required": ["enum"],
"additionalProperties": false
},
"elements": {
"type": "object",
"properties": {
"elements": { "$ref": "#/definitions/schema" }
},
"required": ["elements"],
"additionalProperties": false
},
"properties": {
"type": "object",
"properties": {
"properties": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/schema" }
},
"optionalProperties": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/schema" }
},
"additionalProperties": { "type": "boolean", "default": false }
},
"required": ["properties"],
"additionalProperties": false
},
"values": {
"type": "object",
"properties": {
"values": { "$ref": "#/definitions/schema" }
},
"required": ["values"],
"additionalProperties": false
},
"discriminator": {
"type": "object",
"properties": {
"discriminator": {
"type": "string"
},
"mapping": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/schema" }
}
},
"required": ["discriminator", "mapping"],
"additionalProperties": false
},
"ref": {
"type": "object",
"properties": {
"ref": { "type": "string" }
},
"required": ["ref"],
"additionalProperties": false
},
"schema": {
"oneOf": [
{ "$ref": "#/definitions/empty" },
{ "$ref": "#/definitions/type" },
{ "$ref": "#/definitions/enum" },
{ "$ref": "#/definitions/elements" },
{ "$ref": "#/definitions/properties" },
{ "$ref": "#/definitions/values" },
{ "$ref": "#/definitions/discriminator" },
{ "$ref": "#/definitions/ref" }
]
}
},
"type": "object",
"properties": {
"definitions": {
"type": "object",
"additionalProperties": { "$ref": "#/definitions/schema" }
}
},
"additionalProperties": {
"$ref": "#/definitions/schema"
}
}
—
Reply to this email directly, view it on GitHub
<#13>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQUIOJTESGACZ3HI2SE3NTVHNAZPANCNFSM5UUKYN6Q>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd like to enable auto completion tooling in VSCode. Do you know if there is a JSON Schema DraftV7 version of the JTD definition? I know it seems like at odd ask but would make editing and validating schema in an IDE on a team much easier.
I had started one but then thought I'd reach out first
The text was updated successfully, but these errors were encountered: