From 13da7cd220282bdba910b0a4a2b86bda76bf3523 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 11 Dec 2023 01:29:07 +0100 Subject: [PATCH 001/243] chore: update meetings.json and newsrooom_videos.json (#2420) --- config/newsroom_videos.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/newsroom_videos.json b/config/newsroom_videos.json index 352d13b5def..79fb4f9e5d9 100644 --- a/config/newsroom_videos.json +++ b/config/newsroom_videos.json @@ -1,10 +1,4 @@ [ - { - "image_url": "https://i.ytimg.com/vi/YREb9wuYCOA/hqdefault.jpg", - "title": "AsyncAPI v3 announcement", - "description": "Join us live to learn about all the goodies that AsyncAPI v3 brings.", - "videoId": "YREb9wuYCOA" - }, { "image_url": "https://i.ytimg.com/vi/g6CPg77Lf5Q/hqdefault.jpg", "title": "AsyncAPI Conf on Tour 2023 in Bangalore, India", @@ -28,5 +22,11 @@ "title": "Community Meeting(October 31th, 2023)", "description": "Powered by Restream https://restream.io https://github.com/asyncapi/community/issues/916.", "videoId": "Vm4ZKFb2PVE" + }, + { + "image_url": "https://i.ytimg.com/vi/FN5eR1Zqh9c/hqdefault.jpg", + "title": "AsyncAPI Conf on Tour 2023 in Madrid", + "description": "AACoT'23 Madrid Edition streamed live from StageOne at SNGULAR. 00:00 Waiting 57:12 Opening 1:26:07 Everything You Wish ...", + "videoId": "FN5eR1Zqh9c" } ] \ No newline at end of file From 54f16508e22573eec0630918490bf12b003091a9 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 11 Dec 2023 13:06:28 +0100 Subject: [PATCH 002/243] chore: update tools.json (#2421) Co-authored-by: asyncapi-bot-eve %0ACo-authored-by: asyncapi-bot --- config/tools-automated.json | 62 ++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/config/tools-automated.json b/config/tools-automated.json index e4d8bdb7790..305987a6fb2 100644 --- a/config/tools-automated.json +++ b/config/tools-automated.json @@ -420,41 +420,41 @@ "description": "The following is a list of tools that compare AsyncAPI documents.", "toolsList": [ { - "title": "AsyncAPI Diff", - "description": "Diff is a library that compares two AsyncAPI Documents and provides information about the differences by pointing out explicitly information like breaking changes.", + "title": "jasyncapicmp", + "description": "Tool for comparing two AsyncAPI versions and evaluating compatibility.", "links": { - "repoUrl": "https://github.com/asyncapi/diff" + "websiteUrl": "https://siom79.github.io/jasyncapicmp/", + "docsUrl": "https://github.com/siom79/jasyncapicmp", + "repoUrl": "https://github.com/siom79/jasyncapicmp" }, "filters": { - "language": "TypeScript", + "language": "Java", "technology": [ - "TypeScript" + "Maven" ], "categories": [ "compare-tool" ], "hasCommercial": false, - "isAsyncAPIOwner": true + "isAsyncAPIOwner": false } }, { - "title": "jasyncapicmp", - "description": "Tool for comparing two AsyncAPI versions and evaluating compatibility.", + "title": "AsyncAPI Diff", + "description": "Diff is a library that compares two AsyncAPI Documents and provides information about the differences by pointing out explicitly information like breaking changes.", "links": { - "websiteUrl": "https://siom79.github.io/jasyncapicmp/", - "docsUrl": "https://github.com/siom79/jasyncapicmp", - "repoUrl": "https://github.com/siom79/jasyncapicmp" + "repoUrl": "https://github.com/asyncapi/diff" }, "filters": { - "language": "Java", + "language": "TypeScript", "technology": [ - "Maven" + "TypeScript" ], "categories": [ "compare-tool" ], "hasCommercial": false, - "isAsyncAPIOwner": false + "isAsyncAPIOwner": true } } ] @@ -617,10 +617,10 @@ "description": "The following is a list of templates compatible with AsyncAPI Generator. You can use them to generate apps, clients or documentation from your AsyncAPI documents.", "toolsList": [ { - "title": "Node.js Multiprotocol Template", - "description": "This template generates a server using your AsyncAPI document. It supports multiple different protocols, like Kafka or MQTT. It is designed in the way that generated code is a library and with it's API you can start the server, send messages or register a middleware for listening incoming messages. Runtime message validation included.", + "title": "Node.js Websockets Template", + "description": "Node.js WebSockets template for the AsyncAPI Generator. It showcases how from a single AsyncAPI document you can generate a server and a client at the same time.", "links": { - "repoUrl": "https://github.com/asyncapi/nodejs-template" + "repoUrl": "https://github.com/asyncapi/nodejs-ws-template" }, "filters": { "language": "javascript", @@ -635,15 +635,19 @@ } }, { - "title": "Node.js Websockets Template", - "description": "Node.js WebSockets template for the AsyncAPI Generator. It showcases how from a single AsyncAPI document you can generate a server and a client at the same time.", + "title": "Java Spring Template", + "description": "Java Spring template for the AsyncAPI Generator", "links": { - "repoUrl": "https://github.com/asyncapi/nodejs-ws-template" + "repoUrl": "https://github.com/asyncapi/java-spring-template" }, "filters": { - "language": "javascript", + "language": [ + "javascript" + ], "technology": [ - "Node.js" + "Springboot", + "Maven", + "Gradle" ], "categories": [ "generator-template" @@ -671,19 +675,15 @@ } }, { - "title": "Java Spring Template", - "description": "Java Spring template for the AsyncAPI Generator", + "title": "Node.js Multiprotocol Template", + "description": "This template generates a server using your AsyncAPI document. It supports multiple different protocols, like Kafka or MQTT. It is designed in the way that generated code is a library and with it's API you can start the server, send messages or register a middleware for listening incoming messages. Runtime message validation included.", "links": { - "repoUrl": "https://github.com/asyncapi/java-spring-template" + "repoUrl": "https://github.com/asyncapi/nodejs-template" }, "filters": { - "language": [ - "javascript" - ], + "language": "javascript", "technology": [ - "Springboot", - "Maven", - "Gradle" + "Node.js" ], "categories": [ "generator-template" From 67afc7e0e336c6b831a1b09b0841e2f55dc9825d Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 12 Dec 2023 01:28:30 +0100 Subject: [PATCH 003/243] chore: update meetings.json and newsrooom_videos.json (#2422) --- config/meetings.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/meetings.json b/config/meetings.json index 5d96773153e..3dc8afca597 100644 --- a/config/meetings.json +++ b/config/meetings.json @@ -108,5 +108,12 @@ "url": "https://github.com/asyncapi/community/issues/985", "banner": "https://user-images.githubusercontent.com/40604284/288488243-e274e624-c5b3-4bff-b0ec-8c1929a24aae.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDE4ODI2MTUsIm5iZiI6MTcwMTg4MjMxNSwicGF0aCI6Ii80MDYwNDI4NC8yODg0ODgyNDMtZTI3NGU2MjQtYzViMy00YmZmLWIwZWMtOGMxOTI5YTI0YWFlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFJV05KWUFYNENTVkVINTNBJTJGMjAyMzEyMDYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjMxMjA2VDE3MDUxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUyMGYyNDE3Nzg4OGUyZGVmYjNlMDkxYzVkOWFkNjEwYjM4ZDI2YzZjZmUyYjRjMDliMDQ3YWJiNTVlNDI1MmQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.jYmY72ZRresQv1lMFeKwA49Wi6VkAozRpIHH4uE0J8g", "date": "2023-12-14T18:00:00.000Z" + }, + { + "title": "Quoi de neuf dans AsyncAPI v3 ? Découvrez le en live avec la migration du use-case Adeo", + "calLink": "https://www.google.com/calendar/event?eid=Nmk1dm8yZm10dWc0ZXI3MTNtczRhbWkzdTAgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn", + "url": "https://github.com/asyncapi/community/issues/988", + "banner": "https://user-images.githubusercontent.com/40604284/289498866-12bffa57-7db8-491f-917e-8e4f8f5b20a7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDIyODk0MDMsIm5iZiI6MTcwMjI4OTEwMywicGF0aCI6Ii80MDYwNDI4NC8yODk0OTg4NjYtMTJiZmZhNTctN2RiOC00OTFmLTkxN2UtOGU0ZjhmNWIyMGE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFJV05KWUFYNENTVkVINTNBJTJGMjAyMzEyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjMxMjExVDEwMDUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA4ZmVlODI0YzY4OTEwMTVkMWMxNzA3MzE5NGNkZDE4N2RmOTIzMWIwMTExNmQ2YzNiNjRhZGMwYWI5YmU2NjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.4vALVenjnYGjuQYn4FAT5X3yYBJHi8-bKVpGMriehJc", + "date": "2023-12-14T10:00:00.000Z" } ] \ No newline at end of file From 91fe2ae0215bb0cb797f070aee0b0d41d1fd218b Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 12 Dec 2023 14:01:53 +0100 Subject: [PATCH 004/243] docs(cli): update latest cli documentation (#2424) --- pages/docs/tools/cli/usage.md | 120 ++++++++++++++++++---------------- 1 file changed, 63 insertions(+), 57 deletions(-) diff --git a/pages/docs/tools/cli/usage.md b/pages/docs/tools/cli/usage.md index f3ec3010258..55a3e0c11d6 100644 --- a/pages/docs/tools/cli/usage.md +++ b/pages/docs/tools/cli/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/1.2.8 linux-x64 node-v18.18.2 +@asyncapi/cli/1.2.10 linux-x64 node-v18.19.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -93,7 +93,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/bundle.ts)_ ## `asyncapi config` @@ -107,7 +107,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -121,7 +121,7 @@ DESCRIPTION Manage short aliases for full paths to AsyncAPI documents ``` -_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/config/context/index.ts)_ +_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/index.ts)_ ## `asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH` @@ -143,7 +143,7 @@ DESCRIPTION Add a context to the store ``` -_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/config/context/add.ts)_ +_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/add.ts)_ ## `asyncapi config context current` @@ -160,7 +160,7 @@ DESCRIPTION Shows the current context that is being used ``` -_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/config/context/current.ts)_ +_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/current.ts)_ ## `asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH` @@ -181,7 +181,7 @@ DESCRIPTION Edit a context in the store ``` -_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/config/context/edit.ts)_ +_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/edit.ts)_ ## `asyncapi config context init [CONTEXT-FILE-PATH]` @@ -204,7 +204,7 @@ DESCRIPTION Initialize context ``` -_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/config/context/init.ts)_ +_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/init.ts)_ ## `asyncapi config context list` @@ -221,7 +221,7 @@ DESCRIPTION List all the stored contexts in the store ``` -_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/config/context/list.ts)_ +_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/list.ts)_ ## `asyncapi config context remove CONTEXT-NAME` @@ -241,7 +241,7 @@ DESCRIPTION Delete a context from the store ``` -_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/config/context/remove.ts)_ +_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/remove.ts)_ ## `asyncapi config context use CONTEXT-NAME` @@ -261,7 +261,7 @@ DESCRIPTION Set a context as current ``` -_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/config/context/use.ts)_ +_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/use.ts)_ ## `asyncapi config versions` @@ -278,7 +278,7 @@ DESCRIPTION Show versions of AsyncAPI tools used ``` -_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/config/versions.ts)_ +_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/versions.ts)_ ## `asyncapi convert [SPEC-FILE]` @@ -300,7 +300,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -355,7 +355,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/diff.ts)_ ## `asyncapi generate` @@ -369,7 +369,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -406,7 +406,7 @@ EXAMPLES $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write ``` -_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/generate/fromTemplate.ts)_ +_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/generate/fromTemplate.ts)_ ## `asyncapi generate models LANGUAGE FILE` @@ -480,7 +480,7 @@ DESCRIPTION Generates typed models ``` -_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/generate/models.ts)_ +_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/generate/models.ts)_ ## `asyncapi new` @@ -493,23 +493,26 @@ USAGE FLAGS -e, --example= name of the example to use. Available examples are: - - simple.yml - - anyof.yml - - application-headers.yml - - correlation-id.yml - - websocket-gemini.yml - - gitter-streaming.yml - - mercure.yml - - not.yml - - operation-security.yml - - oneof.yml - - rpc-client.yml - - rpc-server.yml - - slack-rtm.yml + - simple-asyncapi.yml + - adeo-kafka-request-reply-asyncapi.yml + - anyof-asyncapi.yml + - application-headers-asyncapi.yml + - correlation-id-asyncapi.yml + - websocket-gemini-asyncapi.yml + - gitter-streaming-asyncapi.yml + - kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml + - kraken-websocket-request-reply-multiple-channels-asyncapi.yml + - mercure-asyncapi.yml + - not-asyncapi.yml + - operation-security-asyncapi.yml + - oneof-asyncapi.yml + - rpc-client-asyncapi.yml + - rpc-server-asyncapi.yml + - slack-rtm-asyncapi.yml - tutorial.yml - - streetlights-kafka.yml - - streetlights-operation-security.yml - - streetlights-mqtt.yml + - streetlights-kafka-asyncapi.yml + - streetlights-operation-security-asyncapi.yml + - streetlights-mqtt-asyncapi.yml -h, --help Show CLI help. @@ -535,7 +538,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -548,23 +551,26 @@ USAGE FLAGS -e, --example= name of the example to use. Available examples are: - - simple.yml - - anyof.yml - - application-headers.yml - - correlation-id.yml - - websocket-gemini.yml - - gitter-streaming.yml - - mercure.yml - - not.yml - - operation-security.yml - - oneof.yml - - rpc-client.yml - - rpc-server.yml - - slack-rtm.yml + - simple-asyncapi.yml + - adeo-kafka-request-reply-asyncapi.yml + - anyof-asyncapi.yml + - application-headers-asyncapi.yml + - correlation-id-asyncapi.yml + - websocket-gemini-asyncapi.yml + - gitter-streaming-asyncapi.yml + - kraken-websocket-request-reply-message-filter-in-reply-asyncapi.yml + - kraken-websocket-request-reply-multiple-channels-asyncapi.yml + - mercure-asyncapi.yml + - not-asyncapi.yml + - operation-security-asyncapi.yml + - oneof-asyncapi.yml + - rpc-client-asyncapi.yml + - rpc-server-asyncapi.yml + - slack-rtm-asyncapi.yml - tutorial.yml - - streetlights-kafka.yml - - streetlights-operation-security.yml - - streetlights-mqtt.yml + - streetlights-kafka-asyncapi.yml + - streetlights-operation-security-asyncapi.yml + - streetlights-mqtt-asyncapi.yml -h, --help Show CLI help. @@ -590,7 +596,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/new/file.ts)_ +_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/new/file.ts)_ ## `asyncapi new glee` @@ -609,7 +615,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/new/glee.ts)_ +_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/new/glee.ts)_ ## `asyncapi new project` @@ -628,7 +634,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/new/project.ts)_ +_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/new/project.ts)_ ## `asyncapi optimize [SPEC-FILE]` @@ -664,7 +670,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/optimize.ts)_ ## `asyncapi start` @@ -678,7 +684,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -697,7 +703,7 @@ DESCRIPTION starts a new local instance of Studio ``` -_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/start/studio.ts)_ +_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/start/studio.ts)_ ## `asyncapi validate [SPEC-FILE]` @@ -724,5 +730,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.8/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/validate.ts)_ From 4599050d7b1181b42b85de3ed6035f9a3e4bf363 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 12 Dec 2023 14:43:00 +0100 Subject: [PATCH 005/243] docs(cli): update latest cli documentation (#2425) --- pages/docs/tools/cli/usage.md | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pages/docs/tools/cli/usage.md b/pages/docs/tools/cli/usage.md index 55a3e0c11d6..3166261260e 100644 --- a/pages/docs/tools/cli/usage.md +++ b/pages/docs/tools/cli/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/1.2.10 linux-x64 node-v18.19.0 +@asyncapi/cli/1.2.12 linux-x64 node-v18.19.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -93,7 +93,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/bundle.ts)_ ## `asyncapi config` @@ -107,7 +107,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -121,7 +121,7 @@ DESCRIPTION Manage short aliases for full paths to AsyncAPI documents ``` -_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/index.ts)_ +_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/index.ts)_ ## `asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH` @@ -143,7 +143,7 @@ DESCRIPTION Add a context to the store ``` -_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/add.ts)_ +_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/add.ts)_ ## `asyncapi config context current` @@ -160,7 +160,7 @@ DESCRIPTION Shows the current context that is being used ``` -_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/current.ts)_ +_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/current.ts)_ ## `asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH` @@ -181,7 +181,7 @@ DESCRIPTION Edit a context in the store ``` -_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/edit.ts)_ +_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/edit.ts)_ ## `asyncapi config context init [CONTEXT-FILE-PATH]` @@ -204,7 +204,7 @@ DESCRIPTION Initialize context ``` -_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/init.ts)_ +_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/init.ts)_ ## `asyncapi config context list` @@ -221,7 +221,7 @@ DESCRIPTION List all the stored contexts in the store ``` -_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/list.ts)_ +_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/list.ts)_ ## `asyncapi config context remove CONTEXT-NAME` @@ -241,7 +241,7 @@ DESCRIPTION Delete a context from the store ``` -_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/remove.ts)_ +_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/remove.ts)_ ## `asyncapi config context use CONTEXT-NAME` @@ -261,7 +261,7 @@ DESCRIPTION Set a context as current ``` -_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/context/use.ts)_ +_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/use.ts)_ ## `asyncapi config versions` @@ -278,7 +278,7 @@ DESCRIPTION Show versions of AsyncAPI tools used ``` -_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/config/versions.ts)_ +_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/versions.ts)_ ## `asyncapi convert [SPEC-FILE]` @@ -300,7 +300,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -355,7 +355,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/diff.ts)_ ## `asyncapi generate` @@ -369,7 +369,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -406,7 +406,7 @@ EXAMPLES $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write ``` -_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/generate/fromTemplate.ts)_ +_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/generate/fromTemplate.ts)_ ## `asyncapi generate models LANGUAGE FILE` @@ -480,7 +480,7 @@ DESCRIPTION Generates typed models ``` -_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/generate/models.ts)_ +_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/generate/models.ts)_ ## `asyncapi new` @@ -538,7 +538,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -596,7 +596,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/new/file.ts)_ +_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/new/file.ts)_ ## `asyncapi new glee` @@ -615,7 +615,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/new/glee.ts)_ +_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/new/glee.ts)_ ## `asyncapi new project` @@ -634,7 +634,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/new/project.ts)_ +_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/new/project.ts)_ ## `asyncapi optimize [SPEC-FILE]` @@ -670,7 +670,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/optimize.ts)_ ## `asyncapi start` @@ -684,7 +684,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -703,7 +703,7 @@ DESCRIPTION starts a new local instance of Studio ``` -_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/start/studio.ts)_ +_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/start/studio.ts)_ ## `asyncapi validate [SPEC-FILE]` @@ -730,5 +730,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.10/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/validate.ts)_ From 945d6c62240b4a7bcc32590ab8dce639d600d524 Mon Sep 17 00:00:00 2001 From: hridyesh bisht <41201308+kakabisht@users.noreply.github.com> Date: Tue, 12 Dec 2023 22:26:10 +0530 Subject: [PATCH 006/243] docs: add Variables in URL (#2415) Co-authored-by: Alejandra Quetzalli %0ACo-authored-by: Alejandra Quetzalli %0ACo-authored-by: Lukasz Gornicki --- .../asyncapi-document/variable-url.md | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 pages/docs/concepts/asyncapi-document/variable-url.md diff --git a/pages/docs/concepts/asyncapi-document/variable-url.md b/pages/docs/concepts/asyncapi-document/variable-url.md new file mode 100644 index 00000000000..8c7c9341527 --- /dev/null +++ b/pages/docs/concepts/asyncapi-document/variable-url.md @@ -0,0 +1,136 @@ +--- +title: Server variables +weight: 275 +--- + +The server's URL consists of the `host` and `pathname` fields. These values are not always known when you design your system. AsyncAPI enables you to construct dynamic URLs while enhancing the flexibility and maintainability of your AsyncAPI documents. These dynamic values (variables) are placeholders for values you can replace during runtime. You can easily manage multiple endpoints, handling various server configurations and environments. + +## Add variables + +You can add variables to `server.host` and `server.pathname` by adding a variable between curly braces like `{braces}`. Next, you use `server.variables` to provide definitions of your variables. Finally, leverage `components.serverVariables` to enable reusable variable definitions across multiple servers. + +The diagram below describes how to use reusable variables in AsyncAPI. + +```mermaid +graph LR + C[servers] + F[host] + I[protocol] + E[pathname] + A[components] + B[serverVariables] + D[variables] + C --> F + C --> I + C --> E + C --> D + D --> |$ref| B + A --> B + + style C fill:#47BCEE,stroke:#000; + style D fill:#47BCEE,stroke:#000; + style F fill:#47BCEE,stroke:#000; + style E fill:#47BCEE,stroke:#000 +``` + +First, configure the variables in `host` and/or `pathname`. Next, define reusable variables in `components.serverVariables`. Finally, ensure that your `server.variables` from the server reference definitions in the `components.serverVariables` uses `$ref`. + +### Servers section + +Define the servers section in your AsyncAPI document, including the `host` and `pathname` for your API servers. Use placeholders enclosed in curly braces {} to represent the variables in the server. For example: + +```yaml +servers: + production: + host: '{subdomain}.example.com:{port}' + pathname: '/{version} + variables: + subdomain: + enum: + - development + - staging + - production + port: + default: '8080' + version: + enum: + - v1 + - v2 +``` + +### `serverVariables` section + +Define the `components.serverVariables` section in your AsyncAPI document. For each variable used in the server `host` or `pathname`, provide a default value and an optional description to avoid repeating the variable definitions. For example: + +```yaml +components: + serverVariables: + subdomain: + enum: + - development + - staging + - production + default: development + port: + default: '8080' + version: + enum: + - v1 + - v2 +``` + +### Define domain and port variables + +Use `components.serverVariables` in your server using the [Reference Object](/docs/reference/specification/v3.0.0#referenceObject) to avoid repeating information: + +```yml + variables: + subdomain: + $ref: '#/components/serverVariables/subdomain' +``` + +Here's the complete AsyncAPI document with the servers' variables for the `host` field: + +```yaml +asyncapi: 3.0.0 +info: + title: Example API + version: '1.0.0' +servers: + production: + host: '{subdomain}.example.com:{port}' + pathname: '/{version}' + protocol: amqp + variables: + subdomain: + $ref: '#/components/serverVariables/subdomain' + port: + $ref: '#/components/serverVariables/port' + version: + $ref: '#/components/serverVariables/version' + development: + host: '{subdomain}.dev.example.com:{port}' + pathname: /v1 + protocol: amqp + variables: + subdomain: + $ref: '#/components/serverVariables/subdomain' + port: + $ref: '#/components/serverVariables/port' + version: + $ref: '#/components/serverVariables/version' +components: + serverVariables: + subdomain: + enum: + - development + - staging + - production + default: development + port: + default: '8080' + version: + enum: + - v1 + - v2 +``` From 96af1dce724aca3d5c9398c138c330ad55b3d2b1 Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Tue, 12 Dec 2023 19:23:04 +0100 Subject: [PATCH 007/243] fix: revert add accordion to FAQ section (#2429) This reverts commit d023aeb3d60a2014e6cdd8d90eb8b8263d305cb5. --- components/MDX.js | 6 ----- pages/about/index.md | 52 +++++++------------------------------------- 2 files changed, 8 insertions(+), 50 deletions(-) diff --git a/components/MDX.js b/components/MDX.js index 8b0be84e989..9f6182efb4c 100644 --- a/components/MDX.js +++ b/components/MDX.js @@ -62,12 +62,6 @@ export function getMDXComponents() { td: props => , pre: props => CodeComponent(props.children.props), code: props => , - details: (props) => -
, - summary: (props) => - , - p: (props) => -

, hr: props =>


, CodeBlock, ChapterSuggestions, diff --git a/pages/about/index.md b/pages/about/index.md index 585dfa7b70a..4714e54ac94 100644 --- a/pages/about/index.md +++ b/pages/about/index.md @@ -100,47 +100,11 @@ All the information about the project's economy, the amount of the donations, th ## FAQs -
-What is the goal of the project? - -

To make asynchronous APIs as successful and mature as REST APIs.

- -
- -
-What protocols does it support? - -

AsyncAPI is protocol-agnostic, so you can use it for APIs that work over any protocol (e.g., AMQP, MQTT, WebSockets, Kafka, STOMP, HTTP, Mercure, etc). For more information, refer to the [AsyncAPI specification documentation](https://www.asyncapi.com/docs/reference/specification/latest#serverBindingsObject). -

- -
- -
-Who are the users of AsyncAPI? - -

AsyncAPI users are those who implement and maintain event-driven architecture. For example, people that write backend API using WebSocket, or people that maintain communication between their microservices using Kafka.

- -
- -
-What is the AsyncAPI Community? - -

It’s the core of the initiative. The AsyncAPI community contributes to the development of the tool, it promotes access and distribution of the specification allowing freedom of use, study, copying, modification, and redistribution to anyone who wishes to do so. The cooperation between these people in all areas of software production generates a substantial improvement in the quality of the software, as well as greater dissemination and sustainability over time, and prioritizing the benefit of society over any other.

- -
- -
-Who can use it? - -

Anyone. All projects under AsyncAPI Initiative are part of the Linux Foundation, licensed under the Apache 2.0 license. It’s open to use and contribution.

- -
- -
-Where can I find more information? - - [Official AsyncAPI Documentation](/docs) - - [Presentation by Fran Méndez, explaining the project](https://www.youtube.com/watch?v=UID1nnuFDtM&list=PLbi1gRlP7piitNgvqhIAvGNZM_kvP0r8R) - -
+- **What is the goal of the project?** To make asynchronous APIs as successful and mature as REST APIs. +- **What protocols does it support?** AsyncAPI is protocol-agnostic, so you can use it for APIs that work over any protocol (e.g., AMQP, MQTT, WebSockets, Kafka, STOMP, HTTP, Mercure, etc). For more information, refer to the [AsyncAPI specification documentation](https://www.asyncapi.com/docs/reference/specification/latest#serverBindingsObject). +- **Who are the users of AsyncAPI?** AsyncAPI users are those who implement and maintain event-driven architecture. For example, people that write backend API using WebSocket, or people that maintain communication between their microservices using Kafka. +- **What is the AsyncAPI Community?** It’s the core of the initiative. The AsyncAPI community contributes to the development of the tool, it promotes access and distribution of the specification allowing freedom of use, study, copying, modification, and redistribution to anyone who wishes to do so. The cooperation between these people in all areas of software production generates a substantial improvement in the quality of the software, as well as greater dissemination and sustainability over time, and prioritizing the benefit of society over any other. +- **Who can use it?** Anyone. All projects under AsyncAPI Initiative are part of the Linux Foundation, licensed under the Apache 2.0 license. It’s open to use and contribution. +- **Where can I find more information?** + - [Official AsyncAPI Documentation](/docs) + - [Presentation by Fran Méndez, explaining the project](https://www.youtube.com/watch?v=UID1nnuFDtM&list=PLbi1gRlP7piitNgvqhIAvGNZM_kvP0r8R) From 531a99f8fc5d67c9e64e364552ee77bf6af4b81f Mon Sep 17 00:00:00 2001 From: Alejandra Quetzalli Date: Tue, 12 Dec 2023 11:09:58 -0800 Subject: [PATCH 008/243] docs: introduce AsyncAPI document (#1868) Co-authored-by: Sergio Moya <1083296+smoya@users.noreply.github.com> --- .../docs/concepts/asyncapi-document/index.md | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pages/docs/concepts/asyncapi-document/index.md diff --git a/pages/docs/concepts/asyncapi-document/index.md b/pages/docs/concepts/asyncapi-document/index.md new file mode 100644 index 00000000000..032e8a0a9e2 --- /dev/null +++ b/pages/docs/concepts/asyncapi-document/index.md @@ -0,0 +1,43 @@ +--- +title: 'Introduction' +weight: 50 +--- + +The AsyncAPI Specification defines a set of fields that can be used in an AsyncAPI document to describe an application's API. The document may reference other files for additional details or shared fields, but it is typically a single, primary document that encapsulates the API description. + +Furthermore, the AsyncAPI document acts as a communication contract between `receivers` and `senders` within an event-driven system. It specifies the payload content required when a service sends a message and offers clear guidance to the receiver regarding the message's properties. + +```YAML +asyncapi: 3.0.0 +info: + title: Cool Example + version: 0.1.0 +channels: + userSignedUp: + address: user/signedup + messages: + userSignedUp: + description: An event describing that a user just signed up. + payload: + type: object + properties: + fullName: + type: string + email: + type: string + format: email + age: + type: integer + minimum: 18 +operations: + userSignedUp: + action: send + channel: + $ref: '#/channels/userSignedUp' +``` + + +You might have additional fields depending on the implemented protocol (i.e., MQTT, AMQP, Kafka, etc.). + +For example, your AsyncAPI document could have additional fields for configuring Kafka bindings. + From ca15e1ba6092780e3c2dcc5196802e70d13139fd Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Wed, 13 Dec 2023 02:45:41 +0600 Subject: [PATCH 009/243] docs: add document for adding channel (#2408) Co-authored-by: Alejandra Quetzalli %0ACo-authored-by: Lukasz Gornicki --- .../asyncapi-document/adding-channels.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 pages/docs/concepts/asyncapi-document/adding-channels.md diff --git a/pages/docs/concepts/asyncapi-document/adding-channels.md b/pages/docs/concepts/asyncapi-document/adding-channels.md new file mode 100644 index 00000000000..4a515702687 --- /dev/null +++ b/pages/docs/concepts/asyncapi-document/adding-channels.md @@ -0,0 +1,59 @@ +--- +title: Adding channels +weight: 65 +--- + +Incorporating [channels](/docs/concepts/channel) in the AsyncAPI document facilitates message organization and categorization, streamlining message routing to suitable consumers. It also enables the decoupling of producers and consumers, which contributes to the API's scalability and extensibility. Moreover, it offers comprehensive documentation and transparent communication about the API's communication patterns. Additionally, alternative names for channels can be user-defined to suit specific contexts and preferences. + +Here is an example of how to define channels: + +```yml +userSignedUp: + address: 'user.signedup' + messages: + userSignedUp: + $ref: '#/components/messages/userSignedUp' +``` + +The previous AsyncAPI document sets up an interface for a `userSignedUp` channel, where the `address` field holds the actual address of the channel (`user.signedup`). + +### Channel availability on specific servers + +When you add a channel to the AsyncAPI document, by default it is expected to be available on any server described in the document. In other words, if you have two servers, `production-kafka-secure` and `development-kafka`, the channel described in the AsyncAPI document must be present on both servers. + +It's possible to encounter a scenario where an AsyncAPI document describes an application communicating in a production environment through multiple servers, each utilizing distinct protocols. For example, the application might receive messages from a channel on an MQTT server while concurrently sending messages to a different channel on a Kafka server. In such cases, it's imperative to distinctly specify the exclusive availability of one channel on the MQTT server and another channel solely on the Kafka server. + +```mermaid +graph LR + D[MQTT Server] --> |receive| E[Application] + E -->|send| G[Kafka Server] +``` + +Here is an example of how you might specify that a channel is available only on specific servers: + +```yml +channels: + lightTurnOn: + address: light.on + messages: + lightOn: + description: An event describing that lights are on + servers: + - $ref: '#/servers/serverA' + lightTurnOnOff: + address: light/onoff + messages: + lightOnOff: + description: An event describing that light is either on or off + servers: + - $ref: '#/servers/serverB' +servers: + serverA: + host: serverA.example.com + protocol: kafka + serverB: + host: serverB.example.com + protocol: mqtt +``` + +The above example shows two different channels available only on selected servers. Notice the `servers` field under each channel. It means that the `lightTurnOn` channel is only available on `serverA` which uses Kafka protocol, and the `lightTurnOnOff` channel is available only on `serverB` which uses MQTT protocol. From 5f20e40a1cef3c9dfcdb1d9c1f2f25d180a602bd Mon Sep 17 00:00:00 2001 From: Alejandra Quetzalli Date: Tue, 12 Dec 2023 13:08:53 -0800 Subject: [PATCH 010/243] docs: fix title in adding-bindings.md (#2430) --- pages/docs/concepts/asyncapi-document/adding-bindings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/docs/concepts/asyncapi-document/adding-bindings.md b/pages/docs/concepts/asyncapi-document/adding-bindings.md index 6d6cf0c0f5c..ef5d75de346 100644 --- a/pages/docs/concepts/asyncapi-document/adding-bindings.md +++ b/pages/docs/concepts/asyncapi-document/adding-bindings.md @@ -1,5 +1,5 @@ --- -title: Adding Bindings +title: Adding bindings weight: 260 --- From 70692fe01af7e7fbf1a72da9aabb94574b075102 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 13 Dec 2023 01:29:05 +0100 Subject: [PATCH 011/243] chore: update meetings.json and newsrooom_videos.json (#2431) --- config/newsroom_videos.json | 12 +- dashboard.json | 401 ++++++++++++------------------------ 2 files changed, 136 insertions(+), 277 deletions(-) diff --git a/config/newsroom_videos.json b/config/newsroom_videos.json index 79fb4f9e5d9..002c160d262 100644 --- a/config/newsroom_videos.json +++ b/config/newsroom_videos.json @@ -1,4 +1,10 @@ [ + { + "image_url": "https://i.ytimg.com/vi/yOc_fI-i9C8/hqdefault.jpg", + "title": "Community Meeting(12th December)", + "description": "https://github.com/asyncapi/community/issues/979.", + "videoId": "yOc_fI-i9C8" + }, { "image_url": "https://i.ytimg.com/vi/g6CPg77Lf5Q/hqdefault.jpg", "title": "AsyncAPI Conf on Tour 2023 in Bangalore, India", @@ -22,11 +28,5 @@ "title": "Community Meeting(October 31th, 2023)", "description": "Powered by Restream https://restream.io https://github.com/asyncapi/community/issues/916.", "videoId": "Vm4ZKFb2PVE" - }, - { - "image_url": "https://i.ytimg.com/vi/FN5eR1Zqh9c/hqdefault.jpg", - "title": "AsyncAPI Conf on Tour 2023 in Madrid", - "description": "AACoT'23 Madrid Edition streamed live from StageOne at SNGULAR. 00:00 Waiting 57:12 Opening 1:26:07 Everything You Wish ...", - "videoId": "FN5eR1Zqh9c" } ] \ No newline at end of file diff --git a/dashboard.json b/dashboard.json index bc7e99f50fe..52fbef2a83a 100644 --- a/dashboard.json +++ b/dashboard.json @@ -1,21 +1,5 @@ { "hotDiscussions": [ - { - "id": "MDU6SXNzdWU5ODkyOTg0MzY=", - "isPR": false, - "isAssigned": true, - "title": "Proposal to solve publish/subscribe confusion", - "author": "fmvilas", - "resourcePath": "/asyncapi/spec/issues/618", - "repo": "asyncapi/spec", - "labels": [ - { - "name": "💭 Strawman (RFC 0)", - "color": "C2E0C6" - } - ], - "score": 54.2759972736099 - }, { "id": "PR_kwDOBW5R_c5Xb72L", "isPR": true, @@ -25,23 +9,7 @@ "resourcePath": "/asyncapi/website/pull/2038", "repo": "asyncapi/website", "labels": [], - "score": 41.35314077989326 - }, - { - "id": "I_kwDOFLhIt84-OUI3", - "isPR": false, - "isAssigned": false, - "title": "Create educational & technical video explaining AsyncAPI's main features", - "author": "alequetzalli", - "resourcePath": "/asyncapi/community/issues/155", - "repo": "asyncapi/community", - "labels": [ - { - "name": "enhancement", - "color": "a2eeef" - } - ], - "score": 33.31225229491402 + "score": 43.363362901138075 }, { "id": "PR_kwDOB5hCo85gDiV-", @@ -52,75 +20,23 @@ "resourcePath": "/asyncapi/spec-json-schemas/pull/452", "repo": "asyncapi/spec-json-schemas", "labels": [], - "score": 25.55853839868403 - }, - { - "id": "MDU6SXNzdWU5OTMxODc5ODM=", - "isPR": false, - "isAssigned": false, - "title": "Proposal to allow defining schema format other than default one (AsyncAPI Schema)", - "author": "magicmatatjahu", - "resourcePath": "/asyncapi/spec/issues/622", - "repo": "asyncapi/spec", - "labels": [ - { - "name": "stale", - "color": "819cd3" - }, - { - "name": "💭 Strawman (RFC 0)", - "color": "C2E0C6" - } - ], - "score": 23.26114168868996 - }, - { - "id": "I_kwDOBGu-184_rP6l", - "isPR": false, - "isAssigned": false, - "title": "Let channels be identified by an ID rather than their address.", - "author": "smoya", - "resourcePath": "/asyncapi/spec/issues/663", - "repo": "asyncapi/spec", - "labels": [ - { - "name": "💭 Strawman (RFC 0)", - "color": "C2E0C6" - } - ], - "score": 21.825268744943667 + "score": 33.886601472412536 }, { - "id": "I_kwDOGJ23c85V9C3c", + "id": "I_kwDOFLhIt84-OUI3", "isPR": false, "isAssigned": false, - "title": "Support `referenceIntoComponents` for other components than `message`", - "author": "thake", - "resourcePath": "/asyncapi/bundler/issues/97", - "repo": "asyncapi/bundler", + "title": "Create educational & technical video explaining AsyncAPI's main features", + "author": "alequetzalli", + "resourcePath": "/asyncapi/community/issues/155", + "repo": "asyncapi/community", "labels": [ { "name": "enhancement", "color": "a2eeef" } ], - "score": 20.102221212448114 - }, - { - "id": "MDU6SXNzdWUzNjkwNDExMDc=", - "isPR": false, - "isAssigned": false, - "title": "Support request/reply pattern", - "author": "adrianhopebailie", - "resourcePath": "/asyncapi/spec/issues/94", - "repo": "asyncapi/spec", - "labels": [ - { - "name": "keep-open", - "color": "fce250" - } - ], - "score": 20.070109582694446 + "score": 33.31225229491402 }, { "id": "I_kwDOBW5R_c5BIl5P", @@ -139,32 +55,15 @@ "score": 19.527872034949596 }, { - "id": "I_kwDOE8Qh385nTCST", + "id": "I_kwDOCVQpZM5M_dcV", "isPR": false, - "isAssigned": false, - "title": "Improve layout of playground", - "author": "jonaslagoni", - "resourcePath": "/asyncapi/modelina/issues/1346", - "repo": "asyncapi/modelina", - "labels": [ - { - "name": "enhancement", - "color": "a2eeef" - }, - { - "name": "good first issue", - "color": "7057ff" - }, - { - "name": "area/design", - "color": "0d67d3" - }, - { - "name": "website", - "color": "57A793" - } - ], - "score": 18.37917367995256 + "isAssigned": true, + "title": "DocsUI: Messages Object output", + "author": "mcturco", + "resourcePath": "/asyncapi/asyncapi-react/issues/618", + "repo": "asyncapi/asyncapi-react", + "labels": [], + "score": 16.65612614745701 }, { "id": "PR_kwDOFLhIt85bqKL8", @@ -177,6 +76,28 @@ "labels": [], "score": 16.65612614745701 }, + { + "id": "PR_kwDOFDnrNc5RUbi_", + "isPR": true, + "isAssigned": false, + "title": "fix: help command", + "author": "sambhavgupta0705", + "resourcePath": "/asyncapi/cli/pull/593", + "repo": "asyncapi/cli", + "labels": [], + "score": 15.507427792459973 + }, + { + "id": "PR_kwDOBW5R_c5QjwOq", + "isPR": true, + "isAssigned": false, + "title": "feat: add table of contents in case study", + "author": "Shurtu-gal", + "resourcePath": "/asyncapi/website/pull/1673", + "repo": "asyncapi/website", + "labels": [], + "score": 15.507427792459973 + }, { "id": "MDU6SXNzdWUxMjMwODQwMDM4", "isPR": false, @@ -187,9 +108,101 @@ "repo": "asyncapi/asyncapi-react", "labels": [], "score": 14.933078614961456 + }, + { + "id": "PR_kwDOBW5R_c5RI5z2", + "isPR": true, + "isAssigned": false, + "title": "feat: add testimonial carousel", + "author": "Lucif3r-in", + "resourcePath": "/asyncapi/website/pull/1704", + "repo": "asyncapi/website", + "labels": [], + "score": 14.07155484871368 + }, + { + "id": "PR_kwDODou01c5Iv4zR", + "isPR": true, + "isAssigned": false, + "title": "docs: added table of contents and introduction document for Studio tool", + "author": "Jagrutiti", + "resourcePath": "/asyncapi/studio/pull/553", + "repo": "asyncapi/studio", + "labels": [], + "score": 14.07155484871368 + }, + { + "id": "PR_kwDOBW5R_c5dJ7hJ", + "isPR": true, + "isAssigned": false, + "title": "docs: Tutorial for WebSockets with AsyncAPI", + "author": "VaishnaviNandakumar", + "resourcePath": "/asyncapi/website/pull/2245", + "repo": "asyncapi/website", + "labels": [], + "score": 13.497205671215161 } ], "goodFirstIssues": [ + { + "id": "I_kwDOB5hCo855VB2E", + "title": "Add code linting (eslint) as part of CI script", + "isAssigned": false, + "resourcePath": "/asyncapi/spec-json-schemas/issues/467", + "repo": "asyncapi/spec-json-schemas", + "author": "smoya", + "area": "ci-cd", + "labels": [ + { + "name": "enhancement", + "color": "a2eeef" + } + ] + }, + { + "id": "I_kwDODyzcIc54mr9C", + "title": "Fix wrong format for Co-authored automerged commits + pagination", + "isAssigned": false, + "resourcePath": "/asyncapi/.github/issues/263", + "repo": "asyncapi/.github", + "author": "smoya", + "area": "ci-cd", + "labels": [ + { + "name": "bug", + "color": "d73a4a" + } + ] + }, + { + "id": "I_kwDOFXtyC854XYL2", + "title": "Add migration guides ", + "isAssigned": false, + "resourcePath": "/asyncapi/parser-api/issues/106", + "repo": "asyncapi/parser-api", + "author": "jonaslagoni", + "area": "Unknown", + "labels": [ + { + "name": "enhancement", + "color": "a2eeef" + }, + { + "name": "📑 docs", + "color": "E50E99" + } + ] + }, + { + "id": "I_kwDODou01c531nlO", + "title": "Misalignment of Code Editor Highlight Box", + "isAssigned": false, + "resourcePath": "/asyncapi/studio/issues/861", + "repo": "asyncapi/studio", + "author": "princerajpoot20", + "area": "typescript", + "labels": [] + }, { "id": "I_kwDOBGu-1853mU6h", "title": "Fix description of Operation Trait object", @@ -250,21 +263,6 @@ } ] }, - { - "id": "I_kwDOFDnrNc5yy6e0", - "title": "The new glee command is generating a 2.1.0 document", - "isAssigned": false, - "resourcePath": "/asyncapi/cli/issues/829", - "repo": "asyncapi/cli", - "author": "fmvilas", - "area": "Unknown", - "labels": [ - { - "name": "bug", - "color": "d73a4a" - } - ] - }, { "id": "I_kwDOFLhIt85yyn4B", "title": "Update tooling doc with info about new category", @@ -344,25 +342,6 @@ } ] }, - { - "id": "I_kwDOBW5R_c5yduk_", - "title": "Single backtick is recognised as Codeblock", - "isAssigned": false, - "resourcePath": "/asyncapi/website/issues/2188", - "repo": "asyncapi/website", - "author": "akshatnema", - "area": "Unknown", - "labels": [ - { - "name": "bug", - "color": "ee0701" - }, - { - "name": "Hacktoberfest", - "color": "FF8AE2" - } - ] - }, { "id": "I_kwDODwv8N85yTwat", "title": "venues addresses to be clickable links that take you you google map location", @@ -397,21 +376,6 @@ } ] }, - { - "id": "I_kwDOBW5R_c5sqLtN", - "title": "[📑 Docs]: import Glee docs under tools folder", - "isAssigned": false, - "resourcePath": "/asyncapi/website/issues/2003", - "repo": "asyncapi/website", - "author": "AnimeshKumar923", - "area": "docs", - "labels": [ - { - "name": "📑 docs", - "color": "E50E99" - } - ] - }, { "id": "I_kwDOBW5R_c5soAAM", "title": "Create a research page to have participants sign up for the research study", @@ -552,69 +516,6 @@ } ] }, - { - "id": "I_kwDOBW5R_c5qCdE5", - "title": "[📑 Docs]: Adapt Streetlights - Interactive tutorial for v3", - "isAssigned": true, - "resourcePath": "/asyncapi/website/issues/1863", - "repo": "asyncapi/website", - "author": "jonaslagoni", - "area": "docs", - "labels": [ - { - "name": "stale", - "color": "ededed" - }, - { - "name": "📑 docs", - "color": "E50E99" - } - ] - }, - { - "id": "I_kwDOBW5R_c5qCLdo", - "title": "[📑 Docs]: Adapt coming from OpenAPI tutorial for v3", - "isAssigned": true, - "resourcePath": "/asyncapi/website/issues/1856", - "repo": "asyncapi/website", - "author": "jonaslagoni", - "area": "docs", - "labels": [ - { - "name": "📑 docs", - "color": "E50E99" - } - ] - }, - { - "id": "I_kwDOFLhIt85o9dDJ", - "title": "Add 2023 mentorship directory", - "isAssigned": false, - "resourcePath": "/asyncapi/community/issues/753", - "repo": "asyncapi/community", - "author": "AceTheCreator", - "area": "Unknown", - "labels": [] - }, - { - "id": "I_kwDOE8Qh385nTCST", - "title": "Improve layout of playground", - "isAssigned": false, - "resourcePath": "/asyncapi/modelina/issues/1346", - "repo": "asyncapi/modelina", - "author": "jonaslagoni", - "area": "design", - "labels": [ - { - "name": "enhancement", - "color": "a2eeef" - }, - { - "name": "website", - "color": "57A793" - } - ] - }, { "id": "I_kwDOBW5R_c5mwLzC", "title": "[📑 Docs]: Create an Onboarding guide for technical writers", @@ -717,21 +618,6 @@ } ] }, - { - "id": "I_kwDODCuNRs5e58gr", - "title": "MQTT `retain` flag should be applied only to `publish` operations", - "isAssigned": false, - "resourcePath": "/asyncapi/bindings/issues/187", - "repo": "asyncapi/bindings", - "author": "KhudaDad414", - "area": "docs", - "labels": [ - { - "name": "enhancement", - "color": "a2eeef" - } - ] - }, { "id": "I_kwDOBW5R_c5eFaBF", "title": "Add proper dropdowns to the Filters Select Menu", @@ -914,29 +800,6 @@ } ] }, - { - "id": "MDU6SXNzdWUxMDA4MjQ5Nzg4", - "title": "Set the left menu collapsable", - "isAssigned": false, - "resourcePath": "/asyncapi/asyncapi-react/issues/441", - "repo": "asyncapi/asyncapi-react", - "author": "M3lkior", - "area": "library", - "labels": [ - { - "name": "enhancement", - "color": "a2eeef" - }, - { - "name": "stale", - "color": "ededed" - }, - { - "name": "Hacktoberfest", - "color": "FF8AE2" - } - ] - }, { "id": "MDU6SXNzdWU4MDU4MDM5Njg=", "title": "Enhance API docs with information about results of code generation with generateFromString using entrypoint", @@ -949,10 +812,6 @@ { "name": "enhancement", "color": "a2eeef" - }, - { - "name": "stale", - "color": "ededed" } ] } From 2c1394d60926c6ebad078c65c621143113cedb27 Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Wed, 13 Dec 2023 09:22:56 +0600 Subject: [PATCH 012/243] docs: adding document for dynamic channel (#2409) Co-authored-by: Alejandra Quetzalli %0ACo-authored-by: Lukasz Gornicki --- .../dynamic-channel-address.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 pages/docs/concepts/asyncapi-document/dynamic-channel-address.md diff --git a/pages/docs/concepts/asyncapi-document/dynamic-channel-address.md b/pages/docs/concepts/asyncapi-document/dynamic-channel-address.md new file mode 100644 index 00000000000..38bec737e1a --- /dev/null +++ b/pages/docs/concepts/asyncapi-document/dynamic-channel-address.md @@ -0,0 +1,86 @@ +--- +title: Parameters in channel address +weight: 80 +--- + +In the context of channel addresses within AsyncAPI documents, parameters play a crucial role in defining the dynamic components of an address. That aspect is particularly beneficial in setups like IoT, where topics are often assigned per device or device segment. In this scenario, your AsyncAPI document would describe a system composed of multiple channels. While these channels share the same definition, messages, and purpose, they differ in their channel addresses, which vary according to each device's identifier. To efficiently manage this setup, you provide a singular channel definition. The dynamic segment of each channel address, which corresponds to the device identifier, is then articulated through the use of parameters. + +## Add parameters + +You can add parameters to the `channel.address` by adding a parameter between curly braces like `{braces}`. Next, use `channel.parameters` to define your parameters. Finally, leverage the `components.parameters` to enable reusable parameters' definitions across multiple channels. + +The diagram below describes how to use reusable parameters in AsyncAPI. + +```mermaid +graph LR + C[channels] + F[address] + I[messages] + A[components] + B[parameters] + D[parameters] + C --> F + C --> I + C --> D + D --> |$ref| B + A --> B + + style C fill:#47BCEE,stroke:#000; + style D fill:#47BCEE,stroke:#000; + style F fill:#47BCEE,stroke:#000; +``` + +First, configure the variables in `address`. Next, define reusable variables in `components.parameters`. Finally, ensure that your `channel.parameters` references definitions in the `components.parameters` using `$ref`. + +### Channels section + +Here is an example of a parametrized channel address: + +```yml + lightingMeasured: + address: 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured' + description: The topic on which measured values may be produced and consumed. + parameters: + streetlightId: + description: The ID of the streetlight. +``` + +In the above example, you can see a definition of a `lightingMeasured` channel that contains a `streetlight` parameter. During runtime, there can be two or more channels serving the same purpose, but with different devices. For example, you could have channels for `smartylighting/streetlights/1/0/event/2/lighting/measured` and `smartylighting/streetlights/1/0/event/1/lighting/measured`. + +### `parameters` section + +In your AsyncAPI document, it's important to carefully define the `components.parameters` section. For each parameter utilized in the channel `address`, provide a comprehensive description along with other pertinent details. Avoid repeating the parameter definitions. For example: + +```yaml +components: + parameters: + streetlightId: + description: The ID of the streetlight. +``` + +You can reuse parameters using the [Reference Object](/docs/reference/specification/v3.0.0#referenceObject) like in the following example: + +```yml + parameters: + streetlightId: + $ref: '#/components/parameters/streetlightId' +``` + +Here's the complete AsyncAPI document with the channels' parameters for the `address` field: +```yaml +asyncapi: 3.0.0 +info: + title: Example API + version: '1.0.0' +channels: + lightingMeasured: + address: 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured' + description: The topic on which measured values may be produced and consumed. + parameters: + streetlightId: + $ref: '#/components/parameters/streetlightId' +components: + parameters: + streetlightId: + description: The ID of the streetlight. +``` From 3770618567de4b3e0f0216d7ab5c36dede010d0b Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 13 Dec 2023 13:15:43 +0100 Subject: [PATCH 013/243] docs(spec): v3.0.1 release (#2433) --- pages/docs/reference/specification/v3.0.1.md | 2623 ++++++++++++++++++ public/_redirects | 3 +- 2 files changed, 2625 insertions(+), 1 deletion(-) create mode 100644 pages/docs/reference/specification/v3.0.1.md diff --git a/pages/docs/reference/specification/v3.0.1.md b/pages/docs/reference/specification/v3.0.1.md new file mode 100644 index 00000000000..231a2732b33 --- /dev/null +++ b/pages/docs/reference/specification/v3.0.1.md @@ -0,0 +1,2623 @@ +# AsyncAPI Specification + +#### Attribution + +Part of this content has been taken from the great work done by the folks at the [OpenAPI Initiative](https://openapis.org). + +#### Version 3.0.0 + +The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt). + +The AsyncAPI Specification is licensed under [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html). + +## Introduction + +The AsyncAPI Specification is a project used to describe message-driven APIs in a machine-readable format. It’s protocol-agnostic, so you can use it for APIs that work over any protocol (e.g., AMQP, MQTT, WebSockets, Kafka, STOMP, HTTP, Mercure, etc). + +The AsyncAPI Specification defines a set of files required to describe the API of an [application](#definitionsApplication). +These files can be used to create utilities, such as documentation, code, integration, or testing tools. + +The file(s) SHOULD describe the operations an [application](#definitionsApplication) performs. For instance, consider the following AsyncAPI definition snippet: + +```yaml +channels: + userSignedUp: + # ...(redacted for brevity) +operations: + onUserSignedUp: + action: receive + channel: + $ref: "#/channels/userSignedUp" +``` + +It means that the [application](#definitionsApplication) will receive messages from the `userSignedUp` [channel](#definitionsChannel). + +**The AsyncAPI specification does not assume any kind of software topology, architecture or pattern.** Therefore, a server MAY be a message broker, a web server or any other kind of computer program capable of sending and/or receiving data. However, AsyncAPI offers a mechanism called "bindings" that aims to help with more specific information about the protocol. + +It's NOT RECOMMENDED to derive a [receiver](#definitionsReceiver) AsyncAPI document from a [sender](#definitionsSender) one or vice versa. There are no guarantees that the channel used by an application to receive messages will be the same channel where another application is sending them. Also, certain fields in the document like `summary`, `description`, and the id of the operation might stop making sense. For instance, given the following receiver snippet: + +```yaml +operations: + onUserSignedUp: + summary: On user signed up. + description: Event received when a user signed up on the product. + action: receive + channel: + $ref: "#/channels/userSignedUp" +``` + +We can't automatically assume that an _opposite_ application exists by simply replacing `receive` with `send`: + +```yaml +operations: + onUserSignedUp: # <-- This doesn't make sense now. Should be something like sendUserSignedUp. + summary: On user signed up. # <-- This doesn't make sense now. Should say something like "Sends a user signed up event". + description: Event received when a user signed up on the product. # <-- This doesn't make sense now. Should speak about sending an event, not receiving it. + action: send + channel: + $ref: "#/channels/userSignedUp" +``` + +Aside from the issues mentioned above, there may also be infrastructure configuration that is not represented here. For instance, a system may use a read-only channel for receiving messages, a different one for sending them, and an intermediary process that will forward messages from one channel to the other. + + +## Definitions + +### Server +A server MAY be a message broker that is capable of sending and/or receiving between a [sender](#definitionsSender) and [receiver](#definitionsReceiver). A server MAY be a service with WebSocket API that enables message-driven communication between browser-to-server or server-to-server. + +### Application +An application is any kind of computer program or a group of them. It MUST be a [sender](#definitionsSender), a [receiver](#definitionsReceiver), or both. An application MAY be a microservice, IoT device (sensor), mainframe process, message broker, etc. An application MAY be written in any number of different programming languages as long as they support the selected [protocol](#definitionsProtocol). An application MUST also use a protocol supported by the [server](#definitionsServer) in order to connect and exchange [messages](#definitionsMessage). + +### Sender +A sender is a type of application, that is sending [messages](#definitionsMessage) to [channels](#definitionsChannel). A sender MAY send to multiple channels depending on the [server](#definitionsServer), protocol, and use-case pattern. + +### Receiver +A receiver is a type of application that is receiving [messages](#definitionsMessage) from [channels](#definitionsChannel). A receiver MAY receive from multiple channels depending on the [server](#definitionsServer), protocol, and the use-case pattern. A receiver MAY forward a received message further without changing it. A receiver MAY act as a consumer and react to the message. A receiver MAY act as a processor that, for example, aggregates multiple messages in one and forwards them. + +### Message +A message is the mechanism by which information is exchanged via a channel between [servers](#definitionsServer) and applications. A message MAY contain a payload and MAY also contain headers. The headers MAY be subdivided into [protocol](#definitionsProtocol)-defined headers and header properties defined by the application which can act as supporting metadata. The payload contains the data, defined by the application, which MUST be serialized into a format (JSON, XML, Avro, binary, etc.). Since a message is a generic mechanism, it can support multiple interaction patterns such as event, command, request, or response. + +### Channel +A channel is an addressable component, made available by the [server](#definitionsServer), for the organization of [messages](#definitionsMessage). [Sender](#definitionsSender) applications send messages to channels and [receiver](#definitionsReceiver) applications receive messages from channels. [Servers](#definitionsServer) MAY support many channel instances, allowing messages with different content to be addressed to different channels. Depending on the [server](#definitionsServer) implementation, the channel MAY be included in the message via protocol-defined headers. + +### Protocol +A protocol is the mechanism (wireline protocol or API) by which [messages](#definitionsMessage) are exchanged between the application and the [channel](#definitionsChannel). Example protocols include, but are not limited to, AMQP, HTTP, JMS, Kafka, Anypoint MQ, MQTT, Solace, STOMP, Mercure, WebSocket, Google Pub/Sub, Pulsar. + +### Bindings +A "binding" (or "protocol binding") is a mechanism to define protocol-specific information. Therefore, a protocol binding MUST define protocol-specific information only. + +## Specification + +### Format + +The files describing the message-driven API in accordance with the AsyncAPI Specification are represented as JSON objects and conform to the JSON standards. +YAML, being a superset of JSON, can be used as well to represent a A2S (AsyncAPI Specification) file. + +For example, if a field is said to have an array value, the JSON array representation will be used: + +```yaml +{ + "field" : [...] +} +``` + +While the API is described using JSON it does not impose a JSON input/output to the API itself. + +All field names in the specification are **case sensitive**. + +The schema exposes two types of fields. +Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name. +Patterned fields can have multiple occurrences as long as each has a unique name. + +In order to preserve the ability to round-trip between YAML and JSON formats, YAML version [1.2](https://www.yaml.org/spec/1.2/spec.html) is recommended along with some additional constraints: + +- Tags MUST be limited to those allowed by the [JSON Schema ruleset](https://www.yaml.org/spec/1.2/spec.html#id2803231) +- Keys used in YAML maps MUST be limited to a scalar string, as defined by the YAML Failsafe schema ruleset + +### File Structure + +An AsyncAPI document MAY be made up of a single document or be divided into multiple, +connected parts at the discretion of the author. In the latter case, [Reference Objects](#referenceObject) are used. + +It is important to note that everything that is defined in an AsyncAPI document MUST be used by the implemented [Application](#definitionsApplication), with the exception of the [Components Object](#componentsObject). Everything that is defined inside the Components Object represents a resource that MAY or MAY NOT be used by the implemented [Application](#definitionsApplication). + +By convention, the AsyncAPI Specification (A2S) file is named `asyncapi.json` or `asyncapi.yaml`. + +### Absolute URLs + +Unless specified otherwise, all properties that are absolute URLs are defined by [RFC3986, section 4.3](https://datatracker.ietf.org/doc/html/rfc3986#section-4.3). + +### Schema + +#### AsyncAPI Object + +This is the root document object for the API specification. +It combines resource listing and API declaration together into one document. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +asyncapi | [AsyncAPI Version String](#A2SVersionString) | **REQUIRED.** Specifies the AsyncAPI Specification version being used. It can be used by tooling Specifications and clients to interpret the version. The structure shall be `major`.`minor`.`patch`, where `patch` versions _must_ be compatible with the existing `major`.`minor` tooling. Typically patch versions will be introduced to address errors in the documentation, and tooling should typically be compatible with the corresponding `major`.`minor` (1.0.*). Patch versions will correspond to patches of this document. +id | [Identifier](#A2SIdString) | Identifier of the [application](#definitionsApplication) the AsyncAPI document is defining. +info | [Info Object](#infoObject) | **REQUIRED.** Provides metadata about the API. The metadata can be used by the clients if needed. +servers | [Servers Object](#serversObject) | Provides connection details of servers. +defaultContentType | [Default Content Type](#defaultContentTypeString) | Default content type to use when encoding/decoding a message's payload. +channels | [Channels Object](#channelsObject) | The channels used by this [application](#definitionsApplication). +operations | [Operations Object](#operationsObject) | The operations this [application](#definitionsApplication) MUST implement. +components | [Components Object](#componentsObject) | An element to hold various reusable objects for the specification. Everything that is defined inside this object represents a resource that MAY or MAY NOT be used in the rest of the document and MAY or MAY NOT be used by the implemented [Application](#definitionsApplication). + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +#### AsyncAPI Version String + +The version string signifies the version of the AsyncAPI Specification that the document complies to. +The format for this string _must_ be `major`.`minor`.`patch`. The `patch` _may_ be suffixed by a hyphen and extra alphanumeric characters. + +A `major`.`minor` shall be used to designate the AsyncAPI Specification version, and will be considered compatible with the AsyncAPI Specification specified by that `major`.`minor` version. +The patch version will not be considered by tooling, making no distinction between `1.0.0` and `1.0.1`. + +In subsequent versions of the AsyncAPI Specification, care will be given such that increments of the `minor` version should not interfere with operations of tooling developed to a lower minor version. Thus a hypothetical `1.1.0` specification should be usable with tooling designed for `1.0.0`. + +#### Identifier + +This field represents a unique universal identifier of the [application](#definitionsApplication) the AsyncAPI document is defining. It must conform to the URI format, according to [RFC3986](https://tools.ietf.org/html/rfc3986). + +It is RECOMMENDED to use a [URN](https://tools.ietf.org/html/rfc8141) to globally and uniquely identify the application during long periods of time, even after it becomes unavailable or ceases to exist. + +###### Examples + +```json +{ + "id": "urn:example:com:smartylighting:streetlights:server" +} +``` + +```yaml +id: 'urn:example:com:smartylighting:streetlights:server' +``` + +```json +{ + "id": "https://github.com/smartylighting/streetlights-server" +} +``` + +```yaml +id: 'https://github.com/smartylighting/streetlights-server' +``` + +#### Info Object + +The object provides metadata about the API. +The metadata can be used by the clients if needed. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +title | `string` | **REQUIRED.** The title of the application. +version | `string` | **REQUIRED** Provides the version of the application API (not to be confused with the specification version). +description | `string` | A short description of the application. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. +termsOfService | `string` | A URL to the Terms of Service for the API. This MUST be in the form of an absolute URL. +contact | [Contact Object](#contactObject) | The contact information for the exposed API. +license | [License Object](#licenseObject) | The license information for the exposed API. +tags | [Tags Object](#tagsObject) | A list of tags for application API documentation control. Tags can be used for logical grouping of applications. +externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation of the exposed API. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Info Object Example: + +```json +{ + "title": "AsyncAPI Sample App", + "version": "1.0.1", + "description": "This is a sample app.", + "termsOfService": "https://asyncapi.org/terms/", + "contact": { + "name": "API Support", + "url": "https://www.asyncapi.org/support", + "email": "support@asyncapi.org" + }, + "license": { + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" + }, + "externalDocs": { + "description": "Find more info here", + "url": "https://www.asyncapi.org" + }, + "tags": [ + { + "name": "e-commerce" + } + ] +} +``` + +```yaml +title: AsyncAPI Sample App +version: 1.0.1 +description: This is a sample app. +termsOfService: https://asyncapi.org/terms/ +contact: + name: API Support + url: https://www.asyncapi.org/support + email: support@asyncapi.org +license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0.html +externalDocs: + description: Find more info here + url: https://www.asyncapi.org +tags: + - name: e-commerce +``` + +#### Contact Object + +Contact information for the exposed API. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +name | `string` | The identifying name of the contact person/organization. +url | `string` | The URL pointing to the contact information. This MUST be in the form of an absolute URL. +email | `string` | The email address of the contact person/organization. MUST be in the format of an email address. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Contact Object Example: + +```json +{ + "name": "API Support", + "url": "https://www.example.com/support", + "email": "support@example.com" +} +``` + +```yaml +name: API Support +url: https://www.example.com/support +email: support@example.com +``` + +#### License Object + +License information for the exposed API. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +name | `string` | **REQUIRED.** The license name used for the API. +url | `string` | A URL to the license used for the API. This MUST be in the form of an absolute URL. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### License Object Example: + +```json +{ + "name": "Apache 2.0", + "url": "https://www.apache.org/licenses/LICENSE-2.0.html" +} +``` + +```yaml +name: Apache 2.0 +url: https://www.apache.org/licenses/LICENSE-2.0.html +``` + +#### Servers Object + +The Servers Object is a map of [Server Objects](#serverObject). + +##### Patterned Fields + +Field Pattern | Type | Description +---|:---:|--- +`^[A-Za-z0-9_\-]+$` | [Server Object](#serverObject) \| [Reference Object](#referenceObject) | The definition of a server this application MAY connect to. + +##### Servers Object Example + +```json +{ + "development": { + "host": "localhost:5672", + "description": "Development AMQP broker.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:development", + "description": "This environment is meant for developers to run their own tests." + } + ] + }, + "staging": { + "host": "rabbitmq-staging.in.mycompany.com:5672", + "description": "RabbitMQ broker for the staging environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:staging", + "description": "This environment is a replica of the production environment." + } + ] + }, + "production": { + "host": "rabbitmq.in.mycompany.com:5672", + "description": "RabbitMQ broker for the production environment.", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "tags": [ + { + "name": "env:production", + "description": "This environment is the live environment available for final users." + } + ] + } +} +``` + +```yaml +development: + host: localhost:5672 + description: Development AMQP broker. + protocol: amqp + protocolVersion: 0-9-1 + tags: + - name: "env:development" + description: "This environment is meant for developers to run their own tests." +staging: + host: rabbitmq-staging.in.mycompany.com:5672 + description: RabbitMQ broker for the staging environment. + protocol: amqp + protocolVersion: 0-9-1 + tags: + - name: "env:staging" + description: "This environment is a replica of the production environment." +production: + host: rabbitmq.in.mycompany.com:5672 + description: RabbitMQ broker for the production environment. + protocol: amqp + protocolVersion: 0-9-1 + tags: + - name: "env:production" + description: "This environment is the live environment available for final users." +``` + + +#### Server Object + +An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data. This object is used to capture details such as URIs, protocols and security configuration. Variable substitution can be used so that some details, for example usernames and passwords, can be injected by code generation tools. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +host | `string` | **REQUIRED**. The server host name. It MAY include the port. This field supports [Server Variables](#serverObjectVariables). Variable substitutions will be made when a variable is named in `{`braces`}`. +protocol | `string` | **REQUIRED**. The protocol this server supports for connection. +protocolVersion | `string` | The version of the protocol used for connection. For instance: AMQP `0.9.1`, HTTP `2.0`, Kafka `1.0.0`, etc. +pathname | `string` | The path to a resource in the host. This field supports [Server Variables](#serverObjectVariables). Variable substitutions will be made when a variable is named in `{`braces`}`. +description | `string` | An optional string describing the server. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. +title | `string` | A human-friendly title for the server. +summary | `string` | A short summary of the server. +variables | Map[`string`, [Server Variable Object](#serverVariableObject) \| [Reference Object](#referenceObject)]] | A map between a variable name and its value. The value is used for substitution in the server's `host` and `pathname` template. +security | [[Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)] | A declaration of which security schemes can be used with this server. The list of values includes alternative [security scheme objects](#securitySchemeObject) that can be used. Only one of the security scheme objects need to be satisfied to authorize a connection or operation. +tags | [Tags Object](#tagsObject) | A list of tags for logical grouping and categorization of servers. +externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this server. +bindings | [Server Bindings Object](#serverBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the server. + +##### Server Object Example + +A single server would be described as: + +```json +{ + "host": "kafka.in.mycompany.com:9092", + "description": "Production Kafka broker.", + "protocol": "kafka", + "protocolVersion": "3.2" +} +``` + +```yaml +host: kafka.in.mycompany.com:9092 +description: Production Kafka broker. +protocol: kafka +protocolVersion: '3.2' +``` + +An example of a server that has a `pathname`: + +```json +{ + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/production", + "protocol": "amqp", + "description": "Production RabbitMQ broker (uses the `production` vhost)." +} +``` + +```yaml +host: rabbitmq.in.mycompany.com:5672 +pathname: /production +protocol: amqp +description: Production RabbitMQ broker (uses the `production` vhost). +``` + +#### Server Variable Object + +An object representing a Server Variable for server URL template substitution. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +enum | [`string`] | An enumeration of string values to be used if the substitution options are from a limited set. +default | `string` | The default value to use for substitution, and to send, if an alternate value is _not_ supplied. +description | `string` | An optional description for the server variable. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. +examples | [`string`] | An array of examples of the server variable. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Server Variable Object Example + +```json +{ + "host": "rabbitmq.in.mycompany.com:5672", + "pathname": "/{env}", + "protocol": "amqp", + "description": "RabbitMQ broker. Use the `env` variable to point to either `production` or `staging`.", + "variables": { + "env": { + "description": "Environment to connect to. It can be either `production` or `staging`.", + "enum": [ + "production", + "staging" + ] + } + } +} +``` + +```yaml +host: 'rabbitmq.in.mycompany.com:5672' +pathname: '/{env}' +protocol: amqp +description: RabbitMQ broker. Use the `env` variable to point to either `production` or `staging`. +variables: + env: + description: Environment to connect to. It can be either `production` or `staging`. + enum: + - production + - staging +``` + + +#### Default Content Type + +A string representing the default content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). This value MUST be used by schema parsers when the [contentType](#messageObjectContentType) property is omitted. + +In case a message can't be encoded/decoded using this value, schema parsers MUST use their default content type. + +##### Default Content Type Example + +```json +{ + "defaultContentType": "application/json" +} +``` + +```yaml +defaultContentType: application/json +``` + + + + + + +#### Channels Object + +An object containing all the [Channel Object](#channelObject) definitions the [Application](#definitionsApplication) MUST use during runtime. + +##### Patterned Fields + +Field Pattern | Type | Description +---|:---:|--- +{channelId} | [Channel Object](#channelObject) \| [Reference Object](#referenceObject) | An identifier for the described channel. The `channelId` value is **case-sensitive**. Tools and libraries MAY use the `channelId` to uniquely identify a channel, therefore, it is RECOMMENDED to follow common programming naming conventions. + +##### Channels Object Example + +```json +{ + "userSignedUp": { + "address": "user.signedup", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + } + } + } +} +``` + +```yaml +userSignedUp: + address: 'user.signedup' + messages: + userSignedUp: + $ref: '#/components/messages/userSignedUp' +``` + + + + +#### Channel Object + +Describes a shared communication channel. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +address | `string` \| `null` | An optional string representation of this channel's address. The address is typically the "topic name", "routing key", "event type", or "path". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain [Channel Address Expressions](#channelAddressExpressions). Query parameters and fragments SHALL NOT be used, instead use [bindings](#channelBindingsObject) to define them. +messages | [Messages Object](#messagesObject) | A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the [message objects](#messageObject) defined in this map.** +title | `string` | A human-friendly title for the channel. +summary | `string` | A short summary of the channel. +description | `string` | An optional description of this channel. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. +servers | [[Reference Object](#referenceObject)] | An array of `$ref` pointers to the definition of the servers in which this channel is available. If the channel is located in the [root Channels Object](#channelsObject), it MUST point to a subset of server definitions located in the [root Servers Object](#serversObject), and MUST NOT point to a subset of server definitions located in the [Components Object](#componentsObject) or anywhere else. If the channel is located in the [Components Object](#componentsObject), it MAY point to a [Server Objects](#serverObject) in any location. If `servers` is absent or empty, this channel MUST be available on all the servers defined in the [Servers Object](#serversObject). Please note the `servers` property value MUST be an array of [Reference Objects](#referenceObject) and, therefore, MUST NOT contain an array of [Server Objects](#serverObject). However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience. +parameters | [Parameters Object](#parametersObject) | A map of the parameters included in the channel address. It MUST be present only when the address contains [Channel Address Expressions](#channelAddressExpressions). +tags | [Tags Object](#tagsObject) | A list of tags for logical grouping of channels. +externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this channel. +bindings | [Channel Bindings Object](#channelBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the channel. + + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Channel Object Example + +```json +{ + "address": "users.{userId}", + "title": "Users channel", + "description": "This channel is used to exchange messages about user events.", + "messages": { + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + }, + "userCompletedOrder": { + "$ref": "#/components/messages/userCompletedOrder" + } + }, + "parameters": { + "userId": { + "$ref": "#/components/parameters/userId" + } + }, + "servers": [ + { "$ref": "#/servers/rabbitmqInProd" }, + { "$ref": "#/servers/rabbitmqInStaging" } + ], + "bindings": { + "amqp": { + "is": "queue", + "queue": { + "exclusive": true + } + } + }, + "tags": [{ + "name": "user", + "description": "User-related messages" + }], + "externalDocs": { + "description": "Find more info here", + "url": "https://example.com" + } +} +``` + +```yaml +address: 'users.{userId}' +title: Users channel +description: This channel is used to exchange messages about user events. +messages: + userSignedUp: + $ref: '#/components/messages/userSignedUp' + userCompletedOrder: + $ref: '#/components/messages/userCompletedOrder' +parameters: + userId: + $ref: '#/components/parameters/userId' +servers: + - $ref: '#/servers/rabbitmqInProd' + - $ref: '#/servers/rabbitmqInStaging' +bindings: + amqp: + is: queue + queue: + exclusive: true +tags: + - name: user + description: User-related messages +externalDocs: + description: 'Find more info here' + url: 'https://example.com' +``` + + + + + +#### Channel Address Expressions + +Channel addresses MAY contain expressions that can be used to define dynamic values. + +Expressions MUST be composed by a name enclosed in curly braces (`{` and `}`). E.g., `{userId}`. + + + + + +#### Messages Object + +Describes a map of messages included in a channel. + +##### Patterned Fields + +Field Pattern | Type | Description +---|:---:|--- +`{messageId}` | [Message Object](#messageObject) \| [Reference Object](#referenceObject) | The key represents the message identifier. The `messageId` value is **case-sensitive**. Tools and libraries MAY use the `messageId` value to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions. + +##### Messages Object Example + +```json +{ + "userSignedUp": { + "$ref": "#/components/messages/userSignedUp" + }, + "userCompletedOrder": { + "$ref": "#/components/messages/userCompletedOrder" + } +} +``` + +```yaml +userSignedUp: + $ref: '#/components/messages/userSignedUp' +userCompletedOrder: + $ref: '#/components/messages/userCompletedOrder' +``` + + + +#### Operations Object + +Holds a dictionary with all the [operations](#operationObject) this application MUST implement. + +> If you're looking for a place to define operations that MAY or MAY NOT be implemented by the application, consider defining them in [`components/operations`](#componentsOperations). + +##### Patterned Fields + +Field Pattern | Type | Description +---|:---:|--- +{operationId} | [Operation Object](#operationObject) \| [Reference Object](#referenceObject) | The operation this application MUST implement. The field name (`operationId`) MUST be a string used to identify the operation in the document where it is defined, and its value is **case-sensitive**. Tools and libraries MAY use the `operationId` to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions. + +##### Operations Object Example + +```json +{ + "onUserSignUp": { + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "tags": [ + { "name": "user" }, + { "name": "signup" }, + { "name": "register" } + ], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [ + { "$ref": "#/components/operationTraits/kafka" } + ] + } +} +``` + +```yaml +onUserSignUp: + title: User sign up + summary: Action to sign a user up. + description: A longer description + channel: + $ref: '#/channels/userSignup' + action: send + tags: + - name: user + - name: signup + - name: register + bindings: + amqp: + ack: false + traits: + - $ref: '#/components/operationTraits/kafka' +``` + + +#### Operation Object + +Describes a specific operation. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +action | `"send"` | `"receive"` | **Required**. Use `send` when it's expected that the application will send a message to the given [`channel`](#operationObjectChannel), and `receive` when the application should expect receiving messages from the given [`channel`](#operationObjectChannel). +channel | [Reference Object](#referenceObject) | **Required**. A `$ref` pointer to the definition of the channel in which this operation is performed. If the operation is located in the [root Operations Object](#operationsObject), it MUST point to a channel definition located in the [root Channels Object](#channelsObject), and MUST NOT point to a channel definition located in the [Components Object](#componentsObject) or anywhere else. If the operation is located in the [Components Object](#componentsObject), it MAY point to a [Channel Object](#channelObject) in any location. Please note the `channel` property value MUST be a [Reference Object](#referenceObject) and, therefore, MUST NOT contain a [Channel Object](#channelObject). However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience. +title | `string` | A human-friendly title for the operation. +summary | `string` | A short summary of what the operation is about. +description | `string` | A verbose explanation of the operation. [CommonMark syntax](http://spec.commonmark.org/) can be used for rich text representation. +security | [[Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)]| A declaration of which security schemes are associated with this operation. Only one of the [security scheme objects](#securitySchemeObject) MUST be satisfied to authorize an operation. In cases where [Server Security](#serverObjectSecurity) also applies, it MUST also be satisfied. +tags | [Tags Object](#tagsObject) | A list of tags for logical grouping and categorization of operations. +externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this operation. +bindings | [Operation Bindings Object](#operationBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation. +traits | [[Operation Trait Object](#operationTraitObject) | [Reference Object](#referenceObject) ] | A list of traits to apply to the operation object. Traits MUST be merged using [traits merge mechanism](#traits-merge-mechanism). The resulting object MUST be a valid [Operation Object](#operationObject). +messages | [[Reference Object](#referenceObject)] | A list of `$ref` pointers pointing to the supported [Message Objects](#messageObject) that can be processed by this operation. It MUST contain a subset of the messages defined in the [channel referenced in this operation](#operationObjectChannel), and MUST NOT point to a subset of message definitions located in the [Messages Object](#componentsMessages) in the [Components Object](#componentsObject) or anywhere else. **Every message processed by this operation MUST be valid against one, and only one, of the [message objects](#messageObject) referenced in this list.** Please note the `messages` property value MUST be a list of [Reference Objects](#referenceObject) and, therefore, MUST NOT contain [Message Objects](#messageObject). However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience. +reply | [Operation Reply Object](#operationReplyObject) | [Reference Object](#referenceObject) | The definition of the reply in a request-reply operation. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Operation Object Example + +```json +{ + "title": "User sign up", + "summary": "Action to sign a user up.", + "description": "A longer description", + "channel": { + "$ref": "#/channels/userSignup" + }, + "action": "send", + "security": [ + { + "petstore_auth": [ + "write:pets", + "read:pets" + ] + } + ], + "tags": [ + { "name": "user" }, + { "name": "signup" }, + { "name": "register" } + ], + "bindings": { + "amqp": { + "ack": false + } + }, + "traits": [ + { "$ref": "#/components/operationTraits/kafka" } + ], + "messages": [ + { "$ref": "/components/messages/userSignedUp" } + ], + "reply": { + "address": { + "location": "$message.header#/replyTo" + }, + "channel": { + "$ref": "#/channels/userSignupReply" + }, + "messages": [ + { "$ref": "/components/messages/userSignedUpReply" } + ], + } +} +``` + +```yaml +title: User sign up +summary: Action to sign a user up. +description: A longer description +channel: + $ref: '#/channels/userSignup' +action: send +security: + - petstore_auth: + - write:pets + - read:pets +tags: + - name: user + - name: signup + - name: register +bindings: + amqp: + ack: false +traits: + - $ref: "#/components/operationTraits/kafka" +messages: + - $ref: '#/components/messages/userSignedUp' +reply: + address: + location: '$message.header#/replyTo' + channel: + $ref: '#/channels/userSignupReply' + messages: + - $ref: '#/components/messages/userSignedUpReply' +``` + + + + +#### Operation Trait Object + +Describes a trait that MAY be applied to an [Operation Object](#operationObject). This object MAY contain any property from the [Operation Object](#operationObject), except the `action`, `channel` and `traits` ones. + +If you're looking to apply traits to a message, see the [Message Trait Object](#messageTraitObject). + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +title | `string` | A human-friendly title for the operation. +summary | `string` | A short summary of what the operation is about. +description | `string` | A verbose explanation of the operation. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. +security | [[Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)]| A declaration of which security schemes are associated with this operation. Only one of the [security scheme objects](#securitySchemeObject) MUST be satisfied to authorize an operation. In cases where [Server Security](#serverObjectSecurity) also applies, it MUST also be satisfied. +tags | [Tags Object](#tagsObject) | A list of tags for logical grouping and categorization of operations. +externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this operation. +bindings | [Operation Bindings Object](#operationBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Operation Trait Object Example + +```json +{ + "bindings": { + "amqp": { + "ack": false + } + } +} +``` + +```yaml +bindings: + amqp: + ack: false +``` + + + + +#### Operation Reply Object + +Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +address | [Operation Reply Address Object](#operationReplyAddressObject) | [Reference Object](#referenceObject) | Definition of the address that implementations MUST use for the reply. +channel | [Reference Object](#referenceObject) | A `$ref` pointer to the definition of the channel in which this operation is performed. When [address](#operationReplyAddressObject) is specified, the [`address` property](#channelObjectAddress) of the channel referenced by this property MUST be either `null` or not defined. If the operation reply is located inside a [root Operation Object](#operationObject), it MUST point to a channel definition located in the [root Channels Object](#channelsObject), and MUST NOT point to a channel definition located in the [Components Object](#componentsObject) or anywhere else. If the operation reply is located inside an [Operation Object] in the [Components Object](#componentsObject) or in the [Replies Object](#componentsReplies) in the [Components Object](#componentsObject), it MAY point to a [Channel Object](#channelObject) in any location. Please note the `channel` property value MUST be a [Reference Object](#referenceObject) and, therefore, MUST NOT contain a [Channel Object](#channelObject). However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience. +messages | [[Reference Object](#referenceObject)] | A list of `$ref` pointers pointing to the supported [Message Objects](#messageObject) that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the [channel referenced in this operation reply](#operationObjectChannel), and MUST NOT point to a subset of message definitions located in the [Components Object](#componentsObject) or anywhere else. **Every message processed by this operation MUST be valid against one, and only one, of the [message objects](#messageObject) referenced in this list.** Please note the `messages` property value MUST be a list of [Reference Objects](#referenceObject) and, therefore, MUST NOT contain [Message Objects](#messageObject). However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +#### Operation Reply Address Object + +An object that specifies where an operation has to send the reply. + +For specifying and computing the location of a reply address, a [runtime expression](#runtimeExpression) is used. + + +##### Fixed Fields + +Field Name | Type | Description +---|:---|--- +description | `string` | An optional description of the address. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. +location | `string` | **REQUIRED.** A [runtime expression](#runtimeExpression) that specifies the location of the reply address. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Examples + +```json +{ + "description": "Consumer inbox", + "location": "$message.header#/replyTo" +} +``` + +```yaml +description: Consumer Inbox +location: $message.header#/replyTo +``` + + +#### Parameters Object + +Describes a map of parameters included in a channel address. + +This map MUST contain all the parameters used in the parent channel address. + +##### Patterned Fields + +Field Pattern | Type | Description +---|:---:|--- +`^[A-Za-z0-9_\-]+$` | [Parameter Object](#parameterObject) | [Reference Object](#referenceObject) | The key represents the name of the parameter. It MUST match the parameter name used in the parent channel address. + +##### Parameters Object Example + +```json +{ + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user." + } + } +} +``` + +```yaml +address: user/{userId}/signedup +parameters: + userId: + description: Id of the user. +``` + + + + + +#### Parameter Object + +Describes a parameter included in a channel address. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +enum | [`string`] | An enumeration of string values to be used if the substitution options are from a limited set. +default | `string` | The default value to use for substitution, and to send, if an alternate value is _not_ supplied. +description | `string` | An optional description for the parameter. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. +examples | [`string`] | An array of examples of the parameter value. +location | `string` | A [runtime expression](#runtimeExpression) that specifies the location of the parameter value. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Parameter Object Example + +```json +{ + "address": "user/{userId}/signedup", + "parameters": { + "userId": { + "description": "Id of the user.", + "location": "$message.payload#/user/id" + } + } +} +``` + +```yaml +address: user/{userId}/signedup +parameters: + userId: + description: Id of the user. + location: $message.payload#/user/id +``` + + + + +#### Server Bindings Object + +Map describing protocol-specific definitions for a server. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +`http` | [HTTP Server Binding](https://github.com/asyncapi/bindings/blob/master/http#server) | Protocol-specific information for an HTTP server. +`ws` | [WebSockets Server Binding](https://github.com/asyncapi/bindings/blob/master/websockets#server) | Protocol-specific information for a WebSockets server. +`kafka` | [Kafka Server Binding](https://github.com/asyncapi/bindings/blob/master/kafka#server) | Protocol-specific information for a Kafka server. +`anypointmq` | [Anypoint MQ Server Binding](https://github.com/asyncapi/bindings/blob/master/anypointmq#server) | Protocol-specific information for an Anypoint MQ server. +`amqp` | [AMQP Server Binding](https://github.com/asyncapi/bindings/blob/master/amqp#server) | Protocol-specific information for an AMQP 0-9-1 server. +`amqp1` | [AMQP 1.0 Server Binding](https://github.com/asyncapi/bindings/blob/master/amqp1#server) | Protocol-specific information for an AMQP 1.0 server. +`mqtt` | [MQTT Server Binding](https://github.com/asyncapi/bindings/blob/master/mqtt#server) | Protocol-specific information for an MQTT server. +`mqtt5` | [MQTT 5 Server Binding](https://github.com/asyncapi/bindings/blob/master/mqtt5#server) | Protocol-specific information for an MQTT 5 server. +`nats` | [NATS Server Binding](https://github.com/asyncapi/bindings/blob/master/nats#server) | Protocol-specific information for a NATS server. +`jms` | [JMS Server Binding](https://github.com/asyncapi/bindings/blob/master/jms#server) | Protocol-specific information for a JMS server. +`sns` | [SNS Server Binding](https://github.com/asyncapi/bindings/blob/master/sns#server) | Protocol-specific information for an SNS server. +`solace` | [Solace Server Binding](https://github.com/asyncapi/bindings/blob/master/solace#server) | Protocol-specific information for a Solace server. +`sqs` | [SQS Server Binding](https://github.com/asyncapi/bindings/blob/master/sqs#server) | Protocol-specific information for an SQS server. +`stomp` | [STOMP Server Binding](https://github.com/asyncapi/bindings/blob/master/stomp#server) | Protocol-specific information for a STOMP server. +`redis` | [Redis Server Binding](https://github.com/asyncapi/bindings/blob/master/redis#server) | Protocol-specific information for a Redis server. +`mercure` | [Mercure Server Binding](https://github.com/asyncapi/bindings/blob/master/mercure#server) | Protocol-specific information for a Mercure server. +`ibmmq` | [IBM MQ Server Binding](https://github.com/asyncapi/bindings/blob/master/ibmmq#server-binding-object) | Protocol-specific information for an IBM MQ server. +`googlepubsub` | [Google Cloud Pub/Sub Server Binding](https://github.com/asyncapi/bindings/blob/master/googlepubsub#server) | Protocol-specific information for a Google Cloud Pub/Sub server. +`pulsar` | [Pulsar Server Binding](https://github.com/asyncapi/bindings/tree/master/pulsar#server-binding-object) | Protocol-specific information for a Pulsar server. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + + + +#### Channel Bindings Object + +Map describing protocol-specific definitions for a channel. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +`http` | [HTTP Channel Binding](https://github.com/asyncapi/bindings/blob/master/http/README.md#channel) | Protocol-specific information for an HTTP channel. +`ws` | [WebSockets Channel Binding](https://github.com/asyncapi/bindings/blob/master/websockets/README.md#channel) | Protocol-specific information for a WebSockets channel. +`kafka` | [Kafka Channel Binding](https://github.com/asyncapi/bindings/blob/master/kafka/README.md#channel) | Protocol-specific information for a Kafka channel. +`anypointmq` | [Anypoint MQ Channel Binding](https://github.com/asyncapi/bindings/blob/master/anypointmq/README.md#channel) | Protocol-specific information for an Anypoint MQ channel. +`amqp` | [AMQP Channel Binding](https://github.com/asyncapi/bindings/blob/master/amqp/README.md#channel) | Protocol-specific information for an AMQP 0-9-1 channel. +`amqp1` | [AMQP 1.0 Channel Binding](https://github.com/asyncapi/bindings/blob/master/amqp1/README.md#channel) | Protocol-specific information for an AMQP 1.0 channel. +`mqtt` | [MQTT Channel Binding](https://github.com/asyncapi/bindings/blob/master/mqtt/README.md#channel) | Protocol-specific information for an MQTT channel. +`mqtt5` | [MQTT 5 Channel Binding](https://github.com/asyncapi/bindings/blob/master/mqtt5#channel) | Protocol-specific information for an MQTT 5 channel. +`nats` | [NATS Channel Binding](https://github.com/asyncapi/bindings/blob/master/nats/README.md#channel) | Protocol-specific information for a NATS channel. +`jms` | [JMS Channel Binding](https://github.com/asyncapi/bindings/blob/master/jms/README.md#channel) | Protocol-specific information for a JMS channel. +`sns` | [SNS Channel Binding](https://github.com/asyncapi/bindings/blob/master/sns/README.md#channel) | Protocol-specific information for an SNS channel. +`solace` | [Solace Channel Binding](https://github.com/asyncapi/bindings/blob/master/solace#channel) | Protocol-specific information for a Solace channel. +`sqs` | [SQS Channel Binding](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#channel) | Protocol-specific information for an SQS channel. +`stomp` | [STOMP Channel Binding](https://github.com/asyncapi/bindings/blob/master/stomp/README.md#channel) | Protocol-specific information for a STOMP channel. +`redis` | [Redis Channel Binding](https://github.com/asyncapi/bindings/blob/master/redis#channel) | Protocol-specific information for a Redis channel. +`mercure` | [Mercure Channel Binding](https://github.com/asyncapi/bindings/blob/master/mercure#channel) | Protocol-specific information for a Mercure channel. +`ibmmq` | [IBM MQ Channel Binding](https://github.com/asyncapi/bindings/tree/master/ibmmq#channel-binding-object) | Protocol-specific information for an IBM MQ channel. +`googlepubsub` | [Google Cloud Pub/Sub Channel Binding](https://github.com/asyncapi/bindings/tree/master/googlepubsub#channel) | Protocol-specific information for a Google Cloud Pub/Sub channel. +`pulsar` | [Pulsar Channel Binding](https://github.com/asyncapi/bindings/tree/master/pulsar#channel-binding-object) | Protocol-specific information for a Pulsar channel. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + + + +#### Operation Bindings Object + +Map describing protocol-specific definitions for an operation. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +`http` | [HTTP Operation Binding](https://github.com/asyncapi/bindings/blob/master/http/README.md#operation) | Protocol-specific information for an HTTP operation. +`ws` | [WebSockets Operation Binding](https://github.com/asyncapi/bindings/blob/master/websockets/README.md#operation) | Protocol-specific information for a WebSockets operation. +`kafka` | [Kafka Operation Binding](https://github.com/asyncapi/bindings/blob/master/kafka/README.md#operation) | Protocol-specific information for a Kafka operation. +`anypointmq` | [Anypoint MQ Operation Binding](https://github.com/asyncapi/bindings/blob/master/anypointmq/README.md#operation) | Protocol-specific information for an Anypoint MQ operation. +`amqp` | [AMQP Operation Binding](https://github.com/asyncapi/bindings/blob/master/amqp/README.md#operation) | Protocol-specific information for an AMQP 0-9-1 operation. +`amqp1` | [AMQP 1.0 Operation Binding](https://github.com/asyncapi/bindings/blob/master/amqp1/README.md#operation) | Protocol-specific information for an AMQP 1.0 operation. +`mqtt` | [MQTT Operation Binding](https://github.com/asyncapi/bindings/blob/master/mqtt/README.md#operation) | Protocol-specific information for an MQTT operation. +`mqtt5` | [MQTT 5 Operation Binding](https://github.com/asyncapi/bindings/blob/master/mqtt5/README.md#operation) | Protocol-specific information for an MQTT 5 operation. +`nats` | [NATS Operation Binding](https://github.com/asyncapi/bindings/blob/master/nats/README.md#operation) | Protocol-specific information for a NATS operation. +`jms` | [JMS Operation Binding](https://github.com/asyncapi/bindings/blob/master/jms/README.md#operation) | Protocol-specific information for a JMS operation. +`sns` | [SNS Operation Binding](https://github.com/asyncapi/bindings/blob/master/sns/README.md#operation) | Protocol-specific information for an SNS operation. +`solace` | [Solace Operation Binding](https://github.com/asyncapi/bindings/blob/master/solace#operation) | Protocol-specific information for a Solace operation. +`sqs` | [SQS Operation Binding](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#operation) | Protocol-specific information for an SQS operation. +`stomp` | [STOMP Operation Binding](https://github.com/asyncapi/bindings/blob/master/stomp/README.md#operation) | Protocol-specific information for a STOMP operation. +`redis` | [Redis Operation Binding](https://github.com/asyncapi/bindings/blob/master/redis#operation) | Protocol-specific information for a Redis operation. +`mercure` | [Mercure Operation Binding](https://github.com/asyncapi/bindings/blob/master/mercure#operation) | Protocol-specific information for a Mercure operation. +`googlepubsub` | [Google Cloud Pub/Sub Operation Binding](https://github.com/asyncapi/bindings/blob/master/googlepubsub#operation) | Protocol-specific information for a Google Cloud Pub/Sub operation. +`ibmmq` | [IBM MQ Operation Binding](https://github.com/asyncapi/bindings/blob/master/ibmmq#operation-binding-object) | Protocol-specific information for an IBM MQ operation. +`pulsar` | [Pulsar Operation Binding](https://github.com/asyncapi/bindings/tree/master/pulsar#operation-binding-fields) | Protocol-specific information for a Pulsar operation. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + + + + +#### Message Bindings Object + +Map describing protocol-specific definitions for a message. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +`http` | [HTTP Message Binding](https://github.com/asyncapi/bindings/blob/master/http/README.md#message) | Protocol-specific information for an HTTP message, i.e., a request or a response. +`ws` | [WebSockets Message Binding](https://github.com/asyncapi/bindings/blob/master/websockets/README.md#message) | Protocol-specific information for a WebSockets message. +`kafka` | [Kafka Message Binding](https://github.com/asyncapi/bindings/blob/master/kafka/README.md#message) | Protocol-specific information for a Kafka message. +`anypointmq` | [Anypoint MQ Message Binding](https://github.com/asyncapi/bindings/blob/master/anypointmq/README.md#message) | Protocol-specific information for an Anypoint MQ message. +`amqp` | [AMQP Message Binding](https://github.com/asyncapi/bindings/blob/master/amqp/README.md#message) | Protocol-specific information for an AMQP 0-9-1 message. +`amqp1` | [AMQP 1.0 Message Binding](https://github.com/asyncapi/bindings/blob/master/amqp1/README.md#message) | Protocol-specific information for an AMQP 1.0 message. +`mqtt` | [MQTT Message Binding](https://github.com/asyncapi/bindings/blob/master/mqtt/README.md#message) | Protocol-specific information for an MQTT message. +`mqtt5` | [MQTT 5 Message Binding](https://github.com/asyncapi/bindings/blob/master/mqtt5/README.md#message) | Protocol-specific information for an MQTT 5 message. +`nats` | [NATS Message Binding](https://github.com/asyncapi/bindings/blob/master/nats/README.md#message) | Protocol-specific information for a NATS message. +`jms` | [JMS Message Binding](https://github.com/asyncapi/bindings/blob/master/jms/README.md#message) | Protocol-specific information for a JMS message. +`sns` | [SNS Message Binding](https://github.com/asyncapi/bindings/blob/master/sns/README.md#message) | Protocol-specific information for an SNS message. +`solace` | [Solace Server Binding](https://github.com/asyncapi/bindings/blob/master/solace#message) | Protocol-specific information for a Solace message. +`sqs` | [SQS Message Binding](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#message) | Protocol-specific information for an SQS message. +`stomp` | [STOMP Message Binding](https://github.com/asyncapi/bindings/blob/master/stomp/README.md#message) | Protocol-specific information for a STOMP message. +`redis` | [Redis Message Binding](https://github.com/asyncapi/bindings/blob/master/redis#message) | Protocol-specific information for a Redis message. +`mercure` | [Mercure Message Binding](https://github.com/asyncapi/bindings/blob/master/mercure#message) | Protocol-specific information for a Mercure message. +`ibmmq` | [IBM MQ Message Binding](https://github.com/asyncapi/bindings/tree/master/ibmmq#message-binding-object) | Protocol-specific information for an IBM MQ message. +`googlepubsub` | [Google Cloud Pub/Sub Message Binding](https://github.com/asyncapi/bindings/tree/master/googlepubsub#message) | Protocol-specific information for a Google Cloud Pub/Sub message. +`pulsar` | [Pulsar Message Binding](https://github.com/asyncapi/bindings/tree/master/pulsar#message-binding-fields) | Protocol-specific information for a Pulsar message. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + + + + + + + +#### Message Object + +Describes a message received on a given channel and operation. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be a map of key-value pairs. It **MUST NOT** define the protocol headers. If this is a [Schema Object](#schemaObject), then the `schemaFormat` will be assumed to be "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). +payload | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Definition of the message payload. If this is a [Schema Object](#schemaObject), then the `schemaFormat` will be assumed to be "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). +correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. +contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. +name | `string` | A machine-friendly name for the message. +title | `string` | A human-friendly title for the message. +summary | `string` | A short summary of what the message is about. +description | `string` | A verbose explanation of the message. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. +tags | [Tags Object](#tagsObject) | A list of tags for logical grouping and categorization of messages. +externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this message. +bindings | [Message Bindings Object](#messageBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the message. +examples | [[Message Example Object](#messageExampleObject)] | List of examples. +traits | [[Message Trait Object](#messageTraitObject) | [Reference Object](#referenceObject)] | A list of traits to apply to the message object. Traits MUST be merged using [traits merge mechanism](#traits-merge-mechanism). The resulting object MUST be a valid [Message Object](#messageObject). + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Message Object Example + +```json +{ + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "contentType": "application/json", + "tags": [ + { "name": "user" }, + { "name": "signup" }, + { "name": "register" } + ], + "headers": { + "type": "object", + "properties": { + "correlationId": { + "description": "Correlation ID set by application", + "type": "string" + }, + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + }, + "correlationId": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + }, + "traits": [ + { "$ref": "#/components/messageTraits/commonHeaders" } + ], + "examples": [ + { + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + } + } + ] +} +``` + +```yaml +name: UserSignup +title: User signup +summary: Action to sign a user up. +description: A longer description +contentType: application/json +tags: + - name: user + - name: signup + - name: register +headers: + type: object + properties: + correlationId: + description: Correlation ID set by application + type: string + applicationInstanceId: + description: Unique identifier for a given instance of the publishing application + type: string +payload: + type: object + properties: + user: + $ref: "#/components/schemas/userCreate" + signup: + $ref: "#/components/schemas/signup" +correlationId: + description: Default Correlation ID + location: $message.header#/correlationId +traits: + - $ref: "#/components/messageTraits/commonHeaders" +examples: + - name: SimpleSignup + summary: A simple UserSignup example message + headers: + correlationId: my-correlation-id + applicationInstanceId: myInstanceId + payload: + user: + someUserKey: someUserValue + signup: + someSignupKey: someSignupValue +``` + +Example using Avro to define the payload: + +```json +{ + "name": "UserSignup", + "title": "User signup", + "summary": "Action to sign a user up.", + "description": "A longer description", + "tags": [ + { "name": "user" }, + { "name": "signup" }, + { "name": "register" } + ], + "payload": { + "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", + "schema": { + "$ref": "path/to/user-create.avsc#/UserCreate" + } + } +} +``` + +```yaml +name: UserSignup +title: User signup +summary: Action to sign a user up. +description: A longer description +tags: + - name: user + - name: signup + - name: register +payload: + schemaFormat: 'application/vnd.apache.avro+yaml;version=1.9.0' + schema: + $ref: 'path/to/user-create.avsc/#UserCreate' +``` + + + + + + + +#### Message Trait Object + +Describes a trait that MAY be applied to a [Message Object](#messageObject). This object MAY contain any property from the [Message Object](#messageObject), except `payload` and `traits`. + +If you're looking to apply traits to an operation, see the [Operation Trait Object](#operationTraitObject). + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be a map of key-value pairs. It **MUST NOT** define the protocol headers. If this is a [Schema Object](#schemaObject), then the `schemaFormat` will be assumed to be "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). +correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. +contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. +name | `string` | A machine-friendly name for the message. +title | `string` | A human-friendly title for the message. +summary | `string` | A short summary of what the message is about. +description | `string` | A verbose explanation of the message. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. +tags | [Tags Object](#tagsObject) | A list of tags for logical grouping and categorization of messages. +externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this message. +bindings | [Message Bindings Object](#messageBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the message. +examples | [[Message Example Object](#messageExampleObject)] | List of examples. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Message Trait Object Example + +```json +{ + "contentType": "application/json" +} +``` + +```yaml +contentType: application/json +``` + +#### Message Example Object + +Message Example Object represents an example of a [Message Object](#messageObject) and MUST contain either **headers** and/or **payload** fields. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +headers | `Map[string, any]` | The value of this field MUST validate against the [Message Object's headers](#messageObjectHeaders) field. +payload | `Map[string, any]` | The value of this field MUST validate against the [Message Object's payload](#messageObjectPayload) field. +name | `string` | A machine-friendly name. +summary | `string` | A short summary of what the example is about. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Message Example Object Example + +```json +{ + "name": "SimpleSignup", + "summary": "A simple UserSignup example message", + "headers": { + "correlationId": "my-correlation-id", + "applicationInstanceId": "myInstanceId" + }, + "payload": { + "user": { + "someUserKey": "someUserValue" + }, + "signup": { + "someSignupKey": "someSignupValue" + } + } +} +``` + +```yaml +name: SimpleSignup +summary: A simple UserSignup example message +headers: + correlationId: my-correlation-id + applicationInstanceId: myInstanceId +payload: + user: + someUserKey: someUserValue + signup: + someSignupKey: someSignupValue +``` + +#### Tags Object + +A Tags object is a list of [Tag Objects](#tagObject). An [Tag Object](#tagObject) in a list can be referenced by [Reference Object](#referenceObject). + +#### Tag Object + +Allows adding meta data to a single tag. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +name | `string` | **REQUIRED.** The name of the tag. +description | `string` | A short description for the tag. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. +externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this tag. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Tag Object Example + +```json +{ + "name": "user", + "description": "User-related messages" +} +``` + +```yaml +name: user +description: User-related messages +``` + + + + + + + +#### External Documentation Object + +Allows referencing an external resource for extended documentation. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +description | `string` | A short description of the target documentation. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. +url | `string` | **REQUIRED.** The URL for the target documentation. This MUST be in the form of an absolute URL. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### External Documentation Object Example + +```json +{ + "description": "Find more info here", + "url": "https://example.com" +} +``` + +```yaml +description: Find more info here +url: https://example.com +``` + + +#### Reference Object + +A simple object to allow referencing other components in the specification, internally and externally. + +The Reference Object is defined by [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03) and follows the same structure, behavior and rules. A JSON Reference SHALL only be used to refer to a schema that is formatted in either JSON or YAML. In the case of a YAML-formatted Schema, the JSON Reference SHALL be applied to the JSON representation of that schema. The JSON representation SHALL be made by applying the conversion described [here](#format). + +For this specification, reference resolution is done as defined by the JSON Reference specification and not by the JSON Schema specification. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +$ref | `string` | **REQUIRED.** The reference string. + +This object cannot be extended with additional properties and any properties added SHALL be ignored. + +##### Reference Object Example + +```json +{ + "$ref": "#/components/schemas/Pet" +} +``` + +```yaml + $ref: '#/components/schemas/Pet' +``` + +#### Components Object + +Holds a set of reusable objects for different aspects of the AsyncAPI specification. +All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object. + +##### Fixed Fields + +Field Name | Type | Description +---|:---|--- + schemas | Map[`string`, [Multi Format Schema Object](#multiFormatSchemaObject) \| [Schema Object](#schemaObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Schema Object](#schemaObject). If this is a [Schema Object](#schemaObject), then the `schemaFormat` will be assumed to be "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). + servers | Map[`string`, [Server Object](#serverObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Server Objects](#serverObject). + channels | Map[`string`, [Channel Object](#channelObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Channel Objects](#channelObject). + operations | Map[`string`, [Operation Object](#operationObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Operation Objects](#operationObject). + messages | Map[`string`, [Message Object](#messageObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Message Objects](#messageObject). + securitySchemes| Map[`string`, [Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Security Scheme Objects](#securitySchemeObject). + serverVariables | Map[`string`, [Server Variable Object](#serverVariableObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Server Variable Objects](#serverVariableObject). + parameters | Map[`string`, [Parameter Object](#parameterObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Parameter Objects](#parameterObject). + correlationIds | Map[`string`, [Correlation ID Object](#correlationIdObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Correlation ID Objects](#correlationIdObject). +replies | Map[`string`, [Operation Reply Object](#operationReplyObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Operation Reply Objects](#operationReplyObject). + replyAddresses | Map[`string`, [Operation Reply Address Object](#operationReplyAddressObject) | [Reference Object](#referenceObject)] | An object to hold reusable [Operation Reply Address Objects](#operationReplyAddressObject). + externalDocs | Map[`string`, [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [External Documentation Objects](#externalDocumentationObject). + tags | Map[`string`, [Tag Object](#tagObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Tag Objects](#tagObject). + operationTraits | Map[`string`, [Operation Trait Object](#operationTraitObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Operation Trait Objects](#operationTraitObject). + messageTraits | Map[`string`, [Message Trait Object](#messageTraitObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Message Trait Objects](#messageTraitObject). + serverBindings | Map[`string`, [Server Bindings Object](#serverBindingsObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Server Bindings Objects](#serverBindingsObject). + channelBindings | Map[`string`, [Channel Bindings Object](#channelBindingsObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Channel Bindings Objects](#channelBindingsObject). + operationBindings | Map[`string`, [Operation Bindings Object](#operationBindingsObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Operation Bindings Objects](#operationBindingsObject). + messageBindings | Map[`string`, [Message Bindings Object](#messageBindingsObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Message Bindings Objects](#messageBindingsObject). + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +All the fixed fields declared above are objects that MUST use keys that match the regular expression: `^[a-zA-Z0-9\.\-_]+$`. + +Field Name Examples: + +``` +User +User_1 +User_Name +user-name +my.org.User +``` + +##### Components Object Example + +```json +{ + "components": { + "schemas": { + "Category": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + } + }, + "AvroExample": { + "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", + "schema": { + "$ref": "path/to/user-create.avsc#/UserCreate" + } + } + }, + "servers": { + "development": { + "host": "{stage}.in.mycompany.com:{port}", + "description": "RabbitMQ broker", + "protocol": "amqp", + "protocolVersion": "0-9-1", + "variables": { + "stage": { + "$ref": "#/components/serverVariables/stage" + }, + "port": { + "$ref": "#/components/serverVariables/port" + } + } + } + }, + "serverVariables": { + "stage": { + "default": "demo", + "description": "This value is assigned by the service provider, in this example `mycompany.com`" + }, + "port": { + "enum": ["5671", "5672"], + "default": "5672" + } + }, + "channels": { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/userSignUp" + } + } + } + }, + "messages": { + "userSignUp": { + "summary": "Action to sign a user up.", + "description": "Multiline description of what this action does.\nHere you have another line.\n", + "tags": [ + { + "name": "user" + }, + { + "name": "signup" + } + ], + "headers": { + "type": "object", + "properties": { + "applicationInstanceId": { + "description": "Unique identifier for a given instance of the publishing application", + "type": "string" + } + } + }, + "payload": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/userCreate" + }, + "signup": { + "$ref": "#/components/schemas/signup" + } + } + } + } + }, + "parameters": { + "userId": { + "description": "Id of the user." + } + }, + "correlationIds": { + "default": { + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" + } + }, + "messageTraits": { + "commonHeaders": { + "headers": { + "type": "object", + "properties": { + "my-app-header": { + "type": "integer", + "minimum": 0, + "maximum": 100 + } + } + } + } + } + } +} +``` + +```yaml +components: + schemas: + Category: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + AvroExample: + schemaFormat: application/vnd.apache.avro+json;version=1.9.0 + schema: + $ref: 'path/to/user-create.avsc/#UserCreate' + servers: + development: + host: "{stage}.in.mycompany.com:{port}" + description: RabbitMQ broker + protocol: amqp + protocolVersion: 0-9-1 + variables: + stage: + $ref: "#/components/serverVariables/stage" + port: + $ref: "#/components/serverVariables/port" + serverVariables: + stage: + default: demo + description: This value is assigned by the service provider, in this example `mycompany.com` + port: + enum: ["5671", "5672"] + default: "5672" + channels: + user/signedup: + subscribe: + message: + $ref: "#/components/messages/userSignUp" + messages: + userSignUp: + summary: Action to sign a user up. + description: | + Multiline description of what this action does. + Here you have another line. + tags: + - name: user + - name: signup + headers: + type: object + properties: + applicationInstanceId: + description: Unique identifier for a given instance of the publishing application + type: string + payload: + type: object + properties: + user: + $ref: "#/components/schemas/userCreate" + signup: + $ref: "#/components/schemas/signup" + parameters: + userId: + description: Id of the user. + correlationIds: + default: + description: Default Correlation ID + location: $message.header#/correlationId + messageTraits: + commonHeaders: + headers: + type: object + properties: + my-app-header: + type: integer + minimum: 0 + maximum: 100 +``` + +#### Multi Format Schema Object + +The Multi Format Schema Object represents a schema definition. It differs from the [Schema Object](#schemaObject) in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.). + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +schemaFormat | `string` | **Required**. A string containing the name of the schema format that is used to define the information. If `schemaFormat` is missing, it MUST default to `application/vnd.aai.asyncapi+json;version={{asyncapi}}` where `{{asyncapi}}` matches the [AsyncAPI Version String](#A2SVersionString). In such a case, this would make the Multi Format Schema Object equivalent to the [Schema Object](#schemaObject). When using [Reference Object](#referenceObject) within the schema, the `schemaFormat` of the resource being referenced MUST match the `schemaFormat` of the schema that contains the initial reference. For example, if you reference Avro `schema`, then `schemaFormat` of referencing resource and the resource being reference MUST match.

Check out the [supported schema formats table](#multiFormatSchemaFormatTable) for more information. Custom values are allowed but their implementation is OPTIONAL. A custom value MUST NOT refer to one of the schema formats listed in the [table](#multiFormatSchemaFormatTable).

When using [Reference Objects](#referenceObject) within the schema, the `schemaFormat` of the referenced resource MUST match the `schemaFormat` of the schema containing the reference. +schema | `any` | **Required**. Definition of the message payload. It can be of any type but defaults to [Schema Object](#schemaObject). It MUST match the schema format defined in [`schemaFormat`](#multiFormatSchemaObjectSchemaFormat), including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Schema formats table + +The following table contains a set of values that every implementation MUST support. + +Name | Allowed values | Notes +---|:---:|--- +[AsyncAPI 3.0.0 Schema Object](#schemaObject) | `application/vnd.aai.asyncapi;version=3.0.0`, `application/vnd.aai.asyncapi+json;version=3.0.0`, `application/vnd.aai.asyncapi+yaml;version=3.0.0` | This is the default when a `schemaFormat` is not provided. +[JSON Schema Draft 07](https://json-schema.org/specification-links.html#draft-7) | `application/schema+json;version=draft-07`, `application/schema+yaml;version=draft-07` | + +The following table contains a set of values that every implementation is RECOMMENDED to support. + +Name | Allowed values | Notes +---|:---:|--- +[Avro 1.9.0 schema](https://avro.apache.org/docs/1.9.0/spec.html#schemas) | `application/vnd.apache.avro;version=1.9.0`, `application/vnd.apache.avro+json;version=1.9.0`, `application/vnd.apache.avro+yaml;version=1.9.0` | +[OpenAPI 3.0.0 Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schemaObject) | `application/vnd.oai.openapi;version=3.0.0`, `application/vnd.oai.openapi+json;version=3.0.0`, `application/vnd.oai.openapi+yaml;version=3.0.0` | +[RAML 1.0 data type](https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md/) | `application/raml+yaml;version=1.0` | +[Protocol Buffers](https://protobuf.dev/) | `application/vnd.google.protobuf;version=2`, `application/vnd.google.protobuf;version=3` | + + +#### Schema Object + +The Schema Object allows the definition of input and output data types. +These types can be objects, but also primitives and arrays. This object is a superset of the [JSON Schema Specification Draft 07](https://json-schema.org/). The empty schema (which allows any instance to validate) MAY be represented by the `boolean` value `true` and a schema which allows no instance to validate MAY be represented by the `boolean` value `false`. + +Further information about the properties can be found in [JSON Schema Core](https://tools.ietf.org/html/draft-handrews-json-schema-01) and [JSON Schema Validation](https://tools.ietf.org/html/draft-handrews-json-schema-validation-01). +Unless stated otherwise, the property definitions follow the JSON Schema specification as referenced here. + +##### Properties + +The AsyncAPI Schema Object is a JSON Schema vocabulary which extends JSON Schema Core and Validation vocabularies. As such, any keyword available for those vocabularies is by definition available in AsyncAPI, and will work the exact same way, including but not limited to: + +- title +- type +- required +- multipleOf +- maximum +- exclusiveMaximum +- minimum +- exclusiveMinimum +- maxLength +- minLength +- pattern (This string SHOULD be a valid regular expression, according to the [ECMA 262 regular expression](https://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5) dialect) +- maxItems +- minItems +- uniqueItems +- maxProperties +- minProperties +- enum +- const +- examples +- if / then / else +- readOnly +- writeOnly +- properties +- patternProperties +- additionalProperties +- additionalItems +- items +- propertyNames +- contains +- allOf +- oneOf +- anyOf +- not + +The following properties are taken from the JSON Schema definition but their definitions were adjusted to the AsyncAPI Specification. + +- description - [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. +- format - See [Data Type Formats](#dataTypeFormat) for further details. While relying on JSON Schema's defined formats, the AsyncAPI Specification offers a few additional predefined formats. +- default - Use it to specify that property has a predefined value if no other value is present. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, of `type` is `string`, then `default` can be `"foo"` but cannot be `1`. + +Alternatively, any time a Schema Object can be used, a [Reference Object](#referenceObject) can be used in its place. This allows referencing definitions in place of defining them inline. It is appropriate to clarify that the `$ref` keyword MUST follow the behavior described by [Reference Object](#referenceObject) instead of the one in [JSON Schema definition](https://json-schema.org/understanding-json-schema/structuring.html#ref). + +In addition to the JSON Schema fields, the following AsyncAPI vocabulary fields MAY be used for further schema documentation: + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +discriminator | `string` | Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the `required` property list. When used, the value MUST be the name of this schema or any schema that inherits it. See [Composition and Inheritance](#schemaComposition) for more details. +externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this schema. + deprecated | `boolean` | Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is `false`. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +###### Composition and Inheritance (Polymorphism) + +The AsyncAPI Specification allows combining and extending model definitions using the `allOf` property of JSON Schema, in effect offering model composition. +`allOf` takes in an array of object definitions that are validated *independently* but together compose a single object. + +While composition offers model extensibility, it does not imply a hierarchy between the models. +To support polymorphism, AsyncAPI Specification adds the support of the `discriminator` field. +When used, the `discriminator` will be the name of the property used to decide which schema definition is used to validate the structure of the model. +As such, the `discriminator` field MUST be a required field. +There are two ways to define the value of a discriminator for an inheriting instance. + +- Use the schema's name. +- Override the schema's name by overriding the property with a new value. If exists, this takes precedence over the schema's name. + +As such, inline schema definitions, which do not have a given id, *cannot* be used in polymorphism. + +##### Schema Object Examples + +###### Primitive Sample + +```json +{ + "type": "string", + "format": "email" +} +``` + +```yaml +type: string +format: email +``` + +###### Simple Model + +```json +{ + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "address": { + "$ref": "#/components/schemas/Address" + }, + "age": { + "type": "integer", + "format": "int32", + "minimum": 0 + } + } +} +``` + +```yaml +type: object +required: +- name +properties: + name: + type: string + address: + $ref: '#/components/schemas/Address' + age: + type: integer + format: int32 + minimum: 0 +``` + +###### Model with Map/Dictionary Properties + +For a simple string to string mapping: + +```json +{ + "type": "object", + "additionalProperties": { + "type": "string" + } +} +``` + +```yaml +type: object +additionalProperties: + type: string +``` + +For a string to model mapping: + +```json +{ + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/ComplexModel" + } +} +``` + +```yaml +type: object +additionalProperties: + $ref: '#/components/schemas/ComplexModel' +``` + +###### Model with Example + +```json +{ + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + } + }, + "required": [ + "name" + ], + "examples": [ + { + "name": "Puma", + "id": 1 + } + ] +} +``` + +```yaml +type: object +properties: + id: + type: integer + format: int64 + name: + type: string +required: +- name +examples: +- name: Puma + id: 1 +``` + +###### Model with Boolean Schemas + +```json +{ + "type": "object", + "required": [ + "anySchema" + ], + "properties": { + "anySchema": true, + "cannotBeDefined": false + } +} +``` + +```yaml +type: object +required: +- anySchema +properties: + anySchema: true + cannotBeDefined: false +``` + +###### Models with Composition + +```json +{ + "schemas": { + "ErrorModel": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string" + }, + "code": { + "type": "integer", + "minimum": 100, + "maximum": 600 + } + } + }, + "ExtendedErrorModel": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorModel" + }, + { + "type": "object", + "required": [ + "rootCause" + ], + "properties": { + "rootCause": { + "type": "string" + } + } + } + ] + } + } +} +``` + +```yaml +schemas: + ErrorModel: + type: object + required: + - message + - code + properties: + message: + type: string + code: + type: integer + minimum: 100 + maximum: 600 + ExtendedErrorModel: + allOf: + - $ref: '#/components/schemas/ErrorModel' + - type: object + required: + - rootCause + properties: + rootCause: + type: string +``` + +###### Models with Polymorphism Support + +```json +{ + "schemas": { + "Pet": { + "type": "object", + "discriminator": "petType", + "properties": { + "name": { + "type": "string" + }, + "petType": { + "type": "string" + } + }, + "required": [ + "name", + "petType" + ] + }, + "Cat": { + "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.", + "allOf": [ + { + "$ref": "#/components/schemas/Pet" + }, + { + "type": "object", + "properties": { + "huntingSkill": { + "type": "string", + "description": "The measured skill for hunting", + "enum": [ + "clueless", + "lazy", + "adventurous", + "aggressive" + ] + } + }, + "required": [ + "huntingSkill" + ] + } + ] + }, + "Dog": { + "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.", + "allOf": [ + { + "$ref": "#/components/schemas/Pet" + }, + { + "type": "object", + "properties": { + "packSize": { + "type": "integer", + "format": "int32", + "description": "the size of the pack the dog is from", + "minimum": 0 + } + }, + "required": [ + "packSize" + ] + } + ] + }, + "StickInsect": { + "description": "A representation of an Australian walking stick. Note that `StickBug` will be used as the discriminator value.", + "allOf": [ + { + "$ref": "#/components/schemas/Pet" + }, + { + "type": "object", + "properties": { + "petType": { + "const": "StickBug" + }, + "color": { + "type": "string" + } + }, + "required": [ + "color" + ] + } + ] + } + } +} +``` + +```yaml +schemas: + Pet: + type: object + discriminator: petType + properties: + name: + type: string + petType: + type: string + required: + - name + - petType + ## applies to instances with `petType: "Cat"` + ## because that is the schema name + Cat: + description: A representation of a cat + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + properties: + huntingSkill: + type: string + description: The measured skill for hunting + enum: + - clueless + - lazy + - adventurous + - aggressive + required: + - huntingSkill + ## applies to instances with `petType: "Dog"` + ## because that is the schema name + Dog: + description: A representation of a dog + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + properties: + packSize: + type: integer + format: int32 + description: the size of the pack the dog is from + minimum: 0 + required: + - packSize + ## applies to instances with `petType: "StickBug"` + ## because that is the required value of the discriminator field, + ## overriding the schema name + StickInsect: + description: A representation of an Australian walking stick + allOf: + - $ref: '#/components/schemas/Pet' + - type: object + properties: + petType: + const: StickBug + color: + type: string + required: + - color +``` + + + + + +#### Security Scheme Object + +Defines a security scheme that can be used by the operations. Supported schemes are: + +* User/Password. +* API key (either as user or as password). +* X.509 certificate. +* End-to-end encryption (either symmetric or asymmetric). +* HTTP authentication. +* HTTP API key. +* OAuth2's common flows (Implicit, Resource Owner Protected Credentials, Client Credentials and Authorization Code) as defined in [RFC6749](https://tools.ietf.org/html/rfc6749). +* [OpenID Connect Discovery](https://tools.ietf.org/html/draft-ietf-oauth-discovery-06). +* SASL (Simple Authentication and Security Layer) as defined in [RFC4422](https://tools.ietf.org/html/rfc4422). + +##### Fixed Fields +Field Name | Type | Applies To | Description +---|:---:|---|--- +type | `string` | Any | **REQUIRED**. The type of the security scheme. Valid values are `"userPassword"`, `"apiKey"`, `"X509"`, `"symmetricEncryption"`, `"asymmetricEncryption"`, `"httpApiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`, `"plain"`, `"scramSha256"`, `"scramSha512"`, and `"gssapi"`. +description | `string` | Any | A short description for security scheme. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. +name | `string` | `httpApiKey` | **REQUIRED**. The name of the header, query or cookie parameter to be used. +in | `string` | `apiKey` \| `httpApiKey` | **REQUIRED**. The location of the API key. Valid values are `"user"` and `"password"` for `apiKey` and `"query"`, `"header"` or `"cookie"` for `httpApiKey`. +scheme | `string` | `http` | **REQUIRED**. The name of the HTTP Authorization scheme to be used in the [Authorization header as defined in RFC7235](https://tools.ietf.org/html/rfc7235#section-5.1). +bearerFormat | `string` | `http` (`"bearer"`) | A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. +flows | [OAuth Flows Object](#oauthFlowsObject) | `oauth2` | **REQUIRED**. An object containing configuration information for the flow types supported. +openIdConnectUrl | `string` | `openIdConnect` | **REQUIRED**. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of an absolute URL. +scopes | [`string`] | `oauth2` \| `openIdConnect` | List of the needed scope names. An empty array means no scopes are needed. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Security Scheme Object Example + +###### User/Password Authentication Sample + +```json +{ + "type": "userPassword" +} +``` + +```yaml +type: userPassword +``` + +###### API Key Authentication Sample + +```json +{ + "type": "apiKey", + "in": "user" +} +``` + +```yaml +type: apiKey +in: user +``` + +###### X.509 Authentication Sample + +```json +{ + "type": "X509" +} +``` + +```yaml +type: X509 +``` + +###### End-to-end Encryption Authentication Sample + +```json +{ + "type": "symmetricEncryption" +} +``` + +```yaml +type: symmetricEncryption +``` + +###### Basic Authentication Sample + +```json +{ + "type": "http", + "scheme": "basic" +} +``` + +```yaml +type: http +scheme: basic +``` + +###### API Key Sample + +```json +{ + "type": "httpApiKey", + "name": "api_key", + "in": "header" +} +``` + +```yaml +type: httpApiKey +name: api_key +in: header +``` + +###### JWT Bearer Sample + +```json +{ + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" +} +``` + +```yaml +type: http +scheme: bearer +bearerFormat: JWT +``` + +###### Implicit OAuth2 Sample + +```json +{ + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "https://example.com/api/oauth/dialog", + "availableScopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } + } + }, + "scopes": [ + "write:pets" + ] +} +``` + +```yaml +type: oauth2 +flows: + implicit: + authorizationUrl: https://example.com/api/oauth/dialog + availableScopes: + write:pets: modify pets in your account + read:pets: read your pets +scopes: + - 'write:pets' +``` + +###### SASL Sample + +```json +{ + "type": "scramSha512" +} +``` + +```yaml +type: scramSha512 +``` + +#### OAuth Flows Object + +Allows configuration of the supported OAuth Flows. + +##### Fixed Fields +Field Name | Type | Description +---|:---:|--- +implicit| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Implicit flow. +password| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Resource Owner Protected Credentials flow. +clientCredentials| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Client Credentials flow. +authorizationCode| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Authorization Code flow. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +#### OAuth Flow Object + +Configuration details for a supported OAuth Flow + +##### Fixed Fields +Field Name | Type | Applies To | Description +---|:---:|---|--- +authorizationUrl | `string` | `oauth2` (`"implicit"`, `"authorizationCode"`) | **REQUIRED**. The authorization URL to be used for this flow. This MUST be in the form of an absolute URL. +tokenUrl | `string` | `oauth2` (`"password"`, `"clientCredentials"`, `"authorizationCode"`) | **REQUIRED**. The token URL to be used for this flow. This MUST be in the form of an absolute URL. +refreshUrl | `string` | `oauth2` | The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL. +availableScopes | Map[`string`, `string`] | `oauth2` | **REQUIRED**. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### OAuth Flow Object Examples + +```JSON +{ + "authorizationUrl": "https://example.com/api/oauth/dialog", + "tokenUrl": "https://example.com/api/oauth/token", + "availableScopes": { + "write:pets": "modify pets in your account", + "read:pets": "read your pets" + } +} +``` + +```YAML +authorizationUrl: https://example.com/api/oauth/dialog +tokenUrl: https://example.com/api/oauth/token +availableScopes: + write:pets: modify pets in your account + read:pets: read your pets +``` + + + +### Correlation ID Object + +An object that specifies an identifier at design time that can used for message tracing and correlation. + +For specifying and computing the location of a Correlation ID, a [runtime expression](#runtimeExpression) is used. + +##### Fixed Fields + +Field Name | Type | Description +---|:---|--- +description | `string` | An optional description of the identifier. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. +location | `string` | **REQUIRED.** A [runtime expression](#runtimeExpression) that specifies the location of the correlation ID. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Examples + +```json +{ + "description": "Default Correlation ID", + "location": "$message.header#/correlationId" +} +``` + +```yaml +description: Default Correlation ID +location: $message.header#/correlationId +``` + +### Runtime Expression + +A runtime expression allows values to be defined based on information that will be available within the message. +This mechanism is used by [Correlation ID Object](#correlationIdObject) and [Operation Reply Address Object](#operationReplyAddressObject). + +The runtime expression is defined by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax: + +``` + expression = ( "$message" "." source ) + source = ( header-reference | payload-reference ) + header-reference = "header" ["#" fragment] + payload-reference = "payload" ["#" fragment] + fragment = a JSON Pointer [RFC 6901](https://tools.ietf.org/html/rfc6901) +``` + +The table below provides examples of runtime expressions and examples of their use in a value: + +##### Examples + +Source Location | Example expression | Notes +---|:---|:---| +Message Header Property | `$message.header#/MQMD/CorrelId` | Correlation ID is set using the `CorrelId` value from the `MQMD` header. +Message Payload Property | `$message.payload#/messageId` | Correlation ID is set using the `messageId` value from the message payload. + +Runtime expressions preserve the type of the referenced value. + +### Traits Merge Mechanism + +Traits MUST be merged with the target object using the [JSON Merge Patch](https://tools.ietf.org/html/rfc7386) algorithm in the same order they are defined. A property on a trait MUST NOT override the same property on the target object. + +#### Example + +An object like the following: + +```yaml +description: A longer description. +traits: + - name: UserSignup + description: Description from trait. + - tags: + - name: user +``` + +Would look like the following after applying traits: + +```yaml +name: UserSignup +description: A longer description. +tags: + - name: user +``` + +### Specification Extensions + +While the AsyncAPI Specification tries to accommodate most use cases, additional data can be added to extend the specification at certain points. + +The extensions properties are implemented as patterned fields that are always prefixed by `"x-"`. + +Field Pattern | Type | Description +---|:---:|--- +`^x-[\w\d\-\_]+$` | Any | Allows extensions to the AsyncAPI Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. Can have any valid JSON format value. + +The extensions may or may not be supported by the available tooling, but those may be extended as well to add requested support (if tools are internal or open-sourced). + +### Data Type Formats + +Primitives have an optional modifier property: `format`. +The AsyncAPI specification uses several known formats to more finely define the data type being used. +However, the `format` property is an open `string`-valued property, and can have any value to support documentation needs. +Formats such as `"email"`, `"uuid"`, etc., can be used even though they are not defined by this specification. +Types that are not accompanied by a `format` property follow their definition from the JSON Schema. +Tools that do not recognize a specific `format` MAY default back to the `type` alone, as if the `format` was not specified. + +The formats defined by the AsyncAPI Specification are: + + +Common Name | `type` | [`format`](#dataTypeFormat) | Comments +----------- | ------ | -------- | -------- +integer | `integer` | `int32` | signed 32 bits +long | `integer` | `int64` | signed 64 bits +float | `number` | `float` | | +double | `number` | `double` | | +string | `string` | | | +byte | `string` | `byte` | base64 encoded characters +binary | `string` | `binary` | any sequence of octets +boolean | `boolean` | | | +date | `string` | `date` | As defined by `full-date` - [RFC3339](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6) +dateTime | `string` | `date-time` | As defined by `date-time` - [RFC3339](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6) +password | `string` | `password` | Used to hint UIs the input needs to be obscured. diff --git a/public/_redirects b/public/_redirects index 21425ffb3f6..f79523187d6 100644 --- a/public/_redirects +++ b/public/_redirects @@ -19,10 +19,11 @@ https://www.asyncapi.io/* https://www.asyncapi.com/:splat 301! # Redirection will be handled automatically by Action. # LATEST-SPEC-REDIRECTION:START -/docs/reference/specification/latest /docs/reference/specification/v3.0.0 302! +/docs/reference/specification/latest /docs/reference/specification/v3.0.1 302! # LATEST-SPEC-REDIRECTION:END # SPEC-REDIRECTION:START +/docs/reference/specification/3.0.1 /docs/reference/specification/v3.0.1 302! /docs/reference/specification/3.0.0 /docs/reference/specification/v3.0.0 302! # SPEC-REDIRECTION:END From 19155aefb4e4d3a08891af273283933a6b365fbc Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Wed, 13 Dec 2023 13:51:38 +0100 Subject: [PATCH 014/243] docs(spec): revert v3.0.1 release (#2434) This reverts commit 3770618567de4b3e0f0216d7ab5c36dede010d0b. --- pages/docs/reference/specification/v3.0.1.md | 2623 ------------------ public/_redirects | 3 +- 2 files changed, 1 insertion(+), 2625 deletions(-) delete mode 100644 pages/docs/reference/specification/v3.0.1.md diff --git a/pages/docs/reference/specification/v3.0.1.md b/pages/docs/reference/specification/v3.0.1.md deleted file mode 100644 index 231a2732b33..00000000000 --- a/pages/docs/reference/specification/v3.0.1.md +++ /dev/null @@ -1,2623 +0,0 @@ -# AsyncAPI Specification - -#### Attribution - -Part of this content has been taken from the great work done by the folks at the [OpenAPI Initiative](https://openapis.org). - -#### Version 3.0.0 - -The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt). - -The AsyncAPI Specification is licensed under [The Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0.html). - -## Introduction - -The AsyncAPI Specification is a project used to describe message-driven APIs in a machine-readable format. It’s protocol-agnostic, so you can use it for APIs that work over any protocol (e.g., AMQP, MQTT, WebSockets, Kafka, STOMP, HTTP, Mercure, etc). - -The AsyncAPI Specification defines a set of files required to describe the API of an [application](#definitionsApplication). -These files can be used to create utilities, such as documentation, code, integration, or testing tools. - -The file(s) SHOULD describe the operations an [application](#definitionsApplication) performs. For instance, consider the following AsyncAPI definition snippet: - -```yaml -channels: - userSignedUp: - # ...(redacted for brevity) -operations: - onUserSignedUp: - action: receive - channel: - $ref: "#/channels/userSignedUp" -``` - -It means that the [application](#definitionsApplication) will receive messages from the `userSignedUp` [channel](#definitionsChannel). - -**The AsyncAPI specification does not assume any kind of software topology, architecture or pattern.** Therefore, a server MAY be a message broker, a web server or any other kind of computer program capable of sending and/or receiving data. However, AsyncAPI offers a mechanism called "bindings" that aims to help with more specific information about the protocol. - -It's NOT RECOMMENDED to derive a [receiver](#definitionsReceiver) AsyncAPI document from a [sender](#definitionsSender) one or vice versa. There are no guarantees that the channel used by an application to receive messages will be the same channel where another application is sending them. Also, certain fields in the document like `summary`, `description`, and the id of the operation might stop making sense. For instance, given the following receiver snippet: - -```yaml -operations: - onUserSignedUp: - summary: On user signed up. - description: Event received when a user signed up on the product. - action: receive - channel: - $ref: "#/channels/userSignedUp" -``` - -We can't automatically assume that an _opposite_ application exists by simply replacing `receive` with `send`: - -```yaml -operations: - onUserSignedUp: # <-- This doesn't make sense now. Should be something like sendUserSignedUp. - summary: On user signed up. # <-- This doesn't make sense now. Should say something like "Sends a user signed up event". - description: Event received when a user signed up on the product. # <-- This doesn't make sense now. Should speak about sending an event, not receiving it. - action: send - channel: - $ref: "#/channels/userSignedUp" -``` - -Aside from the issues mentioned above, there may also be infrastructure configuration that is not represented here. For instance, a system may use a read-only channel for receiving messages, a different one for sending them, and an intermediary process that will forward messages from one channel to the other. - - -## Definitions - -### Server -A server MAY be a message broker that is capable of sending and/or receiving between a [sender](#definitionsSender) and [receiver](#definitionsReceiver). A server MAY be a service with WebSocket API that enables message-driven communication between browser-to-server or server-to-server. - -### Application -An application is any kind of computer program or a group of them. It MUST be a [sender](#definitionsSender), a [receiver](#definitionsReceiver), or both. An application MAY be a microservice, IoT device (sensor), mainframe process, message broker, etc. An application MAY be written in any number of different programming languages as long as they support the selected [protocol](#definitionsProtocol). An application MUST also use a protocol supported by the [server](#definitionsServer) in order to connect and exchange [messages](#definitionsMessage). - -### Sender -A sender is a type of application, that is sending [messages](#definitionsMessage) to [channels](#definitionsChannel). A sender MAY send to multiple channels depending on the [server](#definitionsServer), protocol, and use-case pattern. - -### Receiver -A receiver is a type of application that is receiving [messages](#definitionsMessage) from [channels](#definitionsChannel). A receiver MAY receive from multiple channels depending on the [server](#definitionsServer), protocol, and the use-case pattern. A receiver MAY forward a received message further without changing it. A receiver MAY act as a consumer and react to the message. A receiver MAY act as a processor that, for example, aggregates multiple messages in one and forwards them. - -### Message -A message is the mechanism by which information is exchanged via a channel between [servers](#definitionsServer) and applications. A message MAY contain a payload and MAY also contain headers. The headers MAY be subdivided into [protocol](#definitionsProtocol)-defined headers and header properties defined by the application which can act as supporting metadata. The payload contains the data, defined by the application, which MUST be serialized into a format (JSON, XML, Avro, binary, etc.). Since a message is a generic mechanism, it can support multiple interaction patterns such as event, command, request, or response. - -### Channel -A channel is an addressable component, made available by the [server](#definitionsServer), for the organization of [messages](#definitionsMessage). [Sender](#definitionsSender) applications send messages to channels and [receiver](#definitionsReceiver) applications receive messages from channels. [Servers](#definitionsServer) MAY support many channel instances, allowing messages with different content to be addressed to different channels. Depending on the [server](#definitionsServer) implementation, the channel MAY be included in the message via protocol-defined headers. - -### Protocol -A protocol is the mechanism (wireline protocol or API) by which [messages](#definitionsMessage) are exchanged between the application and the [channel](#definitionsChannel). Example protocols include, but are not limited to, AMQP, HTTP, JMS, Kafka, Anypoint MQ, MQTT, Solace, STOMP, Mercure, WebSocket, Google Pub/Sub, Pulsar. - -### Bindings -A "binding" (or "protocol binding") is a mechanism to define protocol-specific information. Therefore, a protocol binding MUST define protocol-specific information only. - -## Specification - -### Format - -The files describing the message-driven API in accordance with the AsyncAPI Specification are represented as JSON objects and conform to the JSON standards. -YAML, being a superset of JSON, can be used as well to represent a A2S (AsyncAPI Specification) file. - -For example, if a field is said to have an array value, the JSON array representation will be used: - -```yaml -{ - "field" : [...] -} -``` - -While the API is described using JSON it does not impose a JSON input/output to the API itself. - -All field names in the specification are **case sensitive**. - -The schema exposes two types of fields. -Fixed fields, which have a declared name, and Patterned fields, which declare a regex pattern for the field name. -Patterned fields can have multiple occurrences as long as each has a unique name. - -In order to preserve the ability to round-trip between YAML and JSON formats, YAML version [1.2](https://www.yaml.org/spec/1.2/spec.html) is recommended along with some additional constraints: - -- Tags MUST be limited to those allowed by the [JSON Schema ruleset](https://www.yaml.org/spec/1.2/spec.html#id2803231) -- Keys used in YAML maps MUST be limited to a scalar string, as defined by the YAML Failsafe schema ruleset - -### File Structure - -An AsyncAPI document MAY be made up of a single document or be divided into multiple, -connected parts at the discretion of the author. In the latter case, [Reference Objects](#referenceObject) are used. - -It is important to note that everything that is defined in an AsyncAPI document MUST be used by the implemented [Application](#definitionsApplication), with the exception of the [Components Object](#componentsObject). Everything that is defined inside the Components Object represents a resource that MAY or MAY NOT be used by the implemented [Application](#definitionsApplication). - -By convention, the AsyncAPI Specification (A2S) file is named `asyncapi.json` or `asyncapi.yaml`. - -### Absolute URLs - -Unless specified otherwise, all properties that are absolute URLs are defined by [RFC3986, section 4.3](https://datatracker.ietf.org/doc/html/rfc3986#section-4.3). - -### Schema - -#### AsyncAPI Object - -This is the root document object for the API specification. -It combines resource listing and API declaration together into one document. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -asyncapi | [AsyncAPI Version String](#A2SVersionString) | **REQUIRED.** Specifies the AsyncAPI Specification version being used. It can be used by tooling Specifications and clients to interpret the version. The structure shall be `major`.`minor`.`patch`, where `patch` versions _must_ be compatible with the existing `major`.`minor` tooling. Typically patch versions will be introduced to address errors in the documentation, and tooling should typically be compatible with the corresponding `major`.`minor` (1.0.*). Patch versions will correspond to patches of this document. -id | [Identifier](#A2SIdString) | Identifier of the [application](#definitionsApplication) the AsyncAPI document is defining. -info | [Info Object](#infoObject) | **REQUIRED.** Provides metadata about the API. The metadata can be used by the clients if needed. -servers | [Servers Object](#serversObject) | Provides connection details of servers. -defaultContentType | [Default Content Type](#defaultContentTypeString) | Default content type to use when encoding/decoding a message's payload. -channels | [Channels Object](#channelsObject) | The channels used by this [application](#definitionsApplication). -operations | [Operations Object](#operationsObject) | The operations this [application](#definitionsApplication) MUST implement. -components | [Components Object](#componentsObject) | An element to hold various reusable objects for the specification. Everything that is defined inside this object represents a resource that MAY or MAY NOT be used in the rest of the document and MAY or MAY NOT be used by the implemented [Application](#definitionsApplication). - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -#### AsyncAPI Version String - -The version string signifies the version of the AsyncAPI Specification that the document complies to. -The format for this string _must_ be `major`.`minor`.`patch`. The `patch` _may_ be suffixed by a hyphen and extra alphanumeric characters. - -A `major`.`minor` shall be used to designate the AsyncAPI Specification version, and will be considered compatible with the AsyncAPI Specification specified by that `major`.`minor` version. -The patch version will not be considered by tooling, making no distinction between `1.0.0` and `1.0.1`. - -In subsequent versions of the AsyncAPI Specification, care will be given such that increments of the `minor` version should not interfere with operations of tooling developed to a lower minor version. Thus a hypothetical `1.1.0` specification should be usable with tooling designed for `1.0.0`. - -#### Identifier - -This field represents a unique universal identifier of the [application](#definitionsApplication) the AsyncAPI document is defining. It must conform to the URI format, according to [RFC3986](https://tools.ietf.org/html/rfc3986). - -It is RECOMMENDED to use a [URN](https://tools.ietf.org/html/rfc8141) to globally and uniquely identify the application during long periods of time, even after it becomes unavailable or ceases to exist. - -###### Examples - -```json -{ - "id": "urn:example:com:smartylighting:streetlights:server" -} -``` - -```yaml -id: 'urn:example:com:smartylighting:streetlights:server' -``` - -```json -{ - "id": "https://github.com/smartylighting/streetlights-server" -} -``` - -```yaml -id: 'https://github.com/smartylighting/streetlights-server' -``` - -#### Info Object - -The object provides metadata about the API. -The metadata can be used by the clients if needed. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -title | `string` | **REQUIRED.** The title of the application. -version | `string` | **REQUIRED** Provides the version of the application API (not to be confused with the specification version). -description | `string` | A short description of the application. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. -termsOfService | `string` | A URL to the Terms of Service for the API. This MUST be in the form of an absolute URL. -contact | [Contact Object](#contactObject) | The contact information for the exposed API. -license | [License Object](#licenseObject) | The license information for the exposed API. -tags | [Tags Object](#tagsObject) | A list of tags for application API documentation control. Tags can be used for logical grouping of applications. -externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation of the exposed API. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Info Object Example: - -```json -{ - "title": "AsyncAPI Sample App", - "version": "1.0.1", - "description": "This is a sample app.", - "termsOfService": "https://asyncapi.org/terms/", - "contact": { - "name": "API Support", - "url": "https://www.asyncapi.org/support", - "email": "support@asyncapi.org" - }, - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "externalDocs": { - "description": "Find more info here", - "url": "https://www.asyncapi.org" - }, - "tags": [ - { - "name": "e-commerce" - } - ] -} -``` - -```yaml -title: AsyncAPI Sample App -version: 1.0.1 -description: This is a sample app. -termsOfService: https://asyncapi.org/terms/ -contact: - name: API Support - url: https://www.asyncapi.org/support - email: support@asyncapi.org -license: - name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html -externalDocs: - description: Find more info here - url: https://www.asyncapi.org -tags: - - name: e-commerce -``` - -#### Contact Object - -Contact information for the exposed API. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -name | `string` | The identifying name of the contact person/organization. -url | `string` | The URL pointing to the contact information. This MUST be in the form of an absolute URL. -email | `string` | The email address of the contact person/organization. MUST be in the format of an email address. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Contact Object Example: - -```json -{ - "name": "API Support", - "url": "https://www.example.com/support", - "email": "support@example.com" -} -``` - -```yaml -name: API Support -url: https://www.example.com/support -email: support@example.com -``` - -#### License Object - -License information for the exposed API. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -name | `string` | **REQUIRED.** The license name used for the API. -url | `string` | A URL to the license used for the API. This MUST be in the form of an absolute URL. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### License Object Example: - -```json -{ - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" -} -``` - -```yaml -name: Apache 2.0 -url: https://www.apache.org/licenses/LICENSE-2.0.html -``` - -#### Servers Object - -The Servers Object is a map of [Server Objects](#serverObject). - -##### Patterned Fields - -Field Pattern | Type | Description ----|:---:|--- -`^[A-Za-z0-9_\-]+$` | [Server Object](#serverObject) \| [Reference Object](#referenceObject) | The definition of a server this application MAY connect to. - -##### Servers Object Example - -```json -{ - "development": { - "host": "localhost:5672", - "description": "Development AMQP broker.", - "protocol": "amqp", - "protocolVersion": "0-9-1", - "tags": [ - { - "name": "env:development", - "description": "This environment is meant for developers to run their own tests." - } - ] - }, - "staging": { - "host": "rabbitmq-staging.in.mycompany.com:5672", - "description": "RabbitMQ broker for the staging environment.", - "protocol": "amqp", - "protocolVersion": "0-9-1", - "tags": [ - { - "name": "env:staging", - "description": "This environment is a replica of the production environment." - } - ] - }, - "production": { - "host": "rabbitmq.in.mycompany.com:5672", - "description": "RabbitMQ broker for the production environment.", - "protocol": "amqp", - "protocolVersion": "0-9-1", - "tags": [ - { - "name": "env:production", - "description": "This environment is the live environment available for final users." - } - ] - } -} -``` - -```yaml -development: - host: localhost:5672 - description: Development AMQP broker. - protocol: amqp - protocolVersion: 0-9-1 - tags: - - name: "env:development" - description: "This environment is meant for developers to run their own tests." -staging: - host: rabbitmq-staging.in.mycompany.com:5672 - description: RabbitMQ broker for the staging environment. - protocol: amqp - protocolVersion: 0-9-1 - tags: - - name: "env:staging" - description: "This environment is a replica of the production environment." -production: - host: rabbitmq.in.mycompany.com:5672 - description: RabbitMQ broker for the production environment. - protocol: amqp - protocolVersion: 0-9-1 - tags: - - name: "env:production" - description: "This environment is the live environment available for final users." -``` - - -#### Server Object - -An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data. This object is used to capture details such as URIs, protocols and security configuration. Variable substitution can be used so that some details, for example usernames and passwords, can be injected by code generation tools. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -host | `string` | **REQUIRED**. The server host name. It MAY include the port. This field supports [Server Variables](#serverObjectVariables). Variable substitutions will be made when a variable is named in `{`braces`}`. -protocol | `string` | **REQUIRED**. The protocol this server supports for connection. -protocolVersion | `string` | The version of the protocol used for connection. For instance: AMQP `0.9.1`, HTTP `2.0`, Kafka `1.0.0`, etc. -pathname | `string` | The path to a resource in the host. This field supports [Server Variables](#serverObjectVariables). Variable substitutions will be made when a variable is named in `{`braces`}`. -description | `string` | An optional string describing the server. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. -title | `string` | A human-friendly title for the server. -summary | `string` | A short summary of the server. -variables | Map[`string`, [Server Variable Object](#serverVariableObject) \| [Reference Object](#referenceObject)]] | A map between a variable name and its value. The value is used for substitution in the server's `host` and `pathname` template. -security | [[Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)] | A declaration of which security schemes can be used with this server. The list of values includes alternative [security scheme objects](#securitySchemeObject) that can be used. Only one of the security scheme objects need to be satisfied to authorize a connection or operation. -tags | [Tags Object](#tagsObject) | A list of tags for logical grouping and categorization of servers. -externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this server. -bindings | [Server Bindings Object](#serverBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the server. - -##### Server Object Example - -A single server would be described as: - -```json -{ - "host": "kafka.in.mycompany.com:9092", - "description": "Production Kafka broker.", - "protocol": "kafka", - "protocolVersion": "3.2" -} -``` - -```yaml -host: kafka.in.mycompany.com:9092 -description: Production Kafka broker. -protocol: kafka -protocolVersion: '3.2' -``` - -An example of a server that has a `pathname`: - -```json -{ - "host": "rabbitmq.in.mycompany.com:5672", - "pathname": "/production", - "protocol": "amqp", - "description": "Production RabbitMQ broker (uses the `production` vhost)." -} -``` - -```yaml -host: rabbitmq.in.mycompany.com:5672 -pathname: /production -protocol: amqp -description: Production RabbitMQ broker (uses the `production` vhost). -``` - -#### Server Variable Object - -An object representing a Server Variable for server URL template substitution. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -enum | [`string`] | An enumeration of string values to be used if the substitution options are from a limited set. -default | `string` | The default value to use for substitution, and to send, if an alternate value is _not_ supplied. -description | `string` | An optional description for the server variable. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. -examples | [`string`] | An array of examples of the server variable. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Server Variable Object Example - -```json -{ - "host": "rabbitmq.in.mycompany.com:5672", - "pathname": "/{env}", - "protocol": "amqp", - "description": "RabbitMQ broker. Use the `env` variable to point to either `production` or `staging`.", - "variables": { - "env": { - "description": "Environment to connect to. It can be either `production` or `staging`.", - "enum": [ - "production", - "staging" - ] - } - } -} -``` - -```yaml -host: 'rabbitmq.in.mycompany.com:5672' -pathname: '/{env}' -protocol: amqp -description: RabbitMQ broker. Use the `env` variable to point to either `production` or `staging`. -variables: - env: - description: Environment to connect to. It can be either `production` or `staging`. - enum: - - production - - staging -``` - - -#### Default Content Type - -A string representing the default content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). This value MUST be used by schema parsers when the [contentType](#messageObjectContentType) property is omitted. - -In case a message can't be encoded/decoded using this value, schema parsers MUST use their default content type. - -##### Default Content Type Example - -```json -{ - "defaultContentType": "application/json" -} -``` - -```yaml -defaultContentType: application/json -``` - - - - - - -#### Channels Object - -An object containing all the [Channel Object](#channelObject) definitions the [Application](#definitionsApplication) MUST use during runtime. - -##### Patterned Fields - -Field Pattern | Type | Description ----|:---:|--- -{channelId} | [Channel Object](#channelObject) \| [Reference Object](#referenceObject) | An identifier for the described channel. The `channelId` value is **case-sensitive**. Tools and libraries MAY use the `channelId` to uniquely identify a channel, therefore, it is RECOMMENDED to follow common programming naming conventions. - -##### Channels Object Example - -```json -{ - "userSignedUp": { - "address": "user.signedup", - "messages": { - "userSignedUp": { - "$ref": "#/components/messages/userSignedUp" - } - } - } -} -``` - -```yaml -userSignedUp: - address: 'user.signedup' - messages: - userSignedUp: - $ref: '#/components/messages/userSignedUp' -``` - - - - -#### Channel Object - -Describes a shared communication channel. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -address | `string` \| `null` | An optional string representation of this channel's address. The address is typically the "topic name", "routing key", "event type", or "path". When `null` or absent, it MUST be interpreted as unknown. This is useful when the address is generated dynamically at runtime or can't be known upfront. It MAY contain [Channel Address Expressions](#channelAddressExpressions). Query parameters and fragments SHALL NOT be used, instead use [bindings](#channelBindingsObject) to define them. -messages | [Messages Object](#messagesObject) | A map of the messages that will be sent to this channel by any application at any time. **Every message sent to this channel MUST be valid against one, and only one, of the [message objects](#messageObject) defined in this map.** -title | `string` | A human-friendly title for the channel. -summary | `string` | A short summary of the channel. -description | `string` | An optional description of this channel. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. -servers | [[Reference Object](#referenceObject)] | An array of `$ref` pointers to the definition of the servers in which this channel is available. If the channel is located in the [root Channels Object](#channelsObject), it MUST point to a subset of server definitions located in the [root Servers Object](#serversObject), and MUST NOT point to a subset of server definitions located in the [Components Object](#componentsObject) or anywhere else. If the channel is located in the [Components Object](#componentsObject), it MAY point to a [Server Objects](#serverObject) in any location. If `servers` is absent or empty, this channel MUST be available on all the servers defined in the [Servers Object](#serversObject). Please note the `servers` property value MUST be an array of [Reference Objects](#referenceObject) and, therefore, MUST NOT contain an array of [Server Objects](#serverObject). However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience. -parameters | [Parameters Object](#parametersObject) | A map of the parameters included in the channel address. It MUST be present only when the address contains [Channel Address Expressions](#channelAddressExpressions). -tags | [Tags Object](#tagsObject) | A list of tags for logical grouping of channels. -externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this channel. -bindings | [Channel Bindings Object](#channelBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the channel. - - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Channel Object Example - -```json -{ - "address": "users.{userId}", - "title": "Users channel", - "description": "This channel is used to exchange messages about user events.", - "messages": { - "userSignedUp": { - "$ref": "#/components/messages/userSignedUp" - }, - "userCompletedOrder": { - "$ref": "#/components/messages/userCompletedOrder" - } - }, - "parameters": { - "userId": { - "$ref": "#/components/parameters/userId" - } - }, - "servers": [ - { "$ref": "#/servers/rabbitmqInProd" }, - { "$ref": "#/servers/rabbitmqInStaging" } - ], - "bindings": { - "amqp": { - "is": "queue", - "queue": { - "exclusive": true - } - } - }, - "tags": [{ - "name": "user", - "description": "User-related messages" - }], - "externalDocs": { - "description": "Find more info here", - "url": "https://example.com" - } -} -``` - -```yaml -address: 'users.{userId}' -title: Users channel -description: This channel is used to exchange messages about user events. -messages: - userSignedUp: - $ref: '#/components/messages/userSignedUp' - userCompletedOrder: - $ref: '#/components/messages/userCompletedOrder' -parameters: - userId: - $ref: '#/components/parameters/userId' -servers: - - $ref: '#/servers/rabbitmqInProd' - - $ref: '#/servers/rabbitmqInStaging' -bindings: - amqp: - is: queue - queue: - exclusive: true -tags: - - name: user - description: User-related messages -externalDocs: - description: 'Find more info here' - url: 'https://example.com' -``` - - - - - -#### Channel Address Expressions - -Channel addresses MAY contain expressions that can be used to define dynamic values. - -Expressions MUST be composed by a name enclosed in curly braces (`{` and `}`). E.g., `{userId}`. - - - - - -#### Messages Object - -Describes a map of messages included in a channel. - -##### Patterned Fields - -Field Pattern | Type | Description ----|:---:|--- -`{messageId}` | [Message Object](#messageObject) \| [Reference Object](#referenceObject) | The key represents the message identifier. The `messageId` value is **case-sensitive**. Tools and libraries MAY use the `messageId` value to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions. - -##### Messages Object Example - -```json -{ - "userSignedUp": { - "$ref": "#/components/messages/userSignedUp" - }, - "userCompletedOrder": { - "$ref": "#/components/messages/userCompletedOrder" - } -} -``` - -```yaml -userSignedUp: - $ref: '#/components/messages/userSignedUp' -userCompletedOrder: - $ref: '#/components/messages/userCompletedOrder' -``` - - - -#### Operations Object - -Holds a dictionary with all the [operations](#operationObject) this application MUST implement. - -> If you're looking for a place to define operations that MAY or MAY NOT be implemented by the application, consider defining them in [`components/operations`](#componentsOperations). - -##### Patterned Fields - -Field Pattern | Type | Description ----|:---:|--- -{operationId} | [Operation Object](#operationObject) \| [Reference Object](#referenceObject) | The operation this application MUST implement. The field name (`operationId`) MUST be a string used to identify the operation in the document where it is defined, and its value is **case-sensitive**. Tools and libraries MAY use the `operationId` to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions. - -##### Operations Object Example - -```json -{ - "onUserSignUp": { - "title": "User sign up", - "summary": "Action to sign a user up.", - "description": "A longer description", - "channel": { - "$ref": "#/channels/userSignup" - }, - "action": "send", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "bindings": { - "amqp": { - "ack": false - } - }, - "traits": [ - { "$ref": "#/components/operationTraits/kafka" } - ] - } -} -``` - -```yaml -onUserSignUp: - title: User sign up - summary: Action to sign a user up. - description: A longer description - channel: - $ref: '#/channels/userSignup' - action: send - tags: - - name: user - - name: signup - - name: register - bindings: - amqp: - ack: false - traits: - - $ref: '#/components/operationTraits/kafka' -``` - - -#### Operation Object - -Describes a specific operation. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -action | `"send"` | `"receive"` | **Required**. Use `send` when it's expected that the application will send a message to the given [`channel`](#operationObjectChannel), and `receive` when the application should expect receiving messages from the given [`channel`](#operationObjectChannel). -channel | [Reference Object](#referenceObject) | **Required**. A `$ref` pointer to the definition of the channel in which this operation is performed. If the operation is located in the [root Operations Object](#operationsObject), it MUST point to a channel definition located in the [root Channels Object](#channelsObject), and MUST NOT point to a channel definition located in the [Components Object](#componentsObject) or anywhere else. If the operation is located in the [Components Object](#componentsObject), it MAY point to a [Channel Object](#channelObject) in any location. Please note the `channel` property value MUST be a [Reference Object](#referenceObject) and, therefore, MUST NOT contain a [Channel Object](#channelObject). However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience. -title | `string` | A human-friendly title for the operation. -summary | `string` | A short summary of what the operation is about. -description | `string` | A verbose explanation of the operation. [CommonMark syntax](http://spec.commonmark.org/) can be used for rich text representation. -security | [[Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)]| A declaration of which security schemes are associated with this operation. Only one of the [security scheme objects](#securitySchemeObject) MUST be satisfied to authorize an operation. In cases where [Server Security](#serverObjectSecurity) also applies, it MUST also be satisfied. -tags | [Tags Object](#tagsObject) | A list of tags for logical grouping and categorization of operations. -externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this operation. -bindings | [Operation Bindings Object](#operationBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation. -traits | [[Operation Trait Object](#operationTraitObject) | [Reference Object](#referenceObject) ] | A list of traits to apply to the operation object. Traits MUST be merged using [traits merge mechanism](#traits-merge-mechanism). The resulting object MUST be a valid [Operation Object](#operationObject). -messages | [[Reference Object](#referenceObject)] | A list of `$ref` pointers pointing to the supported [Message Objects](#messageObject) that can be processed by this operation. It MUST contain a subset of the messages defined in the [channel referenced in this operation](#operationObjectChannel), and MUST NOT point to a subset of message definitions located in the [Messages Object](#componentsMessages) in the [Components Object](#componentsObject) or anywhere else. **Every message processed by this operation MUST be valid against one, and only one, of the [message objects](#messageObject) referenced in this list.** Please note the `messages` property value MUST be a list of [Reference Objects](#referenceObject) and, therefore, MUST NOT contain [Message Objects](#messageObject). However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience. -reply | [Operation Reply Object](#operationReplyObject) | [Reference Object](#referenceObject) | The definition of the reply in a request-reply operation. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Operation Object Example - -```json -{ - "title": "User sign up", - "summary": "Action to sign a user up.", - "description": "A longer description", - "channel": { - "$ref": "#/channels/userSignup" - }, - "action": "send", - "security": [ - { - "petstore_auth": [ - "write:pets", - "read:pets" - ] - } - ], - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "bindings": { - "amqp": { - "ack": false - } - }, - "traits": [ - { "$ref": "#/components/operationTraits/kafka" } - ], - "messages": [ - { "$ref": "/components/messages/userSignedUp" } - ], - "reply": { - "address": { - "location": "$message.header#/replyTo" - }, - "channel": { - "$ref": "#/channels/userSignupReply" - }, - "messages": [ - { "$ref": "/components/messages/userSignedUpReply" } - ], - } -} -``` - -```yaml -title: User sign up -summary: Action to sign a user up. -description: A longer description -channel: - $ref: '#/channels/userSignup' -action: send -security: - - petstore_auth: - - write:pets - - read:pets -tags: - - name: user - - name: signup - - name: register -bindings: - amqp: - ack: false -traits: - - $ref: "#/components/operationTraits/kafka" -messages: - - $ref: '#/components/messages/userSignedUp' -reply: - address: - location: '$message.header#/replyTo' - channel: - $ref: '#/channels/userSignupReply' - messages: - - $ref: '#/components/messages/userSignedUpReply' -``` - - - - -#### Operation Trait Object - -Describes a trait that MAY be applied to an [Operation Object](#operationObject). This object MAY contain any property from the [Operation Object](#operationObject), except the `action`, `channel` and `traits` ones. - -If you're looking to apply traits to a message, see the [Message Trait Object](#messageTraitObject). - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -title | `string` | A human-friendly title for the operation. -summary | `string` | A short summary of what the operation is about. -description | `string` | A verbose explanation of the operation. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. -security | [[Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)]| A declaration of which security schemes are associated with this operation. Only one of the [security scheme objects](#securitySchemeObject) MUST be satisfied to authorize an operation. In cases where [Server Security](#serverObjectSecurity) also applies, it MUST also be satisfied. -tags | [Tags Object](#tagsObject) | A list of tags for logical grouping and categorization of operations. -externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this operation. -bindings | [Operation Bindings Object](#operationBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the operation. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Operation Trait Object Example - -```json -{ - "bindings": { - "amqp": { - "ack": false - } - } -} -``` - -```yaml -bindings: - amqp: - ack: false -``` - - - - -#### Operation Reply Object - -Describes the reply part that MAY be applied to an Operation Object. If an operation implements the request/reply pattern, the reply object represents the response message. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -address | [Operation Reply Address Object](#operationReplyAddressObject) | [Reference Object](#referenceObject) | Definition of the address that implementations MUST use for the reply. -channel | [Reference Object](#referenceObject) | A `$ref` pointer to the definition of the channel in which this operation is performed. When [address](#operationReplyAddressObject) is specified, the [`address` property](#channelObjectAddress) of the channel referenced by this property MUST be either `null` or not defined. If the operation reply is located inside a [root Operation Object](#operationObject), it MUST point to a channel definition located in the [root Channels Object](#channelsObject), and MUST NOT point to a channel definition located in the [Components Object](#componentsObject) or anywhere else. If the operation reply is located inside an [Operation Object] in the [Components Object](#componentsObject) or in the [Replies Object](#componentsReplies) in the [Components Object](#componentsObject), it MAY point to a [Channel Object](#channelObject) in any location. Please note the `channel` property value MUST be a [Reference Object](#referenceObject) and, therefore, MUST NOT contain a [Channel Object](#channelObject). However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience. -messages | [[Reference Object](#referenceObject)] | A list of `$ref` pointers pointing to the supported [Message Objects](#messageObject) that can be processed by this operation as reply. It MUST contain a subset of the messages defined in the [channel referenced in this operation reply](#operationObjectChannel), and MUST NOT point to a subset of message definitions located in the [Components Object](#componentsObject) or anywhere else. **Every message processed by this operation MUST be valid against one, and only one, of the [message objects](#messageObject) referenced in this list.** Please note the `messages` property value MUST be a list of [Reference Objects](#referenceObject) and, therefore, MUST NOT contain [Message Objects](#messageObject). However, it is RECOMMENDED that parsers (or other software) dereference this property for a better development experience. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -#### Operation Reply Address Object - -An object that specifies where an operation has to send the reply. - -For specifying and computing the location of a reply address, a [runtime expression](#runtimeExpression) is used. - - -##### Fixed Fields - -Field Name | Type | Description ----|:---|--- -description | `string` | An optional description of the address. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. -location | `string` | **REQUIRED.** A [runtime expression](#runtimeExpression) that specifies the location of the reply address. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Examples - -```json -{ - "description": "Consumer inbox", - "location": "$message.header#/replyTo" -} -``` - -```yaml -description: Consumer Inbox -location: $message.header#/replyTo -``` - - -#### Parameters Object - -Describes a map of parameters included in a channel address. - -This map MUST contain all the parameters used in the parent channel address. - -##### Patterned Fields - -Field Pattern | Type | Description ----|:---:|--- -`^[A-Za-z0-9_\-]+$` | [Parameter Object](#parameterObject) | [Reference Object](#referenceObject) | The key represents the name of the parameter. It MUST match the parameter name used in the parent channel address. - -##### Parameters Object Example - -```json -{ - "address": "user/{userId}/signedup", - "parameters": { - "userId": { - "description": "Id of the user." - } - } -} -``` - -```yaml -address: user/{userId}/signedup -parameters: - userId: - description: Id of the user. -``` - - - - - -#### Parameter Object - -Describes a parameter included in a channel address. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -enum | [`string`] | An enumeration of string values to be used if the substitution options are from a limited set. -default | `string` | The default value to use for substitution, and to send, if an alternate value is _not_ supplied. -description | `string` | An optional description for the parameter. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. -examples | [`string`] | An array of examples of the parameter value. -location | `string` | A [runtime expression](#runtimeExpression) that specifies the location of the parameter value. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Parameter Object Example - -```json -{ - "address": "user/{userId}/signedup", - "parameters": { - "userId": { - "description": "Id of the user.", - "location": "$message.payload#/user/id" - } - } -} -``` - -```yaml -address: user/{userId}/signedup -parameters: - userId: - description: Id of the user. - location: $message.payload#/user/id -``` - - - - -#### Server Bindings Object - -Map describing protocol-specific definitions for a server. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -`http` | [HTTP Server Binding](https://github.com/asyncapi/bindings/blob/master/http#server) | Protocol-specific information for an HTTP server. -`ws` | [WebSockets Server Binding](https://github.com/asyncapi/bindings/blob/master/websockets#server) | Protocol-specific information for a WebSockets server. -`kafka` | [Kafka Server Binding](https://github.com/asyncapi/bindings/blob/master/kafka#server) | Protocol-specific information for a Kafka server. -`anypointmq` | [Anypoint MQ Server Binding](https://github.com/asyncapi/bindings/blob/master/anypointmq#server) | Protocol-specific information for an Anypoint MQ server. -`amqp` | [AMQP Server Binding](https://github.com/asyncapi/bindings/blob/master/amqp#server) | Protocol-specific information for an AMQP 0-9-1 server. -`amqp1` | [AMQP 1.0 Server Binding](https://github.com/asyncapi/bindings/blob/master/amqp1#server) | Protocol-specific information for an AMQP 1.0 server. -`mqtt` | [MQTT Server Binding](https://github.com/asyncapi/bindings/blob/master/mqtt#server) | Protocol-specific information for an MQTT server. -`mqtt5` | [MQTT 5 Server Binding](https://github.com/asyncapi/bindings/blob/master/mqtt5#server) | Protocol-specific information for an MQTT 5 server. -`nats` | [NATS Server Binding](https://github.com/asyncapi/bindings/blob/master/nats#server) | Protocol-specific information for a NATS server. -`jms` | [JMS Server Binding](https://github.com/asyncapi/bindings/blob/master/jms#server) | Protocol-specific information for a JMS server. -`sns` | [SNS Server Binding](https://github.com/asyncapi/bindings/blob/master/sns#server) | Protocol-specific information for an SNS server. -`solace` | [Solace Server Binding](https://github.com/asyncapi/bindings/blob/master/solace#server) | Protocol-specific information for a Solace server. -`sqs` | [SQS Server Binding](https://github.com/asyncapi/bindings/blob/master/sqs#server) | Protocol-specific information for an SQS server. -`stomp` | [STOMP Server Binding](https://github.com/asyncapi/bindings/blob/master/stomp#server) | Protocol-specific information for a STOMP server. -`redis` | [Redis Server Binding](https://github.com/asyncapi/bindings/blob/master/redis#server) | Protocol-specific information for a Redis server. -`mercure` | [Mercure Server Binding](https://github.com/asyncapi/bindings/blob/master/mercure#server) | Protocol-specific information for a Mercure server. -`ibmmq` | [IBM MQ Server Binding](https://github.com/asyncapi/bindings/blob/master/ibmmq#server-binding-object) | Protocol-specific information for an IBM MQ server. -`googlepubsub` | [Google Cloud Pub/Sub Server Binding](https://github.com/asyncapi/bindings/blob/master/googlepubsub#server) | Protocol-specific information for a Google Cloud Pub/Sub server. -`pulsar` | [Pulsar Server Binding](https://github.com/asyncapi/bindings/tree/master/pulsar#server-binding-object) | Protocol-specific information for a Pulsar server. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - - - -#### Channel Bindings Object - -Map describing protocol-specific definitions for a channel. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -`http` | [HTTP Channel Binding](https://github.com/asyncapi/bindings/blob/master/http/README.md#channel) | Protocol-specific information for an HTTP channel. -`ws` | [WebSockets Channel Binding](https://github.com/asyncapi/bindings/blob/master/websockets/README.md#channel) | Protocol-specific information for a WebSockets channel. -`kafka` | [Kafka Channel Binding](https://github.com/asyncapi/bindings/blob/master/kafka/README.md#channel) | Protocol-specific information for a Kafka channel. -`anypointmq` | [Anypoint MQ Channel Binding](https://github.com/asyncapi/bindings/blob/master/anypointmq/README.md#channel) | Protocol-specific information for an Anypoint MQ channel. -`amqp` | [AMQP Channel Binding](https://github.com/asyncapi/bindings/blob/master/amqp/README.md#channel) | Protocol-specific information for an AMQP 0-9-1 channel. -`amqp1` | [AMQP 1.0 Channel Binding](https://github.com/asyncapi/bindings/blob/master/amqp1/README.md#channel) | Protocol-specific information for an AMQP 1.0 channel. -`mqtt` | [MQTT Channel Binding](https://github.com/asyncapi/bindings/blob/master/mqtt/README.md#channel) | Protocol-specific information for an MQTT channel. -`mqtt5` | [MQTT 5 Channel Binding](https://github.com/asyncapi/bindings/blob/master/mqtt5#channel) | Protocol-specific information for an MQTT 5 channel. -`nats` | [NATS Channel Binding](https://github.com/asyncapi/bindings/blob/master/nats/README.md#channel) | Protocol-specific information for a NATS channel. -`jms` | [JMS Channel Binding](https://github.com/asyncapi/bindings/blob/master/jms/README.md#channel) | Protocol-specific information for a JMS channel. -`sns` | [SNS Channel Binding](https://github.com/asyncapi/bindings/blob/master/sns/README.md#channel) | Protocol-specific information for an SNS channel. -`solace` | [Solace Channel Binding](https://github.com/asyncapi/bindings/blob/master/solace#channel) | Protocol-specific information for a Solace channel. -`sqs` | [SQS Channel Binding](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#channel) | Protocol-specific information for an SQS channel. -`stomp` | [STOMP Channel Binding](https://github.com/asyncapi/bindings/blob/master/stomp/README.md#channel) | Protocol-specific information for a STOMP channel. -`redis` | [Redis Channel Binding](https://github.com/asyncapi/bindings/blob/master/redis#channel) | Protocol-specific information for a Redis channel. -`mercure` | [Mercure Channel Binding](https://github.com/asyncapi/bindings/blob/master/mercure#channel) | Protocol-specific information for a Mercure channel. -`ibmmq` | [IBM MQ Channel Binding](https://github.com/asyncapi/bindings/tree/master/ibmmq#channel-binding-object) | Protocol-specific information for an IBM MQ channel. -`googlepubsub` | [Google Cloud Pub/Sub Channel Binding](https://github.com/asyncapi/bindings/tree/master/googlepubsub#channel) | Protocol-specific information for a Google Cloud Pub/Sub channel. -`pulsar` | [Pulsar Channel Binding](https://github.com/asyncapi/bindings/tree/master/pulsar#channel-binding-object) | Protocol-specific information for a Pulsar channel. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - - - -#### Operation Bindings Object - -Map describing protocol-specific definitions for an operation. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -`http` | [HTTP Operation Binding](https://github.com/asyncapi/bindings/blob/master/http/README.md#operation) | Protocol-specific information for an HTTP operation. -`ws` | [WebSockets Operation Binding](https://github.com/asyncapi/bindings/blob/master/websockets/README.md#operation) | Protocol-specific information for a WebSockets operation. -`kafka` | [Kafka Operation Binding](https://github.com/asyncapi/bindings/blob/master/kafka/README.md#operation) | Protocol-specific information for a Kafka operation. -`anypointmq` | [Anypoint MQ Operation Binding](https://github.com/asyncapi/bindings/blob/master/anypointmq/README.md#operation) | Protocol-specific information for an Anypoint MQ operation. -`amqp` | [AMQP Operation Binding](https://github.com/asyncapi/bindings/blob/master/amqp/README.md#operation) | Protocol-specific information for an AMQP 0-9-1 operation. -`amqp1` | [AMQP 1.0 Operation Binding](https://github.com/asyncapi/bindings/blob/master/amqp1/README.md#operation) | Protocol-specific information for an AMQP 1.0 operation. -`mqtt` | [MQTT Operation Binding](https://github.com/asyncapi/bindings/blob/master/mqtt/README.md#operation) | Protocol-specific information for an MQTT operation. -`mqtt5` | [MQTT 5 Operation Binding](https://github.com/asyncapi/bindings/blob/master/mqtt5/README.md#operation) | Protocol-specific information for an MQTT 5 operation. -`nats` | [NATS Operation Binding](https://github.com/asyncapi/bindings/blob/master/nats/README.md#operation) | Protocol-specific information for a NATS operation. -`jms` | [JMS Operation Binding](https://github.com/asyncapi/bindings/blob/master/jms/README.md#operation) | Protocol-specific information for a JMS operation. -`sns` | [SNS Operation Binding](https://github.com/asyncapi/bindings/blob/master/sns/README.md#operation) | Protocol-specific information for an SNS operation. -`solace` | [Solace Operation Binding](https://github.com/asyncapi/bindings/blob/master/solace#operation) | Protocol-specific information for a Solace operation. -`sqs` | [SQS Operation Binding](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#operation) | Protocol-specific information for an SQS operation. -`stomp` | [STOMP Operation Binding](https://github.com/asyncapi/bindings/blob/master/stomp/README.md#operation) | Protocol-specific information for a STOMP operation. -`redis` | [Redis Operation Binding](https://github.com/asyncapi/bindings/blob/master/redis#operation) | Protocol-specific information for a Redis operation. -`mercure` | [Mercure Operation Binding](https://github.com/asyncapi/bindings/blob/master/mercure#operation) | Protocol-specific information for a Mercure operation. -`googlepubsub` | [Google Cloud Pub/Sub Operation Binding](https://github.com/asyncapi/bindings/blob/master/googlepubsub#operation) | Protocol-specific information for a Google Cloud Pub/Sub operation. -`ibmmq` | [IBM MQ Operation Binding](https://github.com/asyncapi/bindings/blob/master/ibmmq#operation-binding-object) | Protocol-specific information for an IBM MQ operation. -`pulsar` | [Pulsar Operation Binding](https://github.com/asyncapi/bindings/tree/master/pulsar#operation-binding-fields) | Protocol-specific information for a Pulsar operation. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - - - - -#### Message Bindings Object - -Map describing protocol-specific definitions for a message. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -`http` | [HTTP Message Binding](https://github.com/asyncapi/bindings/blob/master/http/README.md#message) | Protocol-specific information for an HTTP message, i.e., a request or a response. -`ws` | [WebSockets Message Binding](https://github.com/asyncapi/bindings/blob/master/websockets/README.md#message) | Protocol-specific information for a WebSockets message. -`kafka` | [Kafka Message Binding](https://github.com/asyncapi/bindings/blob/master/kafka/README.md#message) | Protocol-specific information for a Kafka message. -`anypointmq` | [Anypoint MQ Message Binding](https://github.com/asyncapi/bindings/blob/master/anypointmq/README.md#message) | Protocol-specific information for an Anypoint MQ message. -`amqp` | [AMQP Message Binding](https://github.com/asyncapi/bindings/blob/master/amqp/README.md#message) | Protocol-specific information for an AMQP 0-9-1 message. -`amqp1` | [AMQP 1.0 Message Binding](https://github.com/asyncapi/bindings/blob/master/amqp1/README.md#message) | Protocol-specific information for an AMQP 1.0 message. -`mqtt` | [MQTT Message Binding](https://github.com/asyncapi/bindings/blob/master/mqtt/README.md#message) | Protocol-specific information for an MQTT message. -`mqtt5` | [MQTT 5 Message Binding](https://github.com/asyncapi/bindings/blob/master/mqtt5/README.md#message) | Protocol-specific information for an MQTT 5 message. -`nats` | [NATS Message Binding](https://github.com/asyncapi/bindings/blob/master/nats/README.md#message) | Protocol-specific information for a NATS message. -`jms` | [JMS Message Binding](https://github.com/asyncapi/bindings/blob/master/jms/README.md#message) | Protocol-specific information for a JMS message. -`sns` | [SNS Message Binding](https://github.com/asyncapi/bindings/blob/master/sns/README.md#message) | Protocol-specific information for an SNS message. -`solace` | [Solace Server Binding](https://github.com/asyncapi/bindings/blob/master/solace#message) | Protocol-specific information for a Solace message. -`sqs` | [SQS Message Binding](https://github.com/asyncapi/bindings/blob/master/sqs/README.md#message) | Protocol-specific information for an SQS message. -`stomp` | [STOMP Message Binding](https://github.com/asyncapi/bindings/blob/master/stomp/README.md#message) | Protocol-specific information for a STOMP message. -`redis` | [Redis Message Binding](https://github.com/asyncapi/bindings/blob/master/redis#message) | Protocol-specific information for a Redis message. -`mercure` | [Mercure Message Binding](https://github.com/asyncapi/bindings/blob/master/mercure#message) | Protocol-specific information for a Mercure message. -`ibmmq` | [IBM MQ Message Binding](https://github.com/asyncapi/bindings/tree/master/ibmmq#message-binding-object) | Protocol-specific information for an IBM MQ message. -`googlepubsub` | [Google Cloud Pub/Sub Message Binding](https://github.com/asyncapi/bindings/tree/master/googlepubsub#message) | Protocol-specific information for a Google Cloud Pub/Sub message. -`pulsar` | [Pulsar Message Binding](https://github.com/asyncapi/bindings/tree/master/pulsar#message-binding-fields) | Protocol-specific information for a Pulsar message. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - - - - - - - -#### Message Object - -Describes a message received on a given channel and operation. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be a map of key-value pairs. It **MUST NOT** define the protocol headers. If this is a [Schema Object](#schemaObject), then the `schemaFormat` will be assumed to be "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). -payload | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Definition of the message payload. If this is a [Schema Object](#schemaObject), then the `schemaFormat` will be assumed to be "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). -correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. -contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. -name | `string` | A machine-friendly name for the message. -title | `string` | A human-friendly title for the message. -summary | `string` | A short summary of what the message is about. -description | `string` | A verbose explanation of the message. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. -tags | [Tags Object](#tagsObject) | A list of tags for logical grouping and categorization of messages. -externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this message. -bindings | [Message Bindings Object](#messageBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the message. -examples | [[Message Example Object](#messageExampleObject)] | List of examples. -traits | [[Message Trait Object](#messageTraitObject) | [Reference Object](#referenceObject)] | A list of traits to apply to the message object. Traits MUST be merged using [traits merge mechanism](#traits-merge-mechanism). The resulting object MUST be a valid [Message Object](#messageObject). - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Message Object Example - -```json -{ - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "contentType": "application/json", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "headers": { - "type": "object", - "properties": { - "correlationId": { - "description": "Correlation ID set by application", - "type": "string" - }, - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "payload": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/userCreate" - }, - "signup": { - "$ref": "#/components/schemas/signup" - } - } - }, - "correlationId": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - }, - "traits": [ - { "$ref": "#/components/messageTraits/commonHeaders" } - ], - "examples": [ - { - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } - } - ] -} -``` - -```yaml -name: UserSignup -title: User signup -summary: Action to sign a user up. -description: A longer description -contentType: application/json -tags: - - name: user - - name: signup - - name: register -headers: - type: object - properties: - correlationId: - description: Correlation ID set by application - type: string - applicationInstanceId: - description: Unique identifier for a given instance of the publishing application - type: string -payload: - type: object - properties: - user: - $ref: "#/components/schemas/userCreate" - signup: - $ref: "#/components/schemas/signup" -correlationId: - description: Default Correlation ID - location: $message.header#/correlationId -traits: - - $ref: "#/components/messageTraits/commonHeaders" -examples: - - name: SimpleSignup - summary: A simple UserSignup example message - headers: - correlationId: my-correlation-id - applicationInstanceId: myInstanceId - payload: - user: - someUserKey: someUserValue - signup: - someSignupKey: someSignupValue -``` - -Example using Avro to define the payload: - -```json -{ - "name": "UserSignup", - "title": "User signup", - "summary": "Action to sign a user up.", - "description": "A longer description", - "tags": [ - { "name": "user" }, - { "name": "signup" }, - { "name": "register" } - ], - "payload": { - "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", - "schema": { - "$ref": "path/to/user-create.avsc#/UserCreate" - } - } -} -``` - -```yaml -name: UserSignup -title: User signup -summary: Action to sign a user up. -description: A longer description -tags: - - name: user - - name: signup - - name: register -payload: - schemaFormat: 'application/vnd.apache.avro+yaml;version=1.9.0' - schema: - $ref: 'path/to/user-create.avsc/#UserCreate' -``` - - - - - - - -#### Message Trait Object - -Describes a trait that MAY be applied to a [Message Object](#messageObject). This object MAY contain any property from the [Message Object](#messageObject), except `payload` and `traits`. - -If you're looking to apply traits to an operation, see the [Operation Trait Object](#operationTraitObject). - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be a map of key-value pairs. It **MUST NOT** define the protocol headers. If this is a [Schema Object](#schemaObject), then the `schemaFormat` will be assumed to be "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). -correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. -contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. -name | `string` | A machine-friendly name for the message. -title | `string` | A human-friendly title for the message. -summary | `string` | A short summary of what the message is about. -description | `string` | A verbose explanation of the message. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. -tags | [Tags Object](#tagsObject) | A list of tags for logical grouping and categorization of messages. -externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this message. -bindings | [Message Bindings Object](#messageBindingsObject) \| [Reference Object](#referenceObject) | A map where the keys describe the name of the protocol and the values describe protocol-specific definitions for the message. -examples | [[Message Example Object](#messageExampleObject)] | List of examples. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Message Trait Object Example - -```json -{ - "contentType": "application/json" -} -``` - -```yaml -contentType: application/json -``` - -#### Message Example Object - -Message Example Object represents an example of a [Message Object](#messageObject) and MUST contain either **headers** and/or **payload** fields. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -headers | `Map[string, any]` | The value of this field MUST validate against the [Message Object's headers](#messageObjectHeaders) field. -payload | `Map[string, any]` | The value of this field MUST validate against the [Message Object's payload](#messageObjectPayload) field. -name | `string` | A machine-friendly name. -summary | `string` | A short summary of what the example is about. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Message Example Object Example - -```json -{ - "name": "SimpleSignup", - "summary": "A simple UserSignup example message", - "headers": { - "correlationId": "my-correlation-id", - "applicationInstanceId": "myInstanceId" - }, - "payload": { - "user": { - "someUserKey": "someUserValue" - }, - "signup": { - "someSignupKey": "someSignupValue" - } - } -} -``` - -```yaml -name: SimpleSignup -summary: A simple UserSignup example message -headers: - correlationId: my-correlation-id - applicationInstanceId: myInstanceId -payload: - user: - someUserKey: someUserValue - signup: - someSignupKey: someSignupValue -``` - -#### Tags Object - -A Tags object is a list of [Tag Objects](#tagObject). An [Tag Object](#tagObject) in a list can be referenced by [Reference Object](#referenceObject). - -#### Tag Object - -Allows adding meta data to a single tag. - -##### Fixed Fields -Field Name | Type | Description ----|:---:|--- -name | `string` | **REQUIRED.** The name of the tag. -description | `string` | A short description for the tag. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. -externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this tag. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Tag Object Example - -```json -{ - "name": "user", - "description": "User-related messages" -} -``` - -```yaml -name: user -description: User-related messages -``` - - - - - - - -#### External Documentation Object - -Allows referencing an external resource for extended documentation. - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -description | `string` | A short description of the target documentation. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. -url | `string` | **REQUIRED.** The URL for the target documentation. This MUST be in the form of an absolute URL. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### External Documentation Object Example - -```json -{ - "description": "Find more info here", - "url": "https://example.com" -} -``` - -```yaml -description: Find more info here -url: https://example.com -``` - - -#### Reference Object - -A simple object to allow referencing other components in the specification, internally and externally. - -The Reference Object is defined by [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03) and follows the same structure, behavior and rules. A JSON Reference SHALL only be used to refer to a schema that is formatted in either JSON or YAML. In the case of a YAML-formatted Schema, the JSON Reference SHALL be applied to the JSON representation of that schema. The JSON representation SHALL be made by applying the conversion described [here](#format). - -For this specification, reference resolution is done as defined by the JSON Reference specification and not by the JSON Schema specification. - -##### Fixed Fields -Field Name | Type | Description ----|:---:|--- -$ref | `string` | **REQUIRED.** The reference string. - -This object cannot be extended with additional properties and any properties added SHALL be ignored. - -##### Reference Object Example - -```json -{ - "$ref": "#/components/schemas/Pet" -} -``` - -```yaml - $ref: '#/components/schemas/Pet' -``` - -#### Components Object - -Holds a set of reusable objects for different aspects of the AsyncAPI specification. -All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object. - -##### Fixed Fields - -Field Name | Type | Description ----|:---|--- - schemas | Map[`string`, [Multi Format Schema Object](#multiFormatSchemaObject) \| [Schema Object](#schemaObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Schema Object](#schemaObject). If this is a [Schema Object](#schemaObject), then the `schemaFormat` will be assumed to be "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). - servers | Map[`string`, [Server Object](#serverObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Server Objects](#serverObject). - channels | Map[`string`, [Channel Object](#channelObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Channel Objects](#channelObject). - operations | Map[`string`, [Operation Object](#operationObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Operation Objects](#operationObject). - messages | Map[`string`, [Message Object](#messageObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Message Objects](#messageObject). - securitySchemes| Map[`string`, [Security Scheme Object](#securitySchemeObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Security Scheme Objects](#securitySchemeObject). - serverVariables | Map[`string`, [Server Variable Object](#serverVariableObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Server Variable Objects](#serverVariableObject). - parameters | Map[`string`, [Parameter Object](#parameterObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Parameter Objects](#parameterObject). - correlationIds | Map[`string`, [Correlation ID Object](#correlationIdObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Correlation ID Objects](#correlationIdObject). -replies | Map[`string`, [Operation Reply Object](#operationReplyObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Operation Reply Objects](#operationReplyObject). - replyAddresses | Map[`string`, [Operation Reply Address Object](#operationReplyAddressObject) | [Reference Object](#referenceObject)] | An object to hold reusable [Operation Reply Address Objects](#operationReplyAddressObject). - externalDocs | Map[`string`, [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [External Documentation Objects](#externalDocumentationObject). - tags | Map[`string`, [Tag Object](#tagObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Tag Objects](#tagObject). - operationTraits | Map[`string`, [Operation Trait Object](#operationTraitObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Operation Trait Objects](#operationTraitObject). - messageTraits | Map[`string`, [Message Trait Object](#messageTraitObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Message Trait Objects](#messageTraitObject). - serverBindings | Map[`string`, [Server Bindings Object](#serverBindingsObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Server Bindings Objects](#serverBindingsObject). - channelBindings | Map[`string`, [Channel Bindings Object](#channelBindingsObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Channel Bindings Objects](#channelBindingsObject). - operationBindings | Map[`string`, [Operation Bindings Object](#operationBindingsObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Operation Bindings Objects](#operationBindingsObject). - messageBindings | Map[`string`, [Message Bindings Object](#messageBindingsObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Message Bindings Objects](#messageBindingsObject). - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -All the fixed fields declared above are objects that MUST use keys that match the regular expression: `^[a-zA-Z0-9\.\-_]+$`. - -Field Name Examples: - -``` -User -User_1 -User_Name -user-name -my.org.User -``` - -##### Components Object Example - -```json -{ - "components": { - "schemas": { - "Category": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - } - }, - "Tag": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - } - }, - "AvroExample": { - "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", - "schema": { - "$ref": "path/to/user-create.avsc#/UserCreate" - } - } - }, - "servers": { - "development": { - "host": "{stage}.in.mycompany.com:{port}", - "description": "RabbitMQ broker", - "protocol": "amqp", - "protocolVersion": "0-9-1", - "variables": { - "stage": { - "$ref": "#/components/serverVariables/stage" - }, - "port": { - "$ref": "#/components/serverVariables/port" - } - } - } - }, - "serverVariables": { - "stage": { - "default": "demo", - "description": "This value is assigned by the service provider, in this example `mycompany.com`" - }, - "port": { - "enum": ["5671", "5672"], - "default": "5672" - } - }, - "channels": { - "user/signedup": { - "subscribe": { - "message": { - "$ref": "#/components/messages/userSignUp" - } - } - } - }, - "messages": { - "userSignUp": { - "summary": "Action to sign a user up.", - "description": "Multiline description of what this action does.\nHere you have another line.\n", - "tags": [ - { - "name": "user" - }, - { - "name": "signup" - } - ], - "headers": { - "type": "object", - "properties": { - "applicationInstanceId": { - "description": "Unique identifier for a given instance of the publishing application", - "type": "string" - } - } - }, - "payload": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/userCreate" - }, - "signup": { - "$ref": "#/components/schemas/signup" - } - } - } - } - }, - "parameters": { - "userId": { - "description": "Id of the user." - } - }, - "correlationIds": { - "default": { - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" - } - }, - "messageTraits": { - "commonHeaders": { - "headers": { - "type": "object", - "properties": { - "my-app-header": { - "type": "integer", - "minimum": 0, - "maximum": 100 - } - } - } - } - } - } -} -``` - -```yaml -components: - schemas: - Category: - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - Tag: - type: object - properties: - id: - type: integer - format: int64 - name: - type: string - AvroExample: - schemaFormat: application/vnd.apache.avro+json;version=1.9.0 - schema: - $ref: 'path/to/user-create.avsc/#UserCreate' - servers: - development: - host: "{stage}.in.mycompany.com:{port}" - description: RabbitMQ broker - protocol: amqp - protocolVersion: 0-9-1 - variables: - stage: - $ref: "#/components/serverVariables/stage" - port: - $ref: "#/components/serverVariables/port" - serverVariables: - stage: - default: demo - description: This value is assigned by the service provider, in this example `mycompany.com` - port: - enum: ["5671", "5672"] - default: "5672" - channels: - user/signedup: - subscribe: - message: - $ref: "#/components/messages/userSignUp" - messages: - userSignUp: - summary: Action to sign a user up. - description: | - Multiline description of what this action does. - Here you have another line. - tags: - - name: user - - name: signup - headers: - type: object - properties: - applicationInstanceId: - description: Unique identifier for a given instance of the publishing application - type: string - payload: - type: object - properties: - user: - $ref: "#/components/schemas/userCreate" - signup: - $ref: "#/components/schemas/signup" - parameters: - userId: - description: Id of the user. - correlationIds: - default: - description: Default Correlation ID - location: $message.header#/correlationId - messageTraits: - commonHeaders: - headers: - type: object - properties: - my-app-header: - type: integer - minimum: 0 - maximum: 100 -``` - -#### Multi Format Schema Object - -The Multi Format Schema Object represents a schema definition. It differs from the [Schema Object](#schemaObject) in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.). - -##### Fixed Fields - -Field Name | Type | Description ----|:---:|--- -schemaFormat | `string` | **Required**. A string containing the name of the schema format that is used to define the information. If `schemaFormat` is missing, it MUST default to `application/vnd.aai.asyncapi+json;version={{asyncapi}}` where `{{asyncapi}}` matches the [AsyncAPI Version String](#A2SVersionString). In such a case, this would make the Multi Format Schema Object equivalent to the [Schema Object](#schemaObject). When using [Reference Object](#referenceObject) within the schema, the `schemaFormat` of the resource being referenced MUST match the `schemaFormat` of the schema that contains the initial reference. For example, if you reference Avro `schema`, then `schemaFormat` of referencing resource and the resource being reference MUST match.

Check out the [supported schema formats table](#multiFormatSchemaFormatTable) for more information. Custom values are allowed but their implementation is OPTIONAL. A custom value MUST NOT refer to one of the schema formats listed in the [table](#multiFormatSchemaFormatTable).

When using [Reference Objects](#referenceObject) within the schema, the `schemaFormat` of the referenced resource MUST match the `schemaFormat` of the schema containing the reference. -schema | `any` | **Required**. Definition of the message payload. It can be of any type but defaults to [Schema Object](#schemaObject). It MUST match the schema format defined in [`schemaFormat`](#multiFormatSchemaObjectSchemaFormat), including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Schema formats table - -The following table contains a set of values that every implementation MUST support. - -Name | Allowed values | Notes ----|:---:|--- -[AsyncAPI 3.0.0 Schema Object](#schemaObject) | `application/vnd.aai.asyncapi;version=3.0.0`, `application/vnd.aai.asyncapi+json;version=3.0.0`, `application/vnd.aai.asyncapi+yaml;version=3.0.0` | This is the default when a `schemaFormat` is not provided. -[JSON Schema Draft 07](https://json-schema.org/specification-links.html#draft-7) | `application/schema+json;version=draft-07`, `application/schema+yaml;version=draft-07` | - -The following table contains a set of values that every implementation is RECOMMENDED to support. - -Name | Allowed values | Notes ----|:---:|--- -[Avro 1.9.0 schema](https://avro.apache.org/docs/1.9.0/spec.html#schemas) | `application/vnd.apache.avro;version=1.9.0`, `application/vnd.apache.avro+json;version=1.9.0`, `application/vnd.apache.avro+yaml;version=1.9.0` | -[OpenAPI 3.0.0 Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schemaObject) | `application/vnd.oai.openapi;version=3.0.0`, `application/vnd.oai.openapi+json;version=3.0.0`, `application/vnd.oai.openapi+yaml;version=3.0.0` | -[RAML 1.0 data type](https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md/) | `application/raml+yaml;version=1.0` | -[Protocol Buffers](https://protobuf.dev/) | `application/vnd.google.protobuf;version=2`, `application/vnd.google.protobuf;version=3` | - - -#### Schema Object - -The Schema Object allows the definition of input and output data types. -These types can be objects, but also primitives and arrays. This object is a superset of the [JSON Schema Specification Draft 07](https://json-schema.org/). The empty schema (which allows any instance to validate) MAY be represented by the `boolean` value `true` and a schema which allows no instance to validate MAY be represented by the `boolean` value `false`. - -Further information about the properties can be found in [JSON Schema Core](https://tools.ietf.org/html/draft-handrews-json-schema-01) and [JSON Schema Validation](https://tools.ietf.org/html/draft-handrews-json-schema-validation-01). -Unless stated otherwise, the property definitions follow the JSON Schema specification as referenced here. - -##### Properties - -The AsyncAPI Schema Object is a JSON Schema vocabulary which extends JSON Schema Core and Validation vocabularies. As such, any keyword available for those vocabularies is by definition available in AsyncAPI, and will work the exact same way, including but not limited to: - -- title -- type -- required -- multipleOf -- maximum -- exclusiveMaximum -- minimum -- exclusiveMinimum -- maxLength -- minLength -- pattern (This string SHOULD be a valid regular expression, according to the [ECMA 262 regular expression](https://www.ecma-international.org/ecma-262/5.1/#sec-7.8.5) dialect) -- maxItems -- minItems -- uniqueItems -- maxProperties -- minProperties -- enum -- const -- examples -- if / then / else -- readOnly -- writeOnly -- properties -- patternProperties -- additionalProperties -- additionalItems -- items -- propertyNames -- contains -- allOf -- oneOf -- anyOf -- not - -The following properties are taken from the JSON Schema definition but their definitions were adjusted to the AsyncAPI Specification. - -- description - [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. -- format - See [Data Type Formats](#dataTypeFormat) for further details. While relying on JSON Schema's defined formats, the AsyncAPI Specification offers a few additional predefined formats. -- default - Use it to specify that property has a predefined value if no other value is present. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, of `type` is `string`, then `default` can be `"foo"` but cannot be `1`. - -Alternatively, any time a Schema Object can be used, a [Reference Object](#referenceObject) can be used in its place. This allows referencing definitions in place of defining them inline. It is appropriate to clarify that the `$ref` keyword MUST follow the behavior described by [Reference Object](#referenceObject) instead of the one in [JSON Schema definition](https://json-schema.org/understanding-json-schema/structuring.html#ref). - -In addition to the JSON Schema fields, the following AsyncAPI vocabulary fields MAY be used for further schema documentation: - -##### Fixed Fields -Field Name | Type | Description ----|:---:|--- -discriminator | `string` | Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the `required` property list. When used, the value MUST be the name of this schema or any schema that inherits it. See [Composition and Inheritance](#schemaComposition) for more details. -externalDocs | [External Documentation Object](#externalDocumentationObject) \| [Reference Object](#referenceObject) | Additional external documentation for this schema. - deprecated | `boolean` | Specifies that a schema is deprecated and SHOULD be transitioned out of usage. Default value is `false`. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -###### Composition and Inheritance (Polymorphism) - -The AsyncAPI Specification allows combining and extending model definitions using the `allOf` property of JSON Schema, in effect offering model composition. -`allOf` takes in an array of object definitions that are validated *independently* but together compose a single object. - -While composition offers model extensibility, it does not imply a hierarchy between the models. -To support polymorphism, AsyncAPI Specification adds the support of the `discriminator` field. -When used, the `discriminator` will be the name of the property used to decide which schema definition is used to validate the structure of the model. -As such, the `discriminator` field MUST be a required field. -There are two ways to define the value of a discriminator for an inheriting instance. - -- Use the schema's name. -- Override the schema's name by overriding the property with a new value. If exists, this takes precedence over the schema's name. - -As such, inline schema definitions, which do not have a given id, *cannot* be used in polymorphism. - -##### Schema Object Examples - -###### Primitive Sample - -```json -{ - "type": "string", - "format": "email" -} -``` - -```yaml -type: string -format: email -``` - -###### Simple Model - -```json -{ - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "address": { - "$ref": "#/components/schemas/Address" - }, - "age": { - "type": "integer", - "format": "int32", - "minimum": 0 - } - } -} -``` - -```yaml -type: object -required: -- name -properties: - name: - type: string - address: - $ref: '#/components/schemas/Address' - age: - type: integer - format: int32 - minimum: 0 -``` - -###### Model with Map/Dictionary Properties - -For a simple string to string mapping: - -```json -{ - "type": "object", - "additionalProperties": { - "type": "string" - } -} -``` - -```yaml -type: object -additionalProperties: - type: string -``` - -For a string to model mapping: - -```json -{ - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/ComplexModel" - } -} -``` - -```yaml -type: object -additionalProperties: - $ref: '#/components/schemas/ComplexModel' -``` - -###### Model with Example - -```json -{ - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "examples": [ - { - "name": "Puma", - "id": 1 - } - ] -} -``` - -```yaml -type: object -properties: - id: - type: integer - format: int64 - name: - type: string -required: -- name -examples: -- name: Puma - id: 1 -``` - -###### Model with Boolean Schemas - -```json -{ - "type": "object", - "required": [ - "anySchema" - ], - "properties": { - "anySchema": true, - "cannotBeDefined": false - } -} -``` - -```yaml -type: object -required: -- anySchema -properties: - anySchema: true - cannotBeDefined: false -``` - -###### Models with Composition - -```json -{ - "schemas": { - "ErrorModel": { - "type": "object", - "required": [ - "message", - "code" - ], - "properties": { - "message": { - "type": "string" - }, - "code": { - "type": "integer", - "minimum": 100, - "maximum": 600 - } - } - }, - "ExtendedErrorModel": { - "allOf": [ - { - "$ref": "#/components/schemas/ErrorModel" - }, - { - "type": "object", - "required": [ - "rootCause" - ], - "properties": { - "rootCause": { - "type": "string" - } - } - } - ] - } - } -} -``` - -```yaml -schemas: - ErrorModel: - type: object - required: - - message - - code - properties: - message: - type: string - code: - type: integer - minimum: 100 - maximum: 600 - ExtendedErrorModel: - allOf: - - $ref: '#/components/schemas/ErrorModel' - - type: object - required: - - rootCause - properties: - rootCause: - type: string -``` - -###### Models with Polymorphism Support - -```json -{ - "schemas": { - "Pet": { - "type": "object", - "discriminator": "petType", - "properties": { - "name": { - "type": "string" - }, - "petType": { - "type": "string" - } - }, - "required": [ - "name", - "petType" - ] - }, - "Cat": { - "description": "A representation of a cat. Note that `Cat` will be used as the discriminator value.", - "allOf": [ - { - "$ref": "#/components/schemas/Pet" - }, - { - "type": "object", - "properties": { - "huntingSkill": { - "type": "string", - "description": "The measured skill for hunting", - "enum": [ - "clueless", - "lazy", - "adventurous", - "aggressive" - ] - } - }, - "required": [ - "huntingSkill" - ] - } - ] - }, - "Dog": { - "description": "A representation of a dog. Note that `Dog` will be used as the discriminator value.", - "allOf": [ - { - "$ref": "#/components/schemas/Pet" - }, - { - "type": "object", - "properties": { - "packSize": { - "type": "integer", - "format": "int32", - "description": "the size of the pack the dog is from", - "minimum": 0 - } - }, - "required": [ - "packSize" - ] - } - ] - }, - "StickInsect": { - "description": "A representation of an Australian walking stick. Note that `StickBug` will be used as the discriminator value.", - "allOf": [ - { - "$ref": "#/components/schemas/Pet" - }, - { - "type": "object", - "properties": { - "petType": { - "const": "StickBug" - }, - "color": { - "type": "string" - } - }, - "required": [ - "color" - ] - } - ] - } - } -} -``` - -```yaml -schemas: - Pet: - type: object - discriminator: petType - properties: - name: - type: string - petType: - type: string - required: - - name - - petType - ## applies to instances with `petType: "Cat"` - ## because that is the schema name - Cat: - description: A representation of a cat - allOf: - - $ref: '#/components/schemas/Pet' - - type: object - properties: - huntingSkill: - type: string - description: The measured skill for hunting - enum: - - clueless - - lazy - - adventurous - - aggressive - required: - - huntingSkill - ## applies to instances with `petType: "Dog"` - ## because that is the schema name - Dog: - description: A representation of a dog - allOf: - - $ref: '#/components/schemas/Pet' - - type: object - properties: - packSize: - type: integer - format: int32 - description: the size of the pack the dog is from - minimum: 0 - required: - - packSize - ## applies to instances with `petType: "StickBug"` - ## because that is the required value of the discriminator field, - ## overriding the schema name - StickInsect: - description: A representation of an Australian walking stick - allOf: - - $ref: '#/components/schemas/Pet' - - type: object - properties: - petType: - const: StickBug - color: - type: string - required: - - color -``` - - - - - -#### Security Scheme Object - -Defines a security scheme that can be used by the operations. Supported schemes are: - -* User/Password. -* API key (either as user or as password). -* X.509 certificate. -* End-to-end encryption (either symmetric or asymmetric). -* HTTP authentication. -* HTTP API key. -* OAuth2's common flows (Implicit, Resource Owner Protected Credentials, Client Credentials and Authorization Code) as defined in [RFC6749](https://tools.ietf.org/html/rfc6749). -* [OpenID Connect Discovery](https://tools.ietf.org/html/draft-ietf-oauth-discovery-06). -* SASL (Simple Authentication and Security Layer) as defined in [RFC4422](https://tools.ietf.org/html/rfc4422). - -##### Fixed Fields -Field Name | Type | Applies To | Description ----|:---:|---|--- -type | `string` | Any | **REQUIRED**. The type of the security scheme. Valid values are `"userPassword"`, `"apiKey"`, `"X509"`, `"symmetricEncryption"`, `"asymmetricEncryption"`, `"httpApiKey"`, `"http"`, `"oauth2"`, `"openIdConnect"`, `"plain"`, `"scramSha256"`, `"scramSha512"`, and `"gssapi"`. -description | `string` | Any | A short description for security scheme. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. -name | `string` | `httpApiKey` | **REQUIRED**. The name of the header, query or cookie parameter to be used. -in | `string` | `apiKey` \| `httpApiKey` | **REQUIRED**. The location of the API key. Valid values are `"user"` and `"password"` for `apiKey` and `"query"`, `"header"` or `"cookie"` for `httpApiKey`. -scheme | `string` | `http` | **REQUIRED**. The name of the HTTP Authorization scheme to be used in the [Authorization header as defined in RFC7235](https://tools.ietf.org/html/rfc7235#section-5.1). -bearerFormat | `string` | `http` (`"bearer"`) | A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes. -flows | [OAuth Flows Object](#oauthFlowsObject) | `oauth2` | **REQUIRED**. An object containing configuration information for the flow types supported. -openIdConnectUrl | `string` | `openIdConnect` | **REQUIRED**. OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of an absolute URL. -scopes | [`string`] | `oauth2` \| `openIdConnect` | List of the needed scope names. An empty array means no scopes are needed. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Security Scheme Object Example - -###### User/Password Authentication Sample - -```json -{ - "type": "userPassword" -} -``` - -```yaml -type: userPassword -``` - -###### API Key Authentication Sample - -```json -{ - "type": "apiKey", - "in": "user" -} -``` - -```yaml -type: apiKey -in: user -``` - -###### X.509 Authentication Sample - -```json -{ - "type": "X509" -} -``` - -```yaml -type: X509 -``` - -###### End-to-end Encryption Authentication Sample - -```json -{ - "type": "symmetricEncryption" -} -``` - -```yaml -type: symmetricEncryption -``` - -###### Basic Authentication Sample - -```json -{ - "type": "http", - "scheme": "basic" -} -``` - -```yaml -type: http -scheme: basic -``` - -###### API Key Sample - -```json -{ - "type": "httpApiKey", - "name": "api_key", - "in": "header" -} -``` - -```yaml -type: httpApiKey -name: api_key -in: header -``` - -###### JWT Bearer Sample - -```json -{ - "type": "http", - "scheme": "bearer", - "bearerFormat": "JWT" -} -``` - -```yaml -type: http -scheme: bearer -bearerFormat: JWT -``` - -###### Implicit OAuth2 Sample - -```json -{ - "type": "oauth2", - "flows": { - "implicit": { - "authorizationUrl": "https://example.com/api/oauth/dialog", - "availableScopes": { - "write:pets": "modify pets in your account", - "read:pets": "read your pets" - } - } - }, - "scopes": [ - "write:pets" - ] -} -``` - -```yaml -type: oauth2 -flows: - implicit: - authorizationUrl: https://example.com/api/oauth/dialog - availableScopes: - write:pets: modify pets in your account - read:pets: read your pets -scopes: - - 'write:pets' -``` - -###### SASL Sample - -```json -{ - "type": "scramSha512" -} -``` - -```yaml -type: scramSha512 -``` - -#### OAuth Flows Object - -Allows configuration of the supported OAuth Flows. - -##### Fixed Fields -Field Name | Type | Description ----|:---:|--- -implicit| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Implicit flow. -password| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Resource Owner Protected Credentials flow. -clientCredentials| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Client Credentials flow. -authorizationCode| [OAuth Flow Object](#oauthFlowObject) | Configuration for the OAuth Authorization Code flow. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -#### OAuth Flow Object - -Configuration details for a supported OAuth Flow - -##### Fixed Fields -Field Name | Type | Applies To | Description ----|:---:|---|--- -authorizationUrl | `string` | `oauth2` (`"implicit"`, `"authorizationCode"`) | **REQUIRED**. The authorization URL to be used for this flow. This MUST be in the form of an absolute URL. -tokenUrl | `string` | `oauth2` (`"password"`, `"clientCredentials"`, `"authorizationCode"`) | **REQUIRED**. The token URL to be used for this flow. This MUST be in the form of an absolute URL. -refreshUrl | `string` | `oauth2` | The URL to be used for obtaining refresh tokens. This MUST be in the form of an absolute URL. -availableScopes | Map[`string`, `string`] | `oauth2` | **REQUIRED**. The available scopes for the OAuth2 security scheme. A map between the scope name and a short description for it. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### OAuth Flow Object Examples - -```JSON -{ - "authorizationUrl": "https://example.com/api/oauth/dialog", - "tokenUrl": "https://example.com/api/oauth/token", - "availableScopes": { - "write:pets": "modify pets in your account", - "read:pets": "read your pets" - } -} -``` - -```YAML -authorizationUrl: https://example.com/api/oauth/dialog -tokenUrl: https://example.com/api/oauth/token -availableScopes: - write:pets: modify pets in your account - read:pets: read your pets -``` - - - -### Correlation ID Object - -An object that specifies an identifier at design time that can used for message tracing and correlation. - -For specifying and computing the location of a Correlation ID, a [runtime expression](#runtimeExpression) is used. - -##### Fixed Fields - -Field Name | Type | Description ----|:---|--- -description | `string` | An optional description of the identifier. [CommonMark syntax](https://spec.commonmark.org/) can be used for rich text representation. -location | `string` | **REQUIRED.** A [runtime expression](#runtimeExpression) that specifies the location of the correlation ID. - -This object MAY be extended with [Specification Extensions](#specificationExtensions). - -##### Examples - -```json -{ - "description": "Default Correlation ID", - "location": "$message.header#/correlationId" -} -``` - -```yaml -description: Default Correlation ID -location: $message.header#/correlationId -``` - -### Runtime Expression - -A runtime expression allows values to be defined based on information that will be available within the message. -This mechanism is used by [Correlation ID Object](#correlationIdObject) and [Operation Reply Address Object](#operationReplyAddressObject). - -The runtime expression is defined by the following [ABNF](https://tools.ietf.org/html/rfc5234) syntax: - -``` - expression = ( "$message" "." source ) - source = ( header-reference | payload-reference ) - header-reference = "header" ["#" fragment] - payload-reference = "payload" ["#" fragment] - fragment = a JSON Pointer [RFC 6901](https://tools.ietf.org/html/rfc6901) -``` - -The table below provides examples of runtime expressions and examples of their use in a value: - -##### Examples - -Source Location | Example expression | Notes ----|:---|:---| -Message Header Property | `$message.header#/MQMD/CorrelId` | Correlation ID is set using the `CorrelId` value from the `MQMD` header. -Message Payload Property | `$message.payload#/messageId` | Correlation ID is set using the `messageId` value from the message payload. - -Runtime expressions preserve the type of the referenced value. - -### Traits Merge Mechanism - -Traits MUST be merged with the target object using the [JSON Merge Patch](https://tools.ietf.org/html/rfc7386) algorithm in the same order they are defined. A property on a trait MUST NOT override the same property on the target object. - -#### Example - -An object like the following: - -```yaml -description: A longer description. -traits: - - name: UserSignup - description: Description from trait. - - tags: - - name: user -``` - -Would look like the following after applying traits: - -```yaml -name: UserSignup -description: A longer description. -tags: - - name: user -``` - -### Specification Extensions - -While the AsyncAPI Specification tries to accommodate most use cases, additional data can be added to extend the specification at certain points. - -The extensions properties are implemented as patterned fields that are always prefixed by `"x-"`. - -Field Pattern | Type | Description ----|:---:|--- -`^x-[\w\d\-\_]+$` | Any | Allows extensions to the AsyncAPI Schema. The field name MUST begin with `x-`, for example, `x-internal-id`. The value can be `null`, a primitive, an array or an object. Can have any valid JSON format value. - -The extensions may or may not be supported by the available tooling, but those may be extended as well to add requested support (if tools are internal or open-sourced). - -### Data Type Formats - -Primitives have an optional modifier property: `format`. -The AsyncAPI specification uses several known formats to more finely define the data type being used. -However, the `format` property is an open `string`-valued property, and can have any value to support documentation needs. -Formats such as `"email"`, `"uuid"`, etc., can be used even though they are not defined by this specification. -Types that are not accompanied by a `format` property follow their definition from the JSON Schema. -Tools that do not recognize a specific `format` MAY default back to the `type` alone, as if the `format` was not specified. - -The formats defined by the AsyncAPI Specification are: - - -Common Name | `type` | [`format`](#dataTypeFormat) | Comments ------------ | ------ | -------- | -------- -integer | `integer` | `int32` | signed 32 bits -long | `integer` | `int64` | signed 64 bits -float | `number` | `float` | | -double | `number` | `double` | | -string | `string` | | | -byte | `string` | `byte` | base64 encoded characters -binary | `string` | `binary` | any sequence of octets -boolean | `boolean` | | | -date | `string` | `date` | As defined by `full-date` - [RFC3339](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6) -dateTime | `string` | `date-time` | As defined by `date-time` - [RFC3339](https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6) -password | `string` | `password` | Used to hint UIs the input needs to be obscured. diff --git a/public/_redirects b/public/_redirects index f79523187d6..21425ffb3f6 100644 --- a/public/_redirects +++ b/public/_redirects @@ -19,11 +19,10 @@ https://www.asyncapi.io/* https://www.asyncapi.com/:splat 301! # Redirection will be handled automatically by Action. # LATEST-SPEC-REDIRECTION:START -/docs/reference/specification/latest /docs/reference/specification/v3.0.1 302! +/docs/reference/specification/latest /docs/reference/specification/v3.0.0 302! # LATEST-SPEC-REDIRECTION:END # SPEC-REDIRECTION:START -/docs/reference/specification/3.0.1 /docs/reference/specification/v3.0.1 302! /docs/reference/specification/3.0.0 /docs/reference/specification/v3.0.0 302! # SPEC-REDIRECTION:END From e3eaacce485491b6eb6bf2093d92c249bc3e6afe Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 13 Dec 2023 14:07:54 +0100 Subject: [PATCH 015/243] docs(cli): update latest cli documentation (#2435) --- pages/docs/tools/cli/usage.md | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pages/docs/tools/cli/usage.md b/pages/docs/tools/cli/usage.md index 3166261260e..0f3402da460 100644 --- a/pages/docs/tools/cli/usage.md +++ b/pages/docs/tools/cli/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/1.2.12 linux-x64 node-v18.19.0 +@asyncapi/cli/1.2.13 linux-x64 node-v18.19.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -93,7 +93,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/bundle.ts)_ ## `asyncapi config` @@ -107,7 +107,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -121,7 +121,7 @@ DESCRIPTION Manage short aliases for full paths to AsyncAPI documents ``` -_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/index.ts)_ +_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/index.ts)_ ## `asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH` @@ -143,7 +143,7 @@ DESCRIPTION Add a context to the store ``` -_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/add.ts)_ +_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/add.ts)_ ## `asyncapi config context current` @@ -160,7 +160,7 @@ DESCRIPTION Shows the current context that is being used ``` -_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/current.ts)_ +_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/current.ts)_ ## `asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH` @@ -181,7 +181,7 @@ DESCRIPTION Edit a context in the store ``` -_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/edit.ts)_ +_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/edit.ts)_ ## `asyncapi config context init [CONTEXT-FILE-PATH]` @@ -204,7 +204,7 @@ DESCRIPTION Initialize context ``` -_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/init.ts)_ +_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/init.ts)_ ## `asyncapi config context list` @@ -221,7 +221,7 @@ DESCRIPTION List all the stored contexts in the store ``` -_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/list.ts)_ +_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/list.ts)_ ## `asyncapi config context remove CONTEXT-NAME` @@ -241,7 +241,7 @@ DESCRIPTION Delete a context from the store ``` -_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/remove.ts)_ +_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/remove.ts)_ ## `asyncapi config context use CONTEXT-NAME` @@ -261,7 +261,7 @@ DESCRIPTION Set a context as current ``` -_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/context/use.ts)_ +_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/use.ts)_ ## `asyncapi config versions` @@ -278,7 +278,7 @@ DESCRIPTION Show versions of AsyncAPI tools used ``` -_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/config/versions.ts)_ +_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/versions.ts)_ ## `asyncapi convert [SPEC-FILE]` @@ -300,7 +300,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -355,7 +355,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/diff.ts)_ ## `asyncapi generate` @@ -369,7 +369,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -406,7 +406,7 @@ EXAMPLES $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write ``` -_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/generate/fromTemplate.ts)_ +_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/generate/fromTemplate.ts)_ ## `asyncapi generate models LANGUAGE FILE` @@ -480,7 +480,7 @@ DESCRIPTION Generates typed models ``` -_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/generate/models.ts)_ +_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/generate/models.ts)_ ## `asyncapi new` @@ -538,7 +538,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -596,7 +596,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/new/file.ts)_ +_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/new/file.ts)_ ## `asyncapi new glee` @@ -615,7 +615,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/new/glee.ts)_ +_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/new/glee.ts)_ ## `asyncapi new project` @@ -634,7 +634,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/new/project.ts)_ +_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/new/project.ts)_ ## `asyncapi optimize [SPEC-FILE]` @@ -670,7 +670,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/optimize.ts)_ ## `asyncapi start` @@ -684,7 +684,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -703,7 +703,7 @@ DESCRIPTION starts a new local instance of Studio ``` -_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/start/studio.ts)_ +_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/start/studio.ts)_ ## `asyncapi validate [SPEC-FILE]` @@ -730,5 +730,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.12/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/validate.ts)_ From a309e91a21968fd0c10985a99095408a8690c4a0 Mon Sep 17 00:00:00 2001 From: Bhaswati Roy Date: Wed, 13 Dec 2023 21:29:03 +0530 Subject: [PATCH 016/243] docs: adding content about adding operations (#2403) Co-authored-by: Alejandra Quetzalli %0ACo-authored-by: Alejandra Quetzalli %0ACo-authored-by: Lukasz Gornicki --- .../asyncapi-document/adding-operations.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 pages/docs/concepts/asyncapi-document/adding-operations.md diff --git a/pages/docs/concepts/asyncapi-document/adding-operations.md b/pages/docs/concepts/asyncapi-document/adding-operations.md new file mode 100644 index 00000000000..964e8cef18f --- /dev/null +++ b/pages/docs/concepts/asyncapi-document/adding-operations.md @@ -0,0 +1,54 @@ +--- +title: Adding operations +weight: 90 +--- + +In a messaging system, 'operations' are how messages are sent and received between participants or components. In AsyncAPI, understanding operations helps you see how the system sends asynchronous messages back and forth without waiting for responses. They serve as a vital tool, aiding users in comprehending the range of tasks and functionalities that the API is capable of performing. + +In an AsyncAPI document, operations describe your application's behaviors and capabilities by exchanging messages through channels configured in the AsyncAPI document. An `operation` represents a particular action or interaction that can be performed. The purpose of operations is to provide a standardized means for describing the process of sending, receiving from, requesting, or replying to messages within the messaging system. + +## Defining operations + +Operations can be defined as an independent object in the AsyncAPI document. More information about each field name that is used to define operations can be found [in the reference documentation of the specification](/docs/reference/specification/v3.0.0#operationObject). + +The following diagram declares the field names that are frequently used to define operations in an AsyncAPI document: + +```mermaid +flowchart LR + C[operations] + F[action] + I[channel] + A[messages] + B[reply] + D[bindings] + E[security] + C --> F + C --> I + C --> D + C --> B + C --> E + C --> A + classDef default fill:#47BCEE,stroke:#000; +``` + +## Adding operations + +In the AsyncAPI document, 'operations' are distinct fields located at the root level of the document, alongside 'channels' and other key fields. +Operations must specify on what channel they are performed by referencing the `channel` with `$ref`. For example: + +``` +onUserSignUp: + title: User sign up + summary: React and process information about new user sign up. + description: Process information about user sign up and update the information in the table that counts numbers of currently signed up users. + action: receive + channel: + $ref: '#/channels/userSignup' +``` + +The operation definition mentioned above gives the details needed for the application to send a message. Its 'title' and 'summary' clearly show that it's about receiving an event when a new user signs up to the system. + +Some fields are missing from this example: +- No `messages` field means that this operation processes any message coming from the `userSignup` channel. +- No `security` field means that there are no special security measures related to this operation and that the security should be applied the same as for other operations. Essentially, the security from the server level should be respected. +- No `reply` field means that after reacting to the user sign up, this application will not send any reply as a reaction. From e9421ef266f33d0de94bb97d20931801a6be98a8 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 13 Dec 2023 22:11:08 +0100 Subject: [PATCH 017/243] docs(cli): update latest cli documentation (#2438) --- pages/docs/tools/cli/usage.md | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pages/docs/tools/cli/usage.md b/pages/docs/tools/cli/usage.md index 0f3402da460..c40965d491e 100644 --- a/pages/docs/tools/cli/usage.md +++ b/pages/docs/tools/cli/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/1.2.13 linux-x64 node-v18.19.0 +@asyncapi/cli/1.2.16 linux-x64 node-v18.19.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -93,7 +93,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/bundle.ts)_ ## `asyncapi config` @@ -107,7 +107,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -121,7 +121,7 @@ DESCRIPTION Manage short aliases for full paths to AsyncAPI documents ``` -_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/index.ts)_ +_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/index.ts)_ ## `asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH` @@ -143,7 +143,7 @@ DESCRIPTION Add a context to the store ``` -_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/add.ts)_ +_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/add.ts)_ ## `asyncapi config context current` @@ -160,7 +160,7 @@ DESCRIPTION Shows the current context that is being used ``` -_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/current.ts)_ +_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/current.ts)_ ## `asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH` @@ -181,7 +181,7 @@ DESCRIPTION Edit a context in the store ``` -_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/edit.ts)_ +_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/edit.ts)_ ## `asyncapi config context init [CONTEXT-FILE-PATH]` @@ -204,7 +204,7 @@ DESCRIPTION Initialize context ``` -_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/init.ts)_ +_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/init.ts)_ ## `asyncapi config context list` @@ -221,7 +221,7 @@ DESCRIPTION List all the stored contexts in the store ``` -_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/list.ts)_ +_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/list.ts)_ ## `asyncapi config context remove CONTEXT-NAME` @@ -241,7 +241,7 @@ DESCRIPTION Delete a context from the store ``` -_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/remove.ts)_ +_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/remove.ts)_ ## `asyncapi config context use CONTEXT-NAME` @@ -261,7 +261,7 @@ DESCRIPTION Set a context as current ``` -_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/context/use.ts)_ +_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/use.ts)_ ## `asyncapi config versions` @@ -278,7 +278,7 @@ DESCRIPTION Show versions of AsyncAPI tools used ``` -_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/config/versions.ts)_ +_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/versions.ts)_ ## `asyncapi convert [SPEC-FILE]` @@ -300,7 +300,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -355,7 +355,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/diff.ts)_ ## `asyncapi generate` @@ -369,7 +369,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -406,7 +406,7 @@ EXAMPLES $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write ``` -_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/generate/fromTemplate.ts)_ +_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/generate/fromTemplate.ts)_ ## `asyncapi generate models LANGUAGE FILE` @@ -480,7 +480,7 @@ DESCRIPTION Generates typed models ``` -_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/generate/models.ts)_ +_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/generate/models.ts)_ ## `asyncapi new` @@ -538,7 +538,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -596,7 +596,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/new/file.ts)_ +_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/new/file.ts)_ ## `asyncapi new glee` @@ -615,7 +615,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/new/glee.ts)_ +_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/new/glee.ts)_ ## `asyncapi new project` @@ -634,7 +634,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/new/project.ts)_ +_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/new/project.ts)_ ## `asyncapi optimize [SPEC-FILE]` @@ -670,7 +670,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/optimize.ts)_ ## `asyncapi start` @@ -684,7 +684,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -703,7 +703,7 @@ DESCRIPTION starts a new local instance of Studio ``` -_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/start/studio.ts)_ +_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/start/studio.ts)_ ## `asyncapi validate [SPEC-FILE]` @@ -730,5 +730,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.13/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/validate.ts)_ From a5f95c6d7a37217cfd0dabf22a4be952e489f863 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 13 Dec 2023 22:20:45 +0100 Subject: [PATCH 018/243] docs(cli): update latest cli documentation (#2439) --- pages/docs/tools/cli/usage.md | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pages/docs/tools/cli/usage.md b/pages/docs/tools/cli/usage.md index c40965d491e..304ed9f2dc0 100644 --- a/pages/docs/tools/cli/usage.md +++ b/pages/docs/tools/cli/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/1.2.16 linux-x64 node-v18.19.0 +@asyncapi/cli/1.2.18 linux-x64 node-v18.19.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -93,7 +93,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/bundle.ts)_ ## `asyncapi config` @@ -107,7 +107,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -121,7 +121,7 @@ DESCRIPTION Manage short aliases for full paths to AsyncAPI documents ``` -_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/index.ts)_ +_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/index.ts)_ ## `asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH` @@ -143,7 +143,7 @@ DESCRIPTION Add a context to the store ``` -_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/add.ts)_ +_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/add.ts)_ ## `asyncapi config context current` @@ -160,7 +160,7 @@ DESCRIPTION Shows the current context that is being used ``` -_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/current.ts)_ +_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/current.ts)_ ## `asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH` @@ -181,7 +181,7 @@ DESCRIPTION Edit a context in the store ``` -_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/edit.ts)_ +_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/edit.ts)_ ## `asyncapi config context init [CONTEXT-FILE-PATH]` @@ -204,7 +204,7 @@ DESCRIPTION Initialize context ``` -_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/init.ts)_ +_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/init.ts)_ ## `asyncapi config context list` @@ -221,7 +221,7 @@ DESCRIPTION List all the stored contexts in the store ``` -_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/list.ts)_ +_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/list.ts)_ ## `asyncapi config context remove CONTEXT-NAME` @@ -241,7 +241,7 @@ DESCRIPTION Delete a context from the store ``` -_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/remove.ts)_ +_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/remove.ts)_ ## `asyncapi config context use CONTEXT-NAME` @@ -261,7 +261,7 @@ DESCRIPTION Set a context as current ``` -_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/context/use.ts)_ +_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/use.ts)_ ## `asyncapi config versions` @@ -278,7 +278,7 @@ DESCRIPTION Show versions of AsyncAPI tools used ``` -_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/config/versions.ts)_ +_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/versions.ts)_ ## `asyncapi convert [SPEC-FILE]` @@ -300,7 +300,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -355,7 +355,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/diff.ts)_ ## `asyncapi generate` @@ -369,7 +369,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -406,7 +406,7 @@ EXAMPLES $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write ``` -_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/generate/fromTemplate.ts)_ +_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/generate/fromTemplate.ts)_ ## `asyncapi generate models LANGUAGE FILE` @@ -480,7 +480,7 @@ DESCRIPTION Generates typed models ``` -_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/generate/models.ts)_ +_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/generate/models.ts)_ ## `asyncapi new` @@ -538,7 +538,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -596,7 +596,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/new/file.ts)_ +_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/new/file.ts)_ ## `asyncapi new glee` @@ -615,7 +615,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/new/glee.ts)_ +_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/new/glee.ts)_ ## `asyncapi new project` @@ -634,7 +634,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/new/project.ts)_ +_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/new/project.ts)_ ## `asyncapi optimize [SPEC-FILE]` @@ -670,7 +670,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/optimize.ts)_ ## `asyncapi start` @@ -684,7 +684,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -703,7 +703,7 @@ DESCRIPTION starts a new local instance of Studio ``` -_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/start/studio.ts)_ +_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/start/studio.ts)_ ## `asyncapi validate [SPEC-FILE]` @@ -730,5 +730,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.16/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/validate.ts)_ From d0d75f38d61553a71e4b9f3fef58525dfc2b79e9 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 14 Dec 2023 01:28:51 +0100 Subject: [PATCH 019/243] chore: update meetings.json and newsrooom_videos.json (#2440) --- dashboard.json | 98 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 38 deletions(-) diff --git a/dashboard.json b/dashboard.json index 52fbef2a83a..85d330069d3 100644 --- a/dashboard.json +++ b/dashboard.json @@ -11,33 +11,6 @@ "labels": [], "score": 43.363362901138075 }, - { - "id": "PR_kwDOB5hCo85gDiV-", - "isPR": true, - "isAssigned": false, - "title": "feat: new script and ci for JSON Schema validation", - "author": "AnimeshKumar923", - "resourcePath": "/asyncapi/spec-json-schemas/pull/452", - "repo": "asyncapi/spec-json-schemas", - "labels": [], - "score": 33.886601472412536 - }, - { - "id": "I_kwDOFLhIt84-OUI3", - "isPR": false, - "isAssigned": false, - "title": "Create educational & technical video explaining AsyncAPI's main features", - "author": "alequetzalli", - "resourcePath": "/asyncapi/community/issues/155", - "repo": "asyncapi/community", - "labels": [ - { - "name": "enhancement", - "color": "a2eeef" - } - ], - "score": 33.31225229491402 - }, { "id": "I_kwDOBW5R_c5BIl5P", "isPR": false, @@ -76,6 +49,22 @@ "labels": [], "score": 16.65612614745701 }, + { + "id": "I_kwDOFLhIt84-OUI3", + "isPR": false, + "isAssigned": false, + "title": "Create educational & technical video explaining AsyncAPI's main features", + "author": "alequetzalli", + "resourcePath": "/asyncapi/community/issues/155", + "repo": "asyncapi/community", + "labels": [ + { + "name": "enhancement", + "color": "a2eeef" + } + ], + "score": 16.056087666155555 + }, { "id": "PR_kwDOFDnrNc5RUbi_", "isPR": true, @@ -98,17 +87,6 @@ "labels": [], "score": 15.507427792459973 }, - { - "id": "MDU6SXNzdWUxMjMwODQwMDM4", - "isPR": false, - "isAssigned": false, - "title": "Usages of allOf within message payload could be flattened", - "author": "jamescrowley", - "resourcePath": "/asyncapi/asyncapi-react/issues/596", - "repo": "asyncapi/asyncapi-react", - "labels": [], - "score": 14.933078614961456 - }, { "id": "PR_kwDOBW5R_c5RI5z2", "isPR": true, @@ -131,6 +109,34 @@ "labels": [], "score": 14.07155484871368 }, + { + "id": "I_kwDOFDnrNc5rjrK-", + "isPR": false, + "isAssigned": true, + "title": "Improve `new glee` command", + "author": "KhudaDad414", + "resourcePath": "/asyncapi/cli/issues/683", + "repo": "asyncapi/cli", + "labels": [ + { + "name": "enhancement", + "color": "a2eeef" + }, + { + "name": "bounty", + "color": "FD6F9E" + }, + { + "name": "level/medium", + "color": "FD6F9E" + }, + { + "name": "bounty/2023-Q4", + "color": "FD6F9E" + } + ], + "score": 13.497205671215161 + }, { "id": "PR_kwDOBW5R_c5dJ7hJ", "isPR": true, @@ -141,6 +147,22 @@ "repo": "asyncapi/website", "labels": [], "score": 13.497205671215161 + }, + { + "id": "PR_kwDODou01c5YJ7kV", + "isPR": true, + "isAssigned": false, + "title": "Add Form component", + "author": "KhudaDad414", + "resourcePath": "/asyncapi/studio/pull/773", + "repo": "asyncapi/studio", + "labels": [ + { + "name": "autoupdate", + "color": "ededed" + } + ], + "score": 13.210031082465903 } ], "goodFirstIssues": [ From bbcc44ed9ec048adb2219f001597569542086c17 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Fri, 15 Dec 2023 01:28:37 +0100 Subject: [PATCH 020/243] chore: update meetings.json and newsrooom_videos.json (#2448) --- config/meetings.json | 7 ------- config/newsroom_videos.json | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/config/meetings.json b/config/meetings.json index 3dc8afca597..c2fa78c7988 100644 --- a/config/meetings.json +++ b/config/meetings.json @@ -20,13 +20,6 @@ "banner": "", "date": "2023-09-06T15:00:00.000Z" }, - { - "title": "Community Meeting", - "calLink": "https://www.google.com/calendar/event?eid=aTNsZXN2YzkwbWdyanBxdDgwY2RrbGxnMTggY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn", - "url": "https://github.com/asyncapi/community/issues/868", - "banner": "https://user-images.githubusercontent.com/40604284/264583319-519e721e-3112-43ca-adab-d68bac288666.png", - "date": "2023-09-05T16:00:00.000Z" - }, { "title": "Community Meeting", "calLink": "https://www.google.com/calendar/event?eid=b3MydnJrN2VuMjNjY3J1Z2IycW9qMDFmZTQgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn", diff --git a/config/newsroom_videos.json b/config/newsroom_videos.json index 002c160d262..922fb2be38b 100644 --- a/config/newsroom_videos.json +++ b/config/newsroom_videos.json @@ -1,4 +1,16 @@ [ + { + "image_url": "https://i.ytimg.com/vi/WCK9_ZDv6K4/hqdefault.jpg", + "title": "Quoi de neuf dans AsyncAPI v3 ? Découvrez le en live avec la migration du use-case Adeo(14th Dece…", + "description": "Participez à ce live pour découvrir les nouveautés de la V3 et comment migrer une version 2 en version 3 sur un use-case de ...", + "videoId": "WCK9_ZDv6K4" + }, + { + "image_url": "https://i.ytimg.com/vi/-OsMet9h_dg/hqdefault.jpg", + "title": "3 Request/Reply Use Cases", + "description": "Explain Request/Reply use cases to me like I'm a 5 year old.", + "videoId": "-OsMet9h_dg" + }, { "image_url": "https://i.ytimg.com/vi/yOc_fI-i9C8/hqdefault.jpg", "title": "Community Meeting(12th December)", @@ -16,17 +28,5 @@ "title": "Community Meeting(November 28th, 2023)", "description": "https://github.com/asyncapi/community/issues/918.", "videoId": "p68PUXDMsks" - }, - { - "image_url": "https://i.ytimg.com/vi/KDort611FNg/hqdefault.jpg", - "title": "Community Meeting(November 14th, 2023)", - "description": "https://github.com/asyncapi/community/issues/917.", - "videoId": "KDort611FNg" - }, - { - "image_url": "https://i.ytimg.com/vi/Vm4ZKFb2PVE/hqdefault.jpg", - "title": "Community Meeting(October 31th, 2023)", - "description": "Powered by Restream https://restream.io https://github.com/asyncapi/community/issues/916.", - "videoId": "Vm4ZKFb2PVE" } ] \ No newline at end of file From daf6d973d147f9bd139adf32258d66c05a94f0f6 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Fri, 15 Dec 2023 07:42:00 +0100 Subject: [PATCH 021/243] docs(cli): update latest cli documentation (#2450) --- pages/docs/tools/cli/usage.md | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pages/docs/tools/cli/usage.md b/pages/docs/tools/cli/usage.md index 304ed9f2dc0..b6f4720ff22 100644 --- a/pages/docs/tools/cli/usage.md +++ b/pages/docs/tools/cli/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/1.2.18 linux-x64 node-v18.19.0 +@asyncapi/cli/1.2.19 linux-x64 node-v18.19.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -93,7 +93,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/bundle.ts)_ ## `asyncapi config` @@ -107,7 +107,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -121,7 +121,7 @@ DESCRIPTION Manage short aliases for full paths to AsyncAPI documents ``` -_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/index.ts)_ +_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/index.ts)_ ## `asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH` @@ -143,7 +143,7 @@ DESCRIPTION Add a context to the store ``` -_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/add.ts)_ +_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/add.ts)_ ## `asyncapi config context current` @@ -160,7 +160,7 @@ DESCRIPTION Shows the current context that is being used ``` -_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/current.ts)_ +_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/current.ts)_ ## `asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH` @@ -181,7 +181,7 @@ DESCRIPTION Edit a context in the store ``` -_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/edit.ts)_ +_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/edit.ts)_ ## `asyncapi config context init [CONTEXT-FILE-PATH]` @@ -204,7 +204,7 @@ DESCRIPTION Initialize context ``` -_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/init.ts)_ +_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/init.ts)_ ## `asyncapi config context list` @@ -221,7 +221,7 @@ DESCRIPTION List all the stored contexts in the store ``` -_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/list.ts)_ +_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/list.ts)_ ## `asyncapi config context remove CONTEXT-NAME` @@ -241,7 +241,7 @@ DESCRIPTION Delete a context from the store ``` -_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/remove.ts)_ +_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/remove.ts)_ ## `asyncapi config context use CONTEXT-NAME` @@ -261,7 +261,7 @@ DESCRIPTION Set a context as current ``` -_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/context/use.ts)_ +_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/use.ts)_ ## `asyncapi config versions` @@ -278,7 +278,7 @@ DESCRIPTION Show versions of AsyncAPI tools used ``` -_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/config/versions.ts)_ +_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/versions.ts)_ ## `asyncapi convert [SPEC-FILE]` @@ -300,7 +300,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -355,7 +355,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/diff.ts)_ ## `asyncapi generate` @@ -369,7 +369,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -406,7 +406,7 @@ EXAMPLES $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write ``` -_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/generate/fromTemplate.ts)_ +_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/generate/fromTemplate.ts)_ ## `asyncapi generate models LANGUAGE FILE` @@ -480,7 +480,7 @@ DESCRIPTION Generates typed models ``` -_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/generate/models.ts)_ +_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/generate/models.ts)_ ## `asyncapi new` @@ -538,7 +538,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -596,7 +596,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/new/file.ts)_ +_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/new/file.ts)_ ## `asyncapi new glee` @@ -615,7 +615,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/new/glee.ts)_ +_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/new/glee.ts)_ ## `asyncapi new project` @@ -634,7 +634,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/new/project.ts)_ +_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/new/project.ts)_ ## `asyncapi optimize [SPEC-FILE]` @@ -670,7 +670,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/optimize.ts)_ ## `asyncapi start` @@ -684,7 +684,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -703,7 +703,7 @@ DESCRIPTION starts a new local instance of Studio ``` -_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/start/studio.ts)_ +_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/start/studio.ts)_ ## `asyncapi validate [SPEC-FILE]` @@ -730,5 +730,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.18/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/validate.ts)_ From 3934d99b43aee1a5f37a5d2d51244d5f82d9a20e Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Fri, 15 Dec 2023 08:06:36 +0100 Subject: [PATCH 022/243] docs(cli): update latest cli documentation (#2451) --- pages/docs/tools/cli/usage.md | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pages/docs/tools/cli/usage.md b/pages/docs/tools/cli/usage.md index b6f4720ff22..6d71694dfc9 100644 --- a/pages/docs/tools/cli/usage.md +++ b/pages/docs/tools/cli/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/1.2.19 linux-x64 node-v18.19.0 +@asyncapi/cli/1.2.21 linux-x64 node-v18.19.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -93,7 +93,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/bundle.ts)_ ## `asyncapi config` @@ -107,7 +107,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -121,7 +121,7 @@ DESCRIPTION Manage short aliases for full paths to AsyncAPI documents ``` -_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/index.ts)_ +_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/index.ts)_ ## `asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH` @@ -143,7 +143,7 @@ DESCRIPTION Add a context to the store ``` -_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/add.ts)_ +_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/add.ts)_ ## `asyncapi config context current` @@ -160,7 +160,7 @@ DESCRIPTION Shows the current context that is being used ``` -_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/current.ts)_ +_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/current.ts)_ ## `asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH` @@ -181,7 +181,7 @@ DESCRIPTION Edit a context in the store ``` -_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/edit.ts)_ +_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/edit.ts)_ ## `asyncapi config context init [CONTEXT-FILE-PATH]` @@ -204,7 +204,7 @@ DESCRIPTION Initialize context ``` -_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/init.ts)_ +_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/init.ts)_ ## `asyncapi config context list` @@ -221,7 +221,7 @@ DESCRIPTION List all the stored contexts in the store ``` -_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/list.ts)_ +_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/list.ts)_ ## `asyncapi config context remove CONTEXT-NAME` @@ -241,7 +241,7 @@ DESCRIPTION Delete a context from the store ``` -_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/remove.ts)_ +_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/remove.ts)_ ## `asyncapi config context use CONTEXT-NAME` @@ -261,7 +261,7 @@ DESCRIPTION Set a context as current ``` -_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/context/use.ts)_ +_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/use.ts)_ ## `asyncapi config versions` @@ -278,7 +278,7 @@ DESCRIPTION Show versions of AsyncAPI tools used ``` -_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/config/versions.ts)_ +_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/versions.ts)_ ## `asyncapi convert [SPEC-FILE]` @@ -300,7 +300,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -355,7 +355,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/diff.ts)_ ## `asyncapi generate` @@ -369,7 +369,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -406,7 +406,7 @@ EXAMPLES $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write ``` -_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/generate/fromTemplate.ts)_ +_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/generate/fromTemplate.ts)_ ## `asyncapi generate models LANGUAGE FILE` @@ -480,7 +480,7 @@ DESCRIPTION Generates typed models ``` -_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/generate/models.ts)_ +_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/generate/models.ts)_ ## `asyncapi new` @@ -538,7 +538,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -596,7 +596,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/new/file.ts)_ +_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/new/file.ts)_ ## `asyncapi new glee` @@ -615,7 +615,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/new/glee.ts)_ +_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/new/glee.ts)_ ## `asyncapi new project` @@ -634,7 +634,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/new/project.ts)_ +_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/new/project.ts)_ ## `asyncapi optimize [SPEC-FILE]` @@ -670,7 +670,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/optimize.ts)_ ## `asyncapi start` @@ -684,7 +684,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -703,7 +703,7 @@ DESCRIPTION starts a new local instance of Studio ``` -_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/start/studio.ts)_ +_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/start/studio.ts)_ ## `asyncapi validate [SPEC-FILE]` @@ -730,5 +730,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.19/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/validate.ts)_ From 0a929cd9d3058e754abc3f573c16a9ad71386123 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Fri, 15 Dec 2023 10:38:03 +0100 Subject: [PATCH 023/243] docs(cli): update latest cli documentation (#2454) --- pages/docs/tools/cli/usage.md | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pages/docs/tools/cli/usage.md b/pages/docs/tools/cli/usage.md index 6d71694dfc9..0b98316cad9 100644 --- a/pages/docs/tools/cli/usage.md +++ b/pages/docs/tools/cli/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/1.2.21 linux-x64 node-v18.19.0 +@asyncapi/cli/1.2.22 linux-x64 node-v18.19.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -93,7 +93,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/bundle.ts)_ ## `asyncapi config` @@ -107,7 +107,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -121,7 +121,7 @@ DESCRIPTION Manage short aliases for full paths to AsyncAPI documents ``` -_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/index.ts)_ +_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/index.ts)_ ## `asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH` @@ -143,7 +143,7 @@ DESCRIPTION Add a context to the store ``` -_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/add.ts)_ +_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/add.ts)_ ## `asyncapi config context current` @@ -160,7 +160,7 @@ DESCRIPTION Shows the current context that is being used ``` -_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/current.ts)_ +_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/current.ts)_ ## `asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH` @@ -181,7 +181,7 @@ DESCRIPTION Edit a context in the store ``` -_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/edit.ts)_ +_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/edit.ts)_ ## `asyncapi config context init [CONTEXT-FILE-PATH]` @@ -204,7 +204,7 @@ DESCRIPTION Initialize context ``` -_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/init.ts)_ +_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/init.ts)_ ## `asyncapi config context list` @@ -221,7 +221,7 @@ DESCRIPTION List all the stored contexts in the store ``` -_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/list.ts)_ +_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/list.ts)_ ## `asyncapi config context remove CONTEXT-NAME` @@ -241,7 +241,7 @@ DESCRIPTION Delete a context from the store ``` -_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/remove.ts)_ +_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/remove.ts)_ ## `asyncapi config context use CONTEXT-NAME` @@ -261,7 +261,7 @@ DESCRIPTION Set a context as current ``` -_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/context/use.ts)_ +_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/use.ts)_ ## `asyncapi config versions` @@ -278,7 +278,7 @@ DESCRIPTION Show versions of AsyncAPI tools used ``` -_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/config/versions.ts)_ +_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/versions.ts)_ ## `asyncapi convert [SPEC-FILE]` @@ -300,7 +300,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -355,7 +355,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/diff.ts)_ ## `asyncapi generate` @@ -369,7 +369,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -406,7 +406,7 @@ EXAMPLES $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write ``` -_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/generate/fromTemplate.ts)_ +_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/generate/fromTemplate.ts)_ ## `asyncapi generate models LANGUAGE FILE` @@ -480,7 +480,7 @@ DESCRIPTION Generates typed models ``` -_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/generate/models.ts)_ +_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/generate/models.ts)_ ## `asyncapi new` @@ -538,7 +538,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -596,7 +596,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/new/file.ts)_ +_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/new/file.ts)_ ## `asyncapi new glee` @@ -615,7 +615,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/new/glee.ts)_ +_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/new/glee.ts)_ ## `asyncapi new project` @@ -634,7 +634,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/new/project.ts)_ +_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/new/project.ts)_ ## `asyncapi optimize [SPEC-FILE]` @@ -670,7 +670,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/optimize.ts)_ ## `asyncapi start` @@ -684,7 +684,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -703,7 +703,7 @@ DESCRIPTION starts a new local instance of Studio ``` -_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/start/studio.ts)_ +_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/start/studio.ts)_ ## `asyncapi validate [SPEC-FILE]` @@ -730,5 +730,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.21/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/validate.ts)_ From 06a549e897881bfcdbcc65db4a58eaf798b17adf Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Fri, 15 Dec 2023 22:32:27 +0600 Subject: [PATCH 024/243] docs: adding document for adding messages (#2410) Co-authored-by: Alejandra Quetzalli %0ACo-authored-by: Lukasz Gornicki --- .../asyncapi-document/adding-messages.md | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 pages/docs/concepts/asyncapi-document/adding-messages.md diff --git a/pages/docs/concepts/asyncapi-document/adding-messages.md b/pages/docs/concepts/asyncapi-document/adding-messages.md new file mode 100644 index 00000000000..9f81a798fdb --- /dev/null +++ b/pages/docs/concepts/asyncapi-document/adding-messages.md @@ -0,0 +1,155 @@ +--- +title: Adding messages +weight: 140 +--- + +In an AsyncAPI document, adding [messages](/docs/reference/specification/v3.0.0#messageObject) mainly means setting up channels and operations. This is key for explaining how data moves between your applications. However, sometimes you might just want to use the AsyncAPI document to describe the messages themselves, without anything else. + +## Add messages + +In an AsyncAPI document, you define message definitions under channels. However, the best practice is to first define these messages under the 'components' section as reusable definitions. That way, you can reference them easily from a channel. + +Here is a diagram showing some channel fields and the relation between channel messages and components messages: + +```mermaid +graph LR + C[channels] + F[title] + I[address] + A[components] + B[messages] + D[messages] + C --> F + C --> I + C --> D + D --> |$ref| B + A --> B + + style C fill:#47BCEE,stroke:#000; + style D fill:#47BCEE,stroke:#000; +``` + +### Channels section + +Define the channels section in your AsyncAPI document, including the `messages` your channel accepts. For example: + +```yaml +channels: + allCommentsLiked: + address: comment/liked + messages: + commentLiked: + description: Message that is being sent when a comment has been liked by someone. + payload: + type: object + title: commentLikedPayload + additionalProperties: false + properties: + commentId: + type: string + description: Id of the comment that was liked + description: Notification channel for all the services that need to know comment is liked. +``` + +The above example presents an application that communicates over the `allCommentsLiked` channel, which only accepts one message called `commentLiked`. + +### `messages` section + +In your AsyncAPI document, create a `components.messages` section to define each message your application uses as a reusable message. When setting up multiple channels, you won't have to repeat the same message definitions. For example: + +```yaml +components: + messages: + commentLiked: + description: Message that is being sent when a comment has been liked by someone. + payload: + type: object + title: commentLikedPayload + additionalProperties: false + properties: + commentId: + type: string + description: Id of the comment that was liked +``` + +You can reuse messages using the [Reference Object](/docs/reference/specification/v3.0.0#referenceObject). For example: + +```yml + messages: + commentLiked: + $ref: '#/components/messages/commentLiked' +``` + +Here's the complete AsyncAPI document with channels reusing the same message: +```yml +asyncapi: 3.0.0 +info: + title: Example API + version: '1.0.0' +channels: + allCommentsLiked: + address: comment/liked + messages: + commentLiked: + $ref: '#/components/messages/commentLikedUnliked' + description: Notification channel for all the services that need to know comment is liked. + allCommentUnliked: + address: comment/unliked + messages: + commentUnliked: + $ref: '#/components/messages/commentLikedUnliked' + description: Notification channel for all the services that need to know comment is liked. +components: + messages: + commentLikedUnliked: + description: Message that is being sent when a comment has been liked or unliked by someone. + payload: + type: object + title: commentInfoPayload + additionalProperties: false + properties: + commentId: + type: string + description: Id of the comment that was liked or unliked +``` + +### Identifier of the message + +The key name that represents a message in your AsyncAPI document must be interpreted as `messageId`. If your document defines channels, the message key defined in the channel is the `messageId`. + +```yaml +channels: + allCommentsLiked: + address: comment/liked + messages: + commentLiked: + $ref: '#/components/messages/commentLikedUnliked' + description: Notification channel for all the services that need to know comment is liked. +``` + +The above example shows a `commentLiked` message under the `allCommentsLiked` channel. It references a reusable message definition from the `components` section represented by the `commentLikedUnliked` key. In this setup, the `commentLiked` key is the `messageId` and not `commentLikedUnliked`. + +### Messages under operations + +Operations specify which channels they interact with. If a channel has several messages, but your operation only involves one, indicate which specific message the operation uses. + +```yaml +channels: + allComments: + address: comments + messages: + commentLiked: + $ref: '#/components/messages/commentLikedMsg' + commentUnliked: + $ref: '#/components/messages/commentUnlikedMsg' + description: Notification channel for all the services that need to know comment is liked. +operations: + onCommentLiked: + action: receive + channel: + $ref: '#/channels/allComments' + messages: + - $ref: '#/channels/allComments/messages/commentLiked' +``` + +The above example demonstrates how to specify the message for the `onCommentsLiked` operation received from the `allCommentLiked` channel. It's important to note that the message reference points to the channel, not the components section. That ensures accurate information about the `messageId`, which in this case is `commentLiked`, not `commentLikedMsg`. From 6a75ac99cf0319873d0934c4e5e96a6bf0721574 Mon Sep 17 00:00:00 2001 From: hridyesh bisht <41201308+kakabisht@users.noreply.github.com> Date: Sat, 16 Dec 2023 05:36:32 +0530 Subject: [PATCH 025/243] docs: add payload (#2414) Co-authored-by: Alejandra Quetzalli %0ACo-authored-by: Alejandra Quetzalli %0ACo-authored-by: Lukasz Gornicki --- .../asyncapi-document/define-payload.md | 155 ++++++++++++++++++ 1 file changed, 155 insertions(+) create mode 100644 pages/docs/concepts/asyncapi-document/define-payload.md diff --git a/pages/docs/concepts/asyncapi-document/define-payload.md b/pages/docs/concepts/asyncapi-document/define-payload.md new file mode 100644 index 00000000000..02d96aa2487 --- /dev/null +++ b/pages/docs/concepts/asyncapi-document/define-payload.md @@ -0,0 +1,155 @@ +--- +title: Payload schema +weight: 270 +--- + +The payload schema sets the format, data types, and properties of a message. Such an approach ensures the message's payload follows a specific structure and data format. + +It's recommended to use AsyncAPI Schema (a superset of JSON Schema) for handling complex messages and structured data. AsyncAPI Schema helps consumers understand the payload's structure and data types. However, AsyncAPI allows any schema format. For example, when using the Avro schema format, define your message payload in Avro directly instead of trying to represent it in JSON Schema format. + +## Define schema + +Define the schema for the message payload with one of the following methods: + +- Inline: Define the JSON schema within the message payload property. +- Components reference: Specify the schema using a reference to the `components.schemas` section, such as `$ref: '#/components/schemas/user`. +- Remote reference: Specify the schema using an absolute remote endpoint, such as `$ref: 'https://schemas.example.com/user'`. +- Local file reference: Specify the schema using a relative reference, such as `$ref: './user-signedup.json'`. + +The diagram below describes how payload referencing works within the component reference: + +```mermaid +graph LR + C[message] + F[contentType] + I[headers] + A[components] + B[schemas] + D[payload] + C --> F + C --> I + C --> D + D --> |$ref| B + A --> B + + style C fill:#47BCEE,stroke:#000; + style D fill:#47BCEE,stroke:#000; +``` + +Here is an example of an AsyncAPI document where the payload's schema is defined directly within it: + +```yaml +channels: + exampleChannel: + address: exampleChannel + messages: + SimpleSignup: + payload: + type: object + properties: + name: + type: string + email: + type: string +``` + +## Attach examples + +Although optional, attaching examples to the AsyncAPI document is highly recommended. You can use JSON or YAML format for binary encodings. Attach the examples to the examples property within the message payload definition. For example: + +```yaml +examples: + - name: SimpleSignup + summary: A simple UserSignup example message + payload: + user: + name: Demo + email: demo@demo.io +``` + +## Reuse schemas between messages + +To reuse a schema in your AsyncAPI document, define it in the `components/schemas` section and reference it using the `$ref` keyword. Using `$ref` avoids duplication and ensures consistency. Here's an example of reusing a schema from components in AsyncAPI: + +```yaml +components: + messages: + SimpleSignup: + name: SimpleSignup + contentType: application/json + payload: + $ref: '#/components/schemas/SimpleSignup' + examples: + - name: SimpleSignup + payload: + user: + name: Demo + email: demo@demo.io +schemas: + SimpleSignup: + type: object + properties: + name: + type: string + email: + type: string +``` + +## Schema formats + +The default schema in an AsyncAPI document is the AsyncAPI schema itself. However, you can choose from other formats like JSON Schema, Avro, OpenAPI Schema, Protobuf, and more. Remember to indicate in your AsyncAPI document which schema format you're using. + +You specify the format of the schema inside the `payload` field. The type of information you can put in `payload` can be described as a tuple. (A tuple is an ordered sequence of elements that can't be changed during a program's execution.) + +When using AsyncAPI Schema, the `payload` must represent a reference or the payload schema definition as described in previous sections. + +If you're using various formats, the `payload` field should include both `payload.schemaFormat` and `payload.schema`. For example: +```yaml + payload: + schemaFormat: application/vnd.apache.avro;version=1.9.0 + schema: + $ref: "https://www.asyncapi.com/resources/casestudies/adeo/CostingRequestPayload.avsc" +``` + +The above example specifies that the provided schema of the message payload is in Avro, version 1.9.0. It also specifies where the Avro schema file is located. + +## Schema formats and limitations related to their structures + +Some schema formats are too challenging to manage in JSON/YAML. Complex schema formats — Avro, AsyncAPI schemas, and other JSON-based schemas — can be directly included in the AsyncAPI document or referenced using `$ref` for specific sections. +```yaml + payload: + schemaFormat: 'application/vnd.apache.avro;version=1.9.0' + schema: # The following is an Avro schema in YAML format (JSON format is also supported) + type: record + name: User + namespace: com.company + doc: User information + fields: + - name: displayName + type: string + - name: email + type: string + - name: age + type: int +``` + +The process is more complex for Protobuf schemas, as their Protocol Buffers are not JSON-based. You cannot use `$ref` to reference parts of the schema. Instead, you must include the entire Protobuf schema definition as a string: + +```yaml + payload: + schemaFormat: application/vnd.google.protobuf;version=3 + schema: | + message Point { + required int32 x = 1; + required int32 y = 2; + optional string label = 3; + } + + message Line { + required Point start = 1; + required Point end = 2; + optional string label = 3; + } +``` + + From 712e6d94fb1747725290c67d6d43b7be392a6136 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Sat, 16 Dec 2023 01:28:16 +0100 Subject: [PATCH 026/243] chore: update meetings.json and newsrooom_videos.json (#2457) --- config/meetings.json | 21 --------------------- config/newsroom_videos.json | 12 ++++++------ 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/config/meetings.json b/config/meetings.json index c2fa78c7988..aa4169891f4 100644 --- a/config/meetings.json +++ b/config/meetings.json @@ -1,25 +1,4 @@ [ - { - "title": "Spec 3.0 Meeting", - "calLink": "https://www.google.com/calendar/event?eid=NDEzM2E1ZGE5YWttYXVpYW9zbTl1cWM1YWMgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn", - "url": "https://github.com/asyncapi/community/issues/857", - "banner": "", - "date": "2023-09-06T16:00:00.000Z" - }, - { - "title": "Brainstorm on AsyncAPI Cheat Sheet Poster", - "calLink": "https://www.google.com/calendar/event?eid=bGx1dXBuc2x1a29mN3RzMmQzcGFjaWM4anMgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn", - "url": "https://github.com/asyncapi/community/issues/862", - "banner": "", - "date": "2023-09-06T09:00:00.000Z" - }, - { - "title": "Generator and new parser discussion", - "calLink": "https://www.google.com/calendar/event?eid=bnI2ZHBsa2ZxMDM3bmw5anFtY21pbjF0amMgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn", - "url": "https://github.com/asyncapi/community/issues/865", - "banner": "", - "date": "2023-09-06T15:00:00.000Z" - }, { "title": "Community Meeting", "calLink": "https://www.google.com/calendar/event?eid=b3MydnJrN2VuMjNjY3J1Z2IycW9qMDFmZTQgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn", diff --git a/config/newsroom_videos.json b/config/newsroom_videos.json index 922fb2be38b..78704f45039 100644 --- a/config/newsroom_videos.json +++ b/config/newsroom_videos.json @@ -1,16 +1,16 @@ [ - { - "image_url": "https://i.ytimg.com/vi/WCK9_ZDv6K4/hqdefault.jpg", - "title": "Quoi de neuf dans AsyncAPI v3 ? Découvrez le en live avec la migration du use-case Adeo(14th Dece…", - "description": "Participez à ce live pour découvrir les nouveautés de la V3 et comment migrer une version 2 en version 3 sur un use-case de ...", - "videoId": "WCK9_ZDv6K4" - }, { "image_url": "https://i.ytimg.com/vi/-OsMet9h_dg/hqdefault.jpg", "title": "3 Request/Reply Use Cases", "description": "Explain Request/Reply use cases to me like I'm a 5 year old.", "videoId": "-OsMet9h_dg" }, + { + "image_url": "https://i.ytimg.com/vi/WCK9_ZDv6K4/hqdefault.jpg", + "title": "Quoi de neuf dans AsyncAPI v3 ? Découvrez le en live avec la migration du use-case Adeo(14th Dece…", + "description": "Participez à ce live pour découvrir les nouveautés de la V3 et comment migrer une version 2 en version 3 sur un use-case de ...", + "videoId": "WCK9_ZDv6K4" + }, { "image_url": "https://i.ytimg.com/vi/yOc_fI-i9C8/hqdefault.jpg", "title": "Community Meeting(12th December)", From ff3d406dfd89887fae5c4ee489d73ee970e45bfc Mon Sep 17 00:00:00 2001 From: hridyesh bisht <41201308+kakabisht@users.noreply.github.com> Date: Sat, 16 Dec 2023 06:03:06 +0530 Subject: [PATCH 027/243] docs: add reusable parts (#2417) Co-authored-by: Alejandra Quetzalli %0ACo-authored-by: Alejandra Quetzalli %0ACo-authored-by: Lukasz Gornicki --- .../asyncapi-document/reusable-parts.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 pages/docs/concepts/asyncapi-document/reusable-parts.md diff --git a/pages/docs/concepts/asyncapi-document/reusable-parts.md b/pages/docs/concepts/asyncapi-document/reusable-parts.md new file mode 100644 index 00000000000..9effdb64ebd --- /dev/null +++ b/pages/docs/concepts/asyncapi-document/reusable-parts.md @@ -0,0 +1,82 @@ +--- +title: Reusable parts +weight: 280 +--- + +Reusable parts in AsyncAPI provide flexibility, modularity, and code reusability. You can reuse the majority of document sections like messages, schema definitions, channels, operations, and more. + +Reusable parts allow you to split up the AsyncAPI document into many files and reference them using the [Reference Object](/docs/reference/specification/v3.0.0#referenceObject). You can use the `$ref` keyword to reference the same document, another local file, or an external URL. The diagram below describes how to reuse parts in AsyncAPI: + +## Same document + +You can use the `$ref` keyword to reference a component in an AsyncAPI document. In the example below, you define a component called `MyMessageSchema` under the `schemas` section to describe the structure of a message. Under the `myChannel` channel, you have a message with a payload definition that's represented as a reference to the `MyMessageSchema` schema via the `$ref` keyword. + +```yaml +channels: + myChannel: + message: + myMessage: + payload: + $ref: '#/components/schemas/MyMessageSchema' +components: + schemas: + MyMessageSchema: + type: object + properties: + message: + type: string +``` + +## Another local file + +You can reference another local document using the `$ref` keyword. Ensure the path to the local file is correct and accessible from your main AsyncAPI document. + +In the code below, you reference the component from another local document, such as `message-schema.yaml`. + +```yaml +UserSignup: + name: UserSignup + title: User signup + summary: Action to sign a user up. + description: A longer description + contentType: application/json + payload: null +``` + +In the code below, you use another local document, `message-schema.yaml`, through a reference inside the AsyncAPI document. + +```yaml +channels: + signUp: + address: user/signedup + messages: + UserSignup: + $ref: './message-schema.yaml#/UserSignup' +operations: + user/signedup.publish: + action: receive + channel: + $ref: '#/channels/signUp' + messages: + - $ref: '#/channels/signUp/messages/UserSignup' +``` + +## External URL + +You can reference an external URL using the `$ref` keyword. Ensure the external URL provides the referenced component in a compatible format, such as YAML or JSON. In the example below, you reference the component from an external URL. The `$ref` value specifies the full URL to the external resource and the component's location. + +```yaml +channels: + signUp: + address: user/signedup + messages: + UserSignup: + $ref: https://example.com/my-components.yaml#/schemas/MySchema +operations: + user/signedup.publish: + action: receive + channel: + $ref: '#/channels/signUp' + messages: + - $ref: '#/channels/signUp/messages/UserSignup' +``` From aaf1339fca16c0cc8693ae4bbc55a15069363bd2 Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Sat, 16 Dec 2023 09:00:24 +0600 Subject: [PATCH 028/243] docs: adding document for Messages and Operations reusability with Traits (#2411) Co-authored-by: Alejandra Quetzalli %0ACo-authored-by: Lukasz Gornicki --- .../reusability-with-traits.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 pages/docs/concepts/asyncapi-document/reusability-with-traits.md diff --git a/pages/docs/concepts/asyncapi-document/reusability-with-traits.md b/pages/docs/concepts/asyncapi-document/reusability-with-traits.md new file mode 100644 index 00000000000..edab2416206 --- /dev/null +++ b/pages/docs/concepts/asyncapi-document/reusability-with-traits.md @@ -0,0 +1,100 @@ +--- +title: Reusability with traits +weight: 200 +--- + +Traits work only with the `operations` and `messages` fields. Traits allow the definition of properties to be reused across multiple messages and operations within the specification. Reusing traits promotes code maintainability and reduces duplication while making your AsyncAPI documents cleaner to manage. + +## Defining traits + +Traits are meant to be reused, so it's best to define them in the `components` section of your AsyncAPI document, either under `operationTraits` or `messageTraits`. Choose depending on whether they're for operations or messages. Give each trait a unique name and list the properties it includes. You can reference these traits with the `$ref` keyword, allowing you to keep traits in a separate file outside the AsyncAPI document. For more on using `$ref` and reusability, check out the [reusable parts document](/docs/concepts/asyncapi-document/reusable-parts). + +```mermaid +graph LR + A[channels] --> F[messages] + F -->|$ref| D + B[components] --> C[operationTraits] + B --> D[messageTraits] + E[operations] -->|$ref| C + + + style A fill:#47BCEE,stroke:#47BCEE; + style F fill:#47BCEE,stroke:#47BCEE; + style E fill:#47BCEE,stroke:#47BCEE; +``` + +[Message traits](/docs/reference/specification/latest#messageTraitObject) do not fully cover all fields that a normal message has, such as the `payload`. The same is true with [Operation traits](/docs/reference/specification/latest#operationTraitObject) which represent only selected fields usually used in an operation. + +Here is a part of a message that has a trait defined inline in a message: + +```yaml +description: Example description. +traits: + - name: UserSignup + description: Trait description. + - tags: + - name: user +``` + +When traits are combined with a message object, the resulting message will look like the example shown below: + +```yaml +name: UserSignup +description: Example description. +tags: + - name: user +``` + +Notice that the trait description didn't override the already defined description in a message outside the trait. + +## Applying traits from components + +Once a trait is defined, you can apply it to an operation or a message using the `$ref` keyword in the `traits` section. The `$ref` value should point to the path of the trait within the `components` section. + +For example, let's say we have a trait named `commonHeaders` defined in `messageTraits`: + +```yml +components: + messageTraits: + commonHeaders: + headers: + type: object + properties: + content-type: + type: integer +``` + +To apply the above trait to a message object, you can do: + +```yml +name: lightMeasured +title: Light measured +summary: Inform about environmental lighting conditions of a particular streetlight. +headers: + type: object + properties: + custom-header: + type: string +traits: + - $ref: '#/components/messageTraits/commonHeaders' +``` + +Notice how the `commonHeaders` trait includes a `content-type` header and is merged into the `headers` object in a message: + +```yaml +name: lightMeasured +title: Light measured +summary: Inform about environmental lighting conditions of a particular streetlight. +headers: + type: object + properties: + content-type: + type: integer + custom-header: + type: string +``` + +## Trait merging mechanism + +In the AsyncAPI document, traits are merged into the operation or message object in the order they are defined, without overriding any properties. For detailed information on how this merging works, refer to [the specification's section on the traits merge mechanism](/docs/reference/specification/#traitsMergeMechanism). + From 5fc7314b5f937ab00bc16f2b66e713a24ed7a345 Mon Sep 17 00:00:00 2001 From: Mahfuza Humayra Mohona Date: Sat, 16 Dec 2023 10:16:22 +0600 Subject: [PATCH 029/243] docs: adding document for extending the AsyncAPI specification (#2407) Co-authored-by: Alejandra Quetzalli %0ACo-authored-by: Lukasz Gornicki --- .../extending-specification.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 pages/docs/concepts/asyncapi-document/extending-specification.md diff --git a/pages/docs/concepts/asyncapi-document/extending-specification.md b/pages/docs/concepts/asyncapi-document/extending-specification.md new file mode 100644 index 00000000000..b24fbf51a8c --- /dev/null +++ b/pages/docs/concepts/asyncapi-document/extending-specification.md @@ -0,0 +1,34 @@ +--- +title: Extending specification +weight: 240 +--- + +Extending the AsyncAPI specification allows you to include specific information for your domain or use case that's not currently supported by the original specification or the protocol bindings. Extension capability allows for customization, making it possible to integrate unique aspects into APIs that the standard AsyncAPI specification doesn't normally accommodate. + +## Specification extensions + +The AsyncAPI Specification allows the addition of custom properties through patterned fields prefixed with an `x-`. That way, you can create unique things without causing problems in future updates. + +The `x-` prefix is used to define custom properties. These properties are user-defined and won't conflict with future specification versions because any property starting with `x-` is reserved for user definitions. + +Extensions can be used in any part of the AsyncAPI document. + +Here is an example of how to extend the AsyncAPI document with a custom property: + +```yml +asyncapi: 3.0.0 +info: + title: Cool Example + version: 0.1.0 + x-linkedin: '/company/asyncapi' +``` + +The above document shows an `info` object extended with custom information about a company's LinkedIn account that owns the application. Custom information is represented via a custom property called `x-linkedin`. + + +AsyncAPI tools might not support AsyncAPI extensions. Our tools can be extended to understand and handle the added data, especially if the tools are internal or open source. + + +## Extending unsupported features + +If you need a feature not covered by the AsyncAPI specification, you can create an extension for it. Should this extension be useful to others, consider contributing it back to the AsyncAPI community. You can do this by [opening a spec issue](https://github.com/asyncapi/spec) in the AsyncAPI GitHub repository. Before contributing, review the [AsyncAPI contribution guidelines](https://github.com/asyncapi/spec/blob/master/CONTRIBUTING.md). From b12f823e2df445219c15fc22b4152642eac1d179 Mon Sep 17 00:00:00 2001 From: hridyesh bisht <41201308+kakabisht@users.noreply.github.com> Date: Sat, 16 Dec 2023 10:25:36 +0530 Subject: [PATCH 030/243] docs: add servers (#2416) Co-authored-by: Alejandra Quetzalli %0ACo-authored-by: Alejandra Quetzalli %0ACo-authored-by: Lukasz Gornicki --- .../concepts/asyncapi-document/add-server.md | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 pages/docs/concepts/asyncapi-document/add-server.md diff --git a/pages/docs/concepts/asyncapi-document/add-server.md b/pages/docs/concepts/asyncapi-document/add-server.md new file mode 100644 index 00000000000..4032f00ddb5 --- /dev/null +++ b/pages/docs/concepts/asyncapi-document/add-server.md @@ -0,0 +1,90 @@ +--- +title: Add servers +weight: 295 +--- + +A server often acts as a message broker, managing communication between producers and consumers. However, it can represent different concepts too. To understand this better, please first review our [server concepts doc](/docs/concepts/server). + +Adding and defining servers is important because it specifies how and where connections are made, enabling the sending and receiving of messages. + +Unique keys identify the server and contain information about the server's connection details, such as the host, protocol, and authentication. + +Here is a diagram of server information with selected fields: + +```mermaid +graph LR + C[servers] + F[host] + I[protocol] + E[security] + C --> F + C --> E + C --> I +``` + +The server is one of the main sections of the AsyncAPI document next to others like `info`, `channels`, or `operations`. + +## Define servers + +Include server definitions in your AsyncAPI document to specify which server a channel or operation connects to. Here is an example of defining a server in AsyncAPI: + +```yaml +servers: + prod: + host: test.mosquitto.org + protocol: mqtt + description: Test MQTT server +``` + +The previous example shows a server setup using the MQTT protocol, where messages are sent to or received from the `test.mosquitto.org` host. + +## Server reusability + +Add server definitions in a single location, such as `components.servers`, and then refer to them using the `$ref` keyword for easy reuse. + +Here's an example of an AsyncAPI document with two servers referenced from the `components` section: +```yaml +servers: + kafka-test: + $ref: '#/components/servers/kafka-test + mqtt-test: + $ref: '#/components/servers/mqtt-test +components + servers: + kafka-test: + host: my.kafka.pl + protocol: kafka-secure + description: Test Kafka server + mqtt-test: + host: test.mosquitto.org + protocol: mqtt + description: Test MQTT server +``` + +In this example, the main `servers` section lists multiple servers with sharable definitions. You can also store these server definitions separately and use them across various AsyncAPI documents. + +## Channel only on specific server + +Your AsyncAPI document can outline an application that receives messages on a channel from an MQTT server, while sending messages on a different channel via a Kafka server. This setup requires defining two servers, with each channel being exclusive to one server – one channel is only available on the MQTT server and the other only on the Kafka server. The AsyncAPI document describes this by adding a `servers` array to each channel, containing references to the respective server definitions. + +Here's an example of how to add a server reference to a channel: + +```yaml +servers: + kafka-test: + host: my.kafka.pl + protocol: kafka-secure + description: Test Kafka server + mqtt-test: + host: test.mosquitto.org + protocol: mqtt + description: Test MQTT server +channels: + myChannel: + servers: + $ref: "#/servers/mqtt-test" + message: + $ref: '#/components/messages/myMessage' +``` + +In this example, the `myChannel` channel is only available on the `mqtt-test` server. From b4795071f1750c35513d72932a594f7a477f01e0 Mon Sep 17 00:00:00 2001 From: Bhaswati Roy Date: Sat, 16 Dec 2023 10:45:20 +0530 Subject: [PATCH 031/243] docs: added content for securing operations (#2404) Co-authored-by: Alejandra Quetzalli %0ACo-authored-by: Alejandra Quetzalli %0ACo-authored-by: Lukasz Gornicki --- .../asyncapi-document/securing-operations.md | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 pages/docs/concepts/asyncapi-document/securing-operations.md diff --git a/pages/docs/concepts/asyncapi-document/securing-operations.md b/pages/docs/concepts/asyncapi-document/securing-operations.md new file mode 100644 index 00000000000..c6619832a48 --- /dev/null +++ b/pages/docs/concepts/asyncapi-document/securing-operations.md @@ -0,0 +1,83 @@ +--- +title: 'Operation security' +weight: 120 +--- + +The server security concept in AsyncAPI means that the security settings specified at the server level automatically apply to all operations across all channels. If you want to modify these default security settings for a particular operation, you need to specify the security details directly on that operation. + +## Add security + +To accommodate such scenarios, the AsyncAPI document allows you to use the `security` field at the `operation` level. You can have multiple security schemes, but only one must be satisfied to authorize such an operation. + +The diagram below describes how to implement reusable security schemes: + +```mermaid +graph LR + C[components] + F[address] + I[messages] + A[components] + B[securitySchemes] + D[security] + C --> F + C --> I + C --> D + D --> |$ref| B + A --> B + + style C fill:#47BCEE,stroke:#000; + style D fill:#47BCEE,stroke:#000; +``` + +## Operation section + +Security information for an operation is defined using a [Security Scheme](/docs/reference/specification/v3.0.0#securitySchemeObject) at the operation level. You can reference a scheme from another location, such as `components.securitySchemes`, using the `$ref` keyword. + +```yaml +operations: + sendAuthRevoke: + action: send + channel: + $ref: '#/channels/authRevoke' + security: + - type: oauth2 + description: The oauth security descriptions + flows: + clientCredentials: + tokenUrl: 'https://example.com/api/oauth/dialog' + availableScopes: + 'subscribe:auth_revocations': Scope required for authorization revocation topic + scopes: + - 'subscribe:auth_revocations' +``` + +The previous example, featuring the `sendAuthRevoke` operation in an AsyncAPI document, demonstrates the capabilities of a client application with an existing notification service. If a server has its own security requirements, this operation must also comply with those. + +## `securitySchemes` section + +To reuse security schemes between operations, place them in `components.securitySchemes` and reference them via the `$ref` keyword in your operation: + +```yaml +operations: + sendAuthRevoke: + action: send + channel: + $ref: '#/channels/authRevoke' + security: + - $ref: '#/components/securitySchemes/oauth' + +components: + securitySchemes: + oauth: + type: oauth2 + description: The oauth security descriptions + flows: + clientCredentials: + tokenUrl: 'https://example.com/api/oauth/dialog' + availableScopes: + 'subscribe:auth_revocations': Scope required for authorization revocation topic + scopes: + - 'subscribe:auth_revocations' +``` + +The previous code snippet shows the approach for reusing schema within multiple operations, even across multiple AsyncAPI documents. From ca90c78bded8541a64c002856899aafeeacf5781 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 18 Dec 2023 01:29:24 +0100 Subject: [PATCH 032/243] chore: update tools.json (#2467) --- config/all-tags.json | 2 +- config/tools-automated.json | 138 ++++++++++++++++++------------------ 2 files changed, 70 insertions(+), 70 deletions(-) diff --git a/config/all-tags.json b/config/all-tags.json index d9fbea47635..3ef0bff50ef 100644 --- a/config/all-tags.json +++ b/config/all-tags.json @@ -1 +1 @@ -{"languages":[{"name":"Go/Golang","color":"bg-[#8ECFDF]","borderColor":"border-[#00AFD9]"},{"name":"Java","color":"bg-[#ECA2A4]","borderColor":"border-[#EC2125]"},{"name":"JavaScript","color":"bg-[#F2F1C7]","borderColor":"border-[#BFBE86]"},{"name":"HTML","color":"bg-[#E2A291]","borderColor":"border-[#E44D26]"},{"name":"C/C++","color":"bg-[#93CDEF]","borderColor":"border-[#0080CC]"},{"name":"C#","color":"bg-[#E3AFE0]","borderColor":"border-[#9B4F96]"},{"name":"Python","color":"bg-[#A8D0EF]","borderColor":"border-[#3878AB]"},{"name":"TypeScript","color":"bg-[#7DBCFE]","borderColor":"border-[#2C78C7]"},{"name":"Kotlin","color":"bg-[#B1ACDF]","borderColor":"border-[#756BD9]"},{"name":"Scala","color":"bg-[#FFA299]","borderColor":"border-[#DF301F]"},{"name":"Markdown","color":"bg-[#BABEBF]","borderColor":"border-[#445B64]"},{"name":"YAML","color":"bg-[#FFB764]","borderColor":"border-[#F1901F]"},{"name":"R","color":"bg-[#84B5ED]","borderColor":"border-[#246BBE]"},{"name":"Ruby","color":"bg-[#FF8289]","borderColor":"border-[#FF000F]"},{"name":"Rust","color":"bg-[#FFB8AA]","borderColor":"border-[#E43716]"},{"name":"Shell","color":"bg-[#87D4FF]","borderColor":"border-[#389ED7]"},{"name":"Groovy","color":"bg-[#B6D5E5]","borderColor":"border-[#609DBC]"}],"technologies":[{"name":"Node.js","color":"bg-[#BDFF67]","borderColor":"border-[#84CE24]"},{"name":"Hermes","color":"bg-[#8AEEBD]","borderColor":"border-[#2AB672]"},{"name":"React JS","color":"bg-[#9FECFA]","borderColor":"border-[#08D8FE]"},{"name":".NET","color":"bg-[#A184FF]","borderColor":"border-[#5026D4]"},{"name":"ASP.NET","color":"bg-[#71C2FB]","borderColor":"border-[#1577BC]"},{"name":"Springboot","color":"bg-[#98E279]","borderColor":"border-[#68BC44]"},{"name":"AWS","color":"bg-[#FF9F59]","borderColor":"border-[#EF6703]"},{"name":"Docker","color":"bg-[#B8E0FF]","borderColor":"border-[#2596ED]"},{"name":"Node-RED","color":"bg-[#FF7474]","borderColor":"border-[#8F0101]"},{"name":"Maven","color":"bg-[#FF6B80]","borderColor":"border-[#CA1A33]"},{"name":"Saas","color":"bg-[#6AB8EC]","borderColor":"border-[#2275AD]"},{"name":"Kubernetes-native","color":"bg-[#D7C7F2]","borderColor":"border-[#A387D2]"},{"name":"Scala","color":"bg-[#D7C7F2]","borderColor":"border-[#A387D2]"},{"name":"Azure","color":"bg-[#4B93FF]","borderColor":"border-[#015ADF]"},{"name":"Jenkins","color":"bg-[#D7C7F2]","borderColor":"border-[#A387D2]"},{"name":"Flask","color":"bg-[#D7C7F2]","borderColor":"border-[#A387D2]"},{"name":"Nest Js","color":"bg-[#E1224E]","borderColor":"border-[#B9012b]"},{"name":"TypeScript","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Socket.IO","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Liquid","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Kotlin","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Gradle","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Spring Cloud Streams","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"JHipster JDL","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Groovy","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Markdown","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Shell","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"WebComponents","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Babel","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Storybook","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"AsyncAPI Generator","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"VSCode","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"SmartPaste","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"JetBrains","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"IntelliJ IDEA","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"HTML","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"}]} \ No newline at end of file +{"languages":[{"name":"Go/Golang","color":"bg-[#8ECFDF]","borderColor":"border-[#00AFD9]"},{"name":"Java","color":"bg-[#ECA2A4]","borderColor":"border-[#EC2125]"},{"name":"JavaScript","color":"bg-[#F2F1C7]","borderColor":"border-[#BFBE86]"},{"name":"HTML","color":"bg-[#E2A291]","borderColor":"border-[#E44D26]"},{"name":"C/C++","color":"bg-[#93CDEF]","borderColor":"border-[#0080CC]"},{"name":"C#","color":"bg-[#E3AFE0]","borderColor":"border-[#9B4F96]"},{"name":"Python","color":"bg-[#A8D0EF]","borderColor":"border-[#3878AB]"},{"name":"TypeScript","color":"bg-[#7DBCFE]","borderColor":"border-[#2C78C7]"},{"name":"Kotlin","color":"bg-[#B1ACDF]","borderColor":"border-[#756BD9]"},{"name":"Scala","color":"bg-[#FFA299]","borderColor":"border-[#DF301F]"},{"name":"Markdown","color":"bg-[#BABEBF]","borderColor":"border-[#445B64]"},{"name":"YAML","color":"bg-[#FFB764]","borderColor":"border-[#F1901F]"},{"name":"R","color":"bg-[#84B5ED]","borderColor":"border-[#246BBE]"},{"name":"Ruby","color":"bg-[#FF8289]","borderColor":"border-[#FF000F]"},{"name":"Rust","color":"bg-[#FFB8AA]","borderColor":"border-[#E43716]"},{"name":"Shell","color":"bg-[#87D4FF]","borderColor":"border-[#389ED7]"},{"name":"Groovy","color":"bg-[#B6D5E5]","borderColor":"border-[#609DBC]"}],"technologies":[{"name":"Node.js","color":"bg-[#BDFF67]","borderColor":"border-[#84CE24]"},{"name":"Hermes","color":"bg-[#8AEEBD]","borderColor":"border-[#2AB672]"},{"name":"React JS","color":"bg-[#9FECFA]","borderColor":"border-[#08D8FE]"},{"name":".NET","color":"bg-[#A184FF]","borderColor":"border-[#5026D4]"},{"name":"ASP.NET","color":"bg-[#71C2FB]","borderColor":"border-[#1577BC]"},{"name":"Springboot","color":"bg-[#98E279]","borderColor":"border-[#68BC44]"},{"name":"AWS","color":"bg-[#FF9F59]","borderColor":"border-[#EF6703]"},{"name":"Docker","color":"bg-[#B8E0FF]","borderColor":"border-[#2596ED]"},{"name":"Node-RED","color":"bg-[#FF7474]","borderColor":"border-[#8F0101]"},{"name":"Maven","color":"bg-[#FF6B80]","borderColor":"border-[#CA1A33]"},{"name":"Saas","color":"bg-[#6AB8EC]","borderColor":"border-[#2275AD]"},{"name":"Kubernetes-native","color":"bg-[#D7C7F2]","borderColor":"border-[#A387D2]"},{"name":"Scala","color":"bg-[#D7C7F2]","borderColor":"border-[#A387D2]"},{"name":"Azure","color":"bg-[#4B93FF]","borderColor":"border-[#015ADF]"},{"name":"Jenkins","color":"bg-[#D7C7F2]","borderColor":"border-[#A387D2]"},{"name":"Flask","color":"bg-[#D7C7F2]","borderColor":"border-[#A387D2]"},{"name":"Nest Js","color":"bg-[#E1224E]","borderColor":"border-[#B9012b]"},{"name":"TypeScript","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Socket.IO","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Liquid","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Kotlin","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Gradle","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Spring Cloud Streams","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"JHipster JDL","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Groovy","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Markdown","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Shell","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"WebComponents","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Babel","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"Storybook","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"AsyncAPI Generator","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"JetBrains","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"IntelliJ IDEA","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"VSCode","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"SmartPaste","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"},{"name":"HTML","color":"bg-[#61d0f2]","borderColor":"border-[#40ccf7]"}]} \ No newline at end of file diff --git a/config/tools-automated.json b/config/tools-automated.json index 305987a6fb2..73178b8e9f7 100644 --- a/config/tools-automated.json +++ b/config/tools-automated.json @@ -117,6 +117,21 @@ "Code Generators": { "description": "The following is a list of tools that generate code from an AsyncAPI document; not the other way around.", "toolsList": [ + { + "title": "Golang AsyncAPI Code Generator", + "description": "Generate Go user and application boilerplate from AsyncAPI specifications. Can be called from `go generate` without requirements.\n", + "links": { + "repoUrl": "https://github.com/lerenn/asyncapi-codegen" + }, + "filters": { + "language": "golang", + "categories": [ + "code-generator" + ], + "hasCommercial": false, + "isAsyncAPIOwner": false + } + }, { "title": "ZenWave SDK", "description": "DDD and API-First for Event-Driven Microservices", @@ -143,21 +158,6 @@ "isAsyncAPIOwner": false } }, - { - "title": "Golang AsyncAPI Code Generator", - "description": "Generate Go user and application boilerplate from AsyncAPI specifications. Can be called from `go generate` without requirements.\n", - "links": { - "repoUrl": "https://github.com/lerenn/asyncapi-codegen" - }, - "filters": { - "language": "golang", - "categories": [ - "code-generator" - ], - "hasCommercial": false, - "isAsyncAPIOwner": false - } - }, { "title": "AsyncAPI Modelina", "description": "Generate payload models into Java, TypeScript, Go, etc, you name it, from AsyncAPI documents. This tool gives you full control over the models through high customization", @@ -462,6 +462,25 @@ "CLIs": { "description": "The following is a list of tools that you can work with in terminal or do some CI/CD automation.", "toolsList": [ + { + "title": "AsyncAPI CLI", + "description": "One CLI to rule them all. \nThis is a CLI that aims to integrate all AsyncAPI tools that you need while AsyncAPI document development and maintainance. \nYou can use it to generate docs or code, validate AsyncAPI document and event create new documents.\n", + "links": { + "websiteUrl": "https://www.asyncapi.com/tools/cli", + "repoUrl": "https://github.com/asyncapi/cli" + }, + "filters": { + "technology": [ + "TypeScript" + ], + "categories": [ + "others", + "cli" + ], + "hasCommercial": false, + "isAsyncAPIOwner": true + } + }, { "title": "ZenWave SDK", "description": "DDD and API-First for Event-Driven Microservices", @@ -488,25 +507,6 @@ "isAsyncAPIOwner": false } }, - { - "title": "AsyncAPI CLI", - "description": "One CLI to rule them all. \nThis is a CLI that aims to integrate all AsyncAPI tools that you need while AsyncAPI document development and maintainance. \nYou can use it to generate docs or code, validate AsyncAPI document and event create new documents.\n", - "links": { - "websiteUrl": "https://www.asyncapi.com/tools/cli", - "repoUrl": "https://github.com/asyncapi/cli" - }, - "filters": { - "technology": [ - "TypeScript" - ], - "categories": [ - "others", - "cli" - ], - "hasCommercial": false, - "isAsyncAPIOwner": true - } - }, { "title": "AsyncAPI CLI", "description": "One CLI to rule them all. \nThis is a CLI that aims to integrate all AsyncAPI tools that you need while AsyncAPI document development and maintainance. \nYou can use it to generate docs or code, validate AsyncAPI document and event create new documents.\n", @@ -555,15 +555,18 @@ "description": "The following is a list of extensions for different IDEs like VSCode, IntelliJ IDEA and others", "toolsList": [ { - "title": "asyncapi-preview", - "description": "VSCode extension that enables you to:\n - Preview documentation generated using you AsyncAPI document. It uses AsyncAPI React component under the hood,\n - Create AsyncAPI documents faster using SmartPaste functionality\n", + "title": "jAsyncAPI - IDEA plugin", + "description": "Idea plugin for the java-asyncapi - Helps to edit and validate AsyncAPI schemas.", "links": { - "repoUrl": "https://github.com/asyncapi/vs-asyncapi-preview" + "websiteUrl": "https://plugins.jetbrains.com/plugin/15673-asyncapi", + "docsUrl": "https://github.com/asyncapi/jasyncapi-idea-plugin#usage", + "repoUrl": "https://github.com/asyncapi/jasyncapi-idea-plugin" }, "filters": { + "language": "Kotlin", "technology": [ - "VSCode", - "SmartPaste" + "JetBrains", + "IntelliJ IDEA" ], "categories": [ "ide-extension" @@ -573,18 +576,15 @@ } }, { - "title": "jAsyncAPI - IDEA plugin", - "description": "Idea plugin for the java-asyncapi - Helps to edit and validate AsyncAPI schemas.", + "title": "asyncapi-preview", + "description": "VSCode extension that enables you to:\n - Preview documentation generated using you AsyncAPI document. It uses AsyncAPI React component under the hood,\n - Create AsyncAPI documents faster using SmartPaste functionality\n", "links": { - "websiteUrl": "https://plugins.jetbrains.com/plugin/15673-asyncapi", - "docsUrl": "https://github.com/asyncapi/jasyncapi-idea-plugin#usage", - "repoUrl": "https://github.com/asyncapi/jasyncapi-idea-plugin" + "repoUrl": "https://github.com/asyncapi/vs-asyncapi-preview" }, "filters": { - "language": "Kotlin", "technology": [ - "JetBrains", - "IntelliJ IDEA" + "VSCode", + "SmartPaste" ], "categories": [ "ide-extension" @@ -617,15 +617,15 @@ "description": "The following is a list of templates compatible with AsyncAPI Generator. You can use them to generate apps, clients or documentation from your AsyncAPI documents.", "toolsList": [ { - "title": "Node.js Websockets Template", - "description": "Node.js WebSockets template for the AsyncAPI Generator. It showcases how from a single AsyncAPI document you can generate a server and a client at the same time.", + "title": "HTML Template", + "description": "HTML template for AsyncAPI Generator. Use it to generate a static docs. It is using AsyncAPI React component under the hood.", "links": { - "repoUrl": "https://github.com/asyncapi/nodejs-ws-template" + "repoUrl": "https://github.com/asyncapi/html-template" }, "filters": { "language": "javascript", "technology": [ - "Node.js" + "HTML" ], "categories": [ "generator-template" @@ -635,19 +635,15 @@ } }, { - "title": "Java Spring Template", - "description": "Java Spring template for the AsyncAPI Generator", + "title": "Node.js Websockets Template", + "description": "Node.js WebSockets template for the AsyncAPI Generator. It showcases how from a single AsyncAPI document you can generate a server and a client at the same time.", "links": { - "repoUrl": "https://github.com/asyncapi/java-spring-template" + "repoUrl": "https://github.com/asyncapi/nodejs-ws-template" }, "filters": { - "language": [ - "javascript" - ], + "language": "javascript", "technology": [ - "Springboot", - "Maven", - "Gradle" + "Node.js" ], "categories": [ "generator-template" @@ -657,15 +653,15 @@ } }, { - "title": "HTML Template", - "description": "HTML template for AsyncAPI Generator. Use it to generate a static docs. It is using AsyncAPI React component under the hood.", + "title": "Node.js Multiprotocol Template", + "description": "This template generates a server using your AsyncAPI document. It supports multiple different protocols, like Kafka or MQTT. It is designed in the way that generated code is a library and with it's API you can start the server, send messages or register a middleware for listening incoming messages. Runtime message validation included.", "links": { - "repoUrl": "https://github.com/asyncapi/html-template" + "repoUrl": "https://github.com/asyncapi/nodejs-template" }, "filters": { "language": "javascript", "technology": [ - "HTML" + "Node.js" ], "categories": [ "generator-template" @@ -675,15 +671,19 @@ } }, { - "title": "Node.js Multiprotocol Template", - "description": "This template generates a server using your AsyncAPI document. It supports multiple different protocols, like Kafka or MQTT. It is designed in the way that generated code is a library and with it's API you can start the server, send messages or register a middleware for listening incoming messages. Runtime message validation included.", + "title": "Java Spring Template", + "description": "Java Spring template for the AsyncAPI Generator", "links": { - "repoUrl": "https://github.com/asyncapi/nodejs-template" + "repoUrl": "https://github.com/asyncapi/java-spring-template" }, "filters": { - "language": "javascript", + "language": [ + "javascript" + ], "technology": [ - "Node.js" + "Springboot", + "Maven", + "Gradle" ], "categories": [ "generator-template" From 20d3c0a0af019892c6635a0f855201a9f22fa70a Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 18 Dec 2023 19:23:35 +0100 Subject: [PATCH 033/243] chore: update meetings.json, newsrooom_videos.json and dashboard.json (#2468) --- dashboard.json | 76 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 59 insertions(+), 17 deletions(-) diff --git a/dashboard.json b/dashboard.json index 85d330069d3..3dcc5dfb135 100644 --- a/dashboard.json +++ b/dashboard.json @@ -11,6 +11,26 @@ "labels": [], "score": 43.363362901138075 }, + { + "id": "I_kwDOBW5R_c5J6qNe", + "isPR": false, + "isAssigned": false, + "title": "Measuring AsyncAPI spec adoption", + "author": "derberg", + "resourcePath": "/asyncapi/website/issues/780", + "repo": "asyncapi/website", + "labels": [ + { + "name": "enhancement", + "color": "84b6eb" + }, + { + "name": "stale", + "color": "ededed" + } + ], + "score": 19.527872034949596 + }, { "id": "I_kwDOBW5R_c5BIl5P", "isPR": false, @@ -74,7 +94,7 @@ "resourcePath": "/asyncapi/cli/pull/593", "repo": "asyncapi/cli", "labels": [], - "score": 15.507427792459973 + "score": 15.794602381209232 }, { "id": "PR_kwDOBW5R_c5QjwOq", @@ -147,22 +167,6 @@ "repo": "asyncapi/website", "labels": [], "score": 13.497205671215161 - }, - { - "id": "PR_kwDODou01c5YJ7kV", - "isPR": true, - "isAssigned": false, - "title": "Add Form component", - "author": "KhudaDad414", - "resourcePath": "/asyncapi/studio/pull/773", - "repo": "asyncapi/studio", - "labels": [ - { - "name": "autoupdate", - "color": "ededed" - } - ], - "score": 13.210031082465903 } ], "goodFirstIssues": [ @@ -181,6 +185,25 @@ } ] }, + { + "id": "I_kwDOE8Qh38548Idt", + "title": "PythonGenerator with Pydantic If a property is Optional not required the json expected a key None", + "isAssigned": false, + "resourcePath": "/asyncapi/modelina/issues/1644", + "repo": "asyncapi/modelina", + "author": "tornabene", + "area": "Unknown", + "labels": [ + { + "name": "bug", + "color": "d73a4a" + }, + { + "name": "Python generator", + "color": "5319e7" + } + ] + }, { "id": "I_kwDODyzcIc54mr9C", "title": "Fix wrong format for Co-authored automerged commits + pagination", @@ -285,6 +308,25 @@ } ] }, + { + "id": "I_kwDOE8Qh385yzOft", + "title": "TypeScript include documentation for properties instead of getters", + "isAssigned": false, + "resourcePath": "/asyncapi/modelina/issues/1548", + "repo": "asyncapi/modelina", + "author": "jonaslagoni", + "area": "Unknown", + "labels": [ + { + "name": "enhancement", + "color": "a2eeef" + }, + { + "name": "TS generator", + "color": "33943E" + } + ] + }, { "id": "I_kwDOFLhIt85yyn4B", "title": "Update tooling doc with info about new category", From ac216132f1e59e5d5842f92f1852db9cfc67b635 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barbanio=20Gonz=C3=A1lez?= <77982319+Barbanio@users.noreply.github.com> Date: Tue, 19 Dec 2023 11:37:04 +0000 Subject: [PATCH 034/243] chore: store url update (#2286) Co-authored-by: Aishat Muibudeen <105395613+Mayaleeeee@users.noreply.github.com>%0ACo-authored-by: Akshat Nema <76521428+akshatnema@users.noreply.github.com>%0ACo-authored-by: Lukasz Gornicki --- components/footer/FooterList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/footer/FooterList.js b/components/footer/FooterList.js index b2161199a7b..18c05e4a704 100644 --- a/components/footer/FooterList.js +++ b/components/footer/FooterList.js @@ -49,7 +49,7 @@ export const initiativeLinks = [ }, { label: "Shop", - url: "https://asyncapi.threadless.com", + url: "https://www.store.asyncapi.com/", }, { label: "Jobs", From 9dea5f793562fb49e3ee8d8a3f95ee5daf68dbe7 Mon Sep 17 00:00:00 2001 From: Akshat Nema <76521428+akshatnema@users.noreply.github.com> Date: Tue, 19 Dec 2023 17:55:24 +0530 Subject: [PATCH 035/243] feat: create dropdown for docs sidebar (#2328) Co-authored-by: Lukasz Gornicki --- components/icons/DocsArrow.js | 7 ++++ components/layout/DocsLayout.js | 2 +- components/navigation/DocsNav.js | 43 +++++++++++++-------- components/navigation/SubCategoryDocsNav.js | 34 ++++++++++++++++ 4 files changed, 69 insertions(+), 17 deletions(-) create mode 100644 components/icons/DocsArrow.js create mode 100644 components/navigation/SubCategoryDocsNav.js diff --git a/components/icons/DocsArrow.js b/components/icons/DocsArrow.js new file mode 100644 index 00000000000..a9307b921aa --- /dev/null +++ b/components/icons/DocsArrow.js @@ -0,0 +1,7 @@ +export default function DocsArrow({ isDropDown, activeDropDownItem, onClick, className }) { + return ( +
{ }}> + {isDropDown && } +
+ ); +} diff --git a/components/layout/DocsLayout.js b/components/layout/DocsLayout.js index 738df9c09b1..61b6c26c5c7 100644 --- a/components/layout/DocsLayout.js +++ b/components/layout/DocsLayout.js @@ -89,7 +89,7 @@ export default function DocsLayout({ post, navItems = {}, children }) { className="hidden lg:flex lg:flex-shrink-0" data-testid="DocsLayout-main" > -
+
{ acc[bucket.name] = { ...bucket, @@ -19,28 +23,35 @@ const serializedBuckets = buckets.reduce((acc, bucket) => { export default function DocsNav({ item, active, - onClick = () => {}, + onClick = () => { }, }) { const subCategories = item.children; const bucket = serializedBuckets[item.item.rootSectionId]; + const [openSubCategory, setOpenSubCategory] = useState(active.startsWith(item.item.slug)); + + const onClickHandler = () => { + setOpenSubCategory(!openSubCategory); + onClick(); + } + + useEffect(() => { + setOpenSubCategory(active.startsWith(item.item.slug)); + }, [active]) + return (
  • - -
      - {Object.values(subCategories).map((subCategory) => ( -
    • - -
        - {subCategory.children && subCategory.children.map(subItem => ( -
      • - -
      • - ))} -
      -
    • - ))} -
    +
    + 0} activeDropDownItem={openSubCategory} onClick={() => setOpenSubCategory(!openSubCategory)} /> + +
    + {openSubCategory && ( +
      + {Object.values(subCategories).map((subCategory) => ( + + ))} +
    + )}
  • ); } diff --git a/components/navigation/SubCategoryDocsNav.js b/components/navigation/SubCategoryDocsNav.js new file mode 100644 index 00000000000..87cac1852e1 --- /dev/null +++ b/components/navigation/SubCategoryDocsNav.js @@ -0,0 +1,34 @@ +import { useState, useEffect } from "react"; +import DocsNavItem from "./DocsNavItem"; +import DocsArrow from "../icons/DocsArrow"; + +export default function SubCategoryDocsNav({ subCategory, activeItem, onClick }) { + const [openSubCategoryChildren, setOpenSubCategoryChildren] = useState(activeItem.startsWith(subCategory.item.slug)); + + const onClickHandler = () => { + setOpenSubCategoryChildren(!openSubCategoryChildren); + onClick(); + } + + useEffect(() => { + setOpenSubCategoryChildren(activeItem.startsWith(subCategory.item.slug)); + }, [activeItem]) + + return ( +
  • +
    + setOpenSubCategoryChildren(!openSubCategoryChildren)} /> + +
    + {openSubCategoryChildren && ( +
      + {subCategory.children && subCategory.children.map(subItem => ( +
    • + +
    • + ))} +
    + )} +
  • + ) +} From c17625dbd5f8a03e432f682543256877d8252a0b Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 19 Dec 2023 13:35:41 +0100 Subject: [PATCH 036/243] docs(spec): update latest specification (#2470) --- pages/docs/reference/specification/v3.0.0.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/docs/reference/specification/v3.0.0.md b/pages/docs/reference/specification/v3.0.0.md index a34d83190e8..f4153ad73e5 100644 --- a/pages/docs/reference/specification/v3.0.0.md +++ b/pages/docs/reference/specification/v3.0.0.md @@ -14,10 +14,9 @@ The AsyncAPI Specification is licensed under [The Apache License, Version 2.0](h The AsyncAPI Specification is a project used to describe message-driven APIs in a machine-readable format. It’s protocol-agnostic, so you can use it for APIs that work over any protocol (e.g., AMQP, MQTT, WebSockets, Kafka, STOMP, HTTP, Mercure, etc). -The AsyncAPI Specification defines a set of files required to describe the API of an [application](#definitionsApplication). -These files can be used to create utilities, such as documentation, code, integration, or testing tools. +The AsyncAPI Specification defines a set of fields that can be used in an AsyncAPI document to describe an [application](#definitionsApplication)'s API. The document may reference other files for additional details or shared fields, but it is typically a single, primary document that encapsulates the API description. -The file(s) SHOULD describe the operations an [application](#definitionsApplication) performs. For instance, consider the following AsyncAPI definition snippet: +The AsyncAPI document SHOULD describe the operations an [application](#definitionsApplication) performs. For instance, consider the following AsyncAPI definition snippet: ```yaml channels: @@ -60,6 +59,7 @@ operations: Aside from the issues mentioned above, there may also be infrastructure configuration that is not represented here. For instance, a system may use a read-only channel for receiving messages, a different one for sending them, and an intermediary process that will forward messages from one channel to the other. + ## Definitions ### Server From 70011d3e661cc000d6f6be037cd1e1334951236c Mon Sep 17 00:00:00 2001 From: Akshay Sharma <59491379+captain-Akshay@users.noreply.github.com> Date: Tue, 19 Dec 2023 18:17:53 +0530 Subject: [PATCH 037/243] chore: add docker file (#2179) Co-authored-by: Akshat Nema <76521428+akshatnema@users.noreply.github.com>%0ACo-authored-by: Lukasz Gornicki --- .dockerignore | 3 +++ Dockerfile | 19 +++++++++++++++++++ README.md | 22 ++++++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000000..763c421c133 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +node_modules +.next +.github \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000000..f0d69e54df0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +# Development Docker file +FROM node:18-alpine + +WORKDIR /async + +# Install development dependencies +COPY package.json package-lock.json ./ +RUN npm install + +# Copy the rest of the application files +COPY . . + +# Expose the port for development (if needed) +EXPOSE 3000 + +# Set environment variables for development (optional) +ENV NODE_ENV=development + +CMD ["npm", "run", "dev"] diff --git a/README.md b/README.md index c9eb0a45478..6377621fd54 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,28 @@ npm run build Generated files of the website go to the `.next` folder. +### Run locally using Docker + +#### Prerequisites: + +- [install Docker](https://docs.docker.com/get-docker/) + + +After cloning repository to your local, perform the following steps from the root of the repository. + +#### Steps: +1. Build the Docker image: + ```bash + docker build -t asyncapi-website .` + ``` +2. Start the container: + ```bash + docker run --rm -it -v "$PWD":/async -p 3000:3000 asyncapi-website + ``` + +Now you're running AsyncAPI website in a development mode. Container is mapped with your local copy of the website. Whenever you make changes to the code, the website will refresh and changes visible in localhost:3000. + + ## Case studies ### Overview From d1421d5038d31db3902694ed4c51219c7ba3a976 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 19 Dec 2023 15:00:13 +0100 Subject: [PATCH 038/243] docs(glee): update latest glee documentation (#2471) --- pages/docs/tools/glee/authentication.md | 21 +++++++++------------ pages/docs/tools/glee/bearerToken.md | 4 ++-- pages/docs/tools/glee/glee-template.md | 4 ++-- pages/docs/tools/glee/httpApiKey.md | 5 ++--- pages/docs/tools/glee/index.md | 14 +++++--------- pages/docs/tools/glee/installation.md | 4 ++-- pages/docs/tools/glee/intro-auth.md | 11 ++++++----- pages/docs/tools/glee/userPassword.md | 8 ++++---- 8 files changed, 32 insertions(+), 39 deletions(-) diff --git a/pages/docs/tools/glee/authentication.md b/pages/docs/tools/glee/authentication.md index 2cd7a0101c7..89bba89b5b0 100644 --- a/pages/docs/tools/glee/authentication.md +++ b/pages/docs/tools/glee/authentication.md @@ -1,6 +1,6 @@ --- title: 'Authentication functions' -weight: 3 +weight: 70 --- # Getting started with Authentication functions @@ -19,7 +19,7 @@ export async function clientAuth({ parsedAsyncAPI, serverName }) { } ``` -Glee looks for authentication files in the `auth` directory by default but it can be configured using [glee config file](../config-file.md). +Glee looks for authentication files in the `auth` directory by default but it can be configured using [glee config file](config-file). The name of the authentication file should be the name of the targeted server that the authentication logic should work for. ## Supported Authentication Values in asyncapi.yaml file @@ -31,7 +31,7 @@ AsyncAPI currently supports a variety of authentication formats as specified in - httpApiKey - Oauth2 -A sample `asyncapi.yaml` for a server with security requirements and a `userPassword` security schemes is shown below: +A sample `asyncapi.yaml` for a **server** with security requirements and a `userPassword` security schemes is shown below: ```yaml ##server asyncAPI schema @@ -56,7 +56,7 @@ components: ``` -A sample `asyncapi.yaml` for a client that implements some of the requirements of the server above: +A sample `asyncapi.yaml` for a **client** that implements some of the requirements of the server above: ```yaml ##client asyncAPI schema @@ -81,10 +81,7 @@ components: ``` -**The Client asyncapi.yaml file does not need to implement all the security requirements in the server, it only needs to implement the ones that it uses like *userPassword* here.** - - -Glee can act as both a server and a client. Hence the need for `serverAuth` and `clientAuth`. Glee acts as a client when the server name is included in the `x-remoteServers` property in the `asyncapi.yaml` file. +Glee can act as both a server and a client. Hence, the need for `serverAuth` and `clientAuth`. Glee acts as a client when the server name is included in the `x-remoteServers` property in the `asyncapi.yaml` file. When Glee acts as a client, it can connect to a Glee server, and when Glee acts as a server it accepts connections from other Glee clients. Hence a Glee application can both accept connections from clients while also sending requests to other Glee applications (servers) at the same time. @@ -101,9 +98,9 @@ The `serverAuth` function takes an argument that can be destructured as follows | serverName | The name of the server/broker from which the event was emitted. | | doc | The parsedAsyncAPI schema | -### done() +#### done() function -The `done` parameter in the `serverAuth` function allows the broker/server to know what to do next depending on the boolean value you pass to it. +The `done()` parameter in the `serverAuth` function allows the broker/server to know what to do next depending on the boolean value you pass to it. ```js /* websocket.js */ @@ -160,7 +157,7 @@ The `clientAuth` function also takes an argument, and it's argument can be destr | parsedAsyncAPI | The parsedAsyncAPI schema. | | serverName | The name of the server/broker from with the authentication parameters are being sent. | -### possible authentication parameters +### Possible authentication parameters The possible authentication parameters are shown in the code snippet below: @@ -178,7 +175,7 @@ export async function clientAuth({ serverName }) { } ``` -**The name of the authentication parameters should be the same as the names specified in the asyncAPI.yaml file.** +**The name of the authentication parameters should be the same as the names specified in the `asyncapi.yaml` file.** | auth type | values | | ------------------------------------- | ---------------------------------------------------------------------- | diff --git a/pages/docs/tools/glee/bearerToken.md b/pages/docs/tools/glee/bearerToken.md index 9f1d2244ba2..916ff44c244 100644 --- a/pages/docs/tools/glee/bearerToken.md +++ b/pages/docs/tools/glee/bearerToken.md @@ -1,6 +1,6 @@ --- -title: 'Http (Bearer Token)' -weight: 5 +title: 'Http Authentication(Bearer Token)' +weight: 80 --- ## Getting started with Bearer Token authentication diff --git a/pages/docs/tools/glee/glee-template.md b/pages/docs/tools/glee/glee-template.md index 346a28bacb3..ec0db7a5087 100644 --- a/pages/docs/tools/glee/glee-template.md +++ b/pages/docs/tools/glee/glee-template.md @@ -1,8 +1,8 @@ --- title: "Create AsyncAPI Glee template" -weight: 170 +weight: 30 --- -This tutorial teaches you how to create a simple glee template. You'll use the AsyncAPI Glee template you develop to generate Javascript code. Additionally, you'll create a template code with a reusable component to reuse the custom functionality you create and test your code using an WS server. +This tutorial teaches you how to create a simple glee template. You'll use the AsyncAPI Glee template that you develop to generate Javascript code. Additionally, you'll create a template code with a reusable component to reuse the custom functionality you create and test your code using an WS server. {`asyncapi: 3.0.0 diff --git a/pages/docs/tools/glee/httpApiKey.md b/pages/docs/tools/glee/httpApiKey.md index e95131edbaa..5b513c9de64 100644 --- a/pages/docs/tools/glee/httpApiKey.md +++ b/pages/docs/tools/glee/httpApiKey.md @@ -1,6 +1,6 @@ --- -title: 'httpAPIKey' -weight: 5 +title: 'HttpApiKey Authentication' +weight: 90 --- ## Getting started with httpAPIKey authentication @@ -108,4 +108,3 @@ export async serverAuth({ authProps, done }) { ``` `getHttpAPIKeys(name)` takes a name parameter to specify the name of the httpApiKey that is desired. Then it returns an object containing the httpApiKey value that was sent from the client. - diff --git a/pages/docs/tools/glee/index.md b/pages/docs/tools/glee/index.md index aca98544169..ef5638eec35 100644 --- a/pages/docs/tools/glee/index.md +++ b/pages/docs/tools/glee/index.md @@ -1,6 +1,6 @@ --- title: Getting Started -weight: 80 +weight: 10 --- ## Introduction @@ -49,9 +49,7 @@ To setup a project, you should follow our installation page on how to setup glee We recommend creating a new Glee app using our official CLI which sets up everything automatically. (You don't need to create an empty directory. create-glee-app will make one for you.) To create a project, run: `asyncapi new glee` -Once the process is completed, you should have a new Glee app ready for development and see these files that were made. - -![glee_structure](glee_struct.png) +Once the process is completed, you should have a new Glee app ready for development and find the files that were made. #### Define our Spec for our API @@ -141,11 +139,11 @@ export default async function (event) { Every file in the functions folder acts as a handler to develop business logic for glee, every file should export an async function that receives an event parameter, where you have access to payload and server details. -#### Running and testing your application +#### Running and testing our application -We will not execute the application and carry out testing with Postman to ensure that it is functioning as intended. +We will execute the application and carry out testing with Postman to ensure that it is functioning as intended. -Now to execute your glee application, just run: +Now to execute our glee application, just run: ``` npm run dev @@ -154,6 +152,4 @@ npm run start ``` To send a WebSocket request with a payload e.g. `{"name":"john", "time": "1567906535"}` to `ws://localhost:3000/greet`, open Postman and checkout the endpoint: -![glee_response](glee_resp.png) - So, this is how easy it is to build a WebSocket API using Glee. You can also check out the example code [here](https://github.com/Souvikns/greet-bot). diff --git a/pages/docs/tools/glee/installation.md b/pages/docs/tools/glee/installation.md index 3b13855e248..b3d587e39f3 100644 --- a/pages/docs/tools/glee/installation.md +++ b/pages/docs/tools/glee/installation.md @@ -1,6 +1,6 @@ --- title: 'Installation guide' -weight: 30 +weight: 20 --- ## Glee Installation @@ -78,7 +78,7 @@ These scripts refer to the different stages of developing an application. - `glee start`: This script is responsible for starting your project or application. It is used to launch a production-ready server or application instance. -#### Creating `asyncapi.yaml` file and other required directories +#### Create `asyncapi.yaml` file and other required directories Create a yaml file that supports capable of receiving a "hello {name}" message with the protocol as `ws` and the channel name as `hello` the hello API will subscribe to. The operationId property is `onHello` that's the name of function and the payload property is type string publishing to that channel. diff --git a/pages/docs/tools/glee/intro-auth.md b/pages/docs/tools/glee/intro-auth.md index c657fef8ecd..8eb431c17c4 100644 --- a/pages/docs/tools/glee/intro-auth.md +++ b/pages/docs/tools/glee/intro-auth.md @@ -1,21 +1,22 @@ --- title: 'Introduction to Glee Authentication' -weight: 30 +weight: 60 --- Glee comes with Authentication features which help you erifying the identity of users or entities attempting to access a system or application. It ensures that only authorised individuals or systems are granted access, protecting against unauthorised intrusions and data breaches. Glee simplifies this vital process by offering multiple authentication methods, each tailored to different use cases: -# Authentication Using Authentication Functions: +## Authentication Using Authentication Functions: Glee allows you to implement custom authentication logic by utilising authentication functions. This flexible approach enables developers to craft tailored authentication mechanisms, ensuring that access to resources is controlled precisely as required. -# HTTP Bearer Token Authentication: +## HTTP Bearer Token Authentication: In today's API-driven world, bearer token authentication is a widely adopted method. Glee supports this approach, allowing clients to present a token as proof of their identity, thus ensuring secure and efficient access to resources. -# HttpApiKey Authentication: +## HttpApiKey Authentication: Glee's authentication suite includes support for API key authentication, which is vital for protecting web APIs. By using API keys, you can regulate access to your services, making it an essential component of your application's security strategy. -# Username and Password Authentication: +## Username and Password Authentication: Traditional yet still crucial, username and password authentication remains a reliable option within Glee's toolkit. This method allows users to access systems or applications by providing their unique credentials, ensuring a familiar and straightforward login experience. +## Summary Glee's authentication features not only provide layers of security but also offer the flexibility needed to meet your unique requirements. Whether you're developing a web application, a mobile app, or any other application, Glee's authentication methods empower you to tailor your security measures to suit the demands of your project. With Glee, you can build and maintain a secure digital environment, ensuring that only authorised users and systems gain access, protecting your valuable data and resources. \ No newline at end of file diff --git a/pages/docs/tools/glee/userPassword.md b/pages/docs/tools/glee/userPassword.md index fc761310ed1..70f87e63432 100644 --- a/pages/docs/tools/glee/userPassword.md +++ b/pages/docs/tools/glee/userPassword.md @@ -1,6 +1,6 @@ --- -title: 'userPassword' -weight: 5 +title: 'Username and Password Authentication' +weight: 100 --- ## Getting started with username and password authentication @@ -57,7 +57,7 @@ components: ``` -**The Client asyncapi.yaml file does not need to implement all the security requirements in the server, it only needs to implement the ones that it uses like &*userPassword* here.** +**The Client asyncapi.yaml file does not need to implement all the security requirements in the server, it only needs to implement the ones that it uses like *userPassword* here.** ### Client Side @@ -103,4 +103,4 @@ export async serverAuth({ authProps, done }) { ``` -`getUserPass()` return an object containing the username and password that was sent from the client. +`getUserPass()` returns an object containing the username and password that was sent from the client. From 979097923048579357add6cea09f13dd7479473e Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 19 Dec 2023 16:42:16 +0100 Subject: [PATCH 039/243] docs(glee): update latest glee documentation (#2472) --- pages/docs/tools/glee/env-vars-config.md | 191 ++++++++++++++++++ .../tools/glee/function-lifecycle-events.md | 115 +++++++++++ 2 files changed, 306 insertions(+) create mode 100644 pages/docs/tools/glee/env-vars-config.md create mode 100644 pages/docs/tools/glee/function-lifecycle-events.md diff --git a/pages/docs/tools/glee/env-vars-config.md b/pages/docs/tools/glee/env-vars-config.md new file mode 100644 index 00000000000..3446e43f50c --- /dev/null +++ b/pages/docs/tools/glee/env-vars-config.md @@ -0,0 +1,191 @@ +--- +title: Environment variables and Configuration file +weight: 50 +--- + +# Environment Variables + +Glee provides a few environment variables for you to customize the Glee application's behavior according to your specific requirements: +|Variable|Description|Example| +|---|---|---| +|GLEE_SERVER_NAMES|A comma-separated list of the servers to load on startup.|`GLEE_SERVER_NAMES=websockets,mosquitto` +|GLEE_SERVER_CERTS|A comma-separated list of `${serverName}:${pathToCertificateFile}`. These are the certificates to use when establishing the connection to the given server.|`GLEE_SERVER_CERTS=mosquitto:mosquitto.org.crt` +|GLEE_SERVER_VARIABLES|A comma-separated list of `${serverName}:${serverVariable}:${value}`. These are the values to use for each server variable.|`GLEE_SERVER_VARIABLES=websockets:namespace:public` + +## Configuring Glee + +Glee comes with sensible defaults so you don't have to worry about configuration. However, sometimes you may want to change the behavior or customize Glee in different ways. For that purpose, you can use the `glee.config.js` file. + +### The configuration file + +Glee's config file is a JavaScript file that exports an async function. Something like this: + +```js +export default async function () { + // More stuff here... +} +``` + +This function must return an object with the following shape: + +```js +export default async function () { + return { + glee: {}, + kafka: {}, + websocket: {}, + mqtt: {}, + cluster: {}, + http: {} + } +} + +``` + +Here is an example of a `glee.config.js` file for reference: + +```js +export default async function () { + return { + glee: { // Glee core configurations + lifecycleDir: './lifecycle', + functionsDir: './functions', + asyncapiFilePath: './asyncapi.json', + logs: { // you can change the defualt behaviour of glee which logs everything by default. + incoming: 'channel-only', // only logs the channel not message payload. + outgoing: 'none', //log nothing. + } + }, + docs: { + enabled: true, // Enable/Disable documentation generation + folder: 'docs', // Folder where you want the output of your docs to reside. + template: '@asyncapi/markdown-template' // Type of template you want to use. + } + ws: { + server: { + httpServer: customServer, // A custom HTTP server of your own. + adapter: "native", // Default. Can also be 'socket.io' or a reference to a custom adapter. + port: process.env.PORT, + } + }, + cluster: { + adapter: "redis", + name: "cluster", // Default. Name of your cluster. + url: "redis://localhost:6379", // Server URL used by adapter for clustering + }, + mqtt: { + auth: ({serverName, parsedAsyncAPI}) => { + if (serverName === 'mqtt') { + return { + cert: async () => fs.readFileSync('./cert') + clientId: '123', + username: 'user1' + password: 'pass12' + } + } + } + }, + http: { + server: { + httpServer: customServer, // A custom HTTP server of your own. + adapter: 'native', + port: process.env.PORT, + }, + client: { + auth: { + token: process.env.TOKEN + }, + query: { + foo: 'bar' + }, + body: { + foo: 'bar' + } + } + } + }; +} +``` +Inside the return statement, you can specify the following options: +#### Glee Core Configurations +These configurations apply to Glee itself, rather than any specific protocol. +|Field|Default|Description| +|--|--|--| +|glee.gleeDir|`.glee`|Sets the Glee directory. Your sources will be compiled here.| +|glee.lifecycleDir|`lifecycle`|Path to the directory that stores your [lifecycle events](./lifecycle-events.md).| +|glee.functionsDir|`functions`| Path to the directory that stores your [functions](./functions.md).| +|glee.asyncapiFilePath|`asyncapi.(yaml \| yml \| json)`| Path to your AsyncAPI file. | +|glee.logs| | glee logs channel and payload by default. you can change this behaviour for incoming and outgoing messages. | +|glee.logs.incoming| "all" | supported values are `channel-only` and `none`. | +|glee.logs.outgoing| "all" | supported values are `channel-only` and `none`. | +#### Generating Documentation +|Field|Description| +|--|--| +|docs.enabled|This flag enables/disables the docs generation functionality. +|docs.folder|The dedicated folder you want your generated docs to reside. +|docs.template|The AsyncAPI template you wanna use for generating your documentation. +#### Websocket Server +|Field|Description| +|--|--| +|ws.server|Websocket server-specific configurations| +|ws.server.adapter| The Glee adapter to use for the WebSocket server. Defaults to a "native" WebSocket implementation. Other allowed values are `socket.io` (to use the [Socket.IO](https://socket.io/) Glee adapter) or a reference to a custom adapter.| +|ws.server.httpServer| A custom HTTP server of your own. E.g., an [Express](https://expressjs.com/en/4x/api.html) server or any object that implements the [http.Server](https://nodejs.org/api/http.html#http_class_http_server) interface. | +|ws.server.port| The port to use when binding the WebSocket server. This is useful when your server is behind a proxy and the port exposed for consumption is not the same as the port your application should be bound to. Defaults to the port specified in the selected AsyncAPI server.| +#### Cluster +|Field|Description| +|--|--| +|cluster.adapter| The Glee cluster adapter to use for communication between instances. Defaults to Redis Pub/Sub ("redis"). Can be a reference to a custom adapter.| +|cluster.name|The name of the cluster. Defaults to "cluster".| +|cluster.url|The url of the server to be used by the adapter. In case of "redis" adapter, it's the url of the Redis server.| +#### MQTT +|Field|Description| +|---|---| +|mqtt.auth| MQTT authentication configuration| +|mqtt.auth.cert| Client certificate +|mqtt.auth.clientId| MQTT client Id for authentication +|mqtt.auth.username| username parameter +|mqtt.auth.password| password parameter +#### Kafka +|Field|Description| +|---|---| +|kafka.auth| Kafka authentication configuration| +|kafka.auth.key | Kafka Broker Key +|kafka.auth.cert| Client certificate +|kafka.auth.clientId| Kafka client Id for authentication +|kafka.auth.rejectUnauthorized | Boolean flag for accepting the valid SSL certificates +|kafka.auth.username| The username to use during authentication. +|kafka.auth.password| The password to use during authentication. +#### HTTP Server +|Field|Description| +|--|--| +|http.server|HTTP server-specific configurations| +|http.client|HTTP client-specific configurations| +|http.server.adapter| The Glee adapter to use for the HTTP server. Defaults to a "native" HTTP implementation.| +|websocket.server.port| The port to use when binding the HTTP server. This is useful when your server is behind a proxy and the port exposed for consumption is not the same as the port your application should be bound to. Defaults to the port specified in the selected AsyncAPI server.| +|http.client.auth| Authentication/Authorization configuration for the client| +|http.client.auth.token| HTTP Authentication header| +|http.client.query| Query object for the client to send| +|http.client.body| Body object for the client to send +#### Auth Config +Most clients like `ws`,`kafka`, and `mqtt` have auth fields that are used for passing auth parameters. All these configurations can be an object or a function that returns the specific object defined by each protocol. + +```js +export default async function() { + ws: { + client: { + auth: { + token: process.env.TOKEN + } + } + }, + mqtt: { + auth: ({serverName, parsedAsyncAPI}) => { + if (serverName === 'mqtt') { + return { + cert: fs.readFileSync('./cert', 'utf-8') + } + } + } + } +} +``` diff --git a/pages/docs/tools/glee/function-lifecycle-events.md b/pages/docs/tools/glee/function-lifecycle-events.md new file mode 100644 index 00000000000..3f6e78109fb --- /dev/null +++ b/pages/docs/tools/glee/function-lifecycle-events.md @@ -0,0 +1,115 @@ +--- +title: Function and Lifecycle events +weight: 40 +--- + +# Functions + +Glee relies on functions to execute your business logic. Functions are files that export a default async Node.js function: +```js +/* onHello.js */ +export default async function (event) { + // Your business logic here... +} +``` + +Functions take a single argument, which is the event received from a broker or a client, depending which kind of API you're building. The `event` argument has the following shape: +|Attribute|Description| +|----|----| +|payload|The payload/body of the received event. +|headers|The headers/metadata of the received event. +|channel|The name of the channel/topic from which the event was read. +|serverName|The name of the server/broker from which the event was received. +Functions may return an object to tell Glee what to do next. For instance, the following example greets the user back: +```js +/* onHello.js */ +export default async function (event) { + return { + reply: [{ + payload: 'Greetings! How is your day going?' + }] + } +} +``` + +|Attribute|Type|Description| +|---|---|---| +|send|array<[OutboundMessage](#anatomy-of-an-outbound-message)>|A list of outbound messages to send when the processing of the inbound event has finished. All clients subscribed to the given channel/topic will receive the message. +|reply|array<[OutboundMessage](#anatomy-of-an-outbound-message)>|A list of outbound messages to send as a reply when the processing of the inbound event has finished. This is useful when the target of your message is the sender of the inbound event. Note, however, that this only works when you're running Glee as a server. For example, using `reply` when receiving a WebSocket message is fine and the reply will exclusively go to the client that sent the message. However, if you're receiving a message from an MQTT broker, `reply` will work exactly the same way as `send` above, and will send the message to all the clients subscribed to the given channel/topic. +##### Anatomy of an outbound message +|Attribute|Type|Description| +|---|---|---| +|payload|string|The payload/body of the message you want to send. +|headers|object<string,string>|The headers/metadata of the message you want to send. +|channel|string|The channel/topic you want to send the message to. Defaults to `event.channel`, i.e., the same channel as the received event. +|server|string|The server/broker you want to send the message to. Defaults to `event.serverName`, i.e., the same server as the received event. +## How does Glee know which function it should execute? +Glee reads your `asyncapi.yaml` file and searches for all the `receive` actions containing an `operations` attribute field. The `operations` field serves as a mechanism to bind a given operation to a specific function file. For instance, given the folowing AsyncAPI definition: +```yaml +... +operations: + onHello: # operation ID + action: receive + channel: + $ref: '#/channels/hello' + ... +``` + +Glee maps the `onHello` operation to the `functions/onHello.js` file. + +# Lifecycle Events + +Glee lets you bind incoming messages to functions. However, sometimes we need to be proactive and be the first ones to send a message, not necessarily as a reaction to another message. Use cases can be very diverse: from sending a message to announce our client is connected to sending a message every few seconds or minutes. + +To subscribe to a lifecycle event, create a file under the `lifecycle` directory. It must have the following shape: +```js +export default async function ({ + glee, + serverName, + server, + connection, +}) { + // Your business logic here... +} + +export const lifecycleEvent = 'onConnect' +``` + +Each file in the `lifecycle` directory must export a default async function and the `lifecycleEvent` field, which is the [name of the event](#list-of-events) you want to subscribe to. Optionally, your function can return an object following exactly the same syntax [as described in the functions documentation](functions.md). + +## List of events + +|Event|Description| +|---|---| +|onConnect|A connection with a broker has been established. +|onReconnect|Glee reconnected to a broker. +|onDisconnect|A connection with a broker has been closed. +|onServerReady|Your Glee server is now ready to accept connections. +|onServerConnectionOpen|A client has opened a connection with your Glee server. +|onServerConnectionClose|A client has closed the connection with your Glee server. + +All of them take a single argument which contains information about the event: + +|Attribute|Description +|---|---| +|glee|A reference to the Glee app. +|serverName|The name of the server where the event happened. +|server|The AsyncAPI definition of the server where the event happened. +|connection|The connection where the event happened. + +## Restricting the lifecycle event + +In some cases it's useful to restrict the lifecycle event to a specific server or set of servers. To do that, add a line like the following to your lifecycle file: +```js +export const servers = ['mosquitto'] +``` + +The above example makes Glee fire the lifecycle event only if it's coming from the `mosquitto` server. + +Additionally, you may want to restrict the lifecycle event by channel/topic. To do that, add a line like the following to your lifecycle file: +```js +export const channels = ['user/signedup'] +``` + +The above example makes Glee fire the lifecycle event only if the connection has the channel `user/signedup` listed as one of its channels. +Glee maps the `onHello` operation to the `functions/onHello.js` file. From fbd23fef3e7ac67703a07e72402316aee852d3e6 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Tue, 19 Dec 2023 17:00:17 +0100 Subject: [PATCH 040/243] docs(cli): update latest cli documentation (#2473) --- pages/docs/tools/cli/usage.md | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pages/docs/tools/cli/usage.md b/pages/docs/tools/cli/usage.md index 0b98316cad9..a20365343e6 100644 --- a/pages/docs/tools/cli/usage.md +++ b/pages/docs/tools/cli/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/1.2.22 linux-x64 node-v18.19.0 +@asyncapi/cli/1.2.23 linux-x64 node-v18.19.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -93,7 +93,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/bundle.ts)_ ## `asyncapi config` @@ -107,7 +107,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -121,7 +121,7 @@ DESCRIPTION Manage short aliases for full paths to AsyncAPI documents ``` -_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/index.ts)_ +_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/index.ts)_ ## `asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH` @@ -143,7 +143,7 @@ DESCRIPTION Add a context to the store ``` -_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/add.ts)_ +_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/add.ts)_ ## `asyncapi config context current` @@ -160,7 +160,7 @@ DESCRIPTION Shows the current context that is being used ``` -_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/current.ts)_ +_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/current.ts)_ ## `asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH` @@ -181,7 +181,7 @@ DESCRIPTION Edit a context in the store ``` -_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/edit.ts)_ +_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/edit.ts)_ ## `asyncapi config context init [CONTEXT-FILE-PATH]` @@ -204,7 +204,7 @@ DESCRIPTION Initialize context ``` -_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/init.ts)_ +_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/init.ts)_ ## `asyncapi config context list` @@ -221,7 +221,7 @@ DESCRIPTION List all the stored contexts in the store ``` -_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/list.ts)_ +_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/list.ts)_ ## `asyncapi config context remove CONTEXT-NAME` @@ -241,7 +241,7 @@ DESCRIPTION Delete a context from the store ``` -_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/remove.ts)_ +_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/remove.ts)_ ## `asyncapi config context use CONTEXT-NAME` @@ -261,7 +261,7 @@ DESCRIPTION Set a context as current ``` -_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/context/use.ts)_ +_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/use.ts)_ ## `asyncapi config versions` @@ -278,7 +278,7 @@ DESCRIPTION Show versions of AsyncAPI tools used ``` -_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/config/versions.ts)_ +_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/versions.ts)_ ## `asyncapi convert [SPEC-FILE]` @@ -300,7 +300,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -355,7 +355,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/diff.ts)_ ## `asyncapi generate` @@ -369,7 +369,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -406,7 +406,7 @@ EXAMPLES $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write ``` -_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/generate/fromTemplate.ts)_ +_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/generate/fromTemplate.ts)_ ## `asyncapi generate models LANGUAGE FILE` @@ -480,7 +480,7 @@ DESCRIPTION Generates typed models ``` -_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/generate/models.ts)_ +_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/generate/models.ts)_ ## `asyncapi new` @@ -538,7 +538,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -596,7 +596,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/new/file.ts)_ +_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/new/file.ts)_ ## `asyncapi new glee` @@ -615,7 +615,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/new/glee.ts)_ +_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/new/glee.ts)_ ## `asyncapi new project` @@ -634,7 +634,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/new/project.ts)_ +_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/new/project.ts)_ ## `asyncapi optimize [SPEC-FILE]` @@ -670,7 +670,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/optimize.ts)_ ## `asyncapi start` @@ -684,7 +684,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -703,7 +703,7 @@ DESCRIPTION starts a new local instance of Studio ``` -_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/start/studio.ts)_ +_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/start/studio.ts)_ ## `asyncapi validate [SPEC-FILE]` @@ -730,5 +730,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.22/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/validate.ts)_ From 46667cd42c25b9811a4ea50a0badad0c6f33f2ab Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 20 Dec 2023 00:19:00 +0100 Subject: [PATCH 041/243] docs(cli): update latest cli documentation (#2475) --- pages/docs/tools/cli/usage.md | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pages/docs/tools/cli/usage.md b/pages/docs/tools/cli/usage.md index a20365343e6..a6c2421d8f4 100644 --- a/pages/docs/tools/cli/usage.md +++ b/pages/docs/tools/cli/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/1.2.23 linux-x64 node-v18.19.0 +@asyncapi/cli/1.2.24 linux-x64 node-v18.19.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -93,7 +93,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/bundle.ts)_ ## `asyncapi config` @@ -107,7 +107,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -121,7 +121,7 @@ DESCRIPTION Manage short aliases for full paths to AsyncAPI documents ``` -_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/index.ts)_ +_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/index.ts)_ ## `asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH` @@ -143,7 +143,7 @@ DESCRIPTION Add a context to the store ``` -_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/add.ts)_ +_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/add.ts)_ ## `asyncapi config context current` @@ -160,7 +160,7 @@ DESCRIPTION Shows the current context that is being used ``` -_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/current.ts)_ +_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/current.ts)_ ## `asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH` @@ -181,7 +181,7 @@ DESCRIPTION Edit a context in the store ``` -_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/edit.ts)_ +_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/edit.ts)_ ## `asyncapi config context init [CONTEXT-FILE-PATH]` @@ -204,7 +204,7 @@ DESCRIPTION Initialize context ``` -_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/init.ts)_ +_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/init.ts)_ ## `asyncapi config context list` @@ -221,7 +221,7 @@ DESCRIPTION List all the stored contexts in the store ``` -_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/list.ts)_ +_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/list.ts)_ ## `asyncapi config context remove CONTEXT-NAME` @@ -241,7 +241,7 @@ DESCRIPTION Delete a context from the store ``` -_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/remove.ts)_ +_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/remove.ts)_ ## `asyncapi config context use CONTEXT-NAME` @@ -261,7 +261,7 @@ DESCRIPTION Set a context as current ``` -_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/context/use.ts)_ +_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/use.ts)_ ## `asyncapi config versions` @@ -278,7 +278,7 @@ DESCRIPTION Show versions of AsyncAPI tools used ``` -_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/config/versions.ts)_ +_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/versions.ts)_ ## `asyncapi convert [SPEC-FILE]` @@ -300,7 +300,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -355,7 +355,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/diff.ts)_ ## `asyncapi generate` @@ -369,7 +369,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -406,7 +406,7 @@ EXAMPLES $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write ``` -_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/generate/fromTemplate.ts)_ +_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/generate/fromTemplate.ts)_ ## `asyncapi generate models LANGUAGE FILE` @@ -480,7 +480,7 @@ DESCRIPTION Generates typed models ``` -_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/generate/models.ts)_ +_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/generate/models.ts)_ ## `asyncapi new` @@ -538,7 +538,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -596,7 +596,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/new/file.ts)_ +_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/new/file.ts)_ ## `asyncapi new glee` @@ -615,7 +615,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/new/glee.ts)_ +_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/new/glee.ts)_ ## `asyncapi new project` @@ -634,7 +634,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/new/project.ts)_ +_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/new/project.ts)_ ## `asyncapi optimize [SPEC-FILE]` @@ -670,7 +670,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/optimize.ts)_ ## `asyncapi start` @@ -684,7 +684,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -703,7 +703,7 @@ DESCRIPTION starts a new local instance of Studio ``` -_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/start/studio.ts)_ +_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/start/studio.ts)_ ## `asyncapi validate [SPEC-FILE]` @@ -730,5 +730,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.23/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/validate.ts)_ From dfa147907f9065920f047312d605a823fbe88ead Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 20 Dec 2023 01:24:29 +0100 Subject: [PATCH 042/243] chore: update meetings.json and newsrooom_videos.json (#2476) --- config/newsroom_videos.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/newsroom_videos.json b/config/newsroom_videos.json index 78704f45039..928b2513d2f 100644 --- a/config/newsroom_videos.json +++ b/config/newsroom_videos.json @@ -1,4 +1,10 @@ [ + { + "image_url": "https://i.ytimg.com/vi/prFgD14u7T0/hqdefault.jpg", + "title": "Overview of AsyncAPI v3", + "description": "Join us for an insightful stream diving deep into the latest advancements of AsyncAPI v3! We'll explore this cutting-edge ...", + "videoId": "prFgD14u7T0" + }, { "image_url": "https://i.ytimg.com/vi/-OsMet9h_dg/hqdefault.jpg", "title": "3 Request/Reply Use Cases", @@ -22,11 +28,5 @@ "title": "AsyncAPI Conf on Tour 2023 in Bangalore, India", "description": "AACoT'23 Bangalore Edition live from Postman Offices in India.", "videoId": "g6CPg77Lf5Q" - }, - { - "image_url": "https://i.ytimg.com/vi/p68PUXDMsks/hqdefault.jpg", - "title": "Community Meeting(November 28th, 2023)", - "description": "https://github.com/asyncapi/community/issues/918.", - "videoId": "p68PUXDMsks" } ] \ No newline at end of file From fe855bd5f3fd1405c46d4a01716696c419344605 Mon Sep 17 00:00:00 2001 From: Vishvamsinh Vaghela <90895835+vishvamsinh28@users.noreply.github.com> Date: Wed, 20 Dec 2023 18:23:01 +0530 Subject: [PATCH 043/243] feat: implement the asyncapi financial summary page (#2038) Co-authored-by: AISHAT MUIBUDEEN <105395613+Mayaleeeee@users.noreply.github.com>%0ACo-authored-by: Aishat Muibudeen <105395613+Mayaleeeee@users.noreply.github.com>%0ACo-authored-by: Akshat Nema <76521428+akshatnema@users.noreply.github.com> --- .gitignore | 3 +- README.md | 17 + .../FinancialSummary/AsyncAPISummary.js | 54 +++ .../FinancialSummary/BarChartComponent.js | 221 ++++++++++++ components/FinancialSummary/ContactUs.js | 28 ++ .../FinancialSummary/ExpenseBreakdown.js | 86 +++++ .../FinancialSummary/OtherFormsComponent.js | 51 +++ .../FinancialSummary/SponsorshipTiers.js | 71 ++++ components/FinancialSummary/SuccessStories.js | 49 +++ components/footer/FooterList.js | 4 + config/adopters.json | 1 + config/finance/2023/Expenses.yml | 74 ++++ config/finance/2023/ExpensesLink.yml | 20 ++ lib/getUniqueCategories.js | 20 ++ package-lock.json | 340 ++++++++++++++++++ package.json | 1 + pages/finance.js | 57 +++ public/img/illustrations/BountyProgram.webp | Bin 0 -> 978 bytes .../illustrations/EmployeeInvolvement.webp | Bin 0 -> 2104 bytes .../img/illustrations/EventOrganization.webp | Bin 0 -> 1746 bytes public/img/illustrations/Events.webp | Bin 0 -> 820 bytes public/img/illustrations/Hiring.webp | Bin 0 -> 1088 bytes .../img/illustrations/MentorshipProgram.webp | Bin 0 -> 1032 bytes .../img/illustrations/ServiceProvision.webp | Bin 0 -> 2076 bytes public/img/illustrations/Services.webp | Bin 0 -> 934 bytes public/img/illustrations/SwagStore.webp | Bin 0 -> 1004 bytes public/img/logos/LFX.svg | 1 + public/img/logos/OpenCollective.svg | 1 + scripts/finance/index.js | 33 ++ scripts/index.js | 2 + scripts/utils.js | 35 +- styles/globals.css | 2 +- tailwind.config.js | 2 + 33 files changed, 1159 insertions(+), 14 deletions(-) create mode 100644 components/FinancialSummary/AsyncAPISummary.js create mode 100644 components/FinancialSummary/BarChartComponent.js create mode 100644 components/FinancialSummary/ContactUs.js create mode 100644 components/FinancialSummary/ExpenseBreakdown.js create mode 100644 components/FinancialSummary/OtherFormsComponent.js create mode 100644 components/FinancialSummary/SponsorshipTiers.js create mode 100644 components/FinancialSummary/SuccessStories.js create mode 100644 config/adopters.json create mode 100644 config/finance/2023/Expenses.yml create mode 100644 config/finance/2023/ExpensesLink.yml create mode 100644 lib/getUniqueCategories.js create mode 100644 pages/finance.js create mode 100644 public/img/illustrations/BountyProgram.webp create mode 100644 public/img/illustrations/EmployeeInvolvement.webp create mode 100644 public/img/illustrations/EventOrganization.webp create mode 100644 public/img/illustrations/Events.webp create mode 100644 public/img/illustrations/Hiring.webp create mode 100644 public/img/illustrations/MentorshipProgram.webp create mode 100644 public/img/illustrations/ServiceProvision.webp create mode 100644 public/img/illustrations/Services.webp create mode 100644 public/img/illustrations/SwagStore.webp create mode 100644 public/img/logos/LFX.svg create mode 100644 public/img/logos/OpenCollective.svg create mode 100644 scripts/finance/index.js diff --git a/.gitignore b/.gitignore index 97f8c203803..4a2ff1a8a09 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ meetings.json .netlify .env cypress/screenshots -cypress/videos \ No newline at end of file +cypress/videos +/config/finance/json-data/* \ No newline at end of file diff --git a/README.md b/README.md index 6377621fd54..d92e8cdf859 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,23 @@ After cloning repository to your local, perform the following steps from the roo Now you're running AsyncAPI website in a development mode. Container is mapped with your local copy of the website. Whenever you make changes to the code, the website will refresh and changes visible in localhost:3000. +## Updating information about project finance + +AsyncAPI Financial Summary page aims to provide transparency and clarity regarding the organization's financial activities. It serves as a platform to showcase how donations are accepted, different sponsorship options, and how the generated funds are utilized. + +### How to update information + +- YAML files must be stored in the `config/finance` directory. + +- Create separate folders for each year under `config/finance`, such as `config/finance/2023`. Inside each year's folder, include two YAML files: `Expenses.yml` and `ExpensesLink.yml`. + +- In `Expenses.yml`, record expenses for each month, specifying the `Category` and `Amount`. + +- In `ExpensesLink.yml`, provide discussion links related to expense categories. + +- When a new year begins, create a corresponding folder for that year under `config/finance` and place the YAML files inside the folder for that specific year. For example, create a folder named `config/finance/2024` for the year 2024 and `config/finance/2025` for the year 2025. Place the YAML file for each respective year inside its designated folder. + +- Modify the years within the `scripts/finance/index.js` , `lib/getUniqueCategories.js` and `components/FinancialSummary/BarChartComponent.js` to handle data for different years effectively. ## Case studies diff --git a/components/FinancialSummary/AsyncAPISummary.js b/components/FinancialSummary/AsyncAPISummary.js new file mode 100644 index 00000000000..9076096903b --- /dev/null +++ b/components/FinancialSummary/AsyncAPISummary.js @@ -0,0 +1,54 @@ +import Button from '../buttons/Button' +import Heading from '../typography/Heading' +import Paragraph from '../typography/Paragraph' + +export default function AsyncAPISummary() { + return ( +
    +
    +
    + + AsyncAPI Financial Summary + + + To help improve the current state of Event-Driven Architectures and their tooling, you can show your support for + the AsyncAPI Initiative by making a financial contribution. We offer three donation options: Open Collective, GitHub + Sponsors, and Linux Foundation Crowdfunding. Our expenses are managed through Open Collective and GitHub Sponsors, + while Linux Foundation Crowdfunding operates separately. + +
    +
    +
    +
    +
    + + Ways to Support Us? + +
    +
    + + The easiest way to support AsyncAPI is by becoming a financial sponsor. While
    there are alternative options, + they may involve greater effort. Contribute
    monetarily using the following channels. +
    +
    + + + +
    + ); +} \ No newline at end of file diff --git a/components/FinancialSummary/BarChartComponent.js b/components/FinancialSummary/BarChartComponent.js new file mode 100644 index 00000000000..25455841a8c --- /dev/null +++ b/components/FinancialSummary/BarChartComponent.js @@ -0,0 +1,221 @@ +import React, { useState, useEffect, useRef } from 'react'; +import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend } from 'recharts'; +import ExpensesLink from '../../config/finance/json-data/2023/ExpensesLink.json'; +import Expenses from '../../config/finance/json-data/2023/Expenses.json'; +import { getUniqueCategories } from '../../lib/getUniqueCategories'; +/** + * CustomTooltip component for the bar chart. Displays additional information on hover. + * + * @param {Object} props - The component's props. + * @param {boolean} props.active - Indicates if the tooltip is active. + * @param {Object[]} props.payload - An array of data points. + * @returns {JSX.Element} The rendered CustomTooltip component. + */ +const CustomTooltip = ({ active, payload }) => { + if (active && payload && payload.length) { + const data = payload[0].payload; + return ( +
    +

    {data.Category}

    +

    ${data.Amount.toFixed(2)}

    +

    Click the bar to learn more

    +
    + ); + } + return null; +}; + +/** + * Retrieves unique expense categories from the Expenses data. + * + * @returns {string[]} An array of unique expense categories. + */ + +const months = Object.keys(Expenses); +const categories = getUniqueCategories(); + +/** + * Card component displays monthly expense data. + * + * @param {Object} props - The component's props. + * @param {string} props.month - The month for which expenses are displayed. + * @param {Object[]} props.data - The expense data for the month. + * @param {Object[]} props.links - Links to additional information for each category. + * @returns {JSX.Element} The rendered Card component. + */ +const Card = ({ month, data, links }) => { + return ( +
    +
    {month}
    +
    + {data.map((item, index) => ( +
    +
    { + const category = item.Category; + const matchedLinkObject = ExpensesLink.find(obj => obj.category === category); + if (matchedLinkObject) { + window.open(matchedLinkObject.link, '_blank'); + } + }}>{item.Category}
    +
    ${item.Amount}
    +
    + ))} +
    +
    + ); +}; + +/** + * ExpensesCard component displays a grid of expense cards for each month. + * + * @returns {JSX.Element} The rendered ExpensesCard component. + */ +const ExpensesCard = () => { + return ( +
    +
    + {Object.keys(Expenses).map((month, index) => ( + + ))} +
    +
    + ); +}; + +/** + * BarChartComponent displays a budget analysis bar chart with filtering options. + * + * @returns {JSX.Element} The rendered BarChartComponent component. + */ +const BarChartComponent = () => { + // State for selected filters + const [selectedCategory, setSelectedCategory] = useState("All Categories"); + const [selectedMonth, setSelectedMonth] = useState("All Months"); + const [windowWidth, setWindowWidth] = useState(null); + + // Get unique categories and months from the Expenses data + const categories = getUniqueCategories(); + const months = Object.keys(Expenses); + + // Filter the expenses data based on selectedCategory and selectedMonth + const filteredData = Object.entries(Expenses).flatMap(([month, entries]) => + (selectedMonth === "All Months" || selectedMonth === month) ? + entries.filter(entry => + selectedCategory === "All Categories" || entry.Category === selectedCategory + ) + : [] + ); + + // Calculate total amount for the filtered data + const totalAmount = filteredData.reduce((total, entry) => total + parseFloat(entry.Amount), 0); + + const categoryAmounts = {}; + filteredData.forEach(entry => { + if (categoryAmounts[entry.Category]) { + categoryAmounts[entry.Category] += parseFloat(entry.Amount); + } else { + categoryAmounts[entry.Category] = parseFloat(entry.Amount); + } + }); + + // Prepare chartData from the aggregated categoryAmounts + const chartData = Object.keys(categoryAmounts).map(category => ({ + Category: category, + Amount: categoryAmounts[category], + })); + + // Create a ref for the handleResize function + const handleResizeRef = useRef(null); + + // Define the handleResize function + handleResizeRef.current = () => { + setWindowWidth(window.innerWidth); + }; + + // Update the window width when the component mounts and when the window is resized + useEffect(() => { + // Initial width + handleResizeRef.current(); + + // Listen for window resize events + window.addEventListener("resize", handleResizeRef.current); + + // Clean up the event listener when the component unmounts + return () => { + window.removeEventListener("resize", handleResizeRef.current); + }; + }, []); + + const barWidth = windowWidth < 900 ? null : 800; + const barHeight = windowWidth < 900 ? null : 400; + + return ( +
    +
    +
    +

    Budget Analysis

    +

    Gain insights into the allocation of funds across different categories through our Budget Analysis

    +
    +
    +

    Expenses

    +

    ${totalAmount.toFixed(2)}

    +
    +
    + +
    + {/* Select for category filter */} + + + {/* Select for month filter */} + +
    +
    +
    + +
    + {/* Recharts BarChart */} + + + `$${value}`} /> + } /> + + { + // Get the category from the clicked bar's payload + const category = data.payload.Category; + // Replace the URL with the external website URL you want to open + const matchedLinkObject = ExpensesLink.find(obj => obj.category === category); + if (matchedLinkObject) { + // Extract the link from the matched object and open it in a new tab/window + window.open(matchedLinkObject.link, '_blank'); + } + }} + /> + + {windowWidth < 900 ? : null} +
    +
    + ); +}; + +export default BarChartComponent; \ No newline at end of file diff --git a/components/FinancialSummary/ContactUs.js b/components/FinancialSummary/ContactUs.js new file mode 100644 index 00000000000..24fdf5a0e8e --- /dev/null +++ b/components/FinancialSummary/ContactUs.js @@ -0,0 +1,28 @@ +import Button from '../buttons/Button' +import Heading from '../typography/Heading' +import Paragraph from '../typography/Paragraph' + +export default function ContactUs() { + return ( +
    +
    +
    +
    +

    Interested in getting in touch?

    + + Feel free to contact us if you need more explanation. We are happy to hop on a call and help with + onboarding to the project as a sponsor. Write email to info@asyncapi.io + +
    +
    +
    +
    +
    +
    + ) +} \ No newline at end of file diff --git a/components/FinancialSummary/ExpenseBreakdown.js b/components/FinancialSummary/ExpenseBreakdown.js new file mode 100644 index 00000000000..2c4666657c5 --- /dev/null +++ b/components/FinancialSummary/ExpenseBreakdown.js @@ -0,0 +1,86 @@ +import Heading from '../typography/Heading' +import Paragraph from '../typography/Paragraph' + +export default function ExpenseBreakdown() { + return ( +
    +
    +
    +
    + + Expense Breakdown + + + Funds from GitHub Sponsors are directly transferred to our AsyncAPI Open + Collective account. We maintain transparency in all expenses, and the TSC approves + anticipated expenses. + +
    +
    + +
    +
    +
    + Mentorship Program +

    Mentorship Program

    +
    +

    Our AsyncAPI Mentorship program offers paid guidance to develop valuable features, investing in tools and motivated individuals for community benefit.

    +
    +
    + +
    +
    +
    + Bounty Program +

    Bounty Program

    +
    +

    Rewarding contributors regardless of affiliation or volunteer status. Free mentoring and support for newcomers to build portfolios and unlock tech prospects.

    +
    +
    + +
    +
    +
    + Events +

    Events

    +
    +

    Supporting AsyncAPI conferences incurs costs for services and travel arrangements. Your contributions facilitate event hosting and community growth.

    +
    +
    + +
    +
    +
    + Swag Store +

    Swag Store

    +
    +

    Creating a swag store for seamless distribution to contributors, mentees, ambassadors, and community members. Store profits can fund complimentary swag expenses.

    +
    +
    + +
    +
    +
    + Hiring +

    Hiring

    +
    +

    To support our community, we require full time commitment. Open Collective helps us hire for AsyncAPI. Thulie joins as community manager, with plans to expand the team. our team

    +
    +
    + +
    +
    +
    + Services +

    Services

    +
    +

    Occasionally, we must pay for services such as Zoom or Descript, as they are not available through specific Open Source support programs.

    +
    +
    + +
    +
    +
    +
    + ) +} \ No newline at end of file diff --git a/components/FinancialSummary/OtherFormsComponent.js b/components/FinancialSummary/OtherFormsComponent.js new file mode 100644 index 00000000000..5bf31893248 --- /dev/null +++ b/components/FinancialSummary/OtherFormsComponent.js @@ -0,0 +1,51 @@ +import Container from '../layout/Container' +import Heading from '../typography/Heading' +import Paragraph from '../typography/Paragraph' + +export default function OtherFormsComponent() { + return ( +
    +
    +
    +
    + + Other Forms Of Financial Support + + + You can also support AsyncAPI initiative by getting
    involved through employment, providing services and
    organizing events +
    +
    +
    + +
    + Employee involvement +

    Employee involvement

    +

    + Assign your employees to contribute to projects under the AsyncAPI Initiative on a regular basis, and we'll welcome them as new maintainers. +

    +
    + +
    + Service provision +

    Service provision

    +

    + AsyncAPI Initiative relies on numerous tools, many of which incur costs. Your organization can provide services such as hosting or storage to support our efforts. +

    +
    + +
    + Event organization +

    Event organization

    +

    + Host AsyncAPI conferences by sponsoring and organizing events under the AsyncAPI brand at your provided venue. +

    +
    + + +
    + +
    +
    +
    + ); +} \ No newline at end of file diff --git a/components/FinancialSummary/SponsorshipTiers.js b/components/FinancialSummary/SponsorshipTiers.js new file mode 100644 index 00000000000..e5ab417f9e5 --- /dev/null +++ b/components/FinancialSummary/SponsorshipTiers.js @@ -0,0 +1,71 @@ +import Heading from "../typography/Heading" +import Paragraph from '../typography/Paragraph' + +export default function SponsorshipTiers() { + return ( +
    +
    +
    + +

    Sponsorship Tiers

    +
    + + + AsyncAPI offers various sponsorship tiers, each with its own set
    + of benefits and privileges. These tiers include Bronze, Silver,
    + Gold, and Platinum. +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    TiersAmountsBenefits
    Bronze$100/month + Company logo in README on GitHub +
    Silver$500/month + Company logo in README on GitHub and asyncapi.com +
    Gold$1000/month + Company logo in README on GitHub and asyncapi.com +
    Platinum$2000/month + Company logo in README on GitHub and asyncapi.com. + Up to 2 hours of support per month. Support will be + remote with the option of a shared screen or via private chat. + Support hours do not accumulate. +
    +
    +
    +
    +
    + ); +} \ No newline at end of file diff --git a/components/FinancialSummary/SuccessStories.js b/components/FinancialSummary/SuccessStories.js new file mode 100644 index 00000000000..ebac564b2bd --- /dev/null +++ b/components/FinancialSummary/SuccessStories.js @@ -0,0 +1,49 @@ +import Heading from '../typography/Heading' +import Paragraph from '../typography/Paragraph' + +export default function SuccessStories() { + return ( +
    +
    +
    +
    +

    + Success Stories +

    +

    + Thanks to financial support we can already see many
    success stories in + the project. +

    +
    +
    +
    +

    Community Manager

    +

    + With the addition of a dedicated Community Manager, we now have a monthly newsletter, + regular status updates, an active social media presence, and the ability to drive + initiatives such as event organization. +

    +
    +
    +

    AsyncAPI Mentorship

    +

    + The 2022 mentorship program yielded significant achievements: Kafka support in + Glee, a centralized platform for sharing AsyncAPI tools, and a versatile error + handling library for multiple projects. +

    +
    +
    +

    AsyncAPI Conference

    +

    + Every year we organize a conference that attracts many participants. Only last year + the conference generated 3k views. We + plan to do a series of events in different locations every year. +

    +
    +
    + +
    +
    +
    + ) +} \ No newline at end of file diff --git a/components/footer/FooterList.js b/components/footer/FooterList.js index 18c05e4a704..ff5b394e972 100644 --- a/components/footer/FooterList.js +++ b/components/footer/FooterList.js @@ -59,6 +59,10 @@ export const initiativeLinks = [ label: "Brand", url: "https://github.com/asyncapi/brand/blob/master/brand-guidelines/README.md", }, + { + label:"Finance", + url:"/finance" + }, { label: "FAQs", url: "/about#faqs", diff --git a/config/adopters.json b/config/adopters.json new file mode 100644 index 00000000000..e92e3ed5865 --- /dev/null +++ b/config/adopters.json @@ -0,0 +1 @@ +[{"companyName":"Reiffeisen Bank","useCase":"Continuous Integration and Continuous Delivery (CI/CD) pipeline based on GitOps to deploy a topology built on Async API definitions using a Kubernetes operator to an Apache Pulsar cluster.","resources":[{"title":"Video - From an AsyncAPI Definition to a Deployed Pulsar Topology Via GitOps","link":"https://www.youtube.com/watch?v=_MwzLZMwFN8"}]},{"companyName":"LEGO Group","useCase":"Broker management, where developers do not access the management console themselves, but rely on uploading AsyncAPI documents to a self service API that provisions access and topics specified in documents.","resources":[{"title":"Video - Documentation as Configuration for Management of Apache Pulsar","link":"https://www.youtube.com/watch?v=m8I0fYjx6Cc"}]},{"companyName":"LEGO Group","useCase":"Define, document and distribute event-driven APIs. Ensuring consistency and governance","resources":[{"title":"Video - Cross-Domain Events with AsyncAPI and AWS","link":"https://www.youtube.com/watch?v=qjarcJQVLOg"}]},{"companyName":"Bank of New Zealand","useCase":"Decentralized company-wide governance strategy for API. A self service for publishing APIs and docs.","resources":[{"title":"Video - Self-service Events & Decentralised Governance with AsyncAPI: A Real World Example","link":"https://www.confluent.io/events/kafka-summit-apac-2021/self-service-events-and-decentralised-governance-with-asyncapi-a-real-world/"}]},{"companyName":"Zora Robotics","useCase":"Documenting lot products public MQTT API and building a developers portal.","resources":[{"title":"Video - Buliding and managing an extensive API for Robotics and loT","link":"https://www.youtube.com/watch?v=yjHgT0n2BtA"},{"title":"Docs - Buliding and managing an extensive API for Robotics and loT","link":"https://docs.zorabots.be/dev-mqtt-docs/latest/index.html"}]},{"companyName":"Walmart","useCase":"Managing a central API Hub for internal teams. Using AsyncAPI for events discoverability an visibility in a single place. AsyncAPI also enabled company-wide governance on asynchronous APIs.","resources":[{"title":"Video - Time For AsyncAPI Specification","link":"https://www.youtube.com/watch?v=SxTpGRaNIPo"}]},{"companyName":"eBay","useCase":"Enabling partners to build with eBay through asynchronous communication. Public AsyncAPI documents enable code generation and faster integration. It also enables governance and standardisation.","resources":[{"title":"Video - AsyncAPI 2.0: Enabling the Event-Driven World","link":"https://www.youtube.com/watch?v=SxTpGRaNIPo"},{"title":"Article - AsyncAPI 2.0: Enabling the Event-Driven World","link":"https://innovation.ebayinc.com/tech/engineering/asyncapi-2-0-enabling-the-event-driven-world/"},{"title":"Docs - Overview of Notification API with public AsyncAPI documents","link":"https://developer.ebay.com/api-docs/commerce/notification/overview.html"}]}] \ No newline at end of file diff --git a/config/finance/2023/Expenses.yml b/config/finance/2023/Expenses.yml new file mode 100644 index 00000000000..c115f8dd296 --- /dev/null +++ b/config/finance/2023/Expenses.yml @@ -0,0 +1,74 @@ +January: + - Category: AsyncAPI Ambassador + Amount: '68.95' + - Category: Google Season of Docs 2022 + Amount: '35.62' + - Category: Google Season of Docs 2022 + Amount: '1666.67' + - Category: AsyncAPI Mentorship 2022 + Amount: '1500' + - Category: AsyncAPI Mentorship 2022 + Amount: '1500' + - Category: AsyncAPI Mentorship 2022 + Amount: '1500' + +February: + - Category: Community Manager Salary + Amount: '1000.39' + - Category: AsyncAPI Mentorship 2022 + Amount: '1500' + +March: + - Category: Community Manager Salary + Amount: '2000.39' + - Category: AsyncAPI Mentorship 2022 + Amount: '1500' + - Category: AsyncAPI Mentorship 2022 + Amount: '1500' + +April: + - Category: Community Manager Salary + Amount: '2000.39' + +May: + - Category: Community Manager Salary + Amount: '2000.39' + - Category: "AsyncAPI Webstore" + Amount: '75.11' + - Category: AsyncAPI Bounty + Amount: '400' + +June: + - Category: Community Manager Salary + Amount: '2000.39' + - Category: AsyncAPI Bounty + Amount: '200' + - Category: 3rd Party Services + Amount: '28.31' + - Category: AsyncAPI Bounty + Amount: '200' + - Category: AsyncAPI Bounty + Amount: '200' + - Category: AsyncAPI Bounty + Amount: '200' + +July: + - Category: Community Manager Salary + Amount: '2000.39' + - Category: 3rd Party Services + Amount: '1088.27' + - Category: AsyncAPI Bounty + Amount: '400' +August: + - Category: AsyncAPI Webstore + Amount: '15671.63' + - Category: AsyncAPI Bounty + Amount: '400' + - Category: Community Manager Salary + Amount: '2000' + +September: + - Category: AsyncAPI Ambassador + Amount: '129.48' + - Category: Community Manager Salary + Amount: '2000' \ No newline at end of file diff --git a/config/finance/2023/ExpensesLink.yml b/config/finance/2023/ExpensesLink.yml new file mode 100644 index 00000000000..9493648c356 --- /dev/null +++ b/config/finance/2023/ExpensesLink.yml @@ -0,0 +1,20 @@ +- category: "AsyncAPI Ambassador" + link: "https://github.com/orgs/asyncapi/discussions/425" + +- category: "Google Season of Docs 2022" + link: "https://github.com/orgs/asyncapi/discussions/303" + +- category: "AsyncAPI Mentorship 2022" + link: "https://github.com/orgs/asyncapi/discussions/284" + +- category: "AsyncAPI Webstore" + link: "https://github.com/orgs/asyncapi/discussions/710" + +- category: "AsyncAPI Bounty" + link: "https://github.com/orgs/asyncapi/discussions/541" + +- category: "3rd Party Services" + link: "https://github.com/orgs/asyncapi/discussions/295" + +- category: "Community Manager Salary" + link: "https://github.com/orgs/asyncapi/discussions/515" \ No newline at end of file diff --git a/lib/getUniqueCategories.js b/lib/getUniqueCategories.js new file mode 100644 index 00000000000..6b40890658b --- /dev/null +++ b/lib/getUniqueCategories.js @@ -0,0 +1,20 @@ +/** + * Retrieves unique expense categories from the Expenses data. + * + * @param {Object} expenses - The expenses data. + * @returns {string[]} An array of unique expense categories. + */ + +import Expenses from '../config/finance/json-data/2023/Expenses.json'; + +export const getUniqueCategories = () => { + const allCategories = []; + for (const month in Expenses) { + Expenses[month].forEach(entry => { + if (!allCategories.includes(entry.Category)) { + allCategories.push(entry.Category); + } + }); + } + return allCategories; +}; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index b1873089983..bd2db31d984 100644 --- a/package-lock.json +++ b/package-lock.json @@ -58,6 +58,7 @@ "react-typing-animation": "^1.6.2", "react-youtube-embed": "^1.0.3", "reading-time": "^1.2.0", + "recharts": "^2.10.1", "remark-frontmatter": "^2.0.0", "remark-gemoji-to-emoji": "^1.1.0", "remark-heading-id": "^1.0.0", @@ -2526,6 +2527,60 @@ "@types/estree": "*" } }, + "node_modules/@types/d3-array": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.0.5.tgz", + "integrity": "sha512-Qk7fpJ6qFp+26VeQ47WY0mkwXaiq8+76RJcncDEfMc2ocRzXLO67bLFRNI4OX1aGBoPzsM5Y2T+/m1pldOgD+A==" + }, + "node_modules/@types/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-HKuicPHJuvPgCD+np6Se9MQvS6OCbJmOjGvylzMJRlDwUXjKTTXs6Pwgk79O09Vj/ho3u1ofXnhFOaEWWPrlwA==" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.0.tgz", + "integrity": "sha512-aMo4eaAOijJjA6uU+GIeW018dvy9+oH5Y2VPPzjjfxevvGQ/oRDs+tfYC9b50Q4BygRR8yE2QCLsrT0WtAVseA==" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-jx5leotSeac3jr0RePOH1KdR9rISG91QIE4Q2PYTu4OymLTZfA3SrnURSLzKH48HmXVUru50b8nje4E79oQSQw==", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.0.0.tgz", + "integrity": "sha512-0g/A+mZXgFkQxN3HniRDbXMN79K3CdTpLsevj+PXiTcb2hVyvkZUBg37StmgCQkaD84cUJ4uaDAWq7UJOQy2Tg==" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.3.tgz", + "integrity": "sha512-PATBiMCpvHJSMtZAMEhc2WyL+hnzarKzI6wAHYjhsonjWJYGq5BXTzQjv4l8m2jO183/4wZ90rKvSeT7o72xNQ==", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-shape": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.1.tgz", + "integrity": "sha512-6Uh86YFF7LGg4PQkuO2oG6EMBRLuW9cbavUW46zkIO5kuS2PfTqo2o9SkgtQzguBHbLgNnU90UNsITpsX1My+A==", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.0.tgz", + "integrity": "sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg==" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.0.tgz", + "integrity": "sha512-HNB/9GHqu7Fo8AQiugyJbv6ZxYz58wef0esl4Mv828w1ZKpAshw/uFWVDUcIB9KKFeFKoxS3cHY07FFgtTRZ1g==" + }, "node_modules/@types/debug": { "version": "4.1.8", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", @@ -4804,6 +4859,11 @@ } } }, + "node_modules/decimal.js-light": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", + "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==" + }, "node_modules/decode-named-character-reference": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", @@ -5005,6 +5065,14 @@ "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" }, + "node_modules/dom-helpers": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.4.0.tgz", + "integrity": "sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==", + "dependencies": { + "@babel/runtime": "^7.1.2" + } + }, "node_modules/dom-serializer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", @@ -10527,6 +10595,11 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "node_modules/react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, "node_modules/react-scrollspy": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/react-scrollspy/-/react-scrollspy-3.4.3.tgz", @@ -10537,6 +10610,28 @@ "prop-types": "^15.5.10" } }, + "node_modules/react-smooth": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/react-smooth/-/react-smooth-2.0.5.tgz", + "integrity": "sha512-BMP2Ad42tD60h0JW6BFaib+RJuV5dsXJK9Baxiv/HlNFjvRLqA9xrNKxVWnUIZPQfzUwGXIlU/dSYLU+54YGQA==", + "dependencies": { + "fast-equals": "^5.0.0", + "react-transition-group": "2.9.0" + }, + "peerDependencies": { + "prop-types": "^15.6.0", + "react": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/react-smooth/node_modules/fast-equals": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.0.1.tgz", + "integrity": "sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==", + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/react-syntax-highlighter": { "version": "12.2.1", "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-12.2.1.tgz", @@ -10560,6 +10655,21 @@ "prop-types": "^15.5.7" } }, + "node_modules/react-transition-group": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz", + "integrity": "sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg==", + "dependencies": { + "dom-helpers": "^3.4.0", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2", + "react-lifecycles-compat": "^3.0.4" + }, + "peerDependencies": { + "react": ">=15.0.0", + "react-dom": ">=15.0.0" + } + }, "node_modules/react-twitter-embed": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/react-twitter-embed/-/react-twitter-embed-4.0.4.tgz", @@ -10669,6 +10779,50 @@ "resolved": "https://registry.npmjs.org/reading-time/-/reading-time-1.5.0.tgz", "integrity": "sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==" }, + "node_modules/recharts": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.10.1.tgz", + "integrity": "sha512-9bi0jIzxOTfEda+oYqgimKuYfApmBr0zKnAX8r4Iw56k3Saz/IQyBD4zohZL0eyzfz0oGFRH7alpJBgH1eC57g==", + "dependencies": { + "clsx": "^2.0.0", + "eventemitter3": "^4.0.1", + "lodash": "^4.17.19", + "react-is": "^16.10.2", + "react-smooth": "^2.0.5", + "recharts-scale": "^0.4.4", + "tiny-invariant": "^1.3.1", + "victory-vendor": "^36.6.8" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "prop-types": "^15.6.0", + "react": "^16.0.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/recharts-scale": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/recharts-scale/-/recharts-scale-0.4.5.tgz", + "integrity": "sha512-kivNFO+0OcUNu7jQquLXAxz1FIwZj8nrj+YkOKc5694NbjCvcT6aSZiIzNzd2Kul4o4rTto8QVR9lMNtxD4G1w==", + "dependencies": { + "decimal.js-light": "^2.4.1" + } + }, + "node_modules/recharts/node_modules/clsx": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", + "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==", + "engines": { + "node": ">=6" + } + }, + "node_modules/recharts/node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, "node_modules/redis-errors": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", @@ -11846,6 +12000,11 @@ "globrex": "^0.1.2" } }, + "node_modules/tiny-invariant": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz", + "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==" + }, "node_modules/tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -12530,6 +12689,27 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/victory-vendor": { + "version": "36.6.11", + "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-36.6.11.tgz", + "integrity": "sha512-nT8kCiJp8dQh8g991J/R5w5eE2KnO8EAIP0xocWlh9l2okngMWglOPoMZzJvek8Q1KUc4XE/mJxTZnvOB1sTYg==", + "dependencies": { + "@types/d3-array": "^3.0.3", + "@types/d3-ease": "^3.0.0", + "@types/d3-interpolate": "^3.0.1", + "@types/d3-scale": "^4.0.2", + "@types/d3-shape": "^3.1.0", + "@types/d3-time": "^3.0.0", + "@types/d3-timer": "^3.0.0", + "d3-array": "^3.1.6", + "d3-ease": "^3.0.1", + "d3-interpolate": "^3.0.1", + "d3-scale": "^4.0.2", + "d3-shape": "^3.1.0", + "d3-time": "^3.0.0", + "d3-timer": "^3.0.1" + } + }, "node_modules/void-elements": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", @@ -14364,6 +14544,60 @@ "@types/estree": "*" } }, + "@types/d3-array": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.0.5.tgz", + "integrity": "sha512-Qk7fpJ6qFp+26VeQ47WY0mkwXaiq8+76RJcncDEfMc2ocRzXLO67bLFRNI4OX1aGBoPzsM5Y2T+/m1pldOgD+A==" + }, + "@types/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-HKuicPHJuvPgCD+np6Se9MQvS6OCbJmOjGvylzMJRlDwUXjKTTXs6Pwgk79O09Vj/ho3u1ofXnhFOaEWWPrlwA==" + }, + "@types/d3-ease": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.0.tgz", + "integrity": "sha512-aMo4eaAOijJjA6uU+GIeW018dvy9+oH5Y2VPPzjjfxevvGQ/oRDs+tfYC9b50Q4BygRR8yE2QCLsrT0WtAVseA==" + }, + "@types/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-jx5leotSeac3jr0RePOH1KdR9rISG91QIE4Q2PYTu4OymLTZfA3SrnURSLzKH48HmXVUru50b8nje4E79oQSQw==", + "requires": { + "@types/d3-color": "*" + } + }, + "@types/d3-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.0.0.tgz", + "integrity": "sha512-0g/A+mZXgFkQxN3HniRDbXMN79K3CdTpLsevj+PXiTcb2hVyvkZUBg37StmgCQkaD84cUJ4uaDAWq7UJOQy2Tg==" + }, + "@types/d3-scale": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.3.tgz", + "integrity": "sha512-PATBiMCpvHJSMtZAMEhc2WyL+hnzarKzI6wAHYjhsonjWJYGq5BXTzQjv4l8m2jO183/4wZ90rKvSeT7o72xNQ==", + "requires": { + "@types/d3-time": "*" + } + }, + "@types/d3-shape": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.1.tgz", + "integrity": "sha512-6Uh86YFF7LGg4PQkuO2oG6EMBRLuW9cbavUW46zkIO5kuS2PfTqo2o9SkgtQzguBHbLgNnU90UNsITpsX1My+A==", + "requires": { + "@types/d3-path": "*" + } + }, + "@types/d3-time": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.0.tgz", + "integrity": "sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg==" + }, + "@types/d3-timer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.0.tgz", + "integrity": "sha512-HNB/9GHqu7Fo8AQiugyJbv6ZxYz58wef0esl4Mv828w1ZKpAshw/uFWVDUcIB9KKFeFKoxS3cHY07FFgtTRZ1g==" + }, "@types/debug": { "version": "4.1.8", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", @@ -16222,6 +16456,11 @@ "ms": "2.1.2" } }, + "decimal.js-light": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz", + "integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==" + }, "decode-named-character-reference": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.0.2.tgz", @@ -16377,6 +16616,14 @@ "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz", "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==" }, + "dom-helpers": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.4.0.tgz", + "integrity": "sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==", + "requires": { + "@babel/runtime": "^7.1.2" + } + }, "dom-serializer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", @@ -20665,6 +20912,11 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, + "react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, "react-scrollspy": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/react-scrollspy/-/react-scrollspy-3.4.3.tgz", @@ -20675,6 +20927,22 @@ "prop-types": "^15.5.10" } }, + "react-smooth": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/react-smooth/-/react-smooth-2.0.5.tgz", + "integrity": "sha512-BMP2Ad42tD60h0JW6BFaib+RJuV5dsXJK9Baxiv/HlNFjvRLqA9xrNKxVWnUIZPQfzUwGXIlU/dSYLU+54YGQA==", + "requires": { + "fast-equals": "^5.0.0", + "react-transition-group": "2.9.0" + }, + "dependencies": { + "fast-equals": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.0.1.tgz", + "integrity": "sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==" + } + } + }, "react-syntax-highlighter": { "version": "12.2.1", "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-12.2.1.tgz", @@ -20695,6 +20963,17 @@ "prop-types": "^15.5.7" } }, + "react-transition-group": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz", + "integrity": "sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg==", + "requires": { + "dom-helpers": "^3.4.0", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2", + "react-lifecycles-compat": "^3.0.4" + } + }, "react-twitter-embed": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/react-twitter-embed/-/react-twitter-embed-4.0.4.tgz", @@ -20798,6 +21077,41 @@ "resolved": "https://registry.npmjs.org/reading-time/-/reading-time-1.5.0.tgz", "integrity": "sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==" }, + "recharts": { + "version": "2.10.1", + "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.10.1.tgz", + "integrity": "sha512-9bi0jIzxOTfEda+oYqgimKuYfApmBr0zKnAX8r4Iw56k3Saz/IQyBD4zohZL0eyzfz0oGFRH7alpJBgH1eC57g==", + "requires": { + "clsx": "^2.0.0", + "eventemitter3": "^4.0.1", + "lodash": "^4.17.19", + "react-is": "^16.10.2", + "react-smooth": "^2.0.5", + "recharts-scale": "^0.4.4", + "tiny-invariant": "^1.3.1", + "victory-vendor": "^36.6.8" + }, + "dependencies": { + "clsx": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz", + "integrity": "sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==" + }, + "eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + } + } + }, + "recharts-scale": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/recharts-scale/-/recharts-scale-0.4.5.tgz", + "integrity": "sha512-kivNFO+0OcUNu7jQquLXAxz1FIwZj8nrj+YkOKc5694NbjCvcT6aSZiIzNzd2Kul4o4rTto8QVR9lMNtxD4G1w==", + "requires": { + "decimal.js-light": "^2.4.1" + } + }, "redis-errors": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", @@ -21760,6 +22074,11 @@ "globrex": "^0.1.2" } }, + "tiny-invariant": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.3.1.tgz", + "integrity": "sha512-AD5ih2NlSssTCwsMznbvwMZpJ1cbhkGd2uueNxzv2jDlEeZdU04JQfRnggJQ8DrcVBGjAsCKwFBbDlVNtEMlzw==" + }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -22270,6 +22589,27 @@ "unist-util-stringify-position": "^3.0.0" } }, + "victory-vendor": { + "version": "36.6.11", + "resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-36.6.11.tgz", + "integrity": "sha512-nT8kCiJp8dQh8g991J/R5w5eE2KnO8EAIP0xocWlh9l2okngMWglOPoMZzJvek8Q1KUc4XE/mJxTZnvOB1sTYg==", + "requires": { + "@types/d3-array": "^3.0.3", + "@types/d3-ease": "^3.0.0", + "@types/d3-interpolate": "^3.0.1", + "@types/d3-scale": "^4.0.2", + "@types/d3-shape": "^3.1.0", + "@types/d3-time": "^3.0.0", + "@types/d3-timer": "^3.0.0", + "d3-array": "^3.1.6", + "d3-ease": "^3.0.1", + "d3-interpolate": "^3.0.1", + "d3-scale": "^4.0.2", + "d3-shape": "^3.1.0", + "d3-time": "^3.0.0", + "d3-timer": "^3.0.1" + } + }, "void-elements": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", diff --git a/package.json b/package.json index 4143d2049dc..065d1b297e9 100644 --- a/package.json +++ b/package.json @@ -85,6 +85,7 @@ "react-typing-animation": "^1.6.2", "react-youtube-embed": "^1.0.3", "reading-time": "^1.2.0", + "recharts": "^2.10.1", "remark-frontmatter": "^2.0.0", "remark-gemoji-to-emoji": "^1.1.0", "remark-heading-id": "^1.0.0", diff --git a/pages/finance.js b/pages/finance.js new file mode 100644 index 00000000000..c01c16fd8f6 --- /dev/null +++ b/pages/finance.js @@ -0,0 +1,57 @@ +import React, { useEffect, useState, useRef } from "react"; +import Head from "next/head"; +import Container from "../components/layout/Container"; +import StickyNavbar from "../components/navigation/StickyNavbar"; +import NavBar from "../components/navigation/NavBar"; +import AsyncAPISummary from "../components/FinancialSummary/AsyncAPISummary"; +import SponsorshipTiers from "../components/FinancialSummary/SponsorshipTiers"; +import OtherFormsComponent from "../components/FinancialSummary/OtherFormsComponent"; +import ExpenseBreakdown from "../components/FinancialSummary/ExpenseBreakdown"; +import BarChartComponent from "../components/FinancialSummary/BarChartComponent"; +import SuccessStories from "../components/FinancialSummary/SuccessStories"; +import ContactUs from "../components/FinancialSummary/ContactUs"; + +export default function FinancialSummary() { + const [windowWidth, setWindowWidth] = useState(0); + + const handleResizeRef = useRef(null); + + handleResizeRef.current = () => { + setWindowWidth(window.innerWidth); + }; + + useEffect(() => { + handleResizeRef.current(); + window.addEventListener("resize", handleResizeRef.current); + + return () => { + window.removeEventListener("resize", handleResizeRef.current); + }; + }, []); + + const title = "AsyncAPI Finance Summary"; + const description = "Financial Summary of AsyncAPI"; + + const renderComponents = () => ( + <> + + {title} + + + + + + + + + + + + + + ); + + const shouldUseContainer = windowWidth > 1700; + + return
    {shouldUseContainer ? {renderComponents()} : renderComponents()}
    ; +} diff --git a/public/img/illustrations/BountyProgram.webp b/public/img/illustrations/BountyProgram.webp new file mode 100644 index 0000000000000000000000000000000000000000..103dc5bfb04c5ac2fd24565cdc9371a28bd1e2e3 GIT binary patch literal 978 zcmV;@110{{S5MM6+kP&gpI0{{T<833IDDrf*=06r-ch(e*EArne$gct&Z zv4eaL9Zb)%nD_i({AT26GS8>quzB77-Rx7ui|7Nm*O<@MU)Tk!PbtZtIJel!;)u?BEB?SI4sx(l}Pyv*?1ApYV2tgG(fGtq0EY z#`1kC&mz<^uXxb`V`g3x!D~HKY!iRF)Q#L8&Z#~!Q_uha{_EZ^`1l{k!2Ui5`1l$0 z=P;1;>RTLmeqsz#1+LfhksuK8T1TIpXg1D1&N?Xn&T|)>Xfg|<2(Ry-{EE@AK~w$GrOW`K$-#wRRE;HT6)(97I43h(yjha>;^oHiY$|Mk@7 z2vid-&fC!kGw!)j0D1)E>jMta_)YMn|ACvy@g<0XZx0uONuT=>xj?kWmFO#VDvV(h zMe|n~6+wg)%L*{z=PJp>{#Ay^L@G2SdHz!{`eP!oB z`buR-!nYJ=6-p^niT_173Lnb-jFv-(`K}?!fV_PH$h3o6g=K!>zbEOx9JjsGYwW=3 zOy>c>FnFyds{cxuVKL>tsr$9Xd>@pQK3MrHvcmXNXy?>hTYI(q?X12_;Q?|z+}mpw zyaJy`SW6a3eBqds;P{U*AR$8BKISVhWM?w@xMS){A0^o4^+Ep01>5wC7ImBe0FdDI AZ2$lO literal 0 HcmV?d00001 diff --git a/public/img/illustrations/EmployeeInvolvement.webp b/public/img/illustrations/EmployeeInvolvement.webp new file mode 100644 index 0000000000000000000000000000000000000000..3c9a5a06bf65b92be55293f0eae75c9532945ba7 GIT binary patch literal 2104 zcmV-82*>wQNk&F62mkeutP`cH5V)34|q zN4&^>v46MziSF~_-R>3o_14qq8T(7=ar=$%hx=9k5B_(wF0aRt|DE=;{iBrV_5aI$ zPkEK@i~j-n4VF{$fA*H$@ww-NohPKdg8!3$P5*P(+xFksJN5uOtJOBTd{gPFZCsU& zv3*HC31H9C+;=XVgIgE^RuBZNBD^XSb{hLmFn}lyOLJ`Shn~xpb&!sV)Q{*v{Xi zN6F@mbd{-Eu|w>TAF{*DLh;AIJR3l-kU99+!2{DRcCq9eVogRd!6F*mOL}N{YYxHx zj+l7Z9Fjcq;ZO5KZ;aZEE^c+}%IAMqA5VqH(F&{|<84BHpw6~1F|{uQA>2nQ^KP@L zff){4Y(37E4JkUR@;pr0;z=gfC~CS2VchijG_|=MX8`3e-bztTqX+p^3FD8@QX@qN zOAy)tMMxA^y;#H))dWE2nWq^k_Bblq)wIq8ytV00U?|4nBVcAnMu8Ip}vtY^3J3?B0|2 z+QT;Ic*?eedjqFsKCro|yoS$%$e0-ii>F0R{30|i+Mo_C{n*2_7uwJRJzk7cc#92w zK}z1Kk9^zuobk#PhSho;^#Ow(&hVf$#!ZksKs6sp_4$&G*TdmypSdXE^JriE5|bE; zuc3!~r#47|F(7&Syqe}GeX@Qq00M^vvo2+hD21SGG#=)GMA*X;qA>hEkLcb@vd#{Z zb)U1>HWI^${i{89^rWFV!>0|=o6Bp{n6{Dp0JI4hX3I=xk#%vqzfn9HGq}eLV-3?E zlL902O`I1Pl_u{WtB(VROGFA;>uh*RhWp_c#7wgb%?0Aj!r7 zPa31PO*!G}g+KqPp~s7Ta1AATfe9zNuVLc9+f^tQ_R=_gFt zzISUQSN^q=8DRgp!EDiDX=HkP$H}9O&+K>qO8nk1zro~a*_N1vSRoD+3e|)gNV@OyhuR!s^ z0z4mz9b&btF>4pwXXt;UL1F@An>PP{xlYo}5LjNWl*iC3-N_5O=Obg+hpaz&z^^o0 z_H%$)J>A`2+`&k?tCn!)ZGh&P2mjyyiJj8J*G{t39vT(OL(BaAF<~=w13}nO7I)YX z$0OJ(H?(Gv>R{xOuwgFXf`NrHxR?1|urJ2%Oxk8af)2nEvi*1+1y2mtVkM>9)t?Nu z@GYCi_xU|zTU1~(9F%|Nb?F?VIV1%ARk=C7OuZc=@skncoQ-<>PfMyv6)ja7)n_!FRiIsG9Dd8K;u_um>3t^=Yabl0jTlT8V+I+Y zV!Q|`CnDssV!D_8(t*b-&8HJu$<}}Hcyk;d8n1XUpp9hwmZ;$Qrq_S0^An0D0}PK; z-RJ?@^`gHiCVi8>y9^lwiLCwS$1%)!sr3rcL7uNf_FjHraWxK$Rh)&xH{T`Le%R4; zOJ-6;L&dWuKIPPzylJ2cvKkUwtPJe2t6ntVMzMdodB4_ z$tUfedTPll=Ba+l`O$PJ=2RwI<}hI$3EVz33R6F@QRRX2a0Izh1ef;ugaLHE{! z$jQHeG39DGn3%15Px0sjat$sIv})9fYW^U()&jWX90D=U5im9d$*4e*YUQV3tZ z>Pz7*2;OJ1dJqsb`+Y>FTHDhj6D{n=^s zD>Q5&Sh^tcp9i5P$XnMB%&{&x1E5;)2na5DpDNpd3oq9Gj4_`2*cSZ)TA14xe)1-M z6d6R#5iVqrGC>k1RO%*H-X@z9B4BwESvJ6)J$hr7jH5UAytuV$^~u-&_K!I6h;UHK z{ISy(CvSB^qlik{QgjZ43Z8T;>zyB)8!vXq=e>!;%tr&jvK;R20wm<`nh0N{Ny*1^@t8MM6+kP&gpI1^@tXHvpXhDm(!?0X``di9;cwArYuF3>X50 zv$t>|X8kDFVLM6unbY6+$M}KyINP~E{Kx&v?pNnmq@NN0@EuZoz<#oSxBi>&G13A0 zf!9aq9s3XIiTg9~pZiJsJ?!7B|KgA3{i=Uqu2cM1kQ-g`;Alhfv=_%Xze#`2_X++* z{gbLcpa<&DfU{8;Y(Te)C*u`osx??B^#kJ>tKFUY2;bn zROE`I?Wd7r8Z&Y&U;ten7RA^vqtbx27BgM~)GtW+)VyY+c*`r7gm_%-?wi!B8K|*y zv6*rsMFlCaT8xjS0bKfLIQ!R4%_+%9h*J-;Uj{9O5Pdm}XP2b`YO$J&7cWCLUV;J2 z9e7J$6Sab{+ZS}HMT?w(s*3661+y}q=-<>P^^o!G8I>ptOXx#EuaLYx$&HV!C($4n z3y@y@$S+So-dgF7-joR21&l<|f0WUb!Ooou)nLQQ4CVdvN{Qi~Y71@wAQ@>s>#FH(yby9MyJ z4al_?F?I{oqQw9J{_56D`QP#Jf5*lDkBgD`HXHMft@osad;5EZbb<8d{Uq9M{opnZClfgII6ltsL);)@K;LHr0>kY7AZf;FsJa zR>uBgB{Aiacr1exbhh%4gVI=$`n+e|&b7Vai)%OGq8#_JbAQ!DSx-X1ebf|}B1D6o_jMwchL%xD1OK^{t<-YR<~{yC)Sx=V=4% zc?Ju|Ys8*vsH&nHd(0~T`yT~;Yr3~*tNzc0O=XXp@hKbW=tVD%5%Xn7X{Y?EK9%(O zZ*3Q@E2X30MW4moCUwt*r^7lxJN&4&`;&ii>cIxTMpYfqB>`vYHHg^AkM=;yW8=Ax zvt|X%Tapt*>#7>r#AN6xc0PelWBuk9{NDaBum-$5fBeStvObRL1qZ3)NwKNLZ)Dtk zXPq6u2_B~!<|)mf;{L+2kWj<_9dl#xXpl|ff-KeE7T69`51a{fKNz#L|ME%yWV|+> zm^arB8KY_HF!kP`oN4B-ta4h5rlKoGHvywDgyO*lfADMn>Gp@|freCCnD6p9*pK2} zyIx3%UoM%^@Yt)|Hojs~gAg*4W{ZDAMtlogHT4{u^1Oc47HHd+1csheJ0<1n+8;rx zm1WpCPPdi*xtQv0TuPHqUK250**C!sEN2(reOYX70*83grIVEjHV~Jdvz? z=DB$2+x1u_?-<)N8))*tz4S{~5o1xRVnO@}Sne~)p^Kb&moT=K5%4Q) zDckzI#>+f;bJA%iLRg9DUK1}l`tyC1Tv5`_2W*ORp^=~tld1f$f z7&n()d+|*B$ozVWK|x|yd=BIY1@p4H%+_Xcx#x4sDjKs>;HfPZfOtI`4L!PepE0p(@-xllJ?gQLTpns{G>c6U^hh}T{C5t!XBsYx`pN8ZR;hN?}ER7-7 zC5+3VvKW=0TM{u%rsNHN_18Xee4iT>I1kG-OmG%!QR?Z$XQ!k90RHRVFaO97`2qhR zKluUwklt;1ryCUy+$wvjioL*7@5qUmoS8LL#Xayd@w4$ZACvz$U+R_*Bnw(QT1y~s z(%=1*U;pot)n62jq2T6E)fF7BpZvdpIEdG_pf!OH^YX!jogFF557@T^S*Mk zhxO>(FN||`gS47v{`(;oh2DIz z2Xtw;f&Ws_Mdky+zI{EXOMbH#p;7q&ynP-Ql4>W;tbi_^GE{?XXiq$HHJk4X_x56Ao`x4tu62=!ow+DCV1o&SHKw1$z(tiG)E(W1x_~n1t~C5Xzu>V#C^}O<&5s#cem}zJuRB}+ z{2U2+l(^b7Ls6c=4w(rBNS)n3&qsTeNctEyLQvI%_yr7mzp9!3gYBD37!94&cA4@U yZhN?9+(9#tN}NhME@9Hl&3dluwHB4Vd?V2Yaa&Yiph@+ECR@Ag37c@)0000Y)2Y+| literal 0 HcmV?d00001 diff --git a/public/img/illustrations/Hiring.webp b/public/img/illustrations/Hiring.webp new file mode 100644 index 0000000000000000000000000000000000000000..78c59a0727327ba77d3e45ac881e39bacb6b9a0f GIT binary patch literal 1088 zcmV-G1i$-INk&FE1ONb6MM6+kP&gng1ONcA833IDDrx{?06r-ch(jTvArYyZ&=>-Q zvVdrtT{%ZMeR{rK{9XPV?9bmf`CrCwkRNQ`rM)fu(Eg}?jeAOefc}Bl0s5=f&FC@v zGwCDyBk+6r@%wk|(W{-{4GIJ0e%bi}`5CBt`=&g8@o&y?*W&B^x2QILpDF)A>=pc% z`xpF9zg~wwt;3?tjq{CylrKhNJCcOGcRwWRV+iaw`?pD-^j8NhFt$?CR-D!rz)>%7 zW>7)qvWveBNKenBh_jW@gm{S-UnfN)CW(QH2-6|3g0Oc&~x6C4;DaemI8* z`^HPj4D0bBj!lIK{-Of5PJP}HeiS)xj8-2a`Y1!r~hE$ z*9`D~^W1Fmov++num)Su6O?#Qp}iD(voqBDW(nk^K;>%==bKfcdK~=S8tJ5kGL0+0 zv#n_fmD-@q%VwU$-1M!ZW@3owgVAsH`vp1;xhK0uHN=qk1s9M?7Uhaz@ShKZ3pZ zueZ)>zVkw%zY3e*mdQJi-@nqdMhw2~!yb7l0V`gFK+P^m<;Nvg3zCObJYG6*8k(ZJEqY5N}A za4ZT~Kb~ILK_AcILzazMI?5T1Nq*n=t!;~uXt7e{Q7t7R{}hSn`-+$U z?;g2n z{`}2vqfHeoCfjZ&TTS0#cT;}&s!gQC2yS;ObHW>~xpD;(Kbz9J5B@P}lI4vhQwB5b zHNrKYddwfkQ0*-+S+kSr<$0EtBH{lSHlK-0=Ss3cP6sjZgK77pKu;3T0mj|;>_7AW z^?G>6jJzZr8~R?-uXyx%>P~qBKh9LwqxzAZE2_5(_0!ah?y2TASCa%JqhJwHCfaPe zDexoJSc_+A<_dxSvDsP@We(QBVvW)Ce7S;1XLf8Z4AEHd#m;sqyL^q1K@)nf9RFXa zh1O9>Hc_646Q3Sb*K#>lK4;-&XC?=~TqVV!-xw_0alp|H zJn<$#=XX?$rdSG{MR)xe0_^0;136Ve6E6JfB{E7njXy*a^6KMtW2?GiM+eLnJYo`S G6uQ*Y z{7TZ*_ym|4T#i9A6PGrR5p#nsTNym#M56K>!94}j$rZL;ystRNF|ivKy(sTxR{siz z;$Ds1ZjWLb^?*v8K1Y0eW#-bqq(>oj#=w`rLHClYo5x{{7e()aU*JVB>ci)MXg`VW z8+uM~s_EA-PaU1EPXFT``%gSP!W9BKY>1)2K)z}};+@Ns&-DVv%`05d&`UlL`wo1b z9Z&YH&!B(BhkLcqB>J9AT@W|=8n_JSMLxJqq`mdKm7|K4jpFHlkQg!~WMuH>iQ0PD-k z@&`wYqV&-}N!2=jITjE3EQ(pZLKa9Iu=ET6njziFS~nDSdiw>UH~1v~>SO-4FKq@V z1+d!?+RV$9-ryrGBfOKOR9T}Q{26Ag8uSBOM}BG@1KX(0dC1sPZG@5Zj083f{bcD+%>vT2pTbOU3Vr|PqG0NLN zRdQZse3+p%I{nF+#m4%!F?Z_VL~bU0m;c znbvLS3tke8t!TJ(3!k(%>Z)qlXJQqG)RG?6Y_dbO526!hxAG_g>b~F6Hx8MUAJSlx z`z4BQ%HUiN1ze&2fci*f$Rx4-@eer@IxS>{ub3C6w-?uRv*n=0JLVL;5;g$T4yvPT zDIou_jbqm~r8oKXcsakXPgcgbBa8ikOX!lL5|``s|E#O8@7LQ!d;X-NsIKAW!~@ty zAK^dkPay)|dOE~W`C|*2yND|MXY8)Abi7cQv$K>pw667miAS!};fd|VxYsm)zyJUn C(-lAf literal 0 HcmV?d00001 diff --git a/public/img/illustrations/ServiceProvision.webp b/public/img/illustrations/ServiceProvision.webp new file mode 100644 index 0000000000000000000000000000000000000000..7d55d40f1ea105dffaacc8f55b8ff988c33d3b69 GIT binary patch literal 2076 zcmV+%2;=usNk&E#2mkE{~ zv$t?0uKwr7)WQek2A|KyZ^-Y;Yp?fzyqP}y#(m%N>-q=K&q;n@AEiIkKQX_w_X+a> z`py0W+UukP^>eL@&;$0D()0GK;RE(-{>S;hfZx^+{2Jf>7XG``$CY^@zhS>6!Vc5_ z-nW7{|Md^`9Bt_W#?PPE{6F3N<$hoOL;l~mPx7DYy;(nSy^udq0*e!2Zwgz&mhhUW zB+mBfb~=UKO2-lnG=R_e-(sP_Nr?(h$Vzv&BMd;l9N~Z%W4jz)6UD;_Rqx z=~3h$Wk_5yqq|yCBui{d?TLM{DN7VrQ341VsRrD-dLo;dW+1r;Av}Z)inRdMVT>3f zNKCtt)(#`cM8*&{yc{8%#u%t`y}Odvcm~|)jKjrt`hYV?)O9mzy_*2|Ei1uDlT1~++{~=!iCx# zx#4{K6Sa%8M~yJ=PK+4^)-f8!BUr+g2#hFc4lh?45;!DGNZ^qzyJXL>efsQ zfAR3Y$HM%4ELv;X{9zr&oJn7P<-|_?%ZQ!(mk~ScNLZkQRF0__5NKJUpjH-WXcdK; z8>eJ0*@9Cl zYwtQi!=!Cv5_o<{E~9lu)_8uF{bO{=$;3|z*ADsDNVElLFkOv2T>rikf8xN?)*1@z>tBmeWxnF7T~E5S|6|0zv3%F zHhy=ZbvIv4RemZ5uZM?iyg#7_B*hJH{DR7ZO=;xsB9hXng;to!N%np3XRzcS-@0~Y z>u|Vx`v|na@95M)Y(&jiid0$z(s*hMU)jYi$NeLr>e|E-N%zAMt|Kg(H(Lp%uT1rB z#@M<}BNc;uc_Y0L{qn#Aqo{|m)@ErmVn3bbTATAf@zizuxD}^*M7ODm@gDWAyKx5p zQMERl9(uP%-!Sw7%0iMuKhyS|hXU)Fzpn@c?r$J*FeGGiHcnk`kWM-Hcy`;v{NETbLuk{j#{i3hDXcB^y>S`w zPc@ihbN2u20Ll>br7(d_0uz?cWTMdsw1e&gwJl8NzR1K@v7Irn6U&h|&Xc4`k@rgW zhY)P^fa3;PBusAKtZ8u?A*yh#TAZxWU~|^6isr&4rQ{odU*4H?d$aCtPt&HdGZXgx zsqn{dl556syQ<1m!r#-48H_Ot8$tRGceNEG|A^2gJ5e(??{$u>`I#nk`?wN7rN>PDNZne&xsc@f}uEyz;$EluP*I^(Z=JT6zn_s%oF!kFO{em!q z6BZRDB|?e-Dw{`guj8n2+{`Uvdq#?5veErCb;0He;>krZ>{>TbuIa*xSd&x`e2 z)MIPL1YulX0dCMF@B&?JFog(F*%G6$hF8;PucWVW8EdG6R#7 ztyp6Xp6yJH_or4WELIXsnVIB`OaV>Io*4Zst#R@EW#hY7k?XZ9iZF7}zw`Jnf~u63 zvpRp_Qt0 zDv@stYB46$upe`q{2MFH!7HSH_7NBqew%guJ?-&XGR#ta$JFYru2RIi zyAn-v59eDg-EmTa$scR5`?;&TK26Fk?6|LpEtO!znRxxSDHZ-Bw!`HYq`ET;|NB7R z;ua{?A~|?WMn6pU8?#?O_N9GrpTI%^C%pR1S2u~-d zK+}dn-uHNZTq2g0Oe(a)i1-qR%i0Xn8U8AQ9XYlC+(A;b6g?_#YmC9XF#L=g!xJbe za*O<>=Mzv&#}1ajyVb(~9n403O=Hfn^kPrx|Jd^z;mzUrvZ79w_bvE62c=#7!{Rrc GbN~R1WF$KP literal 0 HcmV?d00001 diff --git a/public/img/illustrations/Services.webp b/public/img/illustrations/Services.webp new file mode 100644 index 0000000000000000000000000000000000000000..6791e0340c0546d843e19c2e66a63fd280dc9442 GIT binary patch literal 934 zcmV;X16ll1Nk&GV0{{S5MM6+kP&gox0{{R}6#$(9Drf*;06r-ch(jTvAreVkj2Hrh zv4CitLjE3`&z!%*{lIpZ@e%&H)T7J?>OcD*>bxKyt=(wefF4x;v%dykwV${j0Kcp{ zy-BOeX&dSz{=xYhqFegLI?Gyk(erlBL(xC+{lWiLKjU?)^h^Df8`S~7tTdutLTx?c zX?p>j#RP%;Gx{GZ4q_iQA@7M-c24=fOsPWVsibquohT|cS}v9rsBYX%?qJ4{%fJBs z>)tQ_$HD*O;Q#UPfB5)6+78v1c8FB@(jI2a3d0omUQK2Z!H&=S58tS=_$GzNE_t2o zp#RhfVA8oLhN)KQ(i)Bd3!l|Ddl4AD`dMADwp@lFzS2X z?zOk8QTj;Q$;8`@yJtzbJO7NUihFaJFpRw7U)I6#U$L+8(fcfI^s?kUB&7f?JB<^{ zh}kB<@VApwA5Ij-y$%5$WBJ9X&tsM%e@+beNN&W*rU4t@u5qq-gO|XM0)prFBB~RZN z%#%UTSm@FBpr-6}!K?cjl|BB-7Wl6g+y6_BsPQSj@#6KGq!Q0?C-Kv~5sj@?G`suo z+f#T0sb!qs^!xOcqQ+mTIYnCGpSz4^^1~(UN*Gaita>$%kZPC@sq1AcVJsY5S;llm zN1gbODT#$fURhR%5ts8sK8-NN>12QBF(HdiYy7~A1wD?LgC(mw?B}bdw*PgC{fZ)c zgA$qV{8fF!1CQ)a4wFN}Q{p@#1r~vpBPIR+^6{hR5D1{TbtZ<#eGnj54$`U1K&S16 zXh{R3lz6U@xx*+HR-DXQP$64d{EeZ0#;~M}!SHP;PlQGpdokE{GHM5ptl-?o+BVAV%-3F8B6Z)M zQK;UI`%b(J_`)#>I{J;@ArSt2E(CW@dd})Vo`?xDKXgafkbz$R*8}wNY`3bFm_wl7 zR(x76pwG+X*b1!{xB0CkQ7TnyfoqUYznVZ?FjDV#yb^ltxWo6w8OQgV8Y~t~*QZa$ IZmp0207ES1YXATM literal 0 HcmV?d00001 diff --git a/public/img/illustrations/SwagStore.webp b/public/img/illustrations/SwagStore.webp new file mode 100644 index 0000000000000000000000000000000000000000..feed2b1d0bd85a4499c7a0ac725a50e43e694cea GIT binary patch literal 1004 zcmV3;YJ^iSsfWFCMYsXmkcsec8Z zw%&&NwlQb*Ly+R8`$+5tP%y!MZOoK)Iat^*hlpr|M=*oFE~I- z%4khmrskvW0D8$R!_lT&?Jx#V#_oix{yWvQiN&xG=wjF%PU>swr)tQq2mU~Rbg)(0>fqOR>fg-8$6%No+q{21<3_cA zsgEESJUJDe2Ks0+mm4RZ)r)?m|BDW`Z=tjnUuu-zfJEQb}j~ zxH4V}pe4%+`DT10vKBk?^1X>;NYv-fhV!$0%Zc`fC-dfy{1XUgy}FNSZ7^+I@^g^UQ}LVh25|Kp)x~t;#F*XT0<=$ zY*ah&uEh?qO#kuE-og5|Yao%D2JA>cGJ@y+L|olHG|l&Ha4218ryQ5SGDfGE;dg9T zxP$&6KOp_1LyjfX=-5Gr9jwP~*!%NRvYQ(0(}*EjWvyu)94oj7^gC;ek7;Uoi*?|y zq5ONZTJDIw7zM=RnG1Wz8*OZ_x%k*#oMPDExuFb?zke?OgzwE*7s$Prd6WJe)of~Q z>O+aKA8L8o%oK`3Xrga%s--n;Kk*WxJz+wu$ux(Gd6b7%WUPKn7WoqQuHVo z3RinxWGRMC@WIPaKMyP#D;h=i{_)MTrLj4PiuWLd%JWJTkdIY%ROFU(7UdeMi(sUdd3GNp}{-kN4g*wRr-(UULY zBcwD^md41lEryCx*x43kKS%M*{KAhEQ%KlKM)@LM1$nH1C|8(8OqW7q%sg|KHVoFp1$I*%-3 au(JJqq}DberJs-S$NumT@?Rf33xEI(nhAUW literal 0 HcmV?d00001 diff --git a/public/img/logos/LFX.svg b/public/img/logos/LFX.svg new file mode 100644 index 00000000000..8928d7ae147 --- /dev/null +++ b/public/img/logos/LFX.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/logos/OpenCollective.svg b/public/img/logos/OpenCollective.svg new file mode 100644 index 00000000000..c8b3db1ba1d --- /dev/null +++ b/public/img/logos/OpenCollective.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/scripts/finance/index.js b/scripts/finance/index.js new file mode 100644 index 00000000000..d720bfd989a --- /dev/null +++ b/scripts/finance/index.js @@ -0,0 +1,33 @@ +const { promises: { readFile, writeFile, mkdir } } = require('fs'); +const { convertToJson } = require('../utils'); +const { resolve, dirname } = require('path'); + +module.exports = async function buildFinanceInfoList() { + try { + const currentDir = resolve(__dirname, '../../'); + + const expensesPath = resolve(currentDir, 'config', 'finance', '2023', 'Expenses.yml'); + const expensesLinkPath = resolve(currentDir, 'config', 'finance', '2023', 'ExpensesLink.yml'); + + const ExpensesContent = await readFile(expensesPath, 'utf-8'); + const ExpensesLinkContent = await readFile(expensesLinkPath, 'utf-8'); + + const Expenses = convertToJson(ExpensesContent); + const ExpensesLink = convertToJson(ExpensesLinkContent); + + // Ensure the directory exists before writing the files + const jsonDirectory = resolve(currentDir, 'config', 'finance', 'json-data', '2023'); + await mkdir(jsonDirectory, { recursive: true }); + + // Write Expenses to a JSON files + const expensesJsonPath = resolve(jsonDirectory, 'Expenses.json'); + await writeFile(expensesJsonPath, JSON.stringify(Expenses, null, 2)); + + const expensesLinkJsonPath = resolve(jsonDirectory, 'ExpensesLink.json'); + await writeFile(expensesLinkJsonPath, JSON.stringify(ExpensesLink, null, 2)); + + } catch (err) { + console.error(err); + throw err; + } +}; \ No newline at end of file diff --git a/scripts/index.js b/scripts/index.js index 0634672c55f..835ccd7b6ed 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -1,6 +1,7 @@ const rssFeed = require('./build-rss'); const buildPostList = require('./build-post-list'); const buildCaseStudiesList = require('./casestudies'); +const buildFinanceInfoList = require('./finance') async function start() { await buildPostList(); @@ -17,6 +18,7 @@ async function start() { 'jobs/rss.xml' ); await buildCaseStudiesList(); + await buildFinanceInfoList(); } start(); \ No newline at end of file diff --git a/scripts/utils.js b/scripts/utils.js index b869aa421fa..397bdfe6242 100644 --- a/scripts/utils.js +++ b/scripts/utils.js @@ -1,16 +1,27 @@ const yaml = require('yaml'); function convertToJson(contentYAMLorJSON) { + // Axios handles conversion to JSON by default, if data returned from the server allows it + // So if returned content is not a string (not YAML), we just return JSON back + if (typeof contentYAMLorJSON !== "string") { + return contentYAMLorJSON; + } - //Axios handles conversion to JSON by default, if data returned for the server allows it - //So if returned content is not string (not YAML) we just return JSON back - if (typeof contentYAMLorJSON !== "string") return contentYAMLorJSON; - - //in some cases json can be passed here as string as it failed parsing to json because of json related error - //instead of passint it to yaml parser, return same stuff that came in so it fails on JSON Schema validation later - if (contentYAMLorJSON.trimLeft().startsWith('{')) return contentYAMLorJSON - - return yaml.parse(contentYAMLorJSON); - } - - module.exports = { convertToJson } \ No newline at end of file + // Check if the content is valid JSON before attempting to parse as YAML + try { + const jsonContent = JSON.parse(contentYAMLorJSON); + return jsonContent; + } catch (jsonError) { + // If it's not valid JSON, try parsing it as YAML + try { + const yamlContent = yaml.parse(contentYAMLorJSON); + return yamlContent; + } catch (yamlError) { + // If parsing as YAML also fails, return null or handle the error as needed + console.error('Error parsing content as JSON or YAML:', jsonError.message, yamlError.message); + return null; + } + } +} + +module.exports = { convertToJson }; diff --git a/styles/globals.css b/styles/globals.css index 7503038990d..114687bfa1d 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -340,4 +340,4 @@ abbr[title] { .meeting-card:hover > div:nth-child(2) > p { color: white; -} +} \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index 9054c6758e3..7794e182d5e 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -132,6 +132,8 @@ module.exports = { minimize: '#ffbd2e', maximize: '#28c93f', }, + violet:'#8054F2', + darkGunMetal:'#212526' }, scale: { 25: '.25', From 49230dfa7bf23e9d74d9ec7626c95b97b55e6465 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 20 Dec 2023 13:56:44 +0100 Subject: [PATCH 044/243] docs(glee): update latest glee documentation (#2477) --- pages/docs/tools/glee/authentication.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pages/docs/tools/glee/authentication.md b/pages/docs/tools/glee/authentication.md index 89bba89b5b0..3bbffac47f5 100644 --- a/pages/docs/tools/glee/authentication.md +++ b/pages/docs/tools/glee/authentication.md @@ -116,10 +116,8 @@ export async function serverAuth({ authProps, done }) { **Parameters for done():** - Authentication Result (Boolean): true for success, false for failure. -- HTTP Status Code (Integer): Code for authentication failure (e.g., 401 for Unauthorized). -- Status Message (String): Description of the authentication result (e.g., "Unauthorized"). -When `true` is passed to the done parameter, the server/broker knows to go ahead and allow the client to connect, which means authentication has succeeded. However if the `done` parameter is called with `false` then the server knows to throw an error message and reject the client, which means authenticatio has failed. +When `true` is passed to the done parameter, the server/broker knows to go ahead and allow the client to connect, which means authentication has succeeded. However if the `done` parameter is called with `false` then the server knows to throw an error message and reject the client, which means authentication has failed. `done()` should always be the last thing called in a `serverAuth` function, Glee won't execute any logic beyond the `done()` call. From 4a931df83202e0dbd1544167d37f1849700b2d51 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Wed, 20 Dec 2023 14:15:47 +0100 Subject: [PATCH 045/243] docs(cli): update latest cli documentation (#2479) --- pages/docs/tools/cli/usage.md | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pages/docs/tools/cli/usage.md b/pages/docs/tools/cli/usage.md index a6c2421d8f4..198938841cb 100644 --- a/pages/docs/tools/cli/usage.md +++ b/pages/docs/tools/cli/usage.md @@ -29,7 +29,7 @@ $ npm install -g @asyncapi/cli $ asyncapi COMMAND running command... $ asyncapi (--version) -@asyncapi/cli/1.2.24 linux-x64 node-v18.19.0 +@asyncapi/cli/1.2.25 linux-x64 node-v18.19.0 $ asyncapi --help [COMMAND] USAGE $ asyncapi COMMAND @@ -93,7 +93,7 @@ EXAMPLES $ asyncapi bundle ./asyncapi.yaml ./features.yaml --base ./asyncapi.yaml --reference-into-components ``` -_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/bundle.ts)_ +_See code: [src/commands/bundle.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/bundle.ts)_ ## `asyncapi config` @@ -107,7 +107,7 @@ DESCRIPTION CLI config settings ``` -_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/index.ts)_ +_See code: [src/commands/config/index.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/config/index.ts)_ ## `asyncapi config context` @@ -121,7 +121,7 @@ DESCRIPTION Manage short aliases for full paths to AsyncAPI documents ``` -_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/index.ts)_ +_See code: [src/commands/config/context/index.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/config/context/index.ts)_ ## `asyncapi config context add CONTEXT-NAME SPEC-FILE-PATH` @@ -143,7 +143,7 @@ DESCRIPTION Add a context to the store ``` -_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/add.ts)_ +_See code: [src/commands/config/context/add.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/config/context/add.ts)_ ## `asyncapi config context current` @@ -160,7 +160,7 @@ DESCRIPTION Shows the current context that is being used ``` -_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/current.ts)_ +_See code: [src/commands/config/context/current.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/config/context/current.ts)_ ## `asyncapi config context edit CONTEXT-NAME NEW-SPEC-FILE-PATH` @@ -181,7 +181,7 @@ DESCRIPTION Edit a context in the store ``` -_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/edit.ts)_ +_See code: [src/commands/config/context/edit.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/config/context/edit.ts)_ ## `asyncapi config context init [CONTEXT-FILE-PATH]` @@ -204,7 +204,7 @@ DESCRIPTION Initialize context ``` -_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/init.ts)_ +_See code: [src/commands/config/context/init.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/config/context/init.ts)_ ## `asyncapi config context list` @@ -221,7 +221,7 @@ DESCRIPTION List all the stored contexts in the store ``` -_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/list.ts)_ +_See code: [src/commands/config/context/list.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/config/context/list.ts)_ ## `asyncapi config context remove CONTEXT-NAME` @@ -241,7 +241,7 @@ DESCRIPTION Delete a context from the store ``` -_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/remove.ts)_ +_See code: [src/commands/config/context/remove.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/config/context/remove.ts)_ ## `asyncapi config context use CONTEXT-NAME` @@ -261,7 +261,7 @@ DESCRIPTION Set a context as current ``` -_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/context/use.ts)_ +_See code: [src/commands/config/context/use.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/config/context/use.ts)_ ## `asyncapi config versions` @@ -278,7 +278,7 @@ DESCRIPTION Show versions of AsyncAPI tools used ``` -_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/config/versions.ts)_ +_See code: [src/commands/config/versions.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/config/versions.ts)_ ## `asyncapi convert [SPEC-FILE]` @@ -300,7 +300,7 @@ DESCRIPTION Convert asyncapi documents older to newer versions ``` -_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/convert.ts)_ +_See code: [src/commands/convert.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/convert.ts)_ ## `asyncapi diff OLD NEW` @@ -355,7 +355,7 @@ DESCRIPTION Find diff between two asyncapi files ``` -_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/diff.ts)_ +_See code: [src/commands/diff.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/diff.ts)_ ## `asyncapi generate` @@ -369,7 +369,7 @@ DESCRIPTION Generate typed models or other things like clients, applications or docs using AsyncAPI Generator templates. ``` -_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/generate/index.ts)_ +_See code: [src/commands/generate/index.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/generate/index.ts)_ ## `asyncapi generate fromTemplate ASYNCAPI TEMPLATE` @@ -406,7 +406,7 @@ EXAMPLES $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write ``` -_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/generate/fromTemplate.ts)_ +_See code: [src/commands/generate/fromTemplate.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/generate/fromTemplate.ts)_ ## `asyncapi generate models LANGUAGE FILE` @@ -480,7 +480,7 @@ DESCRIPTION Generates typed models ``` -_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/generate/models.ts)_ +_See code: [src/commands/generate/models.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/generate/models.ts)_ ## `asyncapi new` @@ -538,7 +538,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/new/index.ts)_ +_See code: [src/commands/new/index.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/new/index.ts)_ ## `asyncapi new file` @@ -596,7 +596,7 @@ EXAMPLES $ asyncapi new --file-name=my-asyncapi.yml --example=default-example.yml --no-tty - create a new file with a specific name, using one of the examples and without interactive mode ``` -_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/new/file.ts)_ +_See code: [src/commands/new/file.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/new/file.ts)_ ## `asyncapi new glee` @@ -615,7 +615,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/new/glee.ts)_ +_See code: [src/commands/new/glee.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/new/glee.ts)_ ## `asyncapi new project` @@ -634,7 +634,7 @@ DESCRIPTION Creates a new Glee project ``` -_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/new/project.ts)_ +_See code: [src/commands/new/project.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/new/project.ts)_ ## `asyncapi optimize [SPEC-FILE]` @@ -670,7 +670,7 @@ EXAMPLES $ asyncapi optimize ./asyncapi.yaml --optimization=remove-components,reuse-components,move-to-components --output=terminal --no-tty ``` -_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/optimize.ts)_ +_See code: [src/commands/optimize.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/optimize.ts)_ ## `asyncapi start` @@ -684,7 +684,7 @@ DESCRIPTION Start asyncapi studio ``` -_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/start/index.ts)_ +_See code: [src/commands/start/index.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/start/index.ts)_ ## `asyncapi start studio` @@ -703,7 +703,7 @@ DESCRIPTION starts a new local instance of Studio ``` -_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/start/studio.ts)_ +_See code: [src/commands/start/studio.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/start/studio.ts)_ ## `asyncapi validate [SPEC-FILE]` @@ -730,5 +730,5 @@ DESCRIPTION validate asyncapi file ``` -_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.24/src/commands/validate.ts)_ +_See code: [src/commands/validate.ts](https://github.com/asyncapi/cli/blob/v1.2.25/src/commands/validate.ts)_ From bb67e4c2f196f9bc9b47688b4f684bd28935e0d4 Mon Sep 17 00:00:00 2001 From: Ashish Padhy <100484401+Shurtu-gal@users.noreply.github.com> Date: Wed, 20 Dec 2023 19:34:35 +0530 Subject: [PATCH 046/243] feat: add table of contents in case study (#1673) Co-authored-by: Akshat Nema <76521428+akshatnema@users.noreply.github.com>%0ACo-authored-by: Lukasz Gornicki --- components/CaseTOC.js | 157 +++++++++ components/TOC.js | 2 +- components/helpers/useHeadingsObserver.js | 36 +++ components/typography/Heading.js | 5 +- lib/staticHelpers.js | 106 ++++++ pages/casestudies/[id].js | 373 ++++++++-------------- 6 files changed, 433 insertions(+), 246 deletions(-) create mode 100644 components/CaseTOC.js create mode 100644 components/helpers/useHeadingsObserver.js diff --git a/components/CaseTOC.js b/components/CaseTOC.js new file mode 100644 index 00000000000..0e7e5ac8f8d --- /dev/null +++ b/components/CaseTOC.js @@ -0,0 +1,157 @@ +import { useMemo, useState } from "react"; +import Scrollspy from "react-scrollspy"; +import { twMerge } from "tailwind-merge"; +import ArrowRight from "./icons/ArrowRight"; +import { useHeadingsObserver } from "./helpers/useHeadingsObserver"; + +const checkIfActive = (item, currSelected) => { + return item.slug === currSelected || item.children?.some((child) => checkIfActive(child, currSelected)); +} + +const convertContentToTocItems = (content, level = 1) => { + const tocItems = []; + + for (let section of content) { + const item = { + lvl: level, + content: section.title, + slug: section.title + .replace(/<|>|"|\\|\/|=/gi, "") + .replace(/\s/gi, "-") + .toLowerCase(), + }; + + if (section.children && section.children.length > 0) { + const children = convertContentToTocItems(section.children, level + 1); + item.children = children; + } + + tocItems.push(item); + } + + return tocItems; +}; + +function TOCItem({ item, index, currSelected, closeMenu }) { + const [open, setOpen] = useState(false); + const handleClick = () => { + closeMenu(); + setOpen(false); + }; + const active = useMemo(() => checkIfActive(item, currSelected), [item, currSelected]); + + return ( + <> + + {item.children && item.children.length > 0 && ( +
      + {item.children.map((item, index) => ( + + ))} +
    + )} + + ); +} + +export default function CaseTOC({ + className, + cssBreakingPoint = "xl", + toc, + contentSelector, +}) { + if (!toc || !toc.length) return null; + const tocItems = useMemo(() => convertContentToTocItems(toc), [toc]); + const [open, setOpen] = useState(false); + const { currActive: selected } = useHeadingsObserver(); + + return ( +
    +
    +
    + On this page +
    +
    setOpen(!open)} + > + +
    +
    +
    +
      + {tocItems.map((item, index) => ( + setOpen(false)} + currSelected={selected} + /> + ))} +
    +
    +
    + ); +} diff --git a/components/TOC.js b/components/TOC.js index 3f8de3fd192..89fd93833e5 100644 --- a/components/TOC.js +++ b/components/TOC.js @@ -34,7 +34,7 @@ export default function TOC({
    item.slugWithATag)} + items={tocItems.map(item => item.slug)} currentClassName="text-primary-500 font-bold" componentTag="div" rootEl={contentSelector} diff --git a/components/helpers/useHeadingsObserver.js b/components/helpers/useHeadingsObserver.js new file mode 100644 index 00000000000..56de62808c8 --- /dev/null +++ b/components/helpers/useHeadingsObserver.js @@ -0,0 +1,36 @@ +import { useEffect, useRef, useState } from "react"; + +/** + * @description Custom hook to observe headings and set the current active heading + * @example const { currActive } = useHeadingsObserver(); + * @returns {object} currActive - current active heading + */ +export function useHeadingsObserver() { + const observer = useRef(null); + const headingsRef = useRef([]); + const [currActive, setCurrActive] = useState(null); + + useEffect(() => { + const callback = (entries) => { + entries.forEach(entry => { + if (entry.isIntersecting) { + setCurrActive(entry.target.id); + } + }) + } + + // The heading in from top 20% of the viewport to top 30% of the viewport will be considered as active + observer.current = new IntersectionObserver(callback, { + rootMargin: '-20% 0px -70% 0px', + }); + + headingsRef.current = document.querySelectorAll('h2, h3'); + headingsRef.current.forEach(heading => { + observer.current.observe(heading); + }) + + return () => observer.current.disconnect(); + }, []); + + return { currActive } +} diff --git a/components/typography/Heading.js b/components/typography/Heading.js index db12d5df997..38fe50bc625 100644 --- a/components/typography/Heading.js +++ b/components/typography/Heading.js @@ -3,7 +3,8 @@ export default function Heading({ level = 'h2', textColor = 'text-primary-800', className, - children + children, + id }) { let classNames = '' const Tag = `${level}`; @@ -46,7 +47,7 @@ export default function Heading({ } return ( - + {children} ) diff --git a/lib/staticHelpers.js b/lib/staticHelpers.js index a78f1045abd..7ae955c9901 100644 --- a/lib/staticHelpers.js +++ b/lib/staticHelpers.js @@ -97,3 +97,109 @@ export function getEvents(events, size) { return meetingsWithDates; } + +export const generateCaseStudyContent = (data) => { + const { challenges, solution, usecase, architecture, testing, codegen, schemaStorage, registry, versioning, validation, asyncapiStorage, asyncapiEditing, asyncapiExtensions, asyncapiDocumentation, asyncapiBindings, asyncapiTools, additionalResources, casestudy } = data; + const languages= casestudy.technical.languages + const frameworks=casestudy.technical.frameworks + const protocols=casestudy.technical.protocols + const versions=casestudy.asyncapi.versions + + return [ + { + title: "Challenges", + content: challenges, + }, + { + title: "Solution", + content: solution, + }, + { + title: "Use Case", + content: usecase, + }, + { + title: "More Details", + items: [ + `Languages: ${languages.join(", ")}`, + `Frameworks: ${frameworks.join(", ")}`, + `Protocols: ${protocols.join(", ")}`, + ], + children: [ + { + title: "Testing strategy", + content: testing, + }, + { + title: "Approach to code generation", + content: codegen, + }, + { + title: "Architecture", + content: architecture, + }, + { + title: "More Details about AsyncAPI", + items: [ + `Version: ${versions.join(", ")}`, + `Who maintains documents: ${casestudy.asyncapi.maintainers}}`, + `Internal users: ${casestudy.asyncapi.audience.internal.toString()}`, + `External users: ${casestudy.asyncapi.audience.external.toString()}`, + ], + children: [ + { + title: "How AsyncAPI documents are stored", + content: asyncapiStorage, + }, + { + title: "Where maintainers edit AsyncAPI documents", + content: asyncapiEditing, + }, + { + title: "What extensions are used", + content: asyncapiExtensions, + }, + { + title: "How documentation is generated", + content: asyncapiDocumentation, + }, + { + title: "What bindings are used", + content: asyncapiBindings, + }, + { + title: "What tools are used", + content: asyncapiTools, + }, + ], + }, + { + title: "Schemas", + items: [`Spec: ${casestudy.schemas.description}`], + children: [ + { + title: "Storage strategy", + content: schemaStorage, + }, + { + title: "Schema Registry", + content: registry, + }, + { + title: "Versioning of schemas", + content: versioning, + }, + { + title: "Validation of message schemas", + content: validation, + }, + { + title: "Additional Resources", + content: additionalResources, + }, + ], + }, + ], + }, + ]; +} \ No newline at end of file diff --git a/pages/casestudies/[id].js b/pages/casestudies/[id].js index fad80de8272..1bb0de45a07 100644 --- a/pages/casestudies/[id].js +++ b/pages/casestudies/[id].js @@ -1,12 +1,56 @@ -import React from 'react'; -import Link from 'next/link'; -import Paragraph from '../../components/typography/Paragraph'; -import GenericLayout from '../../components/layout/GenericLayout'; -import Heading from '../../components/typography/Heading'; -import CaseStudiesList from '../../config/case-studies.json'; -import { MDXRemote } from 'next-mdx-remote'; -import { getMDXComponents } from '../../components/MDX.js'; -import { serialize } from 'next-mdx-remote/serialize' +import React from "react"; +import Link from "next/link"; +import Paragraph from "../../components/typography/Paragraph"; +import Heading from "../../components/typography/Heading"; +import CaseStudiesList from "../../config/case-studies.json"; +import { MDXRemote } from "next-mdx-remote"; +import { getMDXComponents } from "../../components/MDX.js"; +import { serialize } from "next-mdx-remote/serialize"; +import GenericLayout from "../../components/layout/GenericLayout"; +import CaseTOC from "../../components/CaseTOC"; +import { generateCaseStudyContent } from "../../lib/staticHelpers"; + +const renderContent = (content, allComponents, level) => { + const typeStyle = + level === 0 ? "heading-lg" : level === 1 ? "heading-md" : "heading-sm"; + + return content.map((item) => { + return ( +
    + |"|\\|\/|=/gi, "") + .replace(/\s/gi, "-") + .toLowerCase()}> + {item.title} + + {item.content && ( + + + + )} + {item.items && ( +
    +
    + {item.items.map((item) => ( + + {item} + + ))} +
    + {item.children && + renderContent(item.children, allComponents, level + 1)} +
    + )} +
    + ); + }); +}; export async function getStaticProps({ params }) { const data = CaseStudiesList.filter((p) => p.id === params.id); @@ -45,8 +89,7 @@ export async function getStaticPaths() { }; } - -function Index({ +function Index({ casestudy, challenges, solution, @@ -64,15 +107,33 @@ function Index({ asyncapiDocumentation, asyncapiBindings, asyncapiTools, - additionalResources + additionalResources, }) { - const image = '/img/social/website-card.png'; + const image = "/img/social/website-card.png"; const allComponents = getMDXComponents(); - var contacts = casestudy.company.contact - var languages= casestudy.technical.languages - var frameworks=casestudy.technical.frameworks - var protocols=casestudy.technical.protocols - var versions=casestudy.asyncapi.versions + const contacts = casestudy.company.contact; + + const content = generateCaseStudyContent({ + challenges, + solution, + usecase, + architecture, + testing, + codegen, + schemaStorage, + registry, + versioning, + validation, + asyncapiStorage, + asyncapiEditing, + asyncapiExtensions, + asyncapiDocumentation, + asyncapiBindings, + asyncapiTools, + additionalResources, + casestudy, + }); + return ( -
    -
    -
    - - {casestudy.company.name} - -
    - {contacts.map((item, index) => ( - ) - )} -
    -
    - - Industry: {casestudy.company.industry} - - - Customers: {casestudy.company.customers} - - - Revenue: {casestudy.company.revenue} - -
    -
    - - {casestudy.company.description} - - - tl;dr just go and have a look at - - - full production-used AsyncAPI document - - - -
    -
    -
    - {casestudy.company.name} -
    -
    -
    - - Challenges - - - - -
    -
    - - Solution - - - - -
    -
    - - Use case - - - - -
    -
    - - More details - -
    -
    - - Languages: - {languages.map((item, index) => ( -
    - {item}{index != languages.length - 1 ? ', ' : ' '} -
    ) - )} -
    - - Frameworks: {frameworks.map((item, index) => ( -
    - {item}{index != frameworks.length - 1 ? ', ' : ' '} -
    ) - )} -
    - - Protocols: {protocols.map((item, index) => ( -
    - {item}{index != protocols.length - 1 ? ', ' : ' '} -
    ) - )} -
    -
    -
    - - Testing strategy - - - - -
    -
    - - Approach to code generation - - - - -
    -
    - - Architecture - - - - -
    -
    - - More details about AsyncAPI - -
    - - Versions: {versions.map((item, index) => ( -
    - {item}{index != versions.length - 1 ? ', ' : ' '} -
    ) - )} +
    + +
    +
    +
    + + {casestudy.company.name} + +
    + {contacts.map((item, index) => ( + ) + )} +
    +
    + + Industry: {casestudy.company.industry} - - Who maintains documents: {casestudy.asyncapi.maintainers} + + Customers: {casestudy.company.customers} - - Internal users: {casestudy.asyncapi.audience.internal.toString()} - - - External users: {casestudy.asyncapi.audience.external.toString()} + + Revenue: {casestudy.company.revenue}
    - - How AsyncAPI documents are stored - - - - - - Where maintainers edit AsyncAPI documents - - - - - - What extensions are used - - - - - - How documentation is generated - - - - - - What bindings are used - - - - - - What tools are used - - - - -
    -
    - - Schemas - -
    - - Spec: {casestudy.schemas.description} - +
    + + {casestudy.company.description} + + + tl;dr just go and have a look at + + + full production-used AsyncAPI document + + +
    - - Storage strategy - - - - - - Schema Registry - - - - - - Versioning of schemas - - - - - - Validation of message schemas - - - - - - Additional resources - - - - +
    +
    + {casestudy.company.name}
    -
    -
    + {renderContent(content, allComponents, 0)} +
    +
    ); } From 1504e92e3e6b277454bdf1c4816b19bb1a890e30 Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Wed, 20 Dec 2023 18:39:11 +0100 Subject: [PATCH 047/243] chore: update finance information and success stories (#2481) Co-authored-by: akshatnema --- .../FinancialSummary/AsyncAPISummary.js | 4 +- components/FinancialSummary/ContactUs.js | 5 +- .../FinancialSummary/OtherFormsComponent.js | 33 +++---- .../FinancialSummary/SponsorshipTiers.js | 39 +++++---- components/FinancialSummary/SuccessStories.js | 13 ++- components/icons/Twitter.js | 2 +- config/finance/2023/Expenses.yml | 85 +++++++++++++------ config/finance/2023/ExpensesLink.yml | 17 ++-- 8 files changed, 115 insertions(+), 83 deletions(-) diff --git a/components/FinancialSummary/AsyncAPISummary.js b/components/FinancialSummary/AsyncAPISummary.js index 9076096903b..cb8638f9e87 100644 --- a/components/FinancialSummary/AsyncAPISummary.js +++ b/components/FinancialSummary/AsyncAPISummary.js @@ -32,8 +32,8 @@ export default function AsyncAPISummary() {
    - The easiest way to support AsyncAPI is by becoming a financial sponsor. While
    there are alternative options, - they may involve greater effort. Contribute
    monetarily using the following channels. + The easiest way to support AsyncAPI is by becoming a financial sponsor. While
    there are alternative options, + they may involve greater effort. Contribute
    monetarily using the following channels.
    diff --git a/components/FinancialSummary/ContactUs.js b/components/FinancialSummary/ContactUs.js index 24fdf5a0e8e..06631c258a8 100644 --- a/components/FinancialSummary/ContactUs.js +++ b/components/FinancialSummary/ContactUs.js @@ -1,6 +1,7 @@ import Button from '../buttons/Button' import Heading from '../typography/Heading' import Paragraph from '../typography/Paragraph' +import TextLink from '../typography/TextLink' export default function ContactUs() { return ( @@ -8,10 +9,10 @@ export default function ContactUs() {
    -

    Interested in getting in touch?

    + Interested in getting in touch? Feel free to contact us if you need more explanation. We are happy to hop on a call and help with - onboarding to the project as a sponsor. Write email to info@asyncapi.io + onboarding to the project as a sponsor. Write email to info@asyncapi.io
    diff --git a/components/FinancialSummary/OtherFormsComponent.js b/components/FinancialSummary/OtherFormsComponent.js index 5bf31893248..fb1e31bdb38 100644 --- a/components/FinancialSummary/OtherFormsComponent.js +++ b/components/FinancialSummary/OtherFormsComponent.js @@ -1,4 +1,3 @@ -import Container from '../layout/Container' import Heading from '../typography/Heading' import Paragraph from '../typography/Paragraph' @@ -12,38 +11,34 @@ export default function OtherFormsComponent() { Other Forms Of Financial Support - You can also support AsyncAPI initiative by getting
    involved through employment, providing services and
    organizing events + You can also support AsyncAPI initiative by getting

    involved through employment, providing services and

    organizing events
    -
    - -
    - Employee involvement -

    Employee involvement

    -

    +

    +
    + Employee involvement +

    Employee involvement

    +

    Assign your employees to contribute to projects under the AsyncAPI Initiative on a regular basis, and we'll welcome them as new maintainers.

    -
    - Service provision -

    Service provision

    -

    +

    + Service provision +

    Service provision

    +

    AsyncAPI Initiative relies on numerous tools, many of which incur costs. Your organization can provide services such as hosting or storage to support our efforts.

    -
    - Event organization -

    Event organization

    -

    +

    + Event organization +

    Event organization

    +

    Host AsyncAPI conferences by sponsoring and organizing events under the AsyncAPI brand at your provided venue.

    - -
    -
    diff --git a/components/FinancialSummary/SponsorshipTiers.js b/components/FinancialSummary/SponsorshipTiers.js index e5ab417f9e5..804e38bd11d 100644 --- a/components/FinancialSummary/SponsorshipTiers.js +++ b/components/FinancialSummary/SponsorshipTiers.js @@ -6,13 +6,13 @@ export default function SponsorshipTiers() {
    - -

    Sponsorship Tiers

    + + Sponsorship Tiers - AsyncAPI offers various sponsorship tiers, each with its own set
    - of benefits and privileges. These tiers include Bronze, Silver,
    + AsyncAPI offers various sponsorship tiers, each with its own set
    + of benefits and privileges. These tiers include Bronze, Silver,
    Gold, and Platinum.
    @@ -22,39 +22,38 @@ export default function SponsorshipTiers() { - - - + + + - - - - + + - - - + + - - - + + - - - + +
    TiersAmountsBenefitsTiersAmountsBenefits
    Bronze$100/month + Bronze$100/month Company logo in README on GitHub
    Silver$500/month + Silver$500/month Company logo in README on GitHub and asyncapi.com
    Gold$1000/month + Gold$1000/month Company logo in README on GitHub and asyncapi.com
    Platinum$2000/month + Platinum$2000/month Company logo in README on GitHub and asyncapi.com. Up to 2 hours of support per month. Support will be remote with the option of a shared screen or via private chat. diff --git a/components/FinancialSummary/SuccessStories.js b/components/FinancialSummary/SuccessStories.js index ebac564b2bd..c2728f00e40 100644 --- a/components/FinancialSummary/SuccessStories.js +++ b/components/FinancialSummary/SuccessStories.js @@ -1,5 +1,4 @@ -import Heading from '../typography/Heading' -import Paragraph from '../typography/Paragraph' +import TextLink from '../typography/TextLink' export default function SuccessStories() { return ( @@ -11,7 +10,7 @@ export default function SuccessStories() { Success Stories

    - Thanks to financial support we can already see many
    success stories in + Thanks to financial support we can already see many
    success stories in the project.

    @@ -21,7 +20,7 @@ export default function SuccessStories() {

    With the addition of a dedicated Community Manager, we now have a monthly newsletter, regular status updates, an active social media presence, and the ability to drive - initiatives such as event organization. + initiatives such as event organization. Dedicated focus enables us to also focus on a year to year vision.

    @@ -35,13 +34,11 @@ export default function SuccessStories() {

    AsyncAPI Conference

    - Every year we organize a conference that attracts many participants. Only last year - the conference generated 3k views. We - plan to do a series of events in different locations every year. + Every year we organize a conference that attracts many participants. In 2022 + the online conference generated 3k views. In 2023 we organized four different in person events, some that was also live streamed.

    - diff --git a/components/icons/Twitter.js b/components/icons/Twitter.js index 15d860ef101..4d5239856ea 100644 --- a/components/icons/Twitter.js +++ b/components/icons/Twitter.js @@ -5,7 +5,7 @@ export default function IconTwitter({ className }) { fillRule="evenodd" d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill="currentColor" - clip-fillRule="evenodd" > + clip-fillrule="evenodd" > ) diff --git a/config/finance/2023/Expenses.yml b/config/finance/2023/Expenses.yml index c115f8dd296..4e29a14c1c3 100644 --- a/config/finance/2023/Expenses.yml +++ b/config/finance/2023/Expenses.yml @@ -1,5 +1,5 @@ January: - - Category: AsyncAPI Ambassador + - Category: Ambassador Program Amount: '68.95' - Category: Google Season of Docs 2022 Amount: '35.62' @@ -13,13 +13,13 @@ January: Amount: '1500' February: - - Category: Community Manager Salary + - Category: Community Manager Amount: '1000.39' - Category: AsyncAPI Mentorship 2022 Amount: '1500' March: - - Category: Community Manager Salary + - Category: Community Manager Amount: '2000.39' - Category: AsyncAPI Mentorship 2022 Amount: '1500' @@ -27,48 +27,81 @@ March: Amount: '1500' April: - - Category: Community Manager Salary + - Category: Community Manager Amount: '2000.39' May: - - Category: Community Manager Salary + - Category: Community Manager Amount: '2000.39' - - Category: "AsyncAPI Webstore" + - Category: Swag Store Amount: '75.11' - - Category: AsyncAPI Bounty + - Category: Bounty Program Amount: '400' June: - - Category: Community Manager Salary + - Category: Community Manager Amount: '2000.39' - - Category: AsyncAPI Bounty + - Category: Bounty Program Amount: '200' - Category: 3rd Party Services Amount: '28.31' - - Category: AsyncAPI Bounty + - Category: Bounty Program Amount: '200' - - Category: AsyncAPI Bounty + - Category: Bounty Program Amount: '200' - - Category: AsyncAPI Bounty + - Category: Bounty Program Amount: '200' July: - - Category: Community Manager Salary + - Category: Community Manager Amount: '2000.39' - - Category: 3rd Party Services - Amount: '1088.27' - - Category: AsyncAPI Bounty + - Category: Bounty Program Amount: '400' + August: - - Category: AsyncAPI Webstore - Amount: '15671.63' - - Category: AsyncAPI Bounty - Amount: '400' - - Category: Community Manager Salary - Amount: '2000' + - Category: 3rd Party Services + Amount: '1093.92' + - Category: Swag Store + Amount: '15672.02' + - Category: Bounty Program + Amount: '800.78' + - Category: Community Manager + Amount: '2000.39' September: - - Category: AsyncAPI Ambassador - Amount: '129.48' - - Category: Community Manager Salary - Amount: '2000' \ No newline at end of file + - Category: Ambassador Program + Amount: '139.10' + - Category: Community Manager + Amount: '2000.39' + +October: + - Category: Mentorship Program 2023 + Amount: '5277.78' + - Category: Community Manager + Amount: '2000.39' + - Category: AsyncAPI Conf on Tour 2023 + Amount: '943.07' + - Category: Swag Store + Amount: '7893.72' + - Category: 3rd Party Services + Amount: '247.04' + +November: + - Category: Mentorship Program 2023 + Amount: '1363.50' + - Category: Community Manager + Amount: '2000.39' + - Category: Swag Store + Amount: '873.87' + +December: + - Category: Mentorship Program 2023 + Amount: '675.39' + - Category: Community Manager + Amount: '2000.39' + - Category: AsyncAPI Conf on Tour 2023 + Amount: '1356.34' + - Category: Swag Store + Amount: '1415.90' + - Category: Bounty Program + Amount: '201.10' \ No newline at end of file diff --git a/config/finance/2023/ExpensesLink.yml b/config/finance/2023/ExpensesLink.yml index 9493648c356..dfbbc3e5d8f 100644 --- a/config/finance/2023/ExpensesLink.yml +++ b/config/finance/2023/ExpensesLink.yml @@ -1,4 +1,4 @@ -- category: "AsyncAPI Ambassador" +- category: "Ambassador Program" link: "https://github.com/orgs/asyncapi/discussions/425" - category: "Google Season of Docs 2022" @@ -7,14 +7,21 @@ - category: "AsyncAPI Mentorship 2022" link: "https://github.com/orgs/asyncapi/discussions/284" -- category: "AsyncAPI Webstore" +- category: "Swag Store" link: "https://github.com/orgs/asyncapi/discussions/710" -- category: "AsyncAPI Bounty" +- category: "Bounty Program" link: "https://github.com/orgs/asyncapi/discussions/541" - category: "3rd Party Services" link: "https://github.com/orgs/asyncapi/discussions/295" -- category: "Community Manager Salary" - link: "https://github.com/orgs/asyncapi/discussions/515" \ No newline at end of file +- category: "Community Manager" + link: "https://github.com/orgs/asyncapi/discussions/515" + +- category: "AsyncAPI Conf on Tour 2023" + link: "https://github.com/orgs/asyncapi/discussions/598" + +- category: "Mentorship Program 2023" + link: "https://github.com/orgs/asyncapi/discussions/689" + \ No newline at end of file From 1c23a16327cfd6d25d05dd96c80dde7910a8859b Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Thu, 21 Dec 2023 01:29:09 +0100 Subject: [PATCH 048/243] chore: update meetings.json and newsrooom_videos.json (#2483) --- config/newsroom_videos.json | 12 +- dashboard.json | 235 ++++++++++++++++++++++++------------ 2 files changed, 166 insertions(+), 81 deletions(-) diff --git a/config/newsroom_videos.json b/config/newsroom_videos.json index 928b2513d2f..4fee26b01e3 100644 --- a/config/newsroom_videos.json +++ b/config/newsroom_videos.json @@ -11,12 +11,6 @@ "description": "Explain Request/Reply use cases to me like I'm a 5 year old.", "videoId": "-OsMet9h_dg" }, - { - "image_url": "https://i.ytimg.com/vi/WCK9_ZDv6K4/hqdefault.jpg", - "title": "Quoi de neuf dans AsyncAPI v3 ? Découvrez le en live avec la migration du use-case Adeo(14th Dece…", - "description": "Participez à ce live pour découvrir les nouveautés de la V3 et comment migrer une version 2 en version 3 sur un use-case de ...", - "videoId": "WCK9_ZDv6K4" - }, { "image_url": "https://i.ytimg.com/vi/yOc_fI-i9C8/hqdefault.jpg", "title": "Community Meeting(12th December)", @@ -28,5 +22,11 @@ "title": "AsyncAPI Conf on Tour 2023 in Bangalore, India", "description": "AACoT'23 Bangalore Edition live from Postman Offices in India.", "videoId": "g6CPg77Lf5Q" + }, + { + "image_url": "https://i.ytimg.com/vi/p68PUXDMsks/hqdefault.jpg", + "title": "Community Meeting(November 28th, 2023)", + "description": "https://github.com/asyncapi/community/issues/918.", + "videoId": "p68PUXDMsks" } ] \ No newline at end of file diff --git a/dashboard.json b/dashboard.json index 3dcc5dfb135..ca8da002acc 100644 --- a/dashboard.json +++ b/dashboard.json @@ -1,16 +1,5 @@ { "hotDiscussions": [ - { - "id": "PR_kwDOBW5R_c5Xb72L", - "isPR": true, - "isAssigned": false, - "title": "feat: implement the asyncapi financial summary page", - "author": "vishvamsinh28", - "resourcePath": "/asyncapi/website/pull/2038", - "repo": "asyncapi/website", - "labels": [], - "score": 43.363362901138075 - }, { "id": "I_kwDOBW5R_c5J6qNe", "isPR": false, @@ -29,7 +18,7 @@ "color": "ededed" } ], - "score": 19.527872034949596 + "score": 19.815046623698855 }, { "id": "I_kwDOBW5R_c5BIl5P", @@ -97,15 +86,32 @@ "score": 15.794602381209232 }, { - "id": "PR_kwDOBW5R_c5QjwOq", - "isPR": true, - "isAssigned": false, - "title": "feat: add table of contents in case study", - "author": "Shurtu-gal", - "resourcePath": "/asyncapi/website/pull/1673", - "repo": "asyncapi/website", - "labels": [], - "score": 15.507427792459973 + "id": "I_kwDOFDnrNc5rjrK-", + "isPR": false, + "isAssigned": true, + "title": "Improve `new glee` command", + "author": "KhudaDad414", + "resourcePath": "/asyncapi/cli/issues/683", + "repo": "asyncapi/cli", + "labels": [ + { + "name": "enhancement", + "color": "a2eeef" + }, + { + "name": "bounty", + "color": "0e8a16" + }, + { + "name": "level/medium", + "color": "0e8a16" + }, + { + "name": "bounty/2023-Q4", + "color": "0e8a16" + } + ], + "score": 14.07155484871368 }, { "id": "PR_kwDOBW5R_c5RI5z2", @@ -130,73 +136,133 @@ "score": 14.07155484871368 }, { - "id": "I_kwDOFDnrNc5rjrK-", - "isPR": false, - "isAssigned": true, - "title": "Improve `new glee` command", + "id": "PR_kwDOBW5R_c5dJ7hJ", + "isPR": true, + "isAssigned": false, + "title": "docs: Tutorial for WebSockets with AsyncAPI", + "author": "VaishnaviNandakumar", + "resourcePath": "/asyncapi/website/pull/2245", + "repo": "asyncapi/website", + "labels": [], + "score": 13.78438025996442 + }, + { + "id": "PR_kwDODou01c5YJ7kV", + "isPR": true, + "isAssigned": false, + "title": "Add Form component", "author": "KhudaDad414", - "resourcePath": "/asyncapi/cli/issues/683", - "repo": "asyncapi/cli", + "resourcePath": "/asyncapi/studio/pull/773", + "repo": "asyncapi/studio", "labels": [ { - "name": "enhancement", - "color": "a2eeef" - }, - { - "name": "bounty", - "color": "FD6F9E" - }, - { - "name": "level/medium", - "color": "FD6F9E" - }, - { - "name": "bounty/2023-Q4", - "color": "FD6F9E" + "name": "autoupdate", + "color": "ededed" } ], "score": 13.497205671215161 }, { - "id": "PR_kwDOBW5R_c5dJ7hJ", + "id": "PR_kwDOBW5R_c5fTNfJ", "isPR": true, "isAssigned": false, - "title": "docs: Tutorial for WebSockets with AsyncAPI", - "author": "VaishnaviNandakumar", - "resourcePath": "/asyncapi/website/pull/2245", + "title": "feat: add Mailchimp integration using netlify function", + "author": "akshatnema", + "resourcePath": "/asyncapi/website/pull/2315", "repo": "asyncapi/website", "labels": [], - "score": 13.497205671215161 + "score": 13.210031082465903 } ], "goodFirstIssues": [ { - "id": "I_kwDOB5hCo855VB2E", - "title": "Add code linting (eslint) as part of CI script", + "id": "I_kwDOE8Qh3856EyqD", + "title": "Add missing PHP constraint docs", "isAssigned": false, - "resourcePath": "/asyncapi/spec-json-schemas/issues/467", - "repo": "asyncapi/spec-json-schemas", - "author": "smoya", - "area": "ci-cd", + "resourcePath": "/asyncapi/modelina/issues/1673", + "repo": "asyncapi/modelina", + "author": "jonaslagoni", + "area": "docs", "labels": [ { "name": "enhancement", "color": "a2eeef" + }, + { + "name": "PHP generator", + "color": "20DC39" } ] }, { - "id": "I_kwDOE8Qh38548Idt", - "title": "PythonGenerator with Pydantic If a property is Optional not required the json expected a key None", + "id": "I_kwDOE8Qh3856EybC", + "title": "Add missing Kotlin constraint docs", "isAssigned": false, - "resourcePath": "/asyncapi/modelina/issues/1644", + "resourcePath": "/asyncapi/modelina/issues/1672", "repo": "asyncapi/modelina", - "author": "tornabene", - "area": "Unknown", + "author": "jonaslagoni", + "area": "docs", "labels": [ { - "name": "bug", - "color": "d73a4a" + "name": "enhancement", + "color": "a2eeef" + }, + { + "name": "Kotlin generator", + "color": "61A95C" + } + ] + }, + { + "id": "I_kwDOE8Qh3856EyLo", + "title": "Add missing C++ constraint docs", + "isAssigned": false, + "resourcePath": "/asyncapi/modelina/issues/1671", + "repo": "asyncapi/modelina", + "author": "jonaslagoni", + "area": "docs", + "labels": [ + { + "name": "enhancement", + "color": "a2eeef" + }, + { + "name": "C++ generator", + "color": "1573BB" + } + ] + }, + { + "id": "I_kwDOE8Qh3856Eu2Z", + "title": "Add C++ constraint tests", + "isAssigned": false, + "resourcePath": "/asyncapi/modelina/issues/1670", + "repo": "asyncapi/modelina", + "author": "jonaslagoni", + "area": "typescript", + "labels": [ + { + "name": "enhancement", + "color": "a2eeef" + }, + { + "name": "C++ generator", + "color": "1573BB" + } + ] + }, + { + "id": "I_kwDOE8Qh3856EtdU", + "title": "Add Python constraint tests", + "isAssigned": false, + "resourcePath": "/asyncapi/modelina/issues/1669", + "repo": "asyncapi/modelina", + "author": "jonaslagoni", + "area": "typescript", + "labels": [ + { + "name": "enhancement", + "color": "a2eeef" }, { "name": "Python generator", @@ -204,6 +270,40 @@ } ] }, + { + "id": "I_kwDOE8Qh3856EtEg", + "title": "Add PHP constraint tests", + "isAssigned": false, + "resourcePath": "/asyncapi/modelina/issues/1668", + "repo": "asyncapi/modelina", + "author": "jonaslagoni", + "area": "typescript", + "labels": [ + { + "name": "enhancement", + "color": "a2eeef" + }, + { + "name": "TS generator", + "color": "33943E" + } + ] + }, + { + "id": "I_kwDOB5hCo855VB2E", + "title": "Add code linting (eslint) as part of CI script", + "isAssigned": false, + "resourcePath": "/asyncapi/spec-json-schemas/issues/467", + "repo": "asyncapi/spec-json-schemas", + "author": "smoya", + "area": "ci-cd", + "labels": [ + { + "name": "enhancement", + "color": "a2eeef" + } + ] + }, { "id": "I_kwDODyzcIc54mr9C", "title": "Fix wrong format for Co-authored automerged commits + pagination", @@ -327,21 +427,6 @@ } ] }, - { - "id": "I_kwDOFLhIt85yyn4B", - "title": "Update tooling doc with info about new category", - "isAssigned": false, - "resourcePath": "/asyncapi/community/issues/899", - "repo": "asyncapi/community", - "author": "derberg", - "area": "docs", - "labels": [ - { - "name": "Hacktoberfest", - "color": "FF8AE2" - } - ] - }, { "id": "I_kwDODwv8N85yh95N", "title": "would be nice if venue from past events is grayed out", @@ -432,7 +517,7 @@ "resourcePath": "/asyncapi/java-spring-template/issues/326", "repo": "asyncapi/java-spring-template", "author": "Tenischev", - "area": "Unknown", + "area": "java", "labels": [ { "name": "bug", From 355d1a3218a8c3faf1a76ab5fa67dfe591382283 Mon Sep 17 00:00:00 2001 From: Vishvamsinh Vaghela <90895835+vishvamsinh28@users.noreply.github.com> Date: Thu, 21 Dec 2023 19:56:32 +0530 Subject: [PATCH 049/243] feat: add adopters section to case study page (#2232) Co-authored-by: Akshat Nema <76521428+akshatnema@users.noreply.github.com>%0ACo-authored-by: akshatnema %0ACo-authored-by: Lukasz Gornicki --- .gitignore | 1 + config/adopters.yml | 47 ++++++++++++++++++ cypress/test/components/CaseStudyCard.cy.js | 5 +- cypress/test/pages/casestudies/index.cy.js | 33 +++++++++++-- pages/casestudies/index.js | 55 +++++++++++++++++++++ scripts/adopters/index.js | 18 +++++++ scripts/index.js | 2 + 7 files changed, 157 insertions(+), 4 deletions(-) create mode 100644 config/adopters.yml create mode 100644 scripts/adopters/index.js diff --git a/.gitignore b/.gitignore index 4a2ff1a8a09..8a6940cc810 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ node_modules out config/posts.json config/case-studies.json +config/adopters.json public/rss.xml .env.local yarn.lock diff --git a/config/adopters.yml b/config/adopters.yml new file mode 100644 index 00000000000..5dae9fb1c94 --- /dev/null +++ b/config/adopters.yml @@ -0,0 +1,47 @@ +- companyName: Reiffeisen Bank + useCase: Continuous Integration and Continuous Delivery (CI/CD) pipeline based on GitOps to deploy a topology built on Async API definitions using a Kubernetes operator to an Apache Pulsar cluster. + resources: + - title: Video - From an AsyncAPI Definition to a Deployed Pulsar Topology Via GitOps + link: https://www.youtube.com/watch?v=_MwzLZMwFN8 + +- companyName: LEGO Group + useCase: Broker management, where developers do not access the management console themselves, but rely on uploading AsyncAPI documents to a self service API that provisions access and topics specified in documents. + resources: + - title: Video - Documentation as Configuration for Management of Apache Pulsar + link: https://www.youtube.com/watch?v=m8I0fYjx6Cc + +- companyName: LEGO Group + useCase: Define, document and distribute event-driven APIs. Ensuring consistency and governance + resources: + - title: Video - Cross-Domain Events with AsyncAPI and AWS + link: https://www.youtube.com/watch?v=qjarcJQVLOg + +- companyName: Bank of New Zealand + useCase: Decentralized company-wide governance strategy for API. A self service for publishing APIs and docs. + resources: + - title: "Video - Self-service Events & Decentralised Governance with AsyncAPI: A Real World Example" + link: https://www.confluent.io/events/kafka-summit-apac-2021/self-service-events-and-decentralised-governance-with-asyncapi-a-real-world/ + +- companyName: Zora Robotics + useCase: Documenting lot products public MQTT API and building a developers portal. + resources: + - title: Video - Buliding and managing an extensive API for Robotics and loT + link: https://www.youtube.com/watch?v=yjHgT0n2BtA + - title: Docs - Buliding and managing an extensive API for Robotics and loT + link: https://docs.zorabots.be/dev-mqtt-docs/latest/index.html + +- companyName: Walmart + useCase: Managing a central API Hub for internal teams. Using AsyncAPI for events discoverability an visibility in a single place. AsyncAPI also enabled company-wide governance on asynchronous APIs. + resources: + - title: Video - Time For AsyncAPI Specification + link: https://www.youtube.com/watch?v=SxTpGRaNIPo + +- companyName: eBay + useCase: Enabling partners to build with eBay through asynchronous communication. Public AsyncAPI documents enable code generation and faster integration. It also enables governance and standardisation. + resources: + - title: "Video - AsyncAPI 2.0: Enabling the Event-Driven World" + link: https://www.youtube.com/watch?v=SxTpGRaNIPo + - title: "Article - AsyncAPI 2.0: Enabling the Event-Driven World" + link: https://innovation.ebayinc.com/tech/engineering/asyncapi-2-0-enabling-the-event-driven-world/ + - title: Docs - Overview of Notification API with public AsyncAPI documents + link: https://developer.ebay.com/api-docs/commerce/notification/overview.html \ No newline at end of file diff --git a/cypress/test/components/CaseStudyCard.cy.js b/cypress/test/components/CaseStudyCard.cy.js index 2e14e4b176f..7fc273f8bc3 100644 --- a/cypress/test/components/CaseStudyCard.cy.js +++ b/cypress/test/components/CaseStudyCard.cy.js @@ -1,7 +1,10 @@ import React from 'react'; import { mount } from 'cypress/react'; import CaseStudyCard from '../../../components/CaseStudyCard'; -import CaseStudiesList from "../../../config/case-studies.json"; +import CaseStudiesList from '../../../config/case-studies.json'; +import AdoptersList from '../../../config/adopters.json'; +import Casestudies from '../../../pages/casestudies'; + describe('CaseStudyCard Component', () => { it('renders the CaseStudyCard component with study data', () => { diff --git a/cypress/test/pages/casestudies/index.cy.js b/cypress/test/pages/casestudies/index.cy.js index e8907f6baad..282ae639e05 100644 --- a/cypress/test/pages/casestudies/index.cy.js +++ b/cypress/test/pages/casestudies/index.cy.js @@ -1,6 +1,8 @@ import Casestudies from "../../../../pages/casestudies"; import MockApp from "../../../utils/MockApp"; -import {mount} from 'cypress/react'; +import { mount } from 'cypress/react'; +import AdoptersList from "../../../../config/adopters.json" + describe('Test for Case Study Pages', () => { it('renders correctly', () => { mount( @@ -8,7 +10,32 @@ describe('Test for Case Study Pages', () => { ); - cy.get('[data-testid="CaseStudy-main"]').should('exist'); - cy.get('[data-testid="CaseStudy-card"]').should('exist'); + cy.get('[data-testid="CaseStudy-main"]').should('exist'); + cy.get('[data-testid="CaseStudy-card"]').should('exist'); }); + + it('Adopters section renders correctly', () => { + mount( + + + + ); + cy.get('[data-testid="Adopters"]').should('have.length', AdoptersList.length); + + cy.get('table') + .should('exist') + .within(() => { + // Check table headers + cy.get('th').eq(0).should('have.text', 'Company name'); + cy.get('th').eq(1).should('have.text', 'Use Case'); + cy.get('th').eq(2).should('have.text', 'Resources'); + + // Check table data + cy.get('tbody tr').should('have.length', AdoptersList.length); + AdoptersList.forEach((entry, index) => { + cy.get('tbody tr').eq(index).find('td').eq(0).should('have.text', entry.companyName); + cy.get('tbody tr').eq(index).find('td').eq(1).should('have.text', entry.useCase); + }); + }); + }) }); \ No newline at end of file diff --git a/pages/casestudies/index.js b/pages/casestudies/index.js index a4f30e5995c..40fa02c1d69 100644 --- a/pages/casestudies/index.js +++ b/pages/casestudies/index.js @@ -4,6 +4,7 @@ import Paragraph from '../../components/typography/Paragraph'; import TextLink from '../../components/typography/TextLink'; import Heading from "../../components/typography/Heading"; import CaseStudiesList from "../../config/case-studies.json"; +import AdoptersList from "../../config/adopters.json" export default function Casestudies() { const description = @@ -41,7 +42,61 @@ export default function Casestudies() { + +
    +
    +
    + + Adopters + + + Check out how different companies use AsyncAPI and what problems they solve. + + + Feel free to submit a pull request with information about how your company uses AsyncAPI. We know that + writing an official case study might be time consuming and requires too much internal paper work. + Let's make sure we can at least capture a use case that is already a great learning information for the + community. + +
    +
    +
    + +
    +
    + + + + + + + + + + {AdoptersList.map((entry, index) => ( + + + + + + ))} + +
    Company nameUse CaseResources
    {entry.companyName}{entry.useCase} + +
    +
    +
    ); } + + diff --git a/scripts/adopters/index.js b/scripts/adopters/index.js new file mode 100644 index 00000000000..0f5eeb427cf --- /dev/null +++ b/scripts/adopters/index.js @@ -0,0 +1,18 @@ +const { promises: { readFile, writeFile } } = require('fs'); +const { convertToJson } = require('../utils'); +const { resolve } = require('path'); + +module.exports = async function buildAdoptersList() { + try { + const AdoptersContent = await readFile('config/adopters.yml', 'utf-8'); + const jsonContent = convertToJson(AdoptersContent); + + await writeFile( + resolve(__dirname, '../../config', 'adopters.json'), + JSON.stringify(jsonContent) + ); + } catch (err) { + console.error(err); + throw err; + } +}; diff --git a/scripts/index.js b/scripts/index.js index 835ccd7b6ed..f6e462c35d4 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -1,6 +1,7 @@ const rssFeed = require('./build-rss'); const buildPostList = require('./build-post-list'); const buildCaseStudiesList = require('./casestudies'); +const buildAdoptersList = require('./adopters') const buildFinanceInfoList = require('./finance') async function start() { @@ -18,6 +19,7 @@ async function start() { 'jobs/rss.xml' ); await buildCaseStudiesList(); + await buildAdoptersList(); await buildFinanceInfoList(); } From 2130efcad6e5cea855147b593680cf68bb3e97f0 Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Thu, 21 Dec 2023 17:48:51 +0100 Subject: [PATCH 050/243] fix: regirects for version react on proper path (#2487) --- public/_redirects | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/public/_redirects b/public/_redirects index 21425ffb3f6..020e536c0fe 100644 --- a/public/_redirects +++ b/public/_redirects @@ -26,21 +26,21 @@ https://www.asyncapi.io/* https://www.asyncapi.com/:splat 301! /docs/reference/specification/3.0.0 /docs/reference/specification/v3.0.0 302! # SPEC-REDIRECTION:END -/docs/specifications/latest /docs/reference/specification/latest 302! -/docs/specifications/2.6.0 https://v2.asyncapi.com/docs/reference/specification/v2.6.0 302! -/docs/specifications/2.5.0 https://v2.asyncapi.com/docs/reference/specification/v2.5.0 302! -/docs/specifications/2.4.0 https://v2.asyncapi.com/docs/reference/specification/v2.4.0 302! -/docs/specifications/2.3.0 https://v2.asyncapi.com/docs/reference/specification/v2.3.0 302! -/docs/specifications/2.2.0 https://v2.asyncapi.com/docs/reference/specification/v2.2.0 302! -/docs/specifications/2.1.0 https://v2.asyncapi.com/docs/reference/specification/v2.1.0 302! -/docs/specifications/2.0.0 https://v2.asyncapi.com/docs/reference/specification/v2.0.0 302! -/docs/specifications/v2.6.0 https://v2.asyncapi.com/docs/reference/specification/v2.6.0 302! -/docs/specifications/v2.5.0 https://v2.asyncapi.com/docs/reference/specification/v2.5.0 302! -/docs/specifications/v2.4.0 https://v2.asyncapi.com/docs/reference/specification/v2.4.0 302! -/docs/specifications/v2.3.0 https://v2.asyncapi.com/docs/reference/specification/v2.3.0 302! -/docs/specifications/v2.2.0 https://v2.asyncapi.com/docs/reference/specification/v2.2.0 302! -/docs/specifications/v2.1.0 https://v2.asyncapi.com/docs/reference/specification/v2.1.0 302! -/docs/specifications/v2.0.0 https://v2.asyncapi.com/docs/reference/specification/v2.0.0 302! +/docs/reference/specification/latest /docs/reference/specification/latest 302! +/docs/reference/specification/2.6.0 https://v2.asyncapi.com/docs/reference/specification/v2.6.0 302! +/docs/reference/specification/2.5.0 https://v2.asyncapi.com/docs/reference/specification/v2.5.0 302! +/docs/reference/specification/2.4.0 https://v2.asyncapi.com/docs/reference/specification/v2.4.0 302! +/docs/reference/specification/2.3.0 https://v2.asyncapi.com/docs/reference/specification/v2.3.0 302! +/docs/reference/specification/2.2.0 https://v2.asyncapi.com/docs/reference/specification/v2.2.0 302! +/docs/reference/specification/2.1.0 https://v2.asyncapi.com/docs/reference/specification/v2.1.0 302! +/docs/reference/specification/2.0.0 https://v2.asyncapi.com/docs/reference/specification/v2.0.0 302! +/docs/reference/specification/v2.6.0 https://v2.asyncapi.com/docs/reference/specification/v2.6.0 302! +/docs/reference/specification/v2.5.0 https://v2.asyncapi.com/docs/reference/specification/v2.5.0 302! +/docs/reference/specification/v2.4.0 https://v2.asyncapi.com/docs/reference/specification/v2.4.0 302! +/docs/reference/specification/v2.3.0 https://v2.asyncapi.com/docs/reference/specification/v2.3.0 302! +/docs/reference/specification/v2.2.0 https://v2.asyncapi.com/docs/reference/specification/v2.2.0 302! +/docs/reference/specification/v2.1.0 https://v2.asyncapi.com/docs/reference/specification/v2.1.0 302! +/docs/reference/specification/v2.0.0 https://v2.asyncapi.com/docs/reference/specification/v2.0.0 302! /docs/specifications/1.0.0 https://github.com/asyncapi/asyncapi/blob/master/versions/1.0.0/asyncapi.md 302! /docs/specifications/1.1.0 https://github.com/asyncapi/asyncapi/blob/master/versions/1.1.0/asyncapi.md 302! From 5212b88be85a95afd152a142b29645ac12c6b4ec Mon Sep 17 00:00:00 2001 From: Ashish Padhy <100484401+Shurtu-gal@users.noreply.github.com> Date: Fri, 22 Dec 2023 02:15:00 +0530 Subject: [PATCH 051/243] chore: fix broken links to examples (#2490) --- components/buttons/OpenInPlaygroundButton.js | 2 +- components/buttons/OpenInStudioButton.js | 2 +- pages/blog/status-update-47-20.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/buttons/OpenInPlaygroundButton.js b/components/buttons/OpenInPlaygroundButton.js index 90d4a638827..4b53507210c 100644 --- a/components/buttons/OpenInPlaygroundButton.js +++ b/components/buttons/OpenInPlaygroundButton.js @@ -2,7 +2,7 @@ import Button from './Button' import IconRocket from '../icons/Rocket' export default function OpenInPlaygroundButton() { - const playgroundLoadUrl = encodeURI('https://raw.githubusercontent.com/asyncapi/asyncapi/v2.2.0/examples/simple.yml') + const playgroundLoadUrl = encodeURI('https://raw.githubusercontent.com/asyncapi/asyncapi/v3.0.0/examples/simple-asyncapi.yml') return (