Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ The latest draft specification can be found at [spec/asyncapi.md](./spec/asyncap

**The human-readable markdown file is the source of truth for the specification.**

- [Version 3.0.0](https://github.com/asyncapi/spec/blob/v3.0.0/spec/asyncapi.md) (latest) ([website](https://www.asyncapi.com/docs/reference/specification/latest))
- [Version 3.1.0](https://github.com/asyncapi/spec/blob/v3.1.0/spec/asyncapi.md) (latest) ([website](https://www.asyncapi.com/docs/reference/specification/latest))
<details>
<summary>Click to see reference links to older versions of the specification.</summary>

- [Version 3.0.0](https://github.com/asyncapi/spec/blob/v3.0.0/spec/asyncapi.md)
- [Version 2.6.0](https://github.com/asyncapi/spec/blob/v2.6.0/spec/asyncapi.md)
- [Version 2.5.0](https://github.com/asyncapi/spec/blob/v2.5.0/spec/asyncapi.md)
- [Version 2.4.0](https://github.com/asyncapi/spec/blob/v2.4.0/spec/asyncapi.md)
Expand Down
2 changes: 1 addition & 1 deletion examples/adeo-kafka-request-reply-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Adeo AsyncAPI Case Study
version: '%REPLACED_BY_MAVEN%'
Expand Down
2 changes: 1 addition & 1 deletion examples/anyof-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: AnyOf example
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/application-headers-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Application Headers example
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/correlation-id-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Correlation ID Example
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/gitter-streaming-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
id: 'tag:stream.gitter.im,2022:api'
info:
title: Gitter Streaming API
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0

info:
title: Kraken Websockets API
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0

info:
title: Kraken Websockets API
Expand Down
2 changes: 1 addition & 1 deletion examples/mercure-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Mercure Hub Example
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/not-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Not example
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/oneof-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: OneOf example
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/operation-security-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Notifications
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/rpc-client-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
id: 'urn:example:rpcclient'
info:
title: RPC Client Example
Expand Down
2 changes: 1 addition & 1 deletion examples/rpc-server-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
id: 'urn:example:rpcserver'
info:
title: RPC Server Example
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Account Service
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/slack-rtm-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
id: 'wss://wss-primary.slack.com/websocket'
info:
title: Slack Real Time Messaging API
Expand Down
2 changes: 1 addition & 1 deletion examples/social-media/backend/asyncapi.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Website Backend
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/social-media/comments-service/asyncapi.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Comments Service
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/social-media/frontend/asyncapi.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Website WebSocket Client
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/social-media/notification-service/asyncapi.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Notifications Service
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/social-media/public-api/asyncapi.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Public API
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/streetlights-kafka-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Streetlights Kafka API
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/streetlights-mqtt-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Streetlights MQTT API
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/streetlights-operation-security-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Streetlights Kafka API
version: 1.0.0
Expand Down
2 changes: 1 addition & 1 deletion examples/websocket-gemini-asyncapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asyncapi: 3.0.0
asyncapi: 3.1.0
info:
title: Gemini Market Data Websocket API
version: 1.0.0
Expand Down
8 changes: 6 additions & 2 deletions scripts/validation/embedded-examples-validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ async function validateParser(document, name) {
try {
const diagnostics = await parser.validate(document);

if (diagnostics.length > 0) {
diagnostics.forEach(diagnostic => {
// Ignore asyncapi-latest-version diagnostic - not relevant to this test and would require updating version each release
const filteredDiagnostics = diagnostics.filter(d => d.code !== 'asyncapi-latest-version');

if (filteredDiagnostics.length > 0) {
filteredDiagnostics.forEach(diagnostic => {

const errorMessage = `\x1b[31mError in ${name}: ${diagnostic.message}\x1b[0m`;
if (diagnostic.level === 'error') {
console.error(errorMessage);
Expand Down
24 changes: 14 additions & 10 deletions scripts/validation/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"author": "Animesh Kumar",
"license": "Apache-2.0",
"devDependencies": {
"@asyncapi/parser": "^3.4.0",
"@asyncapi/parser": "^3.6.0",
"js-yaml": "^4.1.1",
"json-merge-patch": "^1.0.2",
"jsonpointer": "^5.0.1"
Expand Down
100 changes: 100 additions & 0 deletions scripts/validation/validation_examples.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@

> validation@1.0.0 validate:examples
> node embedded-examples-validation.js


Number of examples extracted: 89

Info Object-json-format is valid.
Info Object-yaml-format is valid.
Contact Object-json-format is valid.
Contact Object-yaml-format is valid.
License Object-json-format is valid.
License Object-yaml-format is valid.
Servers Object-json-format is valid.
Servers Object-yaml-format is valid.
Server Object-json-format is valid.
Server Object-yaml-format is valid.
Server Object with pathname-json-format is valid.
Server Object with pathname-yaml-format is valid.
Server Object with Variable Object-json-format is valid.
Server Object with Variable Object-yaml-format is valid.
Default Content Type at root doc-json-format is valid.
Default Content Type at root doc-yaml-format is valid.
Channels Object-json-format is valid.
Channels Object-yaml-format is valid.
Channel Object-json-format is valid.
Channel Object-yaml-format is valid.
Messages Object-json-format is valid.
Messages Object-yaml-format is valid.
Operations Object-json-format is valid.
Operations Object-yaml-format is valid.
Operation Object-json-format is valid.
Operation Object-yaml-format is valid.
Operation Traits Object-json-format is valid.
Operation Traits Object-yaml-format is valid.
Operation Reply Address Object-json-format is valid.
Operation Reply Address Object-yaml-format is valid.
Channel Parameters Object-json-format is valid.
Channel Parameters Object-yaml-format is valid.
Channel Parameter Object-json-format is valid.
Channel Parameter Object-yaml-format is valid.
Message Object-json-format is valid.
Message Object-yaml-format is valid.
Message Object-json-format is valid.
Message Object-yaml-format is valid.
Message Trait Object-json-format is valid.
Message Trait Object-yaml-format is valid.
Message Example Object-json-format is valid.
Message Example Object-yaml-format is valid.
Tag Object-json-format is valid.
Tag Object-yaml-format is valid.
External Docs Object-json-format is valid.
External Docs Object-yaml-format is valid.
Reference Object-json-format is valid.
Reference Object-yaml-format is valid.
Components Object-json-format is valid.
Components Object-yaml-format is valid.
Multi Format Schema Object - Avro-yaml-format is valid.
Schema Object - Primitive-json-format is valid.
Schema Object - Primitive-yaml-format is valid.
Schema Object - Simple model-json-format is valid.
Schema Object - Simple model-yaml-format is valid.
Schema Object - Map-Dictionary model-json-format is valid.
Schema Object - Map-Dictionary model-yaml-format is valid.
Schema Object - Allowing Complex model-json-format is valid.
Schema Object - Allowing Complex model-yaml-format is valid.
Schema Object - With examples model-json-format is valid.
Schema Object - With examples model-yaml-format is valid.
Schema Object - With boolean model-json-format is valid.
Schema Object - With boolean model-yaml-format is valid.
Schema Object - With composition model-json-format is valid.
Schema Object - With composition model-yaml-format is valid.
Schema Object - With polymorphism model-json-format is valid.
Schema Object - With polymorphism model-yaml-format is valid.
Security Scheme Object - user-pass-json-format is valid.
Security Scheme Object - user-pass-yaml-format is valid.
Security Scheme Object - API key auth-json-format is valid.
Security Scheme Object - API key auth-yaml-format is valid.
Security Scheme Object - X.509-json-format is valid.
Security Scheme Object - X.509-yaml-format is valid.
Security Scheme Object - end to end encryption-json-format is valid.
Security Scheme Object - end to end encryption-yaml-format is valid.
Security Scheme Object - basic-json-format is valid.
Security Scheme Object - basic-yaml-format is valid.
Security Scheme Object - API key-json-format is valid.
Security Scheme Object - API key-yaml-format is valid.
Security Scheme Object - JWT-json-format is valid.
Security Scheme Object - JWT-yaml-format is valid.
Security Scheme Object - implicity OAuth2-json-format is valid.
Security Scheme Object - implicity OAuth2-yaml-format is valid.
Security Scheme Object - SASL-json-format is valid.
Security Scheme Object - SASL-yaml-format is valid.
Security Scheme OAuth Flow Object-json-format is valid.
Security Scheme OAuth Flow Object-yaml-format is valid.
Message Correlation ID Object-json-format is valid.
Message Correlation ID Object-yaml-format is valid.


Validation process complete!
Check logs for any errors.
Loading