swagger-api / swagger-api/swagger-codegen
[javaspring]Question. Swagger operationId is not generated for controllers.
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
In swagger spec, we can annote an API openation with operation is. It is useful to at least give some semantic meaning when working in conjunction with ooentracibg. For example for opentracing it is much better to build a span with a good neme with semantic meaning to tell the context around d the pan . Operation is is useful to standardize that and gives a single Pace to get that value without relying the developer to add that throughout the code. But none of the sample seem to add that field anywhere to the
Is it possible to generate that annotation and makes it visible at runtime when a request comes in?
Swagger-codegen version
Swagger declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement
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.
Research direction
Start by reproducing the issue with a Java Spring controller and inspect the generated API specification and runtime request metadata. Determine whether an operationId can be generated and exposed consistently; done means the generated specification and runtime behavior both contain the expected semantic operation identifier.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100