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

Ajv-keywords 2.0 + support for conditionals in schemas #5

Closed
wants to merge 6 commits into from

Conversation

dgilperez
Copy link
Collaborator

Hi!

This PR brings the current version I plan to use in production for a while to upstream:

  • Some dependencies updated
  • Adds ajv-keywords with the comments from ajv-keywords  #3 (so we can close that one)
  • Support for conditionals on the schemas.

On the last one, the current implementation assumes the schema has a structure with a limited number of predefined of keywords (headers, body, query ...), but will not allow for conditionals such as if: and then: (see more here). That feature is particularly useful in a versioned API, if we want to maintain backwards compatibility without carrying too much schema weigh around.

I hope the test explains it well. The implementation is kind of simple, we may want to generalize it a bit.

@dgilperez
Copy link
Collaborator Author

Closed in favor of #8

@dgilperez dgilperez closed this May 18, 2022
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.

1 participant