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

re-enable keywords now properly supported #1031

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

uwinkelvos
Copy link
Contributor

With #882 merged, some keywords that where previously not relevant are should now be checked by ajv.

@@ -61,9 +61,6 @@ function createAjv(
for (let [formatName, formatDefinition] of Object.entries(options.formats)) {
ajv.addFormat(formatName, formatDefinition);
}
ajv.removeKeyword('propertyNames');
Copy link
Owner

Choose a reason for hiding this comment

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

won't these still be necessary for clients using openapi 3.0.x?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When I try to load an openapi 3.0.x spec, that uses e.g. const, I get a validation at middleware construction time. And even if this was bypassed somehow, Ajv would understand the keywords. So imho there is no harm at allowing them at this level (Ajv).

@cdimascio cdimascio merged commit 83dac8a into cdimascio:master Dec 27, 2024
5 checks passed
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