Skip to content

Commit 64d2d79

Browse files
authored
feat: add 2.4 schemas (#212)
1 parent 20197bc commit 64d2d79

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3472
-2
lines changed

.github/workflows/add-good-first-issue-labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
github-token: ${{ secrets.GH_TOKEN }}
2222
script: |
2323
const areas = ['javascript', 'typescript', 'java' , 'go', 'docs', 'ci-cd', 'design'];
24-
const values = context.payload.comment.body.split(" ");
24+
const values = context.payload.comment.body.trim().split(" ");
2525
switch(values[1]){
2626
case 'ts':
2727
values[1] = 'typescript';

definitions/2.3.0/components.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
"schemas": {
1212
"$ref": "http://asyncapi.com/definitions/2.3.0/schemas.json"
1313
},
14+
"servers": {
15+
"$ref": "http://asyncapi.com/definitions/2.3.0/servers.json"
16+
},
17+
"channels": {
18+
"$ref": "http://asyncapi.com/definitions/2.3.0/channels.json"
19+
},
1420
"messages": {
1521
"$ref": "http://asyncapi.com/definitions/2.3.0/messages.json"
1622
},
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"type": "object",
3+
"required": [
4+
"type",
5+
"name",
6+
"in"
7+
],
8+
"properties": {
9+
"type": {
10+
"type": "string",
11+
"enum": [
12+
"httpApiKey"
13+
]
14+
},
15+
"name": {
16+
"type": "string"
17+
},
18+
"in": {
19+
"type": "string",
20+
"enum": [
21+
"header",
22+
"query",
23+
"cookie"
24+
]
25+
},
26+
"description": {
27+
"type": "string"
28+
}
29+
},
30+
"patternProperties": {
31+
"^x-[\\w\\d\\.\\x2d_]+$": {
32+
"$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json"
33+
}
34+
},
35+
"additionalProperties": false,
36+
"$schema": "http://json-schema.org/draft-07/schema#",
37+
"$id": "http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json"
38+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"type": "object",
3+
"required": [
4+
"type",
5+
"scheme"
6+
],
7+
"properties": {
8+
"scheme": {
9+
"type": "string",
10+
"enum": [
11+
"bearer"
12+
]
13+
},
14+
"bearerFormat": {
15+
"type": "string"
16+
},
17+
"type": {
18+
"type": "string",
19+
"enum": [
20+
"http"
21+
]
22+
},
23+
"description": {
24+
"type": "string"
25+
}
26+
},
27+
"patternProperties": {
28+
"^x-[\\w\\d\\.\\x2d_]+$": {
29+
"$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json"
30+
}
31+
},
32+
"additionalProperties": false,
33+
"$schema": "http://json-schema.org/draft-07/schema#",
34+
"$id": "http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json"
35+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"oneOf": [
3+
{
4+
"$ref": "http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json"
5+
},
6+
{
7+
"$ref": "http://asyncapi.com/definitions/2.4.0/BearerHTTPSecurityScheme.json"
8+
},
9+
{
10+
"$ref": "http://asyncapi.com/definitions/2.4.0/APIKeyHTTPSecurityScheme.json"
11+
}
12+
],
13+
"$schema": "http://json-schema.org/draft-07/schema#",
14+
"$id": "http://asyncapi.com/definitions/2.4.0/HTTPSecurityScheme.json"
15+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"not": {
3+
"type": "object",
4+
"properties": {
5+
"scheme": {
6+
"type": "string",
7+
"enum": [
8+
"bearer"
9+
]
10+
}
11+
}
12+
},
13+
"type": "object",
14+
"required": [
15+
"scheme",
16+
"type"
17+
],
18+
"properties": {
19+
"scheme": {
20+
"type": "string"
21+
},
22+
"description": {
23+
"type": "string"
24+
},
25+
"type": {
26+
"type": "string",
27+
"enum": [
28+
"http"
29+
]
30+
}
31+
},
32+
"patternProperties": {
33+
"^x-[\\w\\d\\.\\x2d_]+$": {
34+
"$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json"
35+
}
36+
},
37+
"additionalProperties": false,
38+
"$schema": "http://json-schema.org/draft-07/schema#",
39+
"$id": "http://asyncapi.com/definitions/2.4.0/NonBearerHTTPSecurityScheme.json"
40+
}

definitions/2.4.0/Reference.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"type": "object",
3+
"required": [
4+
"$ref"
5+
],
6+
"properties": {
7+
"$ref": {
8+
"$ref": "http://asyncapi.com/definitions/2.4.0/ReferenceObject.json"
9+
}
10+
},
11+
"$schema": "http://json-schema.org/draft-07/schema#",
12+
"$id": "http://asyncapi.com/definitions/2.4.0/Reference.json"
13+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "string",
3+
"format": "uri-reference",
4+
"$schema": "http://json-schema.org/draft-07/schema#",
5+
"$id": "http://asyncapi.com/definitions/2.4.0/ReferenceObject.json"
6+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"type": "object",
3+
"required": [
4+
"type"
5+
],
6+
"properties": {
7+
"type": {
8+
"type": "string",
9+
"enum": [
10+
"gssapi"
11+
]
12+
},
13+
"description": {
14+
"type": "string"
15+
}
16+
},
17+
"patternProperties": {
18+
"^x-[\\w\\d\\.\\x2d_]+$": {
19+
"$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json"
20+
}
21+
},
22+
"additionalProperties": false,
23+
"$schema": "http://json-schema.org/draft-07/schema#",
24+
"$id": "http://asyncapi.com/definitions/2.4.0/SaslGssapiSecurityScheme.json"
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"type": "object",
3+
"required": [
4+
"type"
5+
],
6+
"properties": {
7+
"type": {
8+
"type": "string",
9+
"enum": [
10+
"plain"
11+
]
12+
},
13+
"description": {
14+
"type": "string"
15+
}
16+
},
17+
"patternProperties": {
18+
"^x-[\\w\\d\\.\\x2d_]+$": {
19+
"$ref": "http://asyncapi.com/definitions/2.4.0/specificationExtension.json"
20+
}
21+
},
22+
"additionalProperties": false,
23+
"$schema": "http://json-schema.org/draft-07/schema#",
24+
"$id": "http://asyncapi.com/definitions/2.4.0/SaslPlainSecurityScheme.json"
25+
}

0 commit comments

Comments
 (0)