generator
generator copied to clipboard
[📑 Docs]: Provide content for `Parser` document
What Dev Docs changes are you proposing?
https://github.com/asyncapi/generator/blob/master/docs/parser.md
I'm still not 100% sure that Parser is a good name of the document. Maybe it should just be a part of a different document. What do you think?
Nevertheless the scope is:
- generator uses AsyncAPI JS Parser to first validate if the AsyncAPI file provided by the user follows the specification. At the end, Parser returns
AsyncAPIDocumentinstance with a set of helper functions that enable easier access to contents of AsyncAPI file - share simple example. Maybe show AsyncAPI document in JSON format with a message in it. Simple document (you can modify streetlight example) that has 2 channels and each has one operation with one message. Show how you would access single message by operating on simple JSON. And then explain "what if you want to list all messages". And say "yeah, this is what parser is for, as
AsyncAPIDocumentgives you access toallMessages()that returns a Map of all the messages. Link to https://github.com/asyncapi/parser-js/blob/master/API.md - mention that in generator not only parser is included but also its plugins for parsing schema formats like avro, or openapi schema. Tell user that usage of parser allows template developer to also easily access schema provided in avro or other formats because the JavaScript parser converts these into JSON Schema.
- in the end say that
AsyncAPIDocumentis part of the template context -> and of course link to the document that will be created :smiley:
cc @pratik2315 @Florence-Njeri
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Hey there! I'll be working on this issue for Parser documentation.
:tada: This issue has been resolved in version 1.9.15 :tada:
The release is available on:
Your semantic-release bot :package::rocket: