Fix content vs schema#1464
Open
kain88-de wants to merge 2 commits into
Open
Knope Bot / Require changes to be documented
required action
Jul 17, 2026
This pull request has not been documented yet
This project requires changes to be documented via either changesets or conventional commits. Depending on how this pull request is merged, it may not be fully documented:
- ❌ Squash merging is allowed, but the title is not a conventional commit
- ✅ Merge commits are disabled
- ✅ Rebase merging is disabled
To satisfy this check, you can:
- Address the conventional commit issues above
- Create a change file with the Knope CLI
- Create a change file in GitHub's web editor or copy/paste the content below into
.changeset/fix_content_vs_schema.md- Replace "CHANGE_TYPE" with
major,minor, orpatch(see knope's docs), then edit as needed for your users.
- Replace "CHANGE_TYPE" with
Details
---
default: CHANGE_TYPE
---
# Fix content vs schema
#1464 by @kain88-de
## Summary
Fix parameter parsing to support OpenAPI parameters defined with `content` instead of `schema`.
OpenAPI 3.1 allows a Parameter Object to include either `schema` or `content`, but not both:
https://spec.openapis.org/oas/v3.1.0.html#parameter-object
Before this change, `content`-only parameters were dropped during parsing because only `param_schema` was considered. That caused:
- path parameters to fail later with an incorrect path templating warning
- query parameters to disappear from generated endpoint signatures
## Changes
- fall back to `content.<media-type>.schema` when `schema` is missing
- add a parser regression test for `content`-only parameters
- add a functional happy-path generated-code test
- add 3.1 snapshot coverage for a `content`-only path parameter
Loading