Skip to content
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: use @stoplight/better-ajv-errors #1236

Merged
merged 2 commits into from
Jun 18, 2020

Conversation

P0lip
Copy link
Contributor

@P0lip P0lip commented Jun 17, 2020

Fixes #1223 #455

Note - I'm going to publish @stoplight/better-ajv-errors to npm, so the git url is temporary.

Checklist

  • Tests added / updated
  • Docs added / updated

Does this PR introduce a breaking change?

  • Yes
  • No

@P0lip P0lip requested a review from nulltoken June 17, 2020 21:47
@P0lip P0lip self-assigned this Jun 17, 2020
@@ -106,7 +106,7 @@ describe(`Rule '${ruleName}'`, () => {
expect(results).toEqual([
expect.objectContaining({
code: ruleName,
message: 'Object should have required property `value`',
message: '`1` property should have required property `value`',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@P0lip This dependency change brings very interesting results messages. I actually never noticed the Object should have requi... pattern before.

Copy link
Contributor

@nulltoken nulltoken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@P0lip Just for my info, how complex will it be to maintain (and keep up-to-date) a forked version of better-ajv-errors?

@P0lip
Copy link
Contributor Author

P0lip commented Jun 18, 2020

, how complex will it be to maintain (and keep up-to-date) a forked version of better-ajv-errors?

should be relatively cheap, given the fact the upstream package isn't very active.
image
Code-wise, our fork is quite small - it's about 300 LoC when bundled.
We could even consider moving this to Spectral repo one day.

@P0lip P0lip merged commit ec986c9 into develop Jun 18, 2020
@P0lip P0lip deleted the chore/use-forked-better-ajv-errors branch June 18, 2020 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JavaScript heap out of memory an OpenAPI 2.0 document
2 participants