Skip to content

Disable OpenAPIKit parameterStyleAndLocationAreCompatible validator#903

Merged
simonjbeaumont merged 1 commit into
apple:mainfrom
simonjbeaumont:sb/soften-openapikit-validation
May 6, 2026
Merged

Disable OpenAPIKit parameterStyleAndLocationAreCompatible validator#903
simonjbeaumont merged 1 commit into
apple:mainfrom
simonjbeaumont:sb/soften-openapikit-validation

Conversation

@simonjbeaumont
Copy link
Copy Markdown
Collaborator

Motivation

After updating to OpenAPIKit 6.0 (#875), the generator fails on OpenAPI documents that use style: simple on 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 with strict: 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 from Validator.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: simple on 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:

'Feature "Query params of style simple, explode: false" is not supported, skipping'

@simonjbeaumont simonjbeaumont force-pushed the sb/soften-openapikit-validation branch from e4e6c79 to 6b25ed2 Compare May 6, 2026 13:42
@simonjbeaumont simonjbeaumont added the 🔨 semver/patch No public API change. label May 6, 2026
@simonjbeaumont simonjbeaumont marked this pull request as ready for review May 6, 2026 13:43
@simonjbeaumont simonjbeaumont merged commit 5dd0da1 into apple:main May 6, 2026
51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patch No public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants