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 3.0.0 validation support #462

Merged
merged 147 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
6374709
chore: update with upstream master (#205)
jonaslagoni Apr 21, 2022
a60ea3e
Merge master into next-major-spec
asyncapi-bot Apr 26, 2022
295239e
Merge master into next-major-spec
asyncapi-bot Apr 27, 2022
c5e6d0d
Merge master into next-major-spec
asyncapi-bot Apr 27, 2022
4c1f870
Merge master into next-major-spec
asyncapi-bot May 10, 2022
077b0f8
Merge master into next-major-spec
asyncapi-bot-eve May 10, 2022
95b9304
Merge master into next-major-spec
asyncapi-bot-eve May 12, 2022
308898f
Merge master into next-major-spec
asyncapi-bot-eve May 16, 2022
2724d2b
Merge master into next-major-spec
asyncapi-bot-eve May 16, 2022
8db6a3f
Merge master into next-major-spec
asyncapi-bot-eve May 18, 2022
36ab33c
feat: add v3 schemas (#221)
jonaslagoni May 18, 2022
5d0d583
Merge master into next-major-spec
asyncapi-bot-eve May 18, 2022
7e23068
Merge master into next-major-spec
asyncapi-bot-eve May 24, 2022
7b926a5
Merge master into next-major-spec
asyncapi-bot-eve May 31, 2022
e25b7e5
Merge master into next-major-spec
asyncapi-bot-eve Jun 3, 2022
7d396cf
feat: add all protocol binding schemas (#225)
jonaslagoni Jun 9, 2022
baf6e13
Merge master into next-major-spec
asyncapi-bot-eve Jun 10, 2022
3e8798d
Merge master into next-major-spec
asyncapi-bot-eve Jun 15, 2022
2f85c2e
Merge master into next-major-spec
asyncapi-bot-eve Jun 22, 2022
a9eb9a9
Merge master into next-major-spec
asyncapi-bot-eve Jun 23, 2022
4e53622
feat: add specific binding schemas (#224)
jonaslagoni Jul 8, 2022
749e0fc
Merge master into next-major-spec
asyncapi-bot-eve Jul 13, 2022
fb39ed5
Merge master into next-major-spec
asyncapi-bot-eve Jul 13, 2022
869e8c6
Merge master into next-major-spec
asyncapi-bot-eve Jul 19, 2022
94ace22
Merge master into next-major-spec
asyncapi-bot-eve Jul 28, 2022
b14dd0e
Merge master into next-major-spec
asyncapi-bot-eve Jul 29, 2022
c19ed9c
Merge master into next-major-spec
asyncapi-bot-eve Sep 15, 2022
45a9177
Merge master into next-major-spec
asyncapi-bot-eve Sep 15, 2022
21229ef
Merge master into next-major-spec
asyncapi-bot-eve Sep 20, 2022
d8cee73
Merge master into next-major-spec
asyncapi-bot-eve Sep 20, 2022
2f1d5c3
chore(release): v3.2.0-next-major-spec.1 (#257)
asyncapi-bot Sep 20, 2022
a82c4f1
Merge master into next-major-spec
asyncapi-bot-eve Sep 22, 2022
35dd959
Merge master into next-major-spec
asyncapi-bot-eve Sep 28, 2022
69e1ce7
feat!: add new channels and operations objects (#264)
fmvilas Oct 27, 2022
09cf0c4
chore(release): v4.0.0-next-major-spec.1 (#283)
asyncapi-bot Oct 27, 2022
c3e7118
Merge branch 'master-github-upstream' into feature/update_next_major_…
jonaslagoni Nov 21, 2022
a10f733
Merge branch 'master-github-upstream' into feature/update_next_major_…
jonaslagoni Dec 9, 2022
dc2fd83
Update packagelock
jonaslagoni Dec 9, 2022
d4d5197
Merge pull request #289 from jonaslagoni/feature/update_next_major_sp…
fmvilas Dec 12, 2022
f5a2346
feat: add binding validation (#239)
jonaslagoni Feb 1, 2023
eeb6d5d
chore(release): v5.0.0-next-major-spec.1 (#309)
asyncapi-bot Feb 1, 2023
bc4e458
feat: add kafka 0.4 and mqtt5 changes (#310)
jonaslagoni Feb 2, 2023
6dfff33
chore(release): v5.0.0-next-major-spec.2 (#311)
asyncapi-bot Feb 2, 2023
2a8ea92
feat: move tags and externalDocs objects from root to the info object…
magicmatatjahu Feb 6, 2023
b87f2d3
chore(release): v5.0.0-next-major-spec.3 (#314)
asyncapi-bot Feb 6, 2023
0da5543
feat: add AsyncAPI 2.6
jonaslagoni Feb 7, 2023
29674f5
chore: update package-lock.json from master
jonaslagoni Feb 7, 2023
4104cab
feat: add title, summary and description fields to the core models (#…
magicmatatjahu Feb 7, 2023
934583e
chore(release): v5.0.0-next-major-spec.4 (#323)
asyncapi-bot Feb 7, 2023
8f7da01
feat: channel's servers field allows references (#318)
magicmatatjahu Feb 7, 2023
b3a5c8e
chore(release): v5.0.0-next-major-spec.5 (#324)
asyncapi-bot Feb 7, 2023
03e4545
feat: define new security mechanism (#316)
magicmatatjahu Feb 7, 2023
0bcbece
chore(release): v5.0.0-next-major-spec.6 (#325)
asyncapi-bot Feb 7, 2023
40257df
fix: allow references in parameters and server variables (#319)
magicmatatjahu Feb 7, 2023
a74c78f
chore(release): v5.0.0-next-major-spec.7 (#326)
asyncapi-bot Feb 7, 2023
290bbf5
feat: add reusable tags and externalDocs objects (#245)
magicmatatjahu Feb 7, 2023
dda2488
chore(release): v5.0.0-next-major-spec.8 (#327)
asyncapi-bot Feb 7, 2023
ca9e4f7
fix: remove action and channel from operation trait object (#317)
magicmatatjahu Feb 7, 2023
8b96702
chore(release): v5.0.0-next-major-spec.9 (#328)
asyncapi-bot Feb 7, 2023
b35715f
Merge branch 'next-major-spec' into feature/update_with_master
jonaslagoni Feb 8, 2023
3563e76
feat: merge master into next-major-spec (#321)
derberg Feb 8, 2023
a6c905a
feat: support multiple binding versions (#312)
jonaslagoni Feb 8, 2023
dc09eef
chore(release): v5.0.0-next-major-spec.10 (#331)
asyncapi-bot Feb 8, 2023
ce41256
feat: add host and pathname fields in server object (#329)
magicmatatjahu Feb 13, 2023
cfba936
chore(release): v5.0.0-next-major-spec.11 (#337)
asyncapi-bot Feb 13, 2023
6ebb449
Merge branch 'master-github-upstream' into feature/update_nest_major_…
jonaslagoni Feb 20, 2023
a2f0bb7
fix: message can have nested oneOf (#333)
jonaslagoni Feb 22, 2023
094175e
chore(release): v5.0.0-next-major-spec.12 (#344)
asyncapi-bot Feb 22, 2023
f79aac2
Merge branch 'next-major-spec' into feature/update_nest_major_with_ma…
derberg Feb 22, 2023
1a1eb05
Merge pull request #343 from jonaslagoni/feature/update_nest_major_wi…
derberg Feb 22, 2023
38fbec5
chore(release): v5.0.0-next-major-spec.13 (#346)
asyncapi-bot Feb 22, 2023
ca7b444
feat: add core message payload validation (#334)
jonaslagoni Mar 13, 2023
26acf98
test: increase timeout that periodically fails (#350)
jonaslagoni Mar 13, 2023
9b1b4c3
feat: re-trigger message payload validation (#351)
jonaslagoni Mar 13, 2023
8e127db
chore(release): v5.0.0-next-major-spec.14 (#353)
asyncapi-bot Mar 13, 2023
48e7b43
feat: add OpenAPI 3.0 schema validation (#348)
jonaslagoni Mar 14, 2023
cce9d44
chore(release): v5.0.0-next-major-spec.15 (#354)
asyncapi-bot Mar 14, 2023
dfd288f
fix: oneOf should not be allowed in message components (#345)
jonaslagoni Mar 14, 2023
1f090a6
chore(release): v5.0.0-next-major-spec.16 (#355)
asyncapi-bot Mar 14, 2023
488cf6b
feat: add AVRO schema validation (#347)
jonaslagoni Mar 15, 2023
3e6a320
chore(release): v5.0.0-next-major-spec.17 (#360)
asyncapi-bot Mar 15, 2023
892b23b
Merge branch 'master-github-upstream' into feature/update_with_master
jonaslagoni Mar 16, 2023
a3d843b
feat: update with master (#361)
smoya Mar 17, 2023
d3ea9c3
chore(release): v5.0.0-next-major-spec.18 (#366)
asyncapi-bot Mar 17, 2023
6ceb4e4
fix: consistency and nested traits (#342)
jonaslagoni Apr 11, 2023
2b3e23f
chore(release): v5.0.0-next-major-spec.19 (#372)
asyncapi-bot Apr 11, 2023
b48eb67
feat: add reply object and reply address object (#330)
magicmatatjahu May 4, 2023
7e989b3
chore(release): v5.0.0-next-major-spec.20 (#392)
asyncapi-bot May 4, 2023
6fdb647
fix: remove message oneOf (#402)
jonaslagoni Jun 26, 2023
edcf7da
fix: inconsistancy in components (#403)
jonaslagoni Jun 26, 2023
2e1bdb0
chore(release): v5.0.0-next-major-spec.21 (#404)
asyncapi-bot Jun 26, 2023
0aa87ed
Merge branch 'master' into next-major-spec
smoya Jun 30, 2023
7c68aed
fix bundler bug where definition names without .json where producing …
smoya Jun 30, 2023
a037119
add missing ajv dep
smoya Jun 30, 2023
b2b00e8
do not use slash in definitions or JSON pointers
smoya Jul 11, 2023
55dfa57
also replace / with - for
smoya Jul 11, 2023
e1c1bbc
chore: merge `master` into `next-major-spec` + fix bug in bundler (#406)
derberg Jul 11, 2023
257bf6b
chore(release): v6.0.0-next-major-spec.1 (#407)
asyncapi-bot Jul 11, 2023
6367e1d
feat!: allow multi format schemas (#370)
smoya Jul 13, 2023
6914a92
chore(release): v6.0.0-next-major-spec.2 (#409)
asyncapi-bot Jul 13, 2023
5176b29
chore: unescape characters in regex + TODO since it is not required (…
smoya Jul 17, 2023
18c49f7
fix: allow Reference objects in MultiFormat schema fields (#411)
smoya Jul 21, 2023
b728570
chore(release): v6.0.0-next-major-spec.3 (#412)
asyncapi-bot Jul 21, 2023
1aebba2
feat: add new simplified parameter (#415)
jonaslagoni Jul 25, 2023
9d49396
chore(release): v6.0.0-next-major-spec.4 (#416)
asyncapi-bot Jul 25, 2023
ba244f8
feat: add all recommended and must supported schema formats (#365)
jonaslagoni Jul 26, 2023
081a249
chore(release): v6.0.0-next-major-spec.5 (#418)
asyncapi-bot Jul 26, 2023
92e4aef
feat: add amqp, mqtt and http bindings for v3 (#417)
jonaslagoni Aug 2, 2023
3a5b6eb
chore(release): v6.0.0-next-major-spec.6 (#420)
asyncapi-bot Aug 2, 2023
bcab68c
feat: add googlepubsub bindings for v3 (#419)
whitlockjc Sep 12, 2023
94ac45d
chore(release): v6.0.0-next-major-spec.7 (#423)
asyncapi-bot Sep 12, 2023
61b4f04
fix: kafka key can be reference (#426)
jonaslagoni Oct 4, 2023
ccbb08f
chore(release): v6.0.0-next-major-spec.8 (#427)
asyncapi-bot Oct 4, 2023
e6e0841
fix: remove trailing comma from kafka and googlepubsub bindings for m…
AceTheCreator Oct 7, 2023
ae2b0d4
chore(release): v6.0.0-next-major-spec.9 (#430)
asyncapi-bot Oct 7, 2023
f80e22e
fix: examples of messages should not follow json schema (#434)
derberg Oct 11, 2023
9eb33e5
chore(release): v6.0.0-next-major-spec.10 (#435)
asyncapi-bot Oct 11, 2023
c097eb5
feat!: remove messageId from Message and MessageTrait objects (#439)
fmvilas Nov 6, 2023
9639ca9
chore(release): v6.0.0-next-major-spec.11 (#440)
asyncapi-bot Nov 6, 2023
29e96d7
fix: add operations to the components section (#445)
KhudaDad414 Nov 13, 2023
3df2a2e
chore(release): v6.0.0-next-major-spec.12 (#447)
asyncapi-bot Nov 13, 2023
728f63c
fix: enable `$ref` support for bindings (#442)
derberg Nov 13, 2023
6caf1dc
chore(release): v6.0.0-next-major-spec.13 (#448)
asyncapi-bot Nov 13, 2023
9348292
update codeowners
jonaslagoni Nov 17, 2023
9e59bb7
removed unused keep files
jonaslagoni Nov 17, 2023
bae60d4
adapt websocket binding
jonaslagoni Nov 17, 2023
c473137
add sqs bindings
jonaslagoni Nov 17, 2023
f1670aa
add sns bindings
jonaslagoni Nov 17, 2023
da04366
change ids of sns and sqs bindings
jonaslagoni Nov 17, 2023
4a31bca
add jms bindings
jonaslagoni Nov 17, 2023
e45fb8e
adapt http bindings
jonaslagoni Nov 17, 2023
64a69a6
adapt anypointmq bindings
jonaslagoni Nov 17, 2023
ec95794
adapt all patterns for specification extension
jonaslagoni Nov 17, 2023
5615dac
adapted all references to use v3
jonaslagoni Nov 17, 2023
17a6cdc
update links
jonaslagoni Nov 17, 2023
2373a45
misc changes
jonaslagoni Nov 17, 2023
75459f2
feat: add object descriptions and examples (#425)
AceTheCreator Nov 21, 2023
cf082dc
Merge branch 'next-major-spec' into update_with_latest_bindings
derberg Nov 21, 2023
6ecfd59
chore(release): v6.0.0-next-major-spec.14 (#451)
asyncapi-bot Nov 21, 2023
f849124
Merge branch 'next-major-spec' into update_with_latest_bindings
derberg Nov 21, 2023
71eb67c
feat: update with latest bindings changes (#450)
derberg Nov 21, 2023
531612a
Merge branch 'master' into next-major-spec
fmvilas Nov 28, 2023
81b53c4
feat: adapt Kafka bindings to v3 - take 2 (#453)
lbroudoux Nov 28, 2023
31f4f9c
chore(release): v6.0.0-next-major-spec.15 (#456)
asyncapi-bot Nov 28, 2023
24e105a
fix: prepare `next-major-spec` for release (#421)
jonaslagoni Nov 30, 2023
4826a84
chore(release): v6.0.0-next-major-spec.16 (#457)
asyncapi-bot Nov 30, 2023
f9fc80f
docs: update readme with new release strategy (#458)
derberg Nov 30, 2023
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
14 changes: 13 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,16 @@

# The default owners are automatically added as reviewers when you open a pull request unless different owners are specified in the file.

* @fmvilas @derberg @dalelane @smoya @char0n @asyncapi-bot-eve
* @fmvilas @derberg @dalelane @smoya @char0n @asyncapi-bot-eve

/bindings/anypointmq/ @mboss37 @GeraldLoeffler
/bindings/ibmmq/ @rcoppen
/bindings/jms/ @rcoppen @SrfHead
/bindings/kafka/ @lbroudoux @dalelane
/bindings/googlepubsub/ @whitlockjc
/bindings/solace/ @damaru-inc @CameronRushton
/bindings/pulsar/ @VisualBean
/bindings/sns/ @dpwdec @iancooper
/bindings/sqs/ @dpwdec @iancooper

/bindings/*.json @KhudaDad414
35 changes: 26 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,39 @@
![npm](https://img.shields.io/npm/v/@asyncapi/specs?style=for-the-badge) ![npm](https://img.shields.io/npm/dt/@asyncapi/specs?style=for-the-badge)

# AsyncAPI
## Overview

This is a mono repository, which provides all the JSON Schema documents for validating AsyncAPI documents.

## Overview
### Two types of schemas

This repository contains [JSON Schema](https://json-schema.org) files for all the versions of AsyncAPI specification. There are two types of JSON Schema files, with and without **$id** feature. We need two versions of schemas because of the differences it tooling implementation of JSON Schema `$ref` and `$id` keywords. Some implementations treat `$id` by default as prefix reference for `$ref` and require it, therefore it is needed to properly correlate `$ref` and `$id` values. Unfortunately other tools do not understand `$id` values and fail dereferencing. This is why we need two different versions of schemas, with and without the `$id`.

### Releases and pre-releases

This repository contains JSON Schema files for official AsyncAPI releases and also for release candidates. Before you decide to use a specific JSON Schema file in production, make sure a corresponding [official release of AsyncAPI specification](https://github.com/asyncapi/spec/releases) is produced, not a release candidate.

JSON Schema which describes a version of AsyncAPI specification that is not yet officially released is considered an unstable pre-release that can change anytime and is not considered to be a breaking-change.

If you want to make sure you only use stable schemas, you have to make sure that you use only certain schema versions, not all by default.

### JSON Schema vs AsyncAPI specification

These JSON Schema files do not reflect 1:1 the specification and shouldn't be treated as specification itself but rather as a tool (e.g., for validation).

These JSON Schema files shouldn't be used as the only tool for validating AsyncAPI documents because some rules described in the AsyncAPI specification can't be described with JSON Schema.

### Libraries

* This repository contains [JSON Schema](https://json-schema.org) files for all the versions of AsyncAPI specification. There are two types of JSON Schema files, with and without **$id** feature. We need two versions of schemas because of the differences it tooling implementation of JSON Schema `$ref` and `$id` keywords. Some implementations treat `$id` by default as prefix reference for `$ref` and require it, therefore it is needed to properly correlate `$ref` and `$id` values. Unfortunately other tools do not understand `$id` values and fail dereferencing. This is why we need two different versions of schemas, with and without the `$id`.
* These JSON Schema files do not reflect 1:1 the specification and shouldn't be treated as specification itself but rather as a tool (e.g., for validation).
* These JSON Schema files shouldn't be used as the only tool for validating AsyncAPI documents because some rules described in the AsyncAPI specification can't be described with JSON Schema.
* In addition, this repo provides JavaScript and Go modules that make it easier to access JSON Schema files through code. These packages provide access only to schemas with version larger or equal 2.0.0.
In addition, this repo provides JavaScript and Go modules that make it easier to access JSON Schema files through code. These packages provide access only to schemas with version larger or equal 2.0.0.

## Custom Validation Needs

If you decide to validate AsyncAPI documents only with the JSON Schema files provided in this repo, your AsyncAPI documents will not be properly validated.
It's recommended to use [AsyncAPI JavaScript Parser](https://github.com/asyncapi/parser-js) that uses the AsyncAPI JSON Schema files for validation but also implements additional custom validations.

The following additional custom validations need to be provided:
The following additional custom validations need to be provided for documents prior to `3.0.0`:

* Variables provided in the URL property have a corresponding variable object defined and its example is correct.
* Variables provided in the `url` property have a corresponding variable object defined and its example is correct.
* `operationId`s are not duplicated in the document.
* `messageId`s are not duplicated in the document.
* Server security is declared properly and the name has a corresponding `securitySchemes` definition in `components` with the same name.
Expand Down Expand Up @@ -108,6 +123,8 @@ func Do() {

If you are currently using version 2, check out [migration guideline to version 3](./migrations/migrate-to-version-3.md).
If you are currently using version 3, check out [migration guideline to version 4](./migrations/migrate-to-version-4.md).
If you are currently using version 4, check out [migration guideline to version 5](./migrations/migrate-to-version-5.md).
If you are currently using version 5, check out [migration guideline to version 6](./migrations/migrate-to-version-6.md).

## Repository structure

Expand Down Expand Up @@ -183,7 +200,7 @@ Whenever a Breaking Change is introduced, the following steps should be taken in

## SchemaStore compatibility testing

AsyncAPI JSON Schema is referenced in [SchemaStore](https://www.schemastore.org/json/). In many IDEs, like VSCode, some extensions integrate with SchemaStore, like [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml). This way we enable autocompletion, validation and tooltips that helps writing AsyncAPI documents.
AsyncAPI JSON Schema is referenced in [SchemaStore](https://www.schemastore.org/json/). In many IDEs, like VSCode, some extensions integrate with SchemaStore, like [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml). This way we enable autocompletion, validation and tooltips that help write AsyncAPI documents.

Whenever you make changes in AsyncAPI JSON Schema, you should always manually verify that the schema is still supported by [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) and that it will be able to fetch and dereference it.

Expand Down
136 changes: 136 additions & 0 deletions bindings/amqp/0.2.0/channel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/amqp/0.2.0/channel.json",
"title": "AMQP channel bindings object",
"description": "This object contains information about the channel representation in AMQP.",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"is": {
"type": "string",
"enum": ["queue", "routingKey"],
"description": "Defines what type of channel is it. Can be either 'queue' or 'routingKey' (default)."
},
"exchange": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 255,
"description": "The name of the exchange. It MUST NOT exceed 255 characters long."
},
"type": {
"type": "string",
"enum": ["topic", "direct", "fanout", "default", "headers"],
"description": "The type of the exchange. Can be either 'topic', 'direct', 'fanout', 'default' or 'headers'."
},
"durable": {
"type": "boolean",
"description": "Whether the exchange should survive broker restarts or not."
},
"autoDelete": {
"type": "boolean",
"description": "Whether the exchange should be deleted when the last queue is unbound from it."
},
"vhost": {
"type": "string",
"default": "/",
"description": "The virtual host of the exchange. Defaults to '/'."
}
},
"description": "When is=routingKey, this object defines the exchange properties."
},
"queue": {
"type": "object",
"properties": {
"name": {
"type": "string",
"maxLength": 255,
"description": "The name of the queue. It MUST NOT exceed 255 characters long."
},
"durable": {
"type": "boolean",
"description": "Whether the queue should survive broker restarts or not."
},
"exclusive": {
"type": "boolean",
"description": "Whether the queue should be used only by one connection or not."
},
"autoDelete": {
"type": "boolean",
"description": "Whether the queue should be deleted when the last consumer unsubscribes."
},
"vhost": {
"type": "string",
"default": "/",
"description": "The virtual host of the queue. Defaults to '/'."
}
},
"description": "When is=queue, this object defines the queue properties."
},
"bindingVersion": {
"type": "string",
"enum": [
"0.2.0"
],
"description": "The version of this binding. If omitted, 'latest' MUST be assumed."
}
},
"oneOf": [
{
"properties": {
"is": { "const": "routingKey" }
},
"required": [
"exchange"
],
"not": {
"required": [
"queue"
]
}
},
{
"properties": {
"is": { "const": "queue" }
},
"required": [
"queue"
],
"not": {
"required": [
"exchange"
]
}
}
],
"examples": [
{
"is": "routingKey",
"exchange": {
"name": "myExchange",
"type": "topic",
"durable": true,
"autoDelete": false,
"vhost": "/"
},
"bindingVersion": "0.2.0"
},
{
"is": "queue",
"queue": {
"name": "my-queue-name",
"durable": true,
"exclusive": true,
"autoDelete": false,
"vhost": "/"
},
"bindingVersion": "0.2.0"
}
]
}
37 changes: 37 additions & 0 deletions bindings/amqp/0.2.0/message.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/amqp/0.2.0/message.json",
"title": "AMQP message bindings object",
"description": "This object contains information about the message representation in AMQP.",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"contentEncoding": {
"type": "string",
"description": "A MIME encoding for the message content."
},
"messageType": {
"type": "string",
"description": "Application-specific message type."
},
"bindingVersion": {
"type": "string",
"enum": [
"0.2.0"
],
"description": "The version of this binding. If omitted, \"latest\" MUST be assumed."
}
},
"examples": [
{
"contentEncoding": "gzip",
"messageType": "user.signup",
"bindingVersion": "0.2.0"
}
]
}
89 changes: 89 additions & 0 deletions bindings/amqp/0.2.0/operation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/amqp/0.2.0/operation.json",
"title": "AMQP operation bindings object",
"description": "This object contains information about the operation representation in AMQP.",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"expiration": {
"type": "integer",
"minimum": 0,
"description": "TTL (Time-To-Live) for the message. It MUST be greater than or equal to zero."
},
"userId": {
"type": "string",
"description": "Identifies the user who has sent the message."
},
"cc": {
"type": "array",
"items": {
"type": "string"
},
"description": "The routing keys the message should be routed to at the time of publishing."
},
"priority": {
"type": "integer",
"description": "A priority for the message."
},
"deliveryMode": {
"type": "integer",
"enum": [1,2],
"description": "Delivery mode of the message. Its value MUST be either 1 (transient) or 2 (persistent)."
},
"mandatory": {
"type": "boolean",
"description": "Whether the message is mandatory or not."
},
"bcc": {
"type": "array",
"items": {
"type": "string"
},
"description": "Like cc but consumers will not receive this information."
},
"replyTo": {
"type": "string",
"description": "Name of the queue where the consumer should send the response."
},
"timestamp": {
"type": "boolean",
"description": "Whether the message should include a timestamp or not."
},
"ack": {
"type": "boolean",
"description": "Whether the consumer should ack the message or not."
},
"bindingVersion": {
"type": "string",
"enum": [
"0.2.0"
],
"description": "The version of this binding. If omitted, \"latest\" MUST be assumed."
}
},
"examples": [
{
"expiration": 100000,
"userId": "guest",
"cc": [
"user.logs"
],
"priority": 10,
"deliveryMode": 2,
"mandatory": false,
"bcc": [
"external.audit"
],
"replyTo": "user.signedup",
"timestamp": true,
"ack": false,
"bindingVersion": "0.2.0"
}
]
}
Loading
Loading