Disable OpenAPIKit parameterStyleAndLocationAreCompatible validator#903
Merged
simonjbeaumont merged 1 commit intoMay 6, 2026
Merged
Conversation
e4e6c79 to
6b25ed2
Compare
kukushechkin
approved these changes
May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
After updating to OpenAPIKit 6.0 (#875), the generator fails on OpenAPI documents that use
style: simpleon query parameters. While this is technically invalid per the OpenAPI specification, it was previously tolerated -- the generator would skip the unsupported parameter with a warning diagnostic and continue generation.The new OpenAPIKit 6.0 brings a new default built-in validation (
.parameterStyleAndLocationAreCompatible) that rejects documents with this combination at validation time. Because this fires as a validation error (not a warning), it is thrown even withstrict: false, before the translator gets a chance to handle the parameter gracefully.This is a regression for users with documents that have this common spec violation, which we do have examples of in our extended compatibility test suite).
Modifications
Replace the use of
Validator()(which includes all OpenAPIKit defaults) with a custom validator built fromValidator.blank. This explicitly lists all default validations from OpenAPIKit 6.0.0 except.parameterStyleAndLocationAreCompatible, restoring the previous behaviour where the generator tolerates these documents.We might want to revisit how lenient we are for this, but this patch is the most expeditious way to getting a release out with the OpenAPIKit update.
Result
Documents with
style: simpleon query parameters are no longer rejected at validation time. The translator continues to emit an "unsupported" diagnostic and skip the parameter, as it did before the OpenAPIKit upgrade: