You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an issue we've been seeing for a while now and we haven't figured out what or when it broke since it is only impacting "packaged" versions of our app and we are not able to reproduce locally so debugging has been a bit complicated
This is what we know so far, we have an endpoint annotated as
@GET@Produces({MediaType.APPLICATION_JSON})
@Operation(
summary = "Return the status of the system")
publicResponsegetSystemStatus(
@ContextfinalHttpServletRequestpRequest) finalBooleanpEnvelope) {
// not important
}
which is generating the following spec
paths:
/api/public/v1.0:
get:
description: This resource returns information about the MongoDB applicationalong with API key meta data.operationId: getSystemStatusrequestBody:
content:
'*/*':
schema:
$ref: '#/components/schemas/HttpServletRequest'responses:
"200":
content:
application/json:
schema:
$ref: '#/components/schemas/SystemStatus'description: OK
For some reason HttpServletRequest is being documented even tho is annotated with @Context and in theory should be ignored by default.
We are only seeing this on our "live" envs and not locally
We are also seeing this for multiple classes annotated with @Context but not all and the only thing they have in common is they are all GET operations and they get documented as part of the request body
So far I have managed to see that when io.swagger.v3.jaxrs2.Reader is called the param is already there and being added but I'm uncertain if the pram should've been filtered in a previous class/method
I'm happy to try and add a filter for this case but I'm currently uncertain what the best class/filter would be to achieve this fix
Some additional info
Java version: 17.0.8.1+1
swagger-core version 2.2.16 (and managed to reproduce up to 2.2.10)
The text was updated successfully, but these errors were encountered:
altro3
added a commit
to altro3/micronaut-openapi
that referenced
this issue
Sep 1, 2024
This is an issue we've been seeing for a while now and we haven't figured out what or when it broke since it is only impacting "packaged" versions of our app and we are not able to reproduce locally so debugging has been a bit complicated
This is what we know so far, we have an endpoint annotated as
which is generating the following spec
For some reason
HttpServletRequest
is being documented even tho is annotated with@Context
and in theory should be ignored by default.We are only seeing this on our "live" envs and not locally
We are also seeing this for multiple classes annotated with
@Context
but not all and the only thing they have in common is they are all GET operations and they get documented as part of the request bodySo far I have managed to see that when io.swagger.v3.jaxrs2.Reader is called the param is already there and being added but I'm uncertain if the pram should've been filtered in a previous class/method
I'm happy to try and add a filter for this case but I'm currently uncertain what the best class/filter would be to achieve this fix
Some additional info
Java version: 17.0.8.1+1
swagger-core version 2.2.16 (and managed to reproduce up to 2.2.10)
The text was updated successfully, but these errors were encountered: