-
-
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
feat: add extensive descriptions and examples to the schema v2.6.0 #394
feat: add extensive descriptions and examples to the schema v2.6.0 #394
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.
please update the PR and remove from it any changes that are not related to this PR but are a result of some weird autoformatter that you are using
in the meantime I will investigate what info
do not work, and if examples play well with YAML plugin
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.
why in definitions you have example
prop and then you remove it and add proper examples
, why not examples
from the start?
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.
looks like a lot of work that will bring quality-of-life improvements - thanks for doing it
@@ -13,38 +13,48 @@ | |||
}, | |||
"properties": { | |||
"url": { | |||
"type": "string" | |||
"type": "string", | |||
"description": "A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the AsyncAPI document is being served." |
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 don't agree that we should call this a URL, but I'm being a pedant... plus that's already in https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md#server-object so this isn't the PR to fix that in :-)
…r/spec-json-schemas into 2.6.0-schema-update
…r/spec-json-schemas into 2.6.0-schema-update
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 works well in VSCode ❤️
examples are not super nice as they are stringified
but it is because of yaml extension and https://github.com/redhat-developer/yaml-language-server/blob/main/src/languageservice/services/yamlHover.ts#L156 that should be updated to JSON.stringify(example, null, 4)
you only forgot about description for message definition
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 works well in VSCode ❤️
examples are not super nice as they are stringified
but it is because of yaml extension and https://github.com/redhat-developer/yaml-language-server/blob/main/src/languageservice/services/yamlHover.ts#L156 that should be updated to JSON.stringify(example, null, 4)
you only forgot about description for message definition
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.
also missing description in definitions/2.6.0/license.json
definitions/2.6.0/components.json do not match spec https://www.asyncapi.com/docs/reference/specification/v2.6.0#componentsObject
and yeah, message
@@ -1,6 +1,6 @@ | |||
{ | |||
"type": "object", | |||
"description": "An object representing a Server.", | |||
"description": "An object representing a message broker, a server or any other kind of computer program capable of sending and/or receiving data", |
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 is longer description in the spec
@@ -11,6 +11,9 @@ | |||
} | |||
] | |||
}, | |||
"example": { |
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 description of servers do not match spec
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.
also missing description in definitions/2.6.0/license.json
definitions/2.6.0/components.json do not match spec https://www.asyncapi.com/docs/reference/specification/v2.6.0#componentsObject
and yeah, message
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.
super happy you added it
can't wait for you rolling it out to previous versions and then to the 3.0 ❤️
thanks 🍻
/rtm |
🎉 This PR is included in version 5.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
So I decided to enhance the spec-json-schema to include additional info and examples. This will enable tools like Studio, spec-visualizer and vscode to have the ability to get more information when consuming the spec-json-schema
cc @derberg @smoya @fmvilas