Closed aeworxet closed 2 months ago
Latest commit: dc621f9dd24306f763a1d09a24936ac6772c65c0
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
@asyncapi/bounty_team
@aeworxet it would be worth adding a comment in https://github.com/asyncapi/parser-js/blob/master/packages/parser/src/validate.ts#L49 mentioning Spectral uses the https://github.com/stoplightio/yaml parser, and basically, JSON is a valid YAML doc, so no matters if you pass YAML or JSON, that YAML parser will be able to parse it.
Additionally, please add two new unit tests in for the validate method testing at least one string input for JSON and another for YAML.
Updated PR.
Credits for the pack of changes in packages/parser/test/parse.spec.ts
go to eslint --fix
; otherwise, Sonar complained.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
/rtm
This PR removes forceful normalization of YAML files to JSON format to fix https://github.com/asyncapi/parser-js/issues/936, which in its turn lays the foundation for reporting correct
range
values in error diagnostics for YAML files inStudio
.Related to https://github.com/asyncapi/parser-js/issues/1012