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

feat: add 2.4 schemas #212

Merged
merged 13 commits into from
May 4, 2022
2 changes: 1 addition & 1 deletion .github/workflows/add-good-first-issue-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
github-token: ${{ secrets.GH_TOKEN }}
script: |
const areas = ['javascript', 'typescript', 'java' , 'go', 'docs', 'ci-cd', 'design'];
const values = context.payload.comment.body.split(" ");
const values = context.payload.comment.body.trim().split(" ");
switch(values[1]){
case 'ts':
values[1] = 'typescript';
Expand Down
6 changes: 6 additions & 0 deletions definitions/2.3.0/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"schemas": {
"$ref": "http://asyncapi.com/definitions/2.3.0/schemas.json"
},
"servers": {
"$ref": "http://asyncapi.com/definitions/2.3.0/servers.json"
},
"channels": {
"$ref": "http://asyncapi.com/definitions/2.3.0/channels.json"
},
"messages": {
"$ref": "http://asyncapi.com/definitions/2.3.0/messages.json"
},
Expand Down
38 changes: 38 additions & 0 deletions definitions/2.4.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.4.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json"
}
35 changes: 35 additions & 0 deletions definitions/2.4.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.4.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json"
}
15 changes: 15 additions & 0 deletions definitions/2.4.0/HTTPSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json"
}
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.4.0/HTTPSecurityScheme.json"
}
40 changes: 40 additions & 0 deletions definitions/2.4.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.4.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json"
}
13 changes: 13 additions & 0 deletions definitions/2.4.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.4.0/ReferenceObject.json"
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.4.0/Reference.json"
}
6 changes: 6 additions & 0 deletions definitions/2.4.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.4.0/ReferenceObject.json"
}
25 changes: 25 additions & 0 deletions definitions/2.4.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.4.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.4.0/SaslGssapiSecurityScheme.json"
}
25 changes: 25 additions & 0 deletions definitions/2.4.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.4.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.4.0/SaslPlainSecurityScheme.json"
}
26 changes: 26 additions & 0 deletions definitions/2.4.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.4.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.4.0/SaslScramSecurityScheme.json"
}
15 changes: 15 additions & 0 deletions definitions/2.4.0/SaslSecurityScheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/2.4.0/SaslPlainSecurityScheme.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.4.0/SaslScramSecurityScheme.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.4.0/SaslGssapiSecurityScheme.json"
}
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.4.0/SaslSecurityScheme.json"
}
12 changes: 12 additions & 0 deletions definitions/2.4.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.4.0/SecurityRequirement.json"
}
33 changes: 33 additions & 0 deletions definitions/2.4.0/SecurityScheme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"oneOf": [
{
"$ref": "http://asyncapi.com/definitions/2.4.0/userPassword.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.4.0/apiKey.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.4.0/X509.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.4.0/symmetricEncryption.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.4.0/asymmetricEncryption.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.4.0/HTTPSecurityScheme.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.4.0/oauth2Flows.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.4.0/openIdConnect.json"
},
{
"$ref": "http://asyncapi.com/definitions/2.4.0/SaslSecurityScheme.json"
}
],
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.4.0/SecurityScheme.json"
}
25 changes: 25 additions & 0 deletions definitions/2.4.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.4.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.4.0/X509.json"
}
33 changes: 33 additions & 0 deletions definitions/2.4.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.4.0/specificationExtension.json"
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/definitions/2.4.0/apiKey.json"
}
Loading