From 1a78f609043b087c74ceaf2b5939b2aae3744a12 Mon Sep 17 00:00:00 2001 From: karthik mv Date: Fri, 8 Dec 2023 00:10:23 +0530 Subject: [PATCH 01/37] fix: single backtick rendering as a codeblock in casestudies (#2208) Co-authored-by: Akshat Nema <76521428+akshatnema@users.noreply.github.com>%0ACo-authored-by: Lukasz Gornicki --- components/MDX.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/MDX.js b/components/MDX.js index 168e6c8dfb7..9f6182efb4c 100644 --- a/components/MDX.js +++ b/components/MDX.js @@ -60,9 +60,8 @@ export function getMDXComponents() { th: props => , tr: props => , td: props => , - pre: props =>
, - inlineCode: props => , - code: CodeComponent, + pre: props => CodeComponent(props.children.props), + code: props => , hr: props =>
, CodeBlock, ChapterSuggestions, From 585fed668c8535d3be43727c02d01d92641e52fd Mon Sep 17 00:00:00 2001 From: Ashish Padhy <100484401+Shurtu-gal@users.noreply.github.com> Date: Fri, 8 Dec 2023 00:43:16 +0530 Subject: [PATCH 02/37] fix: scroll-to-top button (#1657) Co-authored-by: akshatnema --- components/buttons/ScrollButton.js | 2 +- components/navigation/MobileNavMenu.js | 2 +- components/navigation/NavBar.js | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/components/buttons/ScrollButton.js b/components/buttons/ScrollButton.js index 21920bbfe57..84671aa5989 100644 --- a/components/buttons/ScrollButton.js +++ b/components/buttons/ScrollButton.js @@ -23,7 +23,7 @@ function ScrollButton(){ }) } - return
+ return
{backToTopButton &&( )} diff --git a/components/navigation/MobileNavMenu.js b/components/navigation/MobileNavMenu.js index adcfe3424e5..2721323089f 100644 --- a/components/navigation/MobileNavMenu.js +++ b/components/navigation/MobileNavMenu.js @@ -9,7 +9,7 @@ import Link from 'next/link'; export default function MobileNavMenu({ onClickClose = () => {} }) { return ( -
+
diff --git a/components/navigation/NavBar.js b/components/navigation/NavBar.js index dd9dcbe3574..fa5f55f59b9 100644 --- a/components/navigation/NavBar.js +++ b/components/navigation/NavBar.js @@ -9,7 +9,6 @@ import LearningPanel from './LearningPanel' import CommunityPanel from "./CommunityPanel" import MobileNavMenu from './MobileNavMenu' import otherItems from './otherItems' - import GithubButton from "../buttons/GithubButton" import { SearchButton } from '../AlgoliaSearch'; import IconLoupe from '../icons/Loupe'; @@ -100,7 +99,7 @@ export default function NavBar({ useEffect(() => { setMobileMenuOpen(false); setOpen(null); - }, [asPath]) + }, [asPath]); return (
From cecc74fd1c5fe1c9a7b45679a3c0d297043d33a6 Mon Sep 17 00:00:00 2001 From: Akshat Nema <76521428+akshatnema@users.noreply.github.com> Date: Fri, 8 Dec 2023 04:04:57 +0530 Subject: [PATCH 03/37] fix: skip AnnouncementHero and Banner tests (#2405) --- .../campaignTests/AnnouncementHero.cy.js | 14 ++++++++------ cypress/test/components/campaignTests/Banner.cy.js | 11 ++++++----- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/cypress/test/components/campaignTests/AnnouncementHero.cy.js b/cypress/test/components/campaignTests/AnnouncementHero.cy.js index 3d5444d9b20..a2dc55b29bc 100644 --- a/cypress/test/components/campaignTests/AnnouncementHero.cy.js +++ b/cypress/test/components/campaignTests/AnnouncementHero.cy.js @@ -7,26 +7,28 @@ beforeEach(() => { mount(); }); +// .skip should be removed once the AnnouncementHero component is rendered in the website describe('AnnouncementHero Component', () => { - it('should render the component when the date is within the valid range', () => { + it.skip('should render the component when the date is within the valid range', () => { const mockDate = new Date(2021, 10, 12).getTime(); cy.clock(mockDate); cy.get('[data-testid="AnnouncementHero-main-div"]').should('exist'); }); //check if announcement rendered is small or large . - it('should render a small announcement when "small" prop is true', () => { + it.skip('should render a small announcement when "small" prop is true', () => { mount(); cy.get('[data-testid="AnnouncementHero-main-div"]').should('have.class', 'mb-4'); }); - it('should display the correct event information', () => { + it.skip('should display the correct event information', () => { // Assert the event details cy.get('[data-testid="Paragraph-test"]').should('exist'); cy.get('h2').should('exist'); }); - it('should have a link and text for the button', () => { + + it.skip('should have a link and text for the button', () => { mount(); cy.get('[data-testid="Button-link"]') .should('have.attr', 'target', '_blank') @@ -38,7 +40,7 @@ describe('AnnouncementHero Component', () => { }); //check if announcement rendered is small or large . - it('should render a small announcement when "small" prop is true', () => { + it.skip('should render a small announcement when "small" prop is true', () => { const mockDate = new Date('2023-05-01T00:00:00Z'); cy.clock(mockDate.getTime()); @@ -47,7 +49,7 @@ describe('AnnouncementHero Component', () => { cy.get('[data-testid="AnnouncementHero-main-div"]').should('have.class', 'mb-4'); }); - it('should render a large announcement when "small" prop is false', () => { + it.skip('should render a large announcement when "small" prop is false', () => { const mockDate = new Date('2023-05-01T00:00:00Z'); cy.clock(mockDate.getTime()); diff --git a/cypress/test/components/campaignTests/Banner.cy.js b/cypress/test/components/campaignTests/Banner.cy.js index 5ec6e4a1b47..fb196376002 100644 --- a/cypress/test/components/campaignTests/Banner.cy.js +++ b/cypress/test/components/campaignTests/Banner.cy.js @@ -2,8 +2,9 @@ import React from 'react'; import { mount } from '@cypress/react'; import Banner from '../../../../components/campaigns/Banner'; +// .skip should be removed once the Banner component is rendered in the website with default functionalities describe('Banner Component', () => { - it('should not render the banner when the date is not within the valid range', () => { + it.skip('should not render the banner when the date is not within the valid range', () => { const today = new Date(); const [day, month, year] = [today.getUTCDate(), today.getUTCMonth(), today.getUTCFullYear()]; if (year > 2022 || month !== 10 || day < 6) { @@ -17,21 +18,21 @@ describe('Banner Component', () => { } }); - it('should render the banner when the date is within the valid range', () => { + it.skip('should render the banner when the date is within the valid range', () => { const mockDate = new Date(2021, 10, 12).getTime(); cy.clock(mockDate); mount(); cy.get('[data-testid="Banner-main-div"]').should('be.visible'); }); - it('should display the correct message when the date is within the valid range', () => { + it.skip('should display the correct message when the date is within the valid range', () => { const mockDate = new Date(2021, 10, 12).getTime(); cy.clock(mockDate); mount(); cy.contains('.font-medium', 'AsyncAPI Conference 2022 has ended').should('be.visible'); }); - it('should have a link to the recordings playlist', () => { + it.skip('should have a link to the recordings playlist', () => { const mockDate = new Date(2021, 10, 12).getTime(); cy.clock(mockDate); mount(); @@ -41,7 +42,7 @@ describe('Banner Component', () => { .should('have.attr', 'rel', 'noopener noreferrer'); }); - it('should have the max-w-screen-xl class in the div element', () => { + it.skip('should have the max-w-screen-xl class in the div element', () => { const mockDate = new Date(2021, 10, 12).getTime(); cy.clock(mockDate); mount(); From 9af5c53dc80b9c44392b712ad3b1e5e04570dc68 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Fri, 8 Dec 2023 01:28:47 +0100 Subject: [PATCH 04/37] chore: update meetings.json and newsrooom_videos.json (#2406) --- config/meetings.json | 7 ------- config/newsroom_videos.json | 12 ++++++------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/config/meetings.json b/config/meetings.json index 51651ed1f18..84d2257386c 100644 --- a/config/meetings.json +++ b/config/meetings.json @@ -13,13 +13,6 @@ "banner": "", "date": "2023-09-06T16:00:00.000Z" }, - { - "title": "AsyncAPI spec v3 support in Diff", - "calLink": "https://www.google.com/calendar/event?eid=YnVvZWt1azlwcTQxNzZnNzNpZ2c3cjdmbzAgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn", - "url": "https://github.com/asyncapi/community/issues/858", - "banner": "", - "date": "2023-08-29T13:30:00.000Z" - }, { "title": "Brainstorm on AsyncAPI Cheat Sheet Poster", "calLink": "https://www.google.com/calendar/event?eid=bGx1dXBuc2x1a29mN3RzMmQzcGFjaWM4anMgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn", diff --git a/config/newsroom_videos.json b/config/newsroom_videos.json index 0f91f4dda66..352d13b5def 100644 --- a/config/newsroom_videos.json +++ b/config/newsroom_videos.json @@ -1,4 +1,10 @@ [ + { + "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", @@ -17,12 +23,6 @@ "description": "https://github.com/asyncapi/community/issues/917.", "videoId": "KDort611FNg" }, - { - "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/Vm4ZKFb2PVE/hqdefault.jpg", "title": "Community Meeting(October 31th, 2023)", From d023aeb3d60a2014e6cdd8d90eb8b8263d305cb5 Mon Sep 17 00:00:00 2001 From: Ashutosh Rath Date: Fri, 8 Dec 2023 19:20:04 +0530 Subject: [PATCH 05/37] fix: add accordion to FAQ section (#1695) Co-authored-by: Akshat Nema <76521428+akshatnema@users.noreply.github.com>%0ACo-authored-by: akshatnema %0ACo-authored-by: Alejandra Quetzalli %0ACo-authored-by: Ashutosh %0ACo-authored-by: Lucif3r-in --- components/MDX.js | 6 +++++ pages/about/index.md | 52 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/components/MDX.js b/components/MDX.js index 9f6182efb4c..8b0be84e989 100644 --- a/components/MDX.js +++ b/components/MDX.js @@ -62,6 +62,12 @@ 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 4714e54ac94..585dfa7b70a 100644 --- a/pages/about/index.md +++ b/pages/about/index.md @@ -100,11 +100,47 @@ 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 fb574ffe4c4a8b14a1ce4ba0401f1d99a5806ed1 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Sun, 10 Dec 2023 01:31:12 +0100 Subject: [PATCH 06/37] chore: update meetings.json and newsrooom_videos.json (#2418) --- config/meetings.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/config/meetings.json b/config/meetings.json index 84d2257386c..5d96773153e 100644 --- a/config/meetings.json +++ b/config/meetings.json @@ -1,11 +1,4 @@ [ - { - "title": "Spec 3.0 Docs Meeting", - "calLink": "https://www.google.com/calendar/event?eid=aHJwdnA1bzI1ajVjNzliZ2h2bm1nZnI3b3MgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn", - "url": "https://github.com/asyncapi/community/issues/793", - "banner": "", - "date": "2023-08-31T14:30:00.000Z" - }, { "title": "Spec 3.0 Meeting", "calLink": "https://www.google.com/calendar/event?eid=NDEzM2E1ZGE5YWttYXVpYW9zbTl1cWM1YWMgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn", From 13da7cd220282bdba910b0a4a2b86bda76bf3523 Mon Sep 17 00:00:00 2001 From: asyncapi-bot Date: Mon, 11 Dec 2023 01:29:07 +0100 Subject: [PATCH 07/37] 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 08/37] 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 09/37] 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 10/37] 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 11/37] 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 12/37] 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 13/37] 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 14/37] 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 15/37] 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 16/37] 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 17/37] 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 18/37] 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 19/37] 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 20/37] 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 21/37] 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 22/37] 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 23/37] 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 24/37] 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 25/37] 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 26/37] 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 27/37] 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 28/37] 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 29/37] 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 30/37] 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 31/37] 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 32/37] 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 33/37] 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 34/37] 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 35/37] 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 36/37] 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 37/37] 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.