swagger-api / swagger-api/swagger-codegen-generators

Swagger-codegen-maven-plugin code generation doesn't use OAS3 annotation for spring-cloud

Open
#980 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
299
Forks
439
PR merge metrics
No merged PRs in 30d

Description

When using swagger-codegen-maven-plugin version 3.0.29 with configuration:

  <language>spring</language>
  <library>spring-cloud</library>    

classes are generated using old Swagger 1.5.x / OAS 2.x annotations instead of OAS3 annotations.
In my understanding, this should happen only when configuring it using the property useOas2 but the plugin should generate OAS3 annotations by default.
Am I missing something?

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 with the swagger-codegen-maven-plugin configuration for language spring and library spring-cloud in version 3.0.29, then compare its generated classes with the expected annotation set. The issue is done when the default output uses OAS3 annotations and useOas2 still selects OAS2 annotations.

Written by the indexing model from the issue text.

Assessment

Tech stack
spring
Domain
api, backend
Issue type
Bug
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.