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

Allow more ajv options #75

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Allow more ajv options #75

merged 1 commit into from
Jun 19, 2024

Conversation

w3nl
Copy link
Contributor

@w3nl w3nl commented Jun 19, 2024

Add ajv option allErrors, see https://ajv.js.org/options.html#allerrors

const api = new OpenAPIBackend({
    definition: openAPISpecification,
    strict: true,
    ajvOpts: { allErrors: true },
    customizeAjv: (originalAjv) => {
      addFormats(originalAjv)
      return originalAjv
    }
})

You can do now:

new Api({
    specification: openAPISpecification,
    controllers: controllers,
    ajvOptions: { allErrors: true }
})

@w3nl w3nl merged commit 2bdd058 into main Jun 19, 2024
11 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