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

Add peer deps and missing ajv formats #1

Closed
wants to merge 1 commit into from
Closed

Add peer deps and missing ajv formats #1

wants to merge 1 commit into from

Conversation

amh4r
Copy link

@amh4r amh4r commented Apr 5, 2021

Great library! Here are fixes for some snags I hit.

  • Add ajv and ajv-format as peerDepedencies. They're needed to consume the generated files, so I thought that peerDependencies was another way to communicate that. The specific version of ajv matters, and peerDependencies seems like a good way to point that out.
  • There was a breaking change in ajv@8.0.0 which renamed ErrorObject.dataPath to ErrorObject.instancePath. The changelog can be found here.
  • I got unknown format warnings for date-time, int32, and int64. The date-time warning was solved by ajv-format, but the int32 and int64 warnings weren't. However, int32 and int64 are sitting in master (see this PR), so they should be in their next release.

@timvansteenis
Copy link
Contributor

timvansteenis commented Apr 20, 2021

@goodoldneon Sorry for my late response and thanks for this PR!

I just published version 2.2.0 which contains support for ajv-formats. I've used this PR for inspiration so thank you for that!

I've added:

  • ajv-formats support
  • peerDependencies

ErrorObject.dataPath to ErrorObject.instancePath was renamed in version >= 2.0.0

Note: the output structure and generation options have been changed from version >= 2.0.0. Make sure to remove your output folder before generating.

I will be closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants