Skip to content

Commit

Permalink
Strip out all the words that match JSON Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Sturgeon committed Jun 21, 2019
1 parent 42ed2ce commit ce1b4b6
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 133 deletions.
173 changes: 44 additions & 129 deletions schemas/v3.1/meta-openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,148 +7,63 @@
"$recursiveAnchor": true,
"title": "OpenAPI Vocabulary Schema",
"type": ["object", "boolean"],
"properties": {
"type": {
"type": "string",
"enum": [
"array",
"boolean",
"integer",
"number",
"object",
"string"
]
"allOf": [
{
"$ref": "http://json-schema.org/draft/2019-WIP/schema"
},
"not": {
"oneOf": [
{
"$ref": "#/$defs/Schema" # can i use recursiveAnchor for this or how do i ref myself
{
"properties": {
"type": {
"oneOf" : [
{
"$ref": "#/$defs/AllowedTypes"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/AllowedTypes"
}
}
]
},
{
"$ref": "#/$defs/Reference" // this is in the openapi-vocabulary.json any way to ref back up to it
}
]
},
"allOf": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/$defs/Schema"
},
{
"$ref": "#/$defs/Reference"
}
]
}
},
"oneOf": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/$defs/Schema"
},
{
"$ref": "#/$defs/Reference"
}
]
}
},
"anyOf": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/$defs/Schema"
},
{
"$ref": "#/$defs/Reference"
}
]
}
},
"items": {
"oneOf": [
{
"$ref": "#/$defs/Schema"
"nullable": {
"type": "boolean",
"default": false,
"deprecated": true
},
{
"$ref": "#/$defs/Reference"
}
]
},
"properties": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"$ref": "#/$defs/Schema"
},
{
"$ref": "#/$defs/Reference"
}
]
}
},
"additionalProperties": {
"oneOf": [
{
"$ref": "#/$defs/Schema" // TODO
"discriminator": {
"$ref": "#/$defs/Discriminator"
},
{
"$ref": "#/$defs/Reference" // TODO
"example": {
"deprecated": true
},
{
"type": "boolean"
"externalDocs": {
"$ref": "#/$defs/ExternalDocumentation" // how to reference this from openapi-vocabulary.json
},
"xml": {
"$ref": "#/$defs/XML"
}
],
"default": true
},
"description": {
"type": "string"
},
"format": {
"type": "string"
},
"default": {
},
"nullable": {
"type": "boolean",
"default": false,
"deprecated": true
},
"discriminator": {
"$ref": "#/$defs/Discriminator"
},
"readOnly": {
"type": "boolean",
"default": false
},
"writeOnly": {
"type": "boolean",
"default": false
},
"example": {
},
"externalDocs": {
"$ref": "#/$defs/ExternalDocumentation" // TODO
},
"deprecated": {
"type": "boolean",
"default": false
},
"xml": {
"$ref": "#/$defs/XML"
}
}
},
],
"patternProperties": {
"^x-": {
}
},
"additionalProperties": false,

"$defs": {
"AllowedTypes": {
"type": "string",
"enum": [
"array",
"boolean",
"integer",
"number",
"object",
"string",
"null"
]
}
"Discriminator": {
"type": "object",
"required": [
Expand Down
5 changes: 1 addition & 4 deletions schemas/v3.1/openapi-vocabulary.json
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,7 @@
"additionalProperties": false
},
"Schema": {
"allOf": [
{"$ref": "http://json-schema.org/draft/2019-WIP/schema"},
{"$ref": "https://spec.openapis.org/oas/3.1/meta"}
]
"$ref": "https://spec.openapis.org/oas/3.1/meta"
},
"Response": {
"type": "object",
Expand Down

0 comments on commit ce1b4b6

Please sign in to comment.