Skip to content
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

style: perform schema formatting with the new JSON Schema CLI #549

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
28 changes: 14 additions & 14 deletions definitions/3.0.0/APIKeyHTTPSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json",
"type": "object",
"required": [
"type",
"name",
"in"
],
"properties": {
"description": {
"description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation.",
"type": "string"
},
"type": {
"type": "string",
"description": "The type of the security scheme.",
"type": "string",
"enum": [
"httpApiKey"
]
},
"name": {
"type": "string",
"description": "The name of the header, query or cookie parameter to be used."
},
"in": {
"type": "string",
"description": "The location of the API key",
"type": "string",
"enum": [
"header",
"query",
"cookie"
]
},
"description": {
"type": "string",
"description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation."
"name": {
"description": "The name of the header, query or cookie parameter to be used.",
"type": "string"
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"additionalProperties": false,
"example": {
"$ref": "http://asyncapi.com/examples/3.0.0/APIKeyHTTPSecurityScheme.json"
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json"
}
}
}
32 changes: 16 additions & 16 deletions definitions/3.0.0/BearerHTTPSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json",
"type": "object",
"required": [
"type",
"scheme"
],
"properties": {
"scheme": {
"description": {
"description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation.",
"type": "string"
},
"type": {
"description": "The type of the security scheme.",
"type": "string",
"description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.",
"enum": [
"bearer"
"http"
]
},
"bearerFormat": {
"type": "string",
"description": "A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes."
"description": "A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.",
"type": "string"
},
"type": {
"scheme": {
"description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.",
"type": "string",
"description": "The type of the security scheme.",
"enum": [
"http"
"bearer"
]
},
"description": {
"type": "string",
"description": "A short description for security scheme. CommonMark syntax MAY be used for rich text representation."
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/BearerHTTPSecurityScheme.json"
}
"additionalProperties": false
}
8 changes: 4 additions & 4 deletions definitions/3.0.0/HTTPSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json",
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json"
Expand All @@ -9,7 +11,5 @@
{
"$ref": "http://asyncapi.com/definitions/3.0.0/APIKeyHTTPSecurityScheme.json"
}
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/HTTPSecurityScheme.json"
}
]
}
26 changes: 13 additions & 13 deletions definitions/3.0.0/NonBearerHTTPSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json",
"type": "object",
"not": {
"type": "object",
"properties": {
"scheme": {
"type": "string",
"description": "A short description for security scheme.",
"type": "string",
"enum": [
"bearer"
]
}
}
},
"type": "object",
"required": [
"scheme",
"type"
],
"properties": {
"scheme": {
"type": "string",
"description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235."
},
"description": {
"type": "string",
"description": "A short description for security scheme."
"description": "A short description for security scheme.",
"type": "string"
},
"type": {
"type": "string",
"description": "The type of the security scheme.",
"type": "string",
"enum": [
"http"
]
},
"scheme": {
"description": "The name of the HTTP Authorization scheme to be used in the Authorization header as defined in RFC7235.",
"type": "string"
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/NonBearerHTTPSecurityScheme.json"
}
"additionalProperties": false
}
10 changes: 5 additions & 5 deletions definitions/3.0.0/Reference.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/Reference.json",
"description": "A simple object to allow referencing other components in the specification, internally and externally.",
"type": "object",
"required": [
"$ref"
],
Expand All @@ -12,7 +14,5 @@
},
"example": {
"$ref": "http://asyncapi.com/examples/3.0.0/ReferenceObject.json"
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/Reference.json"
}
}
}
8 changes: 4 additions & 4 deletions definitions/3.0.0/ReferenceObject.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"type": "string",
"format": "uri-reference",
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json"
}
"$id": "http://asyncapi.com/definitions/3.0.0/ReferenceObject.json",
"type": "string",
"format": "uri-reference"
}
22 changes: 11 additions & 11 deletions definitions/3.0.0/SaslGssapiSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json",
"type": "object",
"required": [
"type"
],
"properties": {
"description": {
"description": "A short description for security scheme.",
"type": "string"
},
"type": {
"type": "string",
"description": "The type of the security scheme.",
"type": "string",
"enum": [
"gssapi"
]
},
"description": {
"type": "string",
"description": "A short description for security scheme."
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"example": {
"$ref": "http://asyncapi.com/examples/3.0.0/Sasl.json"
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json"
}
"example": {
"$ref": "http://asyncapi.com/examples/3.0.0/Sasl.json"
}
}
18 changes: 9 additions & 9 deletions definitions/3.0.0/SaslPlainSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json",
"type": "object",
"required": [
"type"
],
"properties": {
"description": {
"description": "A short description for security scheme.",
"type": "string"
},
"type": {
"type": "string",
"description": "The type of the security scheme. Valid values",
"type": "string",
"enum": [
"plain"
]
},
"description": {
"type": "string",
"description": "A short description for security scheme."
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"additionalProperties": false,
"example": {
"$ref": "http://asyncapi.com/examples/3.0.0/Sasl.json"
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json"
}
}
18 changes: 9 additions & 9 deletions definitions/3.0.0/SaslScramSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json",
"type": "object",
"required": [
"type"
],
"properties": {
"description": {
"description": "A short description for security scheme.",
"type": "string"
},
"type": {
"type": "string",
"description": "The type of the security scheme.",
"type": "string",
"enum": [
"scramSha256",
"scramSha512"
]
},
"description": {
"type": "string",
"description": "A short description for security scheme."
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"additionalProperties": false,
"example": {
"$ref": "http://asyncapi.com/examples/3.0.0/Sasl.json"
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/SaslScramSecurityScheme.json"
}
}
8 changes: 4 additions & 4 deletions definitions/3.0.0/SaslSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json",
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/3.0.0/SaslPlainSecurityScheme.json"
Expand All @@ -9,7 +11,5 @@
{
"$ref": "http://asyncapi.com/definitions/3.0.0/SaslGssapiSecurityScheme.json"
}
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/SaslSecurityScheme.json"
}
]
}
8 changes: 4 additions & 4 deletions definitions/3.0.0/SecurityScheme.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json",
"description": "Defines a security scheme that can be used by the operations.",
"oneOf": [
{
Expand Down Expand Up @@ -31,7 +33,5 @@
],
"example": {
"$ref": "http://asyncapi.com/examples/3.0.0/SecurityScheme.json"
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/3.0.0/SecurityScheme.json"
}
}
}
Loading
Loading