Description
Reason/Context
Parser-JS 2.0 (released as rc at this moment) is a completely new parser, with a lot of changes. The bigger ones are:
- Completely rewritten to TS.
- Implements the new parser-api, in particular, the version found in this PR.
- Uses Spectral as parser/linter with the AsyncAPI ruleset.
- Lots of other improvements, especially around Developer Experience.
Considering that Spectral now validates the documents before parsing, we had to update the interface for Schema parsers to separate validation from parsing. This change also introduced better errors and the way we handle them. (see this issue and related).
FYI, Spectral addition was discussed starting in asyncapi/parser-js#481 (comment), ending in asyncapi/parser-js#481 (comment). Also asyncapi/parser-js#477 (comment). Also during some 3.0 meetings.
To not pollute every single schema parser repository and to simplify development, the schema parsers have been temporarily included in the same source code as the Parser-JS 2.0. Once tested, the idea is to move those back to their own repositories.
Description
The work to be done is to move back this schema parser from https://github.com/asyncapi/parser-js/tree/next-major/src/schema-parser to this repository.
This includes:
- Copy-pasting the schema parser code from the Parser-JS 2.0
next-major
repository to this one. - Enable Typescript compilation.
- To release a new major version, since the interface has changed.
Please feel free to drop your questions and concerns.