swagger-api / swagger-api/swagger-codegen
Response Headers not displayed as part of Swagger UI
@HugoMario is already working on this.
Since Oct 3, 2018.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
We are using swagger code-gen to generate Jersey classes. Below are the issues:
i) ETag or response headers annotation are not getting added in the generated class.
II) Updated the api.mustache manually and got the annotation added in the generated class, but still the swagger ui is not showing the response headers.
Swagger-codegen version
3.0.0
Swagger declaration file content or url
Definition.yaml
responses:
200:
description: A list of policies
content:
application/vnd.asg-services-policy.v1+json:
schema:
$ref: '#/components/schemas/PoliciesDTO'
headers:
ETag:
description: An ordered set of all policies versions
schema:
type: string
Steps to reproduce
We have added the below ETag in responses section and the same is not displayed, while loading swagger-UI. The ETag section is not displayed.
Related issues/PRs
Suggest a fix/enhancement
Expected Behavior : The swagger code-gen should generate the header annotations for jersey and Swagger UI also should display the Response headers.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.