OpenAPITools / OpenAPITools/openapi-generator

[REQ] Allow headers to be visible in swagger even if the ý are implicit

Open
#18,931 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

implicitHeaders makes the Spring generator not add the explicit parameters but it also seems to remove them from the generated swagger. I would like implicit headers to be shown as header parameters in the generated spec but not explicit in the method signatures,

Additional context

The concrete use case now is that we have a number of X-.... headers that we would like to be shown explicit in the parameters of the swagger documentation but we are handling them globally in a number of filters and interceptors.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how implicitHeaders is handled in the Spring generator and how its output contributes to the generated Swagger/OpenAPI specification and method signatures. Done means implicit headers appear as header parameters in the generated spec while remaining absent from generated method signatures; add or update coverage for both outputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi, spring
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.