-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[BUG] Model resolution for global @PathParam ignores Open API 3.1 setting #4878
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
Comments
OllieKosh
added a commit
to OllieKosh/swagger-core
that referenced
this issue
May 1, 2025
…rs with openAPI 3.1
frantuma
pushed a commit
that referenced
this issue
May 5, 2025
frantuma
added a commit
that referenced
this issue
May 5, 2025
frantuma
pushed a commit
that referenced
this issue
May 5, 2025
frantuma
added a commit
that referenced
this issue
May 5, 2025
Thanks for reporting this and for the PR! fixed in #4884 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Model resolution for global path parameters ignores the setting that the target open api is 3.1, as a consequence openapi 3.1 only features defined with annotations are ignored (i.e
SwaggerConfiguration#isOpenAPI31 == true
is not respected).Reproducer
A test that uses
@Schema#patternProperties
(as an example of 3.1-only property) to show the error:and example Resource class:
The test shows the expected result, but actual result is that
patternProperties
are not represented in the spec for global@PathParam
(i.eglobalPathParam
), but are correctly represented for endpoint path param (i.elocalPathParam
).Proposed solution
ReaderUtils#collectConstructorParameters:84
hardcodesopenapi31
to be false, which seems to be at the core of the issue. Propagating the value from swagger configuration will solve this issue.The text was updated successfully, but these errors were encountered: