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
A possible workaround, (it may not look clean 🤷🏻), is to implement the OperationCustomizer interface, intercept/find the header and then patch the schema programmatically.
I've added something like this to my JAX-RS-based server:
Expected: To see this header in my openapi generated spec.
Actual: Swagger core ignored a header annotation
Additional details:
io.swagger.v3.oas.annotations.responses.ApiResponse#headers
is seemingly only read fromio.swagger.v3.jaxrs2.OperationParser#getApiResponses
io.swagger.v3.core.util.AnnotationsUtils#getHeader
which in turn does this:Recommended solutions (one of):
@Schema
annotation entirely, but still add a header even if only a name is specifiedThe text was updated successfully, but these errors were encountered: