Skip to content

RFC: Add '$schema' property at root of the spec 2.x #485

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions schemas/v2.0/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@
],
"description": "The Swagger version of this document."
},
"$schema": {
"allOf": [
{
"$ref": "http://json-schema.org/draft-04/schema#/properties/$schema"
},
{
"description": "JSON schema for validation of this Swagger specification",
"default": "http://swagger.io/schemas/v2.0/schema.json"
}
]
},
"info": {
"$ref": "#/definitions/info"
},
Expand Down
1 change: 1 addition & 0 deletions versions/2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Field Name | Type | Description
<a name="swaggerSecurity"></a>security | [[Security Requirement Object](#securityRequirementObject)] | A declaration of which security schemes are applied for the API as a whole. The list of values describes alternative security schemes that can be used (that is, there is a logical OR between the security requirements). Individual operations can override this definition.
<a name="swaggerTags"></a>tags | [[Tag Object](#tagObject)] | A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the [Operation Object](#operationObject) must be declared. The tags that are not declared may be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.
<a name="swaggerExternalDocs"></a>externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation.
<a name="swaggerJSONSchema"></a>$schema | `string` | URI to the JSON Schema for Swagger 2 for basic validation of this specification. The default value is [http://swagger.io/schemas/v2.0/schema.json](http://swagger.io/schemas/v2.0/schema.json)

##### Patterned Objects

Expand Down