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
just generate the code using maven plugin and check the DomainApi.java class. You will see that there is not path mapping annotation for basePath: v1 defined in the swagger spec
The text was updated successfully, but these errors were encountered:
How can the context v1 or v2 (which can both be contained in the same Spring instance) be set in application.properties (which is common to all endpoints in the Spring instance) ?
And what if the same Spring instance handles other URLs than just the Swagger-managed API ?
Description
@RequestMapping annotation is not generated in spring server code generation.
basePath is properly defined in swagger.yaml file.
Swagger-codegen version
Swagger codegen version :
swagger-codegen-maven-plugin: 2.2.1 and also tired with 2.2.2-SNAPSHOT
Swagger declaration file content or url
https://gist.github.com/tdhancii/1d0dde04413b6d98a76598a549a68985
Command line used for generation
Used Maven plugin to generate code
<plugin> <groupId>io.swagger</groupId> <artifactId>swagger-codegen-maven-plugin</artifactId> <version>2.2.1</version> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <goals> <goal>generate</goal> </goals> <configuration> <inputSpec>src/main/resources/swagger.yaml</inputSpec> <apiPackage>co.test.swagger.api</apiPackage> <modelPackage>co.test.swagger.model</modelPackage> <language>spring</language> <environmentVariables> <models></models> <apis></apis> <supportingFiles>HomeController.java,SwaggerDocumentationConfig.java</supportingFiles> </environmentVariables> </configuration> </execution> </executions> </plugin>
Steps to reproduce
just generate the code using maven plugin and check the DomainApi.java class. You will see that there is not path mapping annotation for basePath: v1 defined in the swagger spec
The text was updated successfully, but these errors were encountered: