diff --git a/.all-contributorsrc b/.all-contributorsrc index 42f54a7f3cc..6d6f30a8602 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -454,6 +454,71 @@ "contributions": [ "doc" ] + }, + { + "login": "Florence-Njeri", + "name": "Florence Njeri", + "avatar_url": "https://avatars.githubusercontent.com/u/40742916?v=4", + "profile": "https://florence-njeri.github.io/NjeriPortfolio", + "contributions": [ + "code" + ] + }, + { + "login": "anshgoyalevil", + "name": "Ansh Goyal", + "avatar_url": "https://avatars.githubusercontent.com/u/94157520?v=4", + "profile": "https://ansh.live", + "contributions": [ + "code", + "review" + ] + }, + { + "login": "SumantxD", + "name": "Sumant.xD", + "avatar_url": "https://avatars.githubusercontent.com/u/65810424?v=4", + "profile": "https://github.com/SumantxD", + "contributions": [ + "infra" + ] + }, + { + "login": "Shriansh2002", + "name": "Shriansh Agarwal", + "avatar_url": "https://avatars.githubusercontent.com/u/41548480?v=4", + "profile": "http://shrianshagarwal.in", + "contributions": [ + "code" + ] + }, + { + "login": "reachaadrika", + "name": "Aadrika Bhargava", + "avatar_url": "https://avatars.githubusercontent.com/u/64789514?v=4", + "profile": "https://github.com/reachaadrika", + "contributions": [ + "code" + ] + }, + { + "login": "vishvamsinh28", + "name": "Vishvamsinh Vaghela", + "avatar_url": "https://avatars.githubusercontent.com/u/90895835?v=4", + "profile": "https://github.com/vishvamsinh28", + "contributions": [ + "code" + ] + }, + { + "login": "AnimeshKumar923", + "name": "Animesh Kumar", + "avatar_url": "https://avatars.githubusercontent.com/u/99868037?v=4", + "profile": "https://github.com/AnimeshKumar923", + "contributions": [ + "doc", + "review" + ] } ], "contributorsPerLine": 7, diff --git a/.github/workflows/help-command.yml b/.github/workflows/help-command.yml index f4955c22163..d4ba4a44c40 100644 --- a/.github/workflows/help-command.yml +++ b/.github/workflows/help-command.yml @@ -27,13 +27,13 @@ jobs: repo: context.repo.repo, body: `Hello, @${{ github.actor }}! πŸ‘‹πŸΌ - I'm Genie from the magic lamp. Looks like somebody needs a hand! πŸ†˜ + I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand! At the moment the following comments are supported in pull requests: - - `/ready-to-merge` or `/rtm` - This comment will trigger automerge of PR in case all required checks are green, approvals in place and do-not-merge label is not added - - `/do-not-merge` or `/dnm` - This comment will block automerging even if all conditions are met and ready-to-merge label is added - - `/autoupdate` or `/au` - This comment will add `autoupdate` label to the PR and keeps your PR up-to-date to the target branch's future changes. Unless there is a merge conflict or it is a draft PR.` + - \`/ready-to-merge\` or \`/rtm\` - This comment will trigger automerge of PR in case all required checks are green, approvals in place and do-not-merge label is not added + - \`/do-not-merge\` or \`/dnm\` - This comment will block automerging even if all conditions are met and ready-to-merge label is added + - \`/autoupdate\` or \`/au\` - This comment will add \`autoupdate\` label to the PR and keeps your PR up-to-date to the target branch's future changes. Unless there is a merge conflict or it is a draft PR.` }) create_help_comment_issue: @@ -51,10 +51,10 @@ jobs: repo: context.repo.repo, body: `Hello, @${{ github.actor }}! πŸ‘‹πŸΌ - I'm Genie from the magic lamp. Looks like somebody needs a hand! πŸ†˜ + I'm 🧞🧞🧞 Genie 🧞🧞🧞 from the magic lamp. Looks like somebody needs a hand! At the moment the following comments are supported in issues: - - `/good-first-issue {js | ts | java | go | docs | design | ci-cd} ` or `/gfi {js | ts | java | go | docs | design | ci-cd} ` - label an issue as a `good first issue`. - example: `/gfi js` or `/good-first-issue ci-cd` - }) + - \`/good-first-issue {js | ts | java | go | docs | design | ci-cd}\` or \`/gfi {js | ts | java | go | docs | design | ci-cd}\` - label an issue as a \`good first issue\`. + example: \`/gfi js\` or \`/good-first-issue ci-cd\`` + }) \ No newline at end of file diff --git a/.github/workflows/lighthouse-ci.yml b/.github/workflows/lighthouse-ci.yml index 137d2fb77e8..f8cc63d308d 100644 --- a/.github/workflows/lighthouse-ci.yml +++ b/.github/workflows/lighthouse-ci.yml @@ -32,7 +32,7 @@ jobs: ) id: should_run name: Should Run - run: echo "::set-output name=shouldrun::true" + run: echo "shouldrun=true" >> $GITHUB_OUTPUT - if: steps.should_run.outputs.shouldrun == 'true' uses: actions/checkout@v3 diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000000..fa29cdfff91 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +** \ No newline at end of file diff --git a/CODEOWNERS b/CODEOWNERS index 56d4723855a..db47e3d311e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -5,7 +5,7 @@ # For more details, read the following article on GitHub: https://help.github.com/articles/about-codeowners/. # The default owners are automatically added as reviewers when you open a pull request unless different owners are specified in the file. -* @derberg @mcturco @akshatnema @magicmatatjahu @asyncapi-bot-eve +* @derberg @akshatnema @magicmatatjahu @mayaleeeee @asyncapi-bot-eve # All .md files *.md @alequetzalli @asyncapi-bot-eve @@ -13,4 +13,4 @@ pages/blog/*.md @thulieblack @alequetzalli pages/community/*.md @thulieblack @alequetzalli -README.md @alequetzalli @derberg @mcturco @akshatnema @magicmatatjahu @asyncapi-bot-eve +README.md @alequetzalli @derberg @akshatnema @magicmatatjahu @mayaleeeee @asyncapi-bot-eve diff --git a/README.md b/README.md index 9a64ced7fbb..530d15f9eee 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ --- -[![All Contributors](https://img.shields.io/badge/all_contributors-45-orange.svg?style=flat-square)](#contributors-) +[![All Contributors](https://img.shields.io/badge/all_contributors-52-orange.svg?style=flat-square)](#contributors-) [![Netlify Status](https://api.netlify.com/api/v1/badges/b2137407-b765-46c4-95b5-a72d9b1592ab/deploy-status)](https://app.netlify.com/sites/asyncapi-website/deploys) @@ -206,6 +206,15 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d Benjamin Rukundo
Benjamin Rukundo

πŸ’» tthijm
tthijm

πŸš‡ Cynthia Peter
Cynthia Peter

πŸ“– + Florence Njeri
Florence Njeri

πŸ’» + Ansh Goyal
Ansh Goyal

πŸ’» πŸ‘€ + Sumant.xD
Sumant.xD

πŸš‡ + Shriansh Agarwal
Shriansh Agarwal

πŸ’» + + + Aadrika Bhargava
Aadrika Bhargava

πŸ’» + Vishvamsinh Vaghela
Vishvamsinh Vaghela

πŸ’» + Animesh Kumar
Animesh Kumar

πŸ“– πŸ‘€ diff --git a/assets/docs/fragments/how-to-contribute.md b/assets/docs/fragments/how-to-contribute.md new file mode 100644 index 00000000000..932347021a1 --- /dev/null +++ b/assets/docs/fragments/how-to-contribute.md @@ -0,0 +1,23 @@ +## How to contribute to AsyncAPI Docs + +Did you know that you can contribute Docs to AsyncAPI as well? Code isn't the only way to contribute to OSS; Dev Docs are a **huge** help that benefit the entire OSS ecosystem. At AsyncAPI, we value Doc contributions as much as every other type of contribution. ❀️ + +To get started as a Docs contributor: + +1. Familiarize yourself with our [project's Contribution Guide](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) and our [Code of Conduct](https://github.com/asyncapi/.github/blob/master/CODE_OF_CONDUCT.md). + +2. Head over to our Docs GH Board [here](https://github.com/orgs/asyncapi/projects/12). + +3. Pick an issue you would like to contribute to and leave a comment introducing yourself. This is also the perfect place to leave any questions you may have on how to get started. + +4. If there is no work done in that Docs issue yet, feel free to open a PR and get started! + +### Tag me in your AsyncAPI Doc PRs + +Do you have a documentation contributor question and you're wondering how to tag me into a GitHub discussion or PR? Never fear! + +Tag me in your AsyncAPI Doc PRs or [GitHub Discussions](https://github.com/asyncapi/community/discussions/categories/docs) via my GitHub handle, [`/alequetzalli`](https://github.com/alequetzalli) πŸ™. + +### Talk to me + +I want and need to listen πŸ‘‚πŸ½ to all of your perspectives and ideas. Please don't be shy to express to me what you think needs to be documented first or what is missing. πŸ“ There's a lot of good work ahead, but **you** determine _our content roadmap_ because the OSS community needs should always come first.✨ \ No newline at end of file diff --git a/components/AlgoliaSearch.js b/components/AlgoliaSearch.js index c71aea80bae..96a98dcc273 100644 --- a/components/AlgoliaSearch.js +++ b/components/AlgoliaSearch.js @@ -11,7 +11,7 @@ export const DOCS_INDEX_NAME = 'asyncapi-docs'; const APP_ID = 'Z621OGRI9Y'; const API_KEY = '5a4122ae46ce865146d23d3530595d38'; -const SearchContext = createContext() +const SearchContext = createContext({}); export default function AlgoliaSearch({ children }) { const [isOpen, setIsOpen] = useState(false); @@ -47,14 +47,7 @@ export default function AlgoliaSearch({ children }) { - + {children} {isOpen && } @@ -169,6 +162,7 @@ export function SearchButton({ children, indexName = INDEX_NAME, ...props }) { onOpen(indexName); }} {...props} + data-testid="Search-Button" > {typeof children === 'function' ? children({ actionKey }) : children} diff --git a/components/Asyncapi3Comparison.js b/components/Asyncapi3Comparison.js new file mode 100644 index 00000000000..9362db83628 --- /dev/null +++ b/components/Asyncapi3Comparison.js @@ -0,0 +1,549 @@ +import React, { useState } from 'react'; + +// eslint-disable-next-line react/prop-types +export function Asyncapi3Comparison({ className = '' }) { + const [hoverState, setHoverState] = useState({ + Info: false, + Servers: false, + Paths: false, + PathItem: true, + Summary: false, + Operation: false, + Message: false, + Tags: false, + External: false, + Components: false, + Id: false, + Path: false, + Host: false + }); + + return ( +
+
+

AsyncAPI 2.x

+ +
+
setHoverState(prevState => ({ ...prevState, Info: true }))} onMouseLeave={() => setHoverState({ Info: false })}> + Info +
+
+
setHoverState(prevState => ({ ...prevState, Tags: true }))} onMouseLeave={() => setHoverState({ Tags: false })}> +

Tags

+
+
setHoverState(prevState => ({ ...prevState, External: true }))} onMouseLeave={() => setHoverState({ External: false })}> +

External Docs

+
+
+
+ Servers +
+
+ Server +
+
setHoverState(prevState => ({ ...prevState, Host: true, Path: true }))} onMouseLeave={() => setHoverState({ Host: false, Path: false })}> +

Url

+
+
+
+
+
+
setHoverState(prevState => ({ ...prevState, Paths: true }))} onMouseLeave={() => setHoverState({ Paths: false })}> + Channels + +
+
setHoverState(prevState => ({ ...prevState, PathItem: true }))} onMouseLeave={() => setHoverState({ PathItem: false })}> + Channel Item + +
+
setHoverState(prevState => ({ ...prevState, Operation: true }))} onMouseLeave={() => setHoverState({ Operation: false })}> + Operation (Publish and Subscribe) + +
+
+
setHoverState(prevState => ({ ...prevState, Message: true }))} onMouseLeave={() => setHoverState({ Message: false })}> + Messages +
+ Message + +
+ Headers +
+
+ Payload +
+
+
+
+
+
+
+
+
+
+
+
+
+

AsyncAPI 3.0

+ +
+
setHoverState(prevState => ({ ...prevState, Info: true }))} onMouseLeave={() => setHoverState({ Info: false })}> + Info +
+
setHoverState(prevState => ({ ...prevState, Tags: true }))} onMouseLeave={() => setHoverState({ Tags: false })}> +

Tags

+
+
setHoverState(prevState => ({ ...prevState, External: true }))} onMouseLeave={() => setHoverState({ External: false })}> +

External Docs

+
+
+
+
+ Servers +
+
+ Server +
+
setHoverState(prevState => ({ ...prevState, Host: true }))} onMouseLeave={() => setHoverState({ Host: false })}> +

Host

+
+
setHoverState(prevState => ({ ...prevState, Path: true }))} onMouseLeave={() => setHoverState({ Path: false })}> +

Pathname

