diff --git a/modules/swagger-codegen-maven-plugin/README.md b/modules/swagger-codegen-maven-plugin/README.md index 488148727b2..d9282c97ebf 100644 --- a/modules/swagger-codegen-maven-plugin/README.md +++ b/modules/swagger-codegen-maven-plugin/README.md @@ -48,6 +48,44 @@ mvn clean compile - `configOptions` - a map of language-specific parameters (see below) - `configHelp` - dumps the configuration help for the specified library (generates no sources) +### Custom Generator + +Specifying a custom generator is a bit different. It doesn't support the classpath:/ syntax, but it does support the fully qualified name of the package. You can also specify your custom templates, which also get pulled in. Notice the dependency on a project, in the plugin scope. That would be your generator/template jar. + +```xml + + io.swagger + swagger-codegen-maven-plugin + ${swagger-codegen-maven-plugin-version} + + + + generate + + + src/main/resources/yaml/yamlfilename.yaml + + com.my.package.for.GeneratorLanguage + myTemplateDir + + ${project.build.directory}/generated-sources + ${default.package}.handler + ${default.package}.model + ${default.package}.handler + + + + + + + com.my.generator + customgenerator + 1.0-SNAPSHOT + + + +``` + ### Sample configuration -- Please see [an example configuration](examples) for using the plugin \ No newline at end of file +- Please see [an example configuration](examples) for using the plugin