swagger-api / swagger-codegen-generators

Apache License 2.0
280 stars 418 forks source link

requestMapping for basepath defined in swagger '2.0' is missing in generation with io.swagger.codegen.v3 #1197

Open Shiva2199 opened 9 months ago

Shiva2199 commented 9 months ago

I am using swagger-codegen-maven-plugin to generate my resttemplate classes. I am currently upgrading my Application to spring boot 3 and I see swagger-codegen-maven-plugin with groupID io.swagger and language Spring doesnt have support for Jakarta and the alternative is to move to the swagger-codegen-maven-plugin io.swagger.codegen.v3 which supports both swagger 2 and jakarta based imports.But In the process I see the basePath provided in swagger definition is being ignored.

Can this be solved by changing some config params ? is there any other way to do this?

Please find below config: `swagger: '2.0' info: description: '' version: '2.0' title: new 10.3 host: localhost basePath: /app/api/v1 tags:

Shiva2199 commented 9 months ago

@HugoMario / @tgillain Can you please suggest ?

tgillain commented 9 months ago

Hi @Shiva2199 ,

From our side we migrated our project to use openapi-generator-maven-plugin since its more frequent release policy was fitting better our needs. So unfortunately I cannot help.