Skip to content

Commit

Permalink
Merge branch 'master' into lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Gmin2 authored Feb 1, 2024
2 parents 2a57d2b + 516cb82 commit dc6b823
Show file tree
Hide file tree
Showing 9 changed files with 472 additions and 11 deletions.
46 changes: 46 additions & 0 deletions bindings/http/0.3.0/message.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/http/0.3.0/message.json",
"title": "HTTP message bindings object",
"description": "This object contains information about the message representation in HTTP.",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"headers": {
"$ref": "http://asyncapi.com/definitions/3.0.0/schema.json",
"description": "\tA Schema object containing the definitions for HTTP-specific headers. This schema MUST be of type 'object' and have a 'properties' key."
},
"statusCode": {
"type": "number",
"description": "The HTTP response status code according to [RFC 9110](https://httpwg.org/specs/rfc9110.html#overview.of.status.codes). `statusCode` is only relevant for messages referenced by the [Operation Reply Object](https://www.asyncapi.com/docs/reference/specification/v3.0.0#operationReplyObject), as it defines the status code for the response. In all other cases, this value can be safely ignored."
},
"bindingVersion": {
"type": "string",
"enum": [
"0.3.0"
],
"description": "The version of this binding. If omitted, \"latest\" MUST be assumed."
}
},
"examples": [
{
"headers": {
"type": "object",
"properties": {
"Content-Type": {
"type": "string",
"enum": [
"application/json"
]
}
}
},
"bindingVersion": "0.3.0"
}
]
}
82 changes: 82 additions & 0 deletions bindings/http/0.3.0/operation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/http/0.3.0/operation.json",
"title": "HTTP operation bindings object",
"description": "This object contains information about the operation representation in HTTP.",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"method": {
"type": "string",
"enum": [
"GET",
"PUT",
"POST",
"PATCH",
"DELETE",
"HEAD",
"OPTIONS",
"CONNECT",
"TRACE"
],
"description": "When 'type' is 'request', this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'CONNECT', and 'TRACE'."
},
"query": {
"$ref": "http://asyncapi.com/definitions/3.0.0/schema.json",
"description": "A Schema object containing the definitions for each query parameter. This schema MUST be of type 'object' and have a properties key."
},
"bindingVersion": {
"type": "string",
"enum": [
"0.3.0"
],
"description": "The version of this binding. If omitted, 'latest' MUST be assumed."
}
},
"examples": [
{
"query": {
"type": "object",
"required": [
"companyId"
],
"properties": {
"companyId": {
"type": "number",
"minimum": 1,
"description": "The Id of the company."
}
},
"additionalProperties": false
},
"bindingVersion": "0.3.0"
},
{
"method": "GET",
"query": {
"type": "object",
"required": [
"companyId"
],
"properties": {
"companyId": {
"type": "number",
"minimum": 1,
"description": "The Id of the company."
}
},
"additionalProperties": false
},
"bindingVersion": "0.3.0"
}
]
}




15 changes: 14 additions & 1 deletion definitions/3.0.0/messageBindingsObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"http": {
"properties": {
"bindingVersion": {
"enum": ["0.2.0"]
"enum": ["0.2.0", "0.3.0"]
}
},
"allOf": [
Expand Down Expand Up @@ -40,6 +40,19 @@
"then": {
"$ref": "http://asyncapi.com/bindings/http/0.2.0/message.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.3.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/http/0.3.0/message.json"
}
}
]
},
Expand Down
15 changes: 14 additions & 1 deletion definitions/3.0.0/operationBindingsObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"http": {
"properties": {
"bindingVersion": {
"enum": ["0.2.0"]
"enum": ["0.2.0", "0.3.0"]
}
},
"allOf": [
Expand Down Expand Up @@ -40,6 +40,19 @@
"then": {
"$ref": "http://asyncapi.com/bindings/http/0.2.0/operation.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.3.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/http/0.3.0/operation.json"
}
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@asyncapi/specs",
"version": "6.2.0",
"version": "6.3.0",
"description": "AsyncAPI schema versions",
"main": "index.js",
"types": "index.d.ts",
Expand Down
Loading

0 comments on commit dc6b823

Please sign in to comment.