![]() ![]() You can do this by using the Maven Assembly Plugin. (Optional.) If your code uses custom dependencies not covered by Swagger Codegen, you need to package these dependencies into your final JAR file. Mustache template variables and Differences between Mustache and Handlebars syntax How to add a generator for a new language or framework mustache templates, pom.xml (Maven configuration file), and a README file. ![]() The generated project includes a Java class that implements the generator, sample. p PACKAGE specifies the package name of your generator class. You can use this command to see the built-in generator names: java -jar path/to/swagger-codegen-cli-VERSION.jar langs This name must differ from the built-in generator names. n CODEGEN_NAME specifies the name of your custom generator that will be displayed in SwaggerHub’s Export menu. The default directory is the current folder. o OUT_DIR specifies the output directory where the project will be created. Meta is a command to create a project for a custom generator. Run the following command to create a boilerplate project for your codegen (replace the arguments with your values): java -jar path/to/swagger-codegen-cli-VERSION.jar meta -o OUT_DIR -n CODEGEN_NAME -p Swagger-codegen-cli-2.4.27.jar – use it to create OpenAPI 2.0 code generators Swagger-codegen-cli-3.0.34.jar – use it to create OpenAPI 3.0 code generators Follow these steps to create a custom generator:
0 Comments
Leave a Reply. |