-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
feat: add x-parser-spec-parsed extension #288
feat: add x-parser-spec-parsed extension #288
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.
lgtm, can you just please add some comment here so we do not have to dig in the history later on to figure out why we assign this prop.
Tbh, we already have so many parser specific extensions that I think it is about time to think about documenting them 😅 what do you think?
also, tests are failing and sonarcloud complains, have a look |
@derberg Thanks! I will fix tests and sonar clouds errors (I wrote PR yesterday about 23pm 😅).
Something like that? ## Custom extensions
Parser during validation and parsing adds custom extensions (started by `x-parser`) that add additional information about the specification:
| Name | Value | Location | Description |
|---|---|---|
| `x-parser-spec-parsed` | `true` | Root of parsed specification | Indicates that specification is parsed | |
then maybe I should actually do a deeper code review 🤔 😆 for the docs, you went to far, just add a comment in code, readme is something for a followup, don't spend to much on it now, just open an issue if you want |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
🎉 This PR is included in version 1.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Add
x-parser-spec-parsed: true
extension to root of parsed spec, similar likex-parser-message-parsed
to avoid unnecessary calculations. I have use case when I stringify parsed spec (see issue) and after stringification I must pass this spec again toAsyncAPIDocument
constructor. Also I fixed bug, because when we are assigning anonymous id of anonymous message we should first check that id is defined - for schemas we do it.Related issue(s)
See asyncapi/html-template#166 (review) especially part with: