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 support for user-defined keywords #927

Open
constanzaderienzo opened this issue Jun 10, 2024 · 1 comment
Open

Add support for user-defined keywords #927

constanzaderienzo opened this issue Jun 10, 2024 · 1 comment

Comments

@constanzaderienzo
Copy link

constanzaderienzo commented Jun 10, 2024

Is your feature request related to a problem? Please describe.
Given our business logic, we are in need of adding custom-keywords.

For example:

in: path
name: offset
schema:
    type: number
    myUserKeyword: true # Custom keyword

We found that AJV has this feature: https://ajv.js.org/guide/user-keywords.html#user-defined-keywords.

However, there is no way to extend the Ajv instance used by the validator (or at least we couldn't find one).

Describe the solution you'd like
Support for custom-keywords.

A solution is provided in this PR

@cdimascio
Copy link
Owner

@constanzaderienzo can you describe the current behavior today and the desired behavior if this change were implemented and merged?

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

No branches or pull requests

2 participants