Skip to content

Commit

Permalink
Merge branch 'next-major-spec' into docs-add-server
Browse files Browse the repository at this point in the history
  • Loading branch information
kakabisht authored Nov 16, 2023
2 parents afb5743 + 8f5b024 commit eb5cc24
Show file tree
Hide file tree
Showing 42 changed files with 3,400 additions and 17,082 deletions.
562 changes: 562 additions & 0 deletions components/Asyncapi3Comparison.js

Large diffs are not rendered by default.

38 changes: 28 additions & 10 deletions components/DemoAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function DemoAnimation({ className = '' }) {
const common = (
<>
<div>
<span className="text-teal-400">asyncapi:</span> 2.6.0
<span className="text-teal-400">asyncapi:</span> 3.0.0
</div>
<div>
<span className="text-teal-400">info:</span>
Expand Down Expand Up @@ -85,10 +85,34 @@ export default function DemoAnimation({ className = '' }) {
<span className="text-teal-400">channels:</span>
</div>
<div>
<span className="text-yellow-300">&nbsp;&nbsp;user/signedup:</span>
<span className="text-yellow-300">&nbsp;&nbsp;userSignedup:</span>
</div>
<div>
<span className="text-purple-400">&nbsp;&nbsp;&nbsp;&nbsp;subscribe:</span>
<span className="text-purple-400">&nbsp;&nbsp;&nbsp;&nbsp;address:</span><span className="text-teal-200">'user/signedup'</span>
</div>
<div>
<span className="text-teal-400">&nbsp;&nbsp;&nbsp;&nbsp;messages:</span>
</div>
<div>
<span className="text-yellow-300">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;userSignedupMessage:</span>
</div>
<div>
<span className="text-teal-200">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ref:</span><span className="text-teal-200">'#/components/messages/UserSignedUp'</span>
</div>
<div>
<span className="text-teal-400">operations:</span>
</div>
<div>
<span className="text-yellow-300">&nbsp;&nbsp;processUserSignups:</span>
</div>
<div>
<span className="text-purple-400">&nbsp;&nbsp;&nbsp;&nbsp;action:</span><span className="text-teal-200">'receive'</span>
</div>
<div>
<span className="text-teal-400">&nbsp;&nbsp;&nbsp;&nbsp;channel:</span>
</div>
<div>
<span className="text-teal-200">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ref:</span><span className="text-teal-200"> '#/channels/userSignedup'</span>
</div>
<Typing.Delay ms={500} />
</>,
Expand All @@ -99,12 +123,6 @@ export default function DemoAnimation({ className = '' }) {
function renderUntilMessagePayload(callback) {
return renderTyping(
<>
<div>
<span className="text-teal-400">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;message:</span>
</div>
<div>
<span className="text-teal-200">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$ref:</span><span className="text-teal-200"> '#/components/messages/UserSignedUp'</span>
</div>
<div>
<span className="text-teal-400">components:</span>
</div>
Expand Down Expand Up @@ -242,7 +260,7 @@ export default function DemoAnimation({ className = '' }) {
</div>

<div className={transitionClassNames(showChannelsAndOperation)}>
<span className="px-3 py-2 mr-2 bg-green-500 text-white font-bold rounded">SUB</span> <span className="text-lg text-gray-700">user/signedup</span>
<span className="px-3 py-2 mr-2 bg-green-500 text-white font-bold rounded">RECEIVES</span> <span className="text-lg text-gray-700">user/signedup</span>
</div>

<div className={transitionClassNames(showUntilMessagePayload)}>
Expand Down
14 changes: 8 additions & 6 deletions components/GeneratorInstallation.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ export default function GeneratorInstallation({ }) {
}

function getNpmCode() {
return `npm install -g @asyncapi/generator
ag ${specPath} ${template} ${params}`
return `npm install -g @asyncapi/cli
asyncapi generate fromTemplate ${specPath} ${template} ${params}`
}

function getDockerCode() {
return `docker run --rm -it -v \${PWD}/example:/app/example \\
asyncapi/generator ${specPath} ${template} ${params}`
return `docker run --rm -it -v \${PWD}/example:/app/example -v \${PWD}/output:/app/output \\
asyncapi/cli generate fromTemplate ${specPath} ${template} ${params}`
}

return (
Expand All @@ -56,10 +56,12 @@ asyncapi/generator ${specPath} ${template} ${params}`
codeBlocks={[{
language: 'npm',
code: getNpmCode(),
}, {
},
{
language: 'Docker',
code: getDockerCode(),
}]}
},
]}
/>
</div>
)
Expand Down
226 changes: 226 additions & 0 deletions components/OpenAPIComparisonV3.js

Large diffs are not rendered by default.

14 changes: 12 additions & 2 deletions components/data/buckets.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import IconUseCases from '../icons/UseCases'
import IconGuide from '../icons/Guide'
import IconSpec from '../icons/Spec'
import IconUsers from '../icons/Users'
import IconMigration from '../icons/Migration'

export const buckets = [
{
Expand Down Expand Up @@ -51,7 +52,16 @@ export const buckets = [
borderClassName: 'border-yellow-200',
Icon: IconSpec,
},
{
{
name: 'migration',
title: 'Migration',
description: 'Our migration guides on how to upgrade to newer AsyncAPI versions.',
link: '/docs/migration',
className: 'bg-blue-400',
borderClassName: 'border-blue-400',
Icon: IconMigration,
},
{
name: 'community',
title: 'Community',
description: 'Our Community section documents the community guidelines and resources.',
Expand All @@ -61,7 +71,7 @@ export const buckets = [
Icon: IconUsers,
},
].map(bucket => {
// we need such a mapping for some parts of website, e.g navigation blocks use the `icon` property, not `Icon` etc.
// we need such a mapping for some parts of website, e.g navigation blocks use the `icon` property, not `Icon` etc.
return {
...bucket,
href: bucket.link,
Expand Down
15 changes: 15 additions & 0 deletions components/icons/Migration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default function IconUsers({ ...rest }) {
// <!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
return (
<svg
width="800px"
height="800px"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
{...rest}
>
<path d="M550.208 960H209.28A81.792 81.792 0 0 1 128 877.76V146.24A81.92 81.92 0 0 1 209.344 64h613.632a81.92 81.92 0 0 1 81.28 82.432v405.76a29.824 29.824 0 1 1-59.584 0V146.56a22.272 22.272 0 0 0-21.76-22.656H209.408a22.08 22.08 0 0 0-21.696 22.528v731.52a21.76 21.76 0 0 0 21.44 22.464h341.056a29.824 29.824 0 0 1 0.064 59.584z m196.352-600.96H285.824a29.824 29.824 0 1 1 0-59.712h460.8a29.824 29.824 0 1 1 0 59.712z m-204.8 156.8H285.824a29.824 29.824 0 1 1 0-59.712h255.936a29.824 29.824 0 1 1 0 59.648z m179.2 391.936c-101.12 0-183.424-83.84-183.424-186.624a29.824 29.824 0 1 1 59.712 0c0 70.016 55.552 126.976 123.584 126.976 17.408 0 34.24-3.712 50.048-10.88a29.888 29.888 0 0 1 24.768 54.336c-23.552 10.688-48.64 16.192-74.688 16.192z m153.6-156.8a29.824 29.824 0 0 1-29.824-29.824c0-70.016-55.552-126.976-123.648-126.976-16.32 0-32.384 3.2-47.36 9.6a29.888 29.888 0 0 1-23.424-54.912 180.224 180.224 0 0 1 70.784-14.336c101.12 0 183.424 83.84 183.424 186.624a30.016 30.016 0 0 1-29.952 29.824z m-204.8-104.576h-51.264a29.76 29.76 0 0 1-25.28-14.08 30.144 30.144 0 0 1-1.536-28.928l25.6-52.352a29.696 29.696 0 0 1 53.632 0l25.6 52.352a29.696 29.696 0 0 1-1.472 28.928 29.504 29.504 0 0 1-25.28 14.08z m127.552 269.568h-1.024a29.696 29.696 0 0 1-24.896-14.848l-25.6-44.288a29.888 29.888 0 0 1 23.808-44.672l58.048-4.032c11.392-0.704 22.144 5.12 27.904 14.848a30.016 30.016 0 0 1-1.024 31.616l-32.448 48.256a29.824 29.824 0 0 1-24.768 13.12z" fill="#000000" />
</svg>
);
}
18 changes: 9 additions & 9 deletions components/icons/Users.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
export default function IconUsers({ ...rest }) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="1.3"
strokeLinecap="round"
<svg
xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="1.3"
strokeLinecap="round"
strokeLinejoin="round"
{...rest}
>
Expand Down
2 changes: 2 additions & 0 deletions components/navigation/learningItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import IconPlant from '../icons/Plant'
import IconGuide from '../icons/Guide'
import IconPaper from '../icons/Paper'
import IconUsers from '../icons/Users'
import IconMigration from '../icons/Migration'

export default [
{ href: '/docs/concepts', icon: IconRocket, className: 'bg-secondary-200', title: 'Concepts', description: 'Our Concepts section defines the concepts of AsyncAPI features and capabilities.' },
{ href: '/docs/tutorials', icon: IconGradCap, className: 'bg-pink-100', title: 'Tutorials', description: 'Our Tutorials section teaches beginner processes with AsyncAPI, guiding you from Point A to Point B.' },
{ href: '/docs/tools', icon: IconPlant, className: 'bg-green-200', title: 'Tools', description: 'Our Tools section documents the AsyncAPI tools ecosystem.' },
{ href: '/docs/guides', icon: IconGuide, className: 'bg-primary-200', title: 'Guides', description: `Our Guides section teaches AsyncAPI's capabilities at a high level.` },
{ href: '/docs/reference', icon: IconPaper, className: 'bg-yellow-200', title: 'Reference', description: `Our Reference section documents the AsyncAPI specification.` },
{ href: '/docs/migration', icon: IconMigration, className: 'bg-blue-400', title: 'Migrations', description: `Our migration guides on how to upgrade to newer AsyncAPI versions.` },
{ href: '/docs/community', icon: IconUsers, className: 'bg-red-200', title: 'Community', description: `Our Community section documents the community guidelines and resources.` },
]
40 changes: 40 additions & 0 deletions cypress/test/Asyncapi3Comparison.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { mount } from '@cypress/react'
import {Asyncapi3Comparison, Asyncapi3ChannelComparison, Asyncapi3IdAndAddressComparison, Asyncapi3MetaComparison, Asyncapi3OperationComparison, Asyncapi3SchemaFormatComparison, Asyncapi3ServerComparison} from '../../components/Asyncapi3Comparison'

describe('Asyncapi3Comparison.cy', () => {
describe('Asyncapi3Comparison', () => {
it('renders without errors', () => {
mount(<Asyncapi3Comparison />);
});
});
describe('Asyncapi3ChannelComparison', () => {
it('renders without errors', () => {
mount(<Asyncapi3ChannelComparison />);
});
});
describe('Asyncapi3IdAndAddressComparison', () => {
it('renders without errors', () => {
mount(<Asyncapi3IdAndAddressComparison />);
});
});
describe('Asyncapi3MetaComparison', () => {
it('renders without errors', () => {
mount(<Asyncapi3MetaComparison />);
});
});
describe('Asyncapi3OperationComparison', () => {
it('renders without errors', () => {
mount(<Asyncapi3OperationComparison />);
});
});
describe('Asyncapi3SchemaFormatComparison', () => {
it('renders without errors', () => {
mount(<Asyncapi3SchemaFormatComparison />);
});
});
describe('Asyncapi3ServerComparison', () => {
it('renders without errors', () => {
mount(<Asyncapi3ServerComparison />);
});
});
});
18 changes: 14 additions & 4 deletions pages/blog/release-notes-3.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type: Communication
tags:
- Specification
- Release Notes
cover: /img/posts/release-notes-2.4.0/cover.webp
cover: /img/posts/release-notes-3.0.0/cover.webp
authors:
- name: Jonas Lagoni
photo: /img/avatars/jonaslagoni.webp
Expand Down Expand Up @@ -70,6 +70,8 @@ channels:
...
```

Related to: [#94](https://github.com/asyncapi/spec/issues/94) | Pull request: [#827](https://github.com/asyncapi/spec/pull/827)

### Publish and subscribe confusion
In v2, the `publish` and `subscribe` operation keywords have always been confusing. Does it mean my application publishes to the channel? Does it mean you publish for me? Who are you in this context?

Expand Down Expand Up @@ -122,6 +124,7 @@ We have seen many use cases where an AsyncAPI document has been used as a form o

```
asyncapi: 3.0.0
...
components:
...
```
Expand All @@ -136,6 +139,7 @@ The server security information is also now an array instead of an object.

```
asyncapi: 3.0.0
...
servers:
SomeServer:
security:
Expand All @@ -144,7 +148,6 @@ channels:
SomeChannel:
servers:
- $ref: '#/servers/SomeServer'
...
components:
securitySchemes:
SomeSecurity:
Expand All @@ -162,6 +165,7 @@ There has been some inconsistency between which metadata fields are available in

```
asyncapi: 3.0.0
...
servers:
SomeServer:
title: Some Server title
Expand All @@ -188,6 +192,7 @@ Therefore the root `tags` and `externalDocs` have been moved to the info object.

```
asyncapi: 3.0.0
...
info:
...
externalDocs:
Expand All @@ -205,6 +210,7 @@ There has been some confusion about what the `url` of a server should contain; i

```
asyncapi: 3.0.0
...
servers:
localhost:
host: localhost
Expand All @@ -225,6 +231,7 @@ This is a bit of a mixture between some of the features, that all added a little

```
asyncapi: 3.0.0
...
components:
...
replies:
Expand Down Expand Up @@ -281,6 +288,7 @@ In v3, schemaFormat has been removed from the message object and message trait o

```
asyncapi: 3.0.0
...
components:
schemas:
avroSchema:
Expand All @@ -303,6 +311,7 @@ Parameters can now only have the following properties: `enum`, `default`, `descr

```
asyncapi: 3.0.0
...
channels:
userSignup:
address: user/{userId}/signedup
Expand All @@ -313,7 +322,7 @@ channels:

Issues: [#583](https://github.com/asyncapi/spec/issues/583) | Pull request: [#935](https://github.com/asyncapi/spec/pull/935) | Specification information: https://www.asyncapi.com/docs/reference/specification/v3.0.0-next-major-spec.12#parameterObject

### Editorial changes
### Editorial Changes

We have [removed the note that stated we strived to be compatible with OpenAPI where possible]([#933](https://github.com/asyncapi/spec/pull/933)) because, with the recent changes, this is no longer the case. That said, we still strive to make the different specs as interoperable as possible i.e., with Avro, RAML, OpenAPI Schema, etc.

Expand All @@ -322,4 +331,5 @@ Spec 3.0 have been a massive undertaking, so I would like to say a huge "thank y

Thank you, xxxxxxxxxxxxxxxxx

> Photo by <a href="https://unsplash.com/@andurache?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Alexandru Tudorache</a> on <a href="https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
> Photo by <a href="https://unsplash.com/@jonathanborba?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Jonathan Borba</a> on <a href="https://unsplash.com/images/nature/sun?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
4 changes: 2 additions & 2 deletions pages/docs/community/_section.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
title: 'Community'
weight: 6
---
weight: 7
---
2 changes: 1 addition & 1 deletion pages/docs/concepts/asyncapi-document/_section.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
title: AsyncAPI document
title: 'AsyncAPI Document'
weight: 50
---
Loading

0 comments on commit eb5cc24

Please sign in to comment.