1

I'm currently using swagger-codegen through the maven plugin: https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen-maven-plugin. I've set the place where I want my api files to be generated with the <apiPackage></apiPackage> field in my pom.xml. But when I generate my apis, it gets put in src/main/java/<apiPackage>. I would like to know where is src/main/java declared as part of the path and if it can be changed.

user7999116
  • 199
  • 1
  • 12

2 Answers2

0

src/main/java is a Maven convention.

This folder structure is hard-coded in Swagger Codegen's code and cannot be changed.

Helen
  • 87,344
  • 17
  • 243
  • 314
-1

You can extend AbstractJavaCodegen and in constructor override value of sourceFolder variable. This extended class you can passed to codegen as --lang parameter.

lolcio
  • 346
  • 5
  • 12