-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
OpenAPI different default content type for pojo return and primitives #36198
OpenAPI different default content type for pojo return and primitives #36198
Conversation
91257a7
to
efa0338
Compare
This comment has been minimized.
This comment has been minimized.
efa0338
to
5ec36ca
Compare
Signed-off-by: Phillip Kruger <[email protected]>
5ec36ca
to
29f26d3
Compare
✔️ The latest workflow run for the pull request has completed successfully. It should be safe to merge provided you have a look at the other checks in the summary. |
System.setProperty(io.smallrye.openapi.api.constants.OpenApiConstants.DEFAULT_PRODUCES_PRIMITIVES, "plain/text"); | ||
System.setProperty(io.smallrye.openapi.api.constants.OpenApiConstants.DEFAULT_CONSUMES_PRIMITIVES, "plain/text"); |
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.
This should be "text/plain"
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.
Created #36247
@phillip-kruger also shouldn't this have breaking change or noteworthy label as this changes the default? |
@@ -216,7 +215,9 @@ SyntheticBeanBuildItem initBasicAuth( | |||
&& !buildTimeConfig.auth.basic.orElse(false)) { | |||
//if not explicitly enabled we make this a default bean, so it is the fallback if nothing else is defined | |||
configurator.defaultBean(); | |||
securityInformationProducer.produce(SecurityInformationBuildItem.BASIC()); | |||
if (buildTimeConfig.auth.basic.isPresent() && buildTimeConfig.auth.basic.get()) { |
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.
line 215 !buildTimeConfig.auth.basic.orElse(false)
means that
quarkus.http.auth.basic
is missing => inside IF body
quarkus.http.auth.basic=false
=> inside IF body
quarkus.http.auth.basic=true
=> don't go in
while line 218 says
buildTimeConfig.auth.basic.isPresent()
=> quarkus.http.auth.basic=false
|| quarkus.http.auth.basic=true
buildTimeConfig.auth.basic.get()
=> quarkus.http.auth.basic=true
so in order to have produced BASIC
here it means that quarkus.http.auth.basic
must be both true
and false
@phillip-kruger I don't know what was intention of this condition, can you please fix it? Thank you
Fix #34700
Draft for now until OpenAPI release