Skip to content

Commit

Permalink
feat: create definitions for 2.5.0 version of the Spec
Browse files Browse the repository at this point in the history
  • Loading branch information
smoya committed Jun 17, 2022
1 parent b6f8455 commit b45d02b
Show file tree
Hide file tree
Showing 48 changed files with 1,631 additions and 0 deletions.
38 changes: 38 additions & 0 deletions definitions/2.5.0/APIKeyHTTPSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"type": "object",
"required": [
"type",
"name",
"in"
],
"properties": {
"type": {
"type": "string",
"enum": [
"httpApiKey"
]
},
"name": {
"type": "string"
},
"in": {
"type": "string",
"enum": [
"header",
"query",
"cookie"
]
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/APIKeyHTTPSecurityScheme.json"
}
35 changes: 35 additions & 0 deletions definitions/2.5.0/BearerHTTPSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"type": "object",
"required": [
"type",
"scheme"
],
"properties": {
"scheme": {
"type": "string",
"enum": [
"bearer"
]
},
"bearerFormat": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"http"
]
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/BearerHTTPSecurityScheme.json"
}
15 changes: 15 additions & 0 deletions definitions/2.5.0/HTTPSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/2.5.0/NonBearerHTTPSecurityScheme.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.5.0/BearerHTTPSecurityScheme.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.5.0/APIKeyHTTPSecurityScheme.json"
}
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/HTTPSecurityScheme.json"
}
40 changes: 40 additions & 0 deletions definitions/2.5.0/NonBearerHTTPSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"not": {
"type": "object",
"properties": {
"scheme": {
"type": "string",
"enum": [
"bearer"
]
}
}
},
"type": "object",
"required": [
"scheme",
"type"
],
"properties": {
"scheme": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"http"
]
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/NonBearerHTTPSecurityScheme.json"
}
13 changes: 13 additions & 0 deletions definitions/2.5.0/Reference.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "object",
"required": [
"$ref"
],
"properties": {
"$ref": {
"$ref": "http://asyncapi.com/definitions/2.5.0/ReferenceObject.json"
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/Reference.json"
}
6 changes: 6 additions & 0 deletions definitions/2.5.0/ReferenceObject.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"type": "string",
"format": "uri-reference",
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/ReferenceObject.json"
}
25 changes: 25 additions & 0 deletions definitions/2.5.0/SaslGssapiSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"gssapi"
]
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/SaslGssapiSecurityScheme.json"
}
25 changes: 25 additions & 0 deletions definitions/2.5.0/SaslPlainSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"plain"
]
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/SaslPlainSecurityScheme.json"
}
26 changes: 26 additions & 0 deletions definitions/2.5.0/SaslScramSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"scramSha256",
"scramSha512"
]
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/SaslScramSecurityScheme.json"
}
15 changes: 15 additions & 0 deletions definitions/2.5.0/SaslSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/2.5.0/SaslPlainSecurityScheme.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.5.0/SaslScramSecurityScheme.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.5.0/SaslGssapiSecurityScheme.json"
}
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/SaslSecurityScheme.json"
}
12 changes: 12 additions & 0 deletions definitions/2.5.0/SecurityRequirement.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/SecurityRequirement.json"
}
33 changes: 33 additions & 0 deletions definitions/2.5.0/SecurityScheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/2.5.0/userPassword.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.5.0/apiKey.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.5.0/X509.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.5.0/symmetricEncryption.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.5.0/asymmetricEncryption.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.5.0/HTTPSecurityScheme.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.5.0/oauth2Flows.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.5.0/openIdConnect.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.5.0/SaslSecurityScheme.json"
}
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/SecurityScheme.json"
}
25 changes: 25 additions & 0 deletions definitions/2.5.0/X509.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"X509"
]
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/X509.json"
}
33 changes: 33 additions & 0 deletions definitions/2.5.0/apiKey.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"type": "object",
"required": [
"type",
"in"
],
"properties": {
"type": {
"type": "string",
"enum": [
"apiKey"
]
},
"in": {
"type": "string",
"enum": [
"user",
"password"
]
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/apiKey.json"
}
25 changes: 25 additions & 0 deletions definitions/2.5.0/asymmetricEncryption.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"asymmetricEncryption"
]
},
"description": {
"type": "string"
}
},
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/2.5.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.5.0/asymmetricEncryption.json"
}
Loading

0 comments on commit b45d02b

Please sign in to comment.