-
-
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
Conversation
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.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
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.
@Dindihub thanks so much for taking the time to submit this PR 🙏🏼
I left some feedback.
In additional:
- please update description, you need to explicitly write
Resolves ISSUE_NUMBER
to make sure automated closing after merge will work - please move these 2 sections up in the structure of the readme, they should be the first sections that user sees
README.md
Outdated
@@ -106,3 +106,25 @@ The manual process of creating a new version is to: | |||
] | |||
} | |||
``` | |||
|
|||
## Overview | |||
* This repository contains JSON Schema files for all the versions of AsyncAPI specification. You can link to https://json-schema.org/ for reference. |
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.
* This repository contains JSON Schema files for all the versions of AsyncAPI specification. You can link to https://json-schema.org/ for reference. | |
* This repository contains [JSON Schema](https://json-schema.org/ for reference) files for all the versions of AsyncAPI specification. |
README.md
Outdated
## Overview | ||
* This repository contains JSON Schema files for all the versions of AsyncAPI specification. You can link to https://json-schema.org/ for reference. | ||
* 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 | ||
* These JSON Schema files should'nt be used as the only tool for validation of AsyncAPI documents because some rules described in the AsyncAPI specification are not described here. |
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.
* These JSON Schema files should'nt be used as the only tool for validation of AsyncAPI documents because some rules described in the AsyncAPI specification are not described here. | |
* 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. |
README.md
Outdated
* These JSON Schema files should'nt be used as the only tool for validation of AsyncAPI documents because some rules described in the AsyncAPI specification are not described here. | ||
|
||
## Custom Validation Needs | ||
* The JSON Schema does not cover all validation cases, and if a user decides to validate AsyncAPI tools with only JSON Schema provided in this repo, they risk having the AsyncAPI documents not working in tandem with all AsyncAPI tools and this will affect validation. |
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.
* The JSON Schema does not cover all validation cases, and if a user decides to validate AsyncAPI tools with only JSON Schema provided in this repo, they risk having the AsyncAPI documents not working in tandem with all AsyncAPI tools and this will affect validation. | |
* 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. |
README.md
Outdated
|
||
## Custom Validation Needs | ||
* The JSON Schema does not cover all validation cases, and if a user decides to validate AsyncAPI tools with only JSON Schema provided in this repo, they risk having the AsyncAPI documents not working in tandem with all AsyncAPI tools and this will affect validation. | ||
* It's recommended to use the custom validation tool provided at https://github.com/asyncapi/parser-js as we look on implementing a comprehensive validation tool. |
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.
* It's recommended to use the custom validation tool provided at https://github.com/asyncapi/parser-js as we look on implementing a comprehensive validation tool. | |
* 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. |
README.md
Outdated
6. Validate if parameters specified in the channel name have corresponding parameters object defined and if name does not contain url parameters. | ||
7. Validate if all servers listed for a channel in servers property are declared in the top-level servers object. | ||
8. Validate if tags specified in the objects have no duplicates. Check is done for: root, operations, operation traits, channels, messages and message traits. | ||
* At the moment, Parser-js do not cover all validation cases yet,all test cases and parsers coverage can be found here -> https://asyncapi.github.io/tck/ |
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.
* At the moment, Parser-js do not cover all validation cases yet,all test cases and parsers coverage can be found here -> https://asyncapi.github.io/tck/ | |
* At the moment, AsyncAPI JavaScript parser do not cover all validation cases yet | |
* All test cases and parsers coverage can be found [here](https://asyncapi.github.io/tck/) |
README.md
Outdated
* It's recommended to use the custom validation tool provided at https://github.com/asyncapi/parser-js as we look on implementing a comprehensive validation tool. | ||
|
||
* The following additional custom validations need to be provided: | ||
1. Validate if variables provided in the url property have corresponding variable object defined and if the example is correct |
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.
this should be the bullet list as the order doesn't matter.
ordering by number should be used only if the order makes a difference
README.md
Outdated
8. Validate if tags specified in the objects have no duplicates. Check is done for: root, operations, operation traits, channels, messages and message traits. | ||
* At the moment, Parser-js do not cover all validation cases yet,all test cases and parsers coverage can be found here -> https://asyncapi.github.io/tck/ | ||
|
||
All names of objects/properties can be double-checked with https://www.asyncapi.com/docs/reference/specification/v2.4.0 |
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.
this was just a note for you in my input, so when you write this readme doc, you use proper names, and put them in code and capitalize them when needed. This is why in my input I for example wrote operationId
and not operationId. It matters a lot in tech content, because it indicates that it is not just a word to describe something but actually technical term used in technology you describe.
I hope that makes sense 😅 let me know if you have some doubts
please address this type of highlighting
in the list of custom validations
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.
Noted. Let me review and make a new PR.
README.md
Outdated
* At the moment, AsyncAPI JavaScript parser do not cover all validation cases yet | ||
* All test cases and parsers coverage can be found [here](https://asyncapi.github.io/tck/) |
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.
this should not be part of bullet list of custom validations cases. There should be a separate paragraph below the bullet list
README.md
Outdated
![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/ for reference) files for all the versions of AsyncAPI specification. |
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.
I always recommend to check the preview of the markdown and trying to click links, this one is a broken link
* This repository contains [JSON Schema](https://json-schema.org/ for reference) files for all the versions of AsyncAPI specification. | |
* This repository contains [JSON Schema](https://json-schema.org) files for all the versions of AsyncAPI specification. |
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.
Noted.Let me check on the suggestions. Thanks
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.
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.
I left some additional comments,
I think one problem here is that you make changes only on local, but sometimes it is easier to do it directly in PR when I prepare for you exact solution
@@ -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 comment
The 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 comment
The 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.
README.md
Outdated
@@ -1,10 +1,37 @@ | |||
|
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
README.md
Outdated
* Validate if parameters specified in the channel name have corresponding parameters object defined and if name does not contain url parameters. | ||
* Validate if all servers listed for a channel in servers property are declared in the top-level servers object. | ||
* Validate if tags specified in the objects have no duplicates. Check is done for: root, operations, operation traits, channels, messages and message traits. | ||
* 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 comment
The 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Sorry missed that one. Thnaks
Co-authored-by: Lukasz Gornicki <lpgornicki@gmail.com>
Co-authored-by: Lukasz Gornicki <lpgornicki@gmail.com>
Changed line 24 from bullet ist to paragraph.
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.
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.
Left some comments, hope they help!
Co-authored-by: Fran Méndez <fmvilas@gmail.com>
Co-authored-by: Fran Méndez <fmvilas@gmail.com>
Co-authored-by: Fran Méndez <fmvilas@gmail.com>
Co-authored-by: Fran Méndez <fmvilas@gmail.com>
Co-authored-by: Fran Méndez <fmvilas@gmail.com>
Co-authored-by: Fran Méndez <fmvilas@gmail.com>
Co-authored-by: Fran Méndez <fmvilas@gmail.com>
Co-authored-by: Fran Méndez <fmvilas@gmail.com>
Co-authored-by: Fran Méndez <fmvilas@gmail.com>
Co-authored-by: Fran Méndez <fmvilas@gmail.com>
Co-authored-by: Fran Méndez <fmvilas@gmail.com>
Co-authored-by: Fran Méndez <fmvilas@gmail.com>
I have committed the new suggestions. Thanks for the input |
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.
LGTM 👍
Requesting another review from @derberg since there were lots of changes.
Sure |
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.
This looks good to me - adds useful clarifications
Kudos, SonarCloud Quality Gate passed! |
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.
Thanks so much @Dindihub 🙇🏼
/rtm |
🎉 This PR is included in version 3.2.0-next-major-spec.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 3.2.0-next-spec.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 3.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Related issue(s)
#240