swagger-api / swagger-api/swagger-codegen

[javaspring]Question. Swagger operationId is not generated for controllers.

Open
#9,191 0 comments 0 reactions 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.