-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[Bug][Java/Spring] OAS3 related bugfixes and enhancements #11526
[Bug][Java/Spring] OAS3 related bugfixes and enhancements #11526
Conversation
@wing328 The Samples up-to-date check fails, no idea why. Should be all up 2 date. |
cc @OpenAPITools/generator-core-team as the change impacts CodegenModel. |
LGTM. For the CI failure, it has been fixed in the master. |
1 similar comment
LGTM. For the CI failure, it has been fixed in the master. |
That was quick. Thanks. If you can, have a look at #11475 (LGTM) |
{{#swagger2AnnotationLibrary}}@Parameter(name = "{{{baseName}}}", description = "{{{description}}}"{{#required}}, required = true{{/required}}){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{^isContainer}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}{{/isContainer}}){{/swagger1AnnotationLibrary}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think we should make the @Schema
annotation work. Are enum values properly documented otherwise?
I'm surprised none of the generated samples changed with this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few:
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List<String> status
This would be a perfect valid PR. We would need to identify when @Schema should be used and what information springdoc could otherwise deduct form the Spring MVC annotations and/or Method Parameters is affected.
We had the same discussion with the @io.swagger.v3.oas.annotations.parameters.RequestBody
annotation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm trying to see if I can get the annotation tk be present with the type
field set, and see if they resolves the issue.
If it does, then likely we can always set @Schema
- but the openApiType is not currently a value available to Java generators so I'm looking at how to appropriately add that.
Further OAS3 related bugfixes and enhancements. A follow up to #11181.
Fixes
Supersedes
Other OAS3 related fixes not included here:
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.For Windows users, please run the script in Git BASH.
master
(5.3.0),6.0.x