swagger-api / swagger-api/swagger-codegen

[JaxRsSpec] Add apiNameSuffix config option

Open
#7,150 2 comments 1 reaction 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

I was trying to overwrite the Api name suffix like I was able to do with the model name.
Unfortunately it seems that this feature doesn't exist yet. I saw that it was already requested at some points (https://github.com/swagger-api/swagger-codegen/issues/4028), but was never implemented.

In my case, I want to generate the "apis" as kind of an interface so I would like to be able to rename it.

Swagger-codegen version

swagger-codegen 2.3.0

Swagger declaration file content or url

It would be nice to have this parameter available:

{
    "apiNameSuffix": "Suffix"
}
Related issues/PRs

Issue: https://github.com/swagger-api/swagger-codegen/issues/4028
PR: https://github.com/swagger-api/swagger-codegen/pull/4036

Suggest a fix/enhancement

WIP

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 JaxRsSpec handles the existing model-name suffix configuration and how that value reaches generated API names. Add equivalent support for the apiNameSuffix option shown in the issue, then verify that generated JAX-RS API names use the configured suffix. No specific file or test is named, so the generator’s configuration and template paths must be located first.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
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.