+
+
+
+
+
+
setHoverState(prevState => ({ ...prevState, Paths: true }))} onMouseLeave={() => setHoverState({ Paths: false })}> + Channels + +
setHoverState(prevState => ({ ...prevState, PathItem: true }))} onMouseLeave={() => setHoverState({ PathItem: false })}> + Channel Item +
+
+ address +
+
+
setHoverState(prevState => ({ ...prevState, Message: true }))} onMouseLeave={() => setHoverState({ Message: false })}> + Messages +
+ Message + +
+ Headers +
+
+ Payload +
+
+
+
+
+
+
+
setHoverState(prevState => ({ ...prevState, Operation: true }))} onMouseLeave={() => setHoverState({ Operation: false })}> + Operations +
+
+ Operation + +
+
+ action (send or receive) +
+
+ channel +
+
+ messages +
+
+
+
+
+
+
+
+ ) +} + +// eslint-disable-next-line react/prop-types +export function Asyncapi3ChannelComparison({ className = '' }) { + const [hoverState, setHoverState] = useState({ + Paths: false, + PathItem: false, + Operation: false, + Message: false, + }); + + return ( +
+
+

AsyncAPI 2.x

+ +
+
setHoverState(prevState => ({ ...prevState, Paths: true }))} onMouseLeave={() => setHoverState({ Paths: false })}> + Channels + +
+
setHoverState(prevState => ({ ...prevState, PathItem: true }))} onMouseLeave={() => setHoverState({ PathItem: false })}> + Channel Item + +
+
setHoverState(prevState => ({ ...prevState, Operation: true }))} onMouseLeave={() => setHoverState({ Operation: false })}> + Operation (Publish and Subscribe) + +
+
+
setHoverState(prevState => ({ ...prevState, Message: true }))} onMouseLeave={() => setHoverState({ Message: false })}> + Messages +
+ Message + +
+ Headers +
+
+ Payload +
+
+
+
+
+
+
+
+
+
+
+
+
+

AsyncAPI 3.0

+ +
+
setHoverState(prevState => ({ ...prevState, Paths: true }))} onMouseLeave={() => setHoverState({ Paths: false })}> + Channels + +
setHoverState(prevState => ({ ...prevState, PathItem: true }))} onMouseLeave={() => setHoverState({ PathItem: false })}> + Channel Item +
+
setHoverState(prevState => ({ ...prevState, Message: true }))} onMouseLeave={() => setHoverState({ Message: false })}> + Messages +
+ Message + +
+ Headers +
+
+ Payload +
+
+
+
+
+
+
setHoverState(prevState => ({ ...prevState, Operation: true }))} onMouseLeave={() => setHoverState({ Operation: false })}> + Operations +
+
+ Operation +
+
+ action (send or receive) +
+
+ channel +
+
+ messages +
+
+
+
+
+
+
+
+ ) +} + +// eslint-disable-next-line react/prop-types +export function Asyncapi3IdAndAddressComparison({ className = '' }) { + const [hoverState, setHoverState] = useState({ + Paths: false, + PathItem: false, + }); + + return ( +
+
+

AsyncAPI 2.x

+ +
+
setHoverState(prevState => ({ ...prevState, Paths: true }))} onMouseLeave={() => setHoverState({ Paths: false })}> + Channels +
setHoverState(prevState => ({ ...prevState, PathItem: true }))} onMouseLeave={() => setHoverState({ PathItem: false })}> + Channel Item +
+
+
+
+
+

AsyncAPI 3.0

+ +
+
setHoverState(prevState => ({ ...prevState, Paths: true }))} onMouseLeave={() => setHoverState({ Paths: false })}> + Channels + +
setHoverState(prevState => ({ ...prevState, PathItem: true }))} onMouseLeave={() => setHoverState({ PathItem: false })}> + Channel Item + +
+
+ address +
+
+
+
+
+
+
+ ) +} + + +export function Asyncapi3ServerComparison({ className = '' }) { + const [hoverState, setHoverState] = useState({ + Host: false, + path: false, + Servers: false, + }); + + return ( +
+
+

AsyncAPI 2.x

+ +
+
+ Servers +
+
+ Server +
+
setHoverState(prevState => ({ ...prevState, Host: true, Path: true }))} onMouseLeave={() => setHoverState({ Host: false, Path: false })}> +

Url

+
+
+
+
+
+
+
+
+

AsyncAPI 3.0

+ +
+
+ Servers +
+
+ Server +
+
setHoverState(prevState => ({ ...prevState, Host: true }))} onMouseLeave={() => setHoverState({ Host: false })}> +

Host

+
+
setHoverState(prevState => ({ ...prevState, Path: true }))} onMouseLeave={() => setHoverState({ Path: false })}> +

Pathname

+
+
+
+
+
+
+
+
+ ) +} + +export function Asyncapi3MetaComparison({ className = '' }) { + const [hoverState, setHoverState] = useState({ + Info: false, + Tags: false, + External: false + }); + + return ( +
+
+

AsyncAPI 2.x

+ +
+
setHoverState(prevState => ({ ...prevState, Info: true }))} onMouseLeave={() => setHoverState({ Info: false })}> + Info +
+
+
setHoverState(prevState => ({ ...prevState, Tags: true }))} onMouseLeave={() => setHoverState({ Tags: false })}> +

Tags

+
+
setHoverState(prevState => ({ ...prevState, External: true }))} onMouseLeave={() => setHoverState({ External: false })}> +

External Docs

+
+
+
+
+
+

AsyncAPI 3.0

+ +
+
setHoverState(prevState => ({ ...prevState, Info: true }))} onMouseLeave={() => setHoverState({ Info: false })}> + Info +
+
setHoverState(prevState => ({ ...prevState, Tags: true }))} onMouseLeave={() => setHoverState({ Tags: false })}> +

Tags

+
+
setHoverState(prevState => ({ ...prevState, External: true }))} onMouseLeave={() => setHoverState({ External: false })}> +

External Docs

+
+
+
+
+
+
+ ) +} + + +// eslint-disable-next-line react/prop-types +export function Asyncapi3OperationComparison({ className = '' }) { + return ( +
+
+

AsyncAPI 2.x

+ +
+
+ Channels + +
+
+ Channel Item + +
+
+ Operation (Publish and Subscribe) +
+
+
+
+
+
+
+
+

AsyncAPI 3.0

+ +
+
+ Operations +
+
+ Operation + +
+
+ action (send or receive) +
+
+
+
+
+
+
+
+ ) +} + + +// eslint-disable-next-line react/prop-types +export function Asyncapi3SchemaFormatComparison({ className = '' }) { + const [hoverState, setHoverState] = useState({ + SchemaFormat: false, + Payload: false + }); + + return ( +
+
+

AsyncAPI 2.x

+ +
+
+ components | channels + +
+
+ messages + +
+
+ message +
+
setHoverState(prevState => ({ ...prevState, SchemaFormat: true }))} onMouseLeave={() => setHoverState({ SchemaFormat: false })}> + schemaFormat +
+ +
setHoverState(prevState => ({ ...prevState, Payload: true }))} onMouseLeave={() => setHoverState({ Payload: false })}> + payload +
+
+ schema +
+
+
+
+
+
+
+
+
+
+
+
+

AsyncAPI 3.0

+ +
+
+ components | channels + +
+
+ messages + +
+
+ message +
+
setHoverState(prevState => ({ ...prevState, Payload: true }))} onMouseLeave={() => setHoverState({ Payload: false })}> + payload + +
+
setHoverState(prevState => ({ ...prevState, SchemaFormat: true }))} onMouseLeave={() => setHoverState({ SchemaFormat: false })}> + schemaFormat +
+
+ schema +
+
+
+
+
+
+
+
+
+
+
+
+ ) +} diff --git a/components/AuthorAvatars.js b/components/AuthorAvatars.js index c3e740ff212..0ce49ba1fc4 100644 --- a/components/AuthorAvatars.js +++ b/components/AuthorAvatars.js @@ -1,15 +1,25 @@ +import React from 'react' export default function AuthorAvatars({ authors = [] }) { return ( authors.map((author, index) => { - let avatar = 0 ? `absolute left-${index * 7} top-0` : `relative mr-${(authors.length - 1) * 7}`} z-${(authors.length - 1 - index) * 10} h-10 w-10 border-2 border-white rounded-full object-cover hover:z-50`} - src={author.photo} - loading="lazy" - /> + let avatar = ( + 0 ? `absolute left-${index * 7} top-0` : `relative mr-${(authors.length - 1) * 7}`} z-${(authors.length - 1 - index) * 10} h-10 w-10 border-2 border-white rounded-full object-cover hover:z-50`} + src={author.photo} + loading="lazy" + data-testid="AuthorAvatars-img" + /> + ); - return author.link ? {avatar} : {avatar} + return author.link ? ( + + {avatar} + + ) : ( + {avatar} + ); }) - ) -} \ No newline at end of file + ); +} diff --git a/components/Calendar.js b/components/Calendar.js index 0a1388d2ccc..f4bd6c1039f 100644 --- a/components/Calendar.js +++ b/components/Calendar.js @@ -16,7 +16,7 @@ export default function Calendar({ className = '', size, text="text-left" }) {