-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update readme.md with overview and custom validation sections #243
Changes from 5 commits
a754665
4a3c27e
f9372a1
8ddf475
7eb2a1e
45aef8a
4c37ef6
f48859d
a5165d8
25e9a30
92a20ae
bd98240
8d6bbf3
ebd2e14
be0197f
9a3f08b
2e92c06
c50bbc9
d9c9053
1d47076
08ba891
4e15da8
27c1474
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,37 @@ | ||
|
||
|
||
|
||
![npm](https://img.shields.io/npm/v/@asyncapi/specs?style=for-the-badge) ![npm](https://img.shields.io/npm/dt/@asyncapi/specs?style=for-the-badge) | ||
|
||
> If you are currently using version 2, check out [migration guideline to version 3](./migrations/Migrate%20to%20version%203.md). You might be able to update it without any change. | ||
# AsyncAPI | ||
|
||
This is a mono repository, which provides all the JSON Schema documents for validating AsyncAPI documents. | ||
|
||
## Overview | ||
* This repository contains [JSON Schema](https://json-schema.org) files for all the versions of AsyncAPI specification. | ||
* These JSON Schema files do not reflect 1:1 the specification and shouldn't be treated as specification itself but rather as a tool for things like validation e.t.c | ||
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* These JSON Schema files shouldn't be used as the only tool for validating AsyncAPI documents because some rules described in the AsyncAPI specification are not described with JSON Schema. | ||
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* In addition, this repo provides JavaScript and Go modules that make it easier to access JSON Schema files through code. | ||
|
||
derberg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## Custom Validation Needs | ||
* The JSON Schema does not cover all validation cases, and if you decide to validate AsyncAPI tools with only JSON Schema provided in this repo, you risk having the AsyncAPI documents not working in tandem with all AsyncAPI tools, and this will affect validation. | ||
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* It's recommended to use [AsyncAPI JavaScript Parser](https://github.com/asyncapi/parser-js) that not only uses AsyncAPI JSON Schema file for validation but also implements additional custom validations. | ||
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The following additional custom validations need to be provided: | ||
* Validate if variables provided in the url property have corresponding variable object defined and if the example is correct | ||
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Validate if operationIds are duplicated in the document | ||
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Validate if messageIds are duplicated in the document | ||
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Validate if server security is declared properly and the name has a corresponding server securitySchemes definition in components with the same name | ||
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Validate if given server securitySchemes is a proper empty array when security type requires it | ||
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Validate if parameters specified in the channel name have corresponding parameters object defined and if name does not contain url parameters. | ||
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Validate if all servers listed for a channel in servers property are declared in the top-level servers object. | ||
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Validate if tags specified in the objects have no duplicates. Check is done for: root, operations, operation traits, channels, messages and message traits. | ||
Dindihub marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* At the moment, AsyncAPI JavaScript parser do not cover all validation cases yet | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this also should not be a bullet list element as it is not one of custom validations that user have to provide There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Dindihub I think you missed this comment, line 24 should not be part of bullet list There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. Sorry missed that one. Thnaks |
||
|
||
All test cases and parsers coverage can be found [here](https://asyncapi.github.io/tck/) | ||
|
||
|
||
## Installation | ||
|
||
### NodeJS | ||
|
@@ -106,3 +133,6 @@ The manual process of creating a new version is to: | |
] | ||
} | ||
``` | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. some not needed empty spaces There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi. I have worked on the changes suggested. And thanks for the reference Doc. It helped. Please review. |
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some not needed empty spaces