You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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.
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:
description: >-
API for getting information.
schemes:
produces:
paths:
/state:
get:
tags:
- Sate
summary: Get state
description: Return state.
operationId: getState
responses:
'200':
description: OK
schema:
$ref: '#/definitions/State'`
Plugin Config:
old plugin
<plugin> <groupId>io.swagger</groupId> <artifactId>swagger-codegen-maven-plugin</artifactId> <version>2.4.12</version> <executions> <execution> <id>generate-state</id> <goals> <goal>generate</goal> </goals> <phase>generate-sources</phase> <configuration> <language>spring</language> <inputSpec>${project.build.directory}/state.yaml</inputSpec> <output>${codegen.rest.dir}</output> <apiPackage>endpoint.rest.api.interfaces</apiPackage> <modelPackage>endpoint.rest.api.model</modelPackage> <addCompileSourceRoot>false</addCompileSourceRoot> <generateApiDocumentation>false</generateApiDocumentation> <generateApiTests>false</generateApiTests> <generateModelTests>false</generateModelTests> <generateModelDocumentation>false</generateModelDocumentation> <generateSupportingFiles>false</generateSupportingFiles> <configOptions> <sourceFolder>.</sourceFolder> <delegatePattern>true</delegatePattern> <java8>true</java8> <jakarta>true</jakarta> <!-- has no impact --> </configOptions> </configuration> </execution> </executions> </plugin>
The text was updated successfully, but these errors were encountered: