Skip to content

feat: add support for parse errors#23

Merged
char0n merged 1 commit intomasterfrom
char0n/parsing-errors
May 25, 2020
Merged

feat: add support for parse errors#23
char0n merged 1 commit intomasterfrom
char0n/parsing-errors

Conversation

@char0n
Copy link
Contributor

@char0n char0n commented May 25, 2020

If the underlying json-ast parser fails to parse the document, it will throw an error.
This error is translated into ApiDOM Annotation and embedded into ParserResult.

Special case of failure is when there is no parsing error but the shape of the data
is unexpected for the parser. So this case is more an unexpected failure. This case
will be handled in future by validator, that runs before the mapping visitors kics in.

Closes #4

If the underlying json-ast parser fails to parse the document, it will throw an error.
This error is translated into ApiDOM Annotation and embedded into ParserResult.

Special case of failure is when there is no parsing error but the shape of the data
is unexpected for the parser. So this case is more an unexpected failure. This case
will be handled in future by validator, that runs before the mapping visitors kics in.

Closes #4
@char0n char0n added enhancement New feature or request Javascript ApiDOM labels May 25, 2020
@char0n char0n added this to the M2 milestone May 25, 2020
@char0n char0n requested a review from frantuma May 25, 2020 13:43
@char0n char0n self-assigned this May 25, 2020
@char0n char0n merged commit b4392b2 into master May 25, 2020
@char0n char0n deleted the char0n/parsing-errors branch September 1, 2020 11:25
robert-hebel-sb added a commit that referenced this pull request Feb 25, 2026
Consolidate identical lint rules across OpenAPI 3.1 and 3.2 versions
to reduce duplication and improve maintainability.

Changes:
- Info Object: Consolidate allowed-fields rules (3.1 and 3.2 identical)
- License Object: Consolidate identifier-mutually-exclusive rules
  (3.1 and 3.2 identical except error code - using 3.1 code)

Files consolidated:
- info/lint/allowed-fields-3-1.ts + allowed-fields-3-2.ts
  → allowed-fields-3-1--3-2.ts
- license/lint/identifier--mutually-exclusive.ts +
  identifier--mutually-exclusive-3-2.ts
  → identifier--mutually-exclusive-3-1--3-2.ts

Addresses PR #5110 review comments #22 and #23.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Javascript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support parser errors

1 participant