Skip to content

Commit

Permalink
Merge pull request #2509 from jdesrosiers/gh-pages
Browse files Browse the repository at this point in the history
Make 3.1 schemas retrievable from their $ids
  • Loading branch information
MikeRalphson authored Mar 25, 2021
2 parents 62d0c05 + dd98272 commit 2f56ee7
Show file tree
Hide file tree
Showing 4 changed files with 1,464 additions and 0 deletions.
21 changes: 21 additions & 0 deletions oas/3.1/dialect/base
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$id": "https://spec.openapis.org/oas/3.1/dialect/base",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$vocabulary": {
"https://json-schema.org/draft/2020-12/vocab/core": true,
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
"https://json-schema.org/draft/2020-12/vocab/validation": true,
"https://json-schema.org/draft/2020-12/vocab/meta-data": true,
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
"https://json-schema.org/draft/2020-12/vocab/content": true,
"https://spec.openapis.org/oas/3.1/vocab/base": false
},
"$dynamicAnchor": "meta",

"title": "OpenAPI 3.1 Schema Object Dialect",
"allOf": [
{ "$ref": "https://json-schema.org/draft/2020-12/schema" },
{ "$ref": "https://spec.openapis.org/oas/3.1/meta/base" }
]
}
79 changes: 79 additions & 0 deletions oas/3.1/meta/base
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"$id": "https://spec.openapis.org/oas/3.1/meta/base",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$vocabulary": {
"https://spec.openapis.org/oas/3.1/vocab/base": true
},
"$dynamicAnchor": "meta",
"title": "OAS Base vocabulary",

"type": ["object", "boolean"],
"properties": {
"example": true,
"discriminator": { "$ref": "#/$defs/discriminator" },
"externalDocs": { "$ref": "#/$defs/external-docs" },
"xml": { "$ref": "#/$defs/xml" }
},
"$defs": {
"extensible": {
"patternProperties": {
"^x-": true
}
},
"discriminator": {
"$ref": "#/$defs/extensible",
"type": "object",
"properties": {
"propertyName": {
"type": "string"
},
"mapping": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"required": ["propertyName"],
"unevaluatedProperties": false
},
"external-docs": {
"$ref": "#/$defs/extensible",
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri-reference"
},
"description": {
"type": "string"
}
},
"required": ["url"],
"unevaluatedProperties": false
},
"xml": {
"$ref": "#/$defs/extensible",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"namespace": {
"type": "string",
"format": "uri"
},
"prefix": {
"type": "string"
},
"attribute": {
"type": "boolean"
},
"wrapped": {
"type": "boolean"
}
},
"unevaluatedProperties": false
}
}
}
24 changes: 24 additions & 0 deletions oas/3.1/schema-base/2021-03-02
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-03-02",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$ref": "https://spec.openapis.org/oas/3.1/schema/2021-03-02",
"properties": {
"jsonSchemaDialect": {
"$ref": "#/$defs/dialect"
}
},
"$defs": {
"dialect": {
"const": "https://spec.openapis.org/oas/3.1/dialect/base"
},
"schema": {
"$dynamicAnchor": "meta",
"$ref\"": "https://spec.openapis.org/oas/3.1/dialect/base",
"properties": {
"$schema": {
"$ref": "#/$defs/dialect"
}
}
}
}
}
Loading

0 comments on commit 2f56ee7

Please sign in to comment.