From 09671e0767581287369a52f5b3bb99770028b355 Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Mon, 13 Aug 2018 16:30:27 +0200 Subject: [PATCH 01/11] Change display of available generators * consider null case for g.getType() * skip a category when it is empty --- .../codegen/cmd/ListGenerators.java | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java index 8add50af445f..530b25d23f8a 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java @@ -1,7 +1,10 @@ package org.openapitools.codegen.cmd; +import com.google.common.base.Objects; + import io.airlift.airline.Command; import io.airlift.airline.Option; + import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.CodegenConfigLoader; import org.openapitools.codegen.CodegenType; @@ -9,6 +12,7 @@ import java.util.Arrays; import java.util.Comparator; import java.util.List; +import java.util.stream.Collectors; // NOTE: List can later have subcommands such as list languages, list types, list frameworks, etc. @Command(name = "list", description = "Lists the available generators") @@ -40,19 +44,29 @@ public void run() { sb.append(System.lineSeparator()); for (CodegenType type : types) { - sb.append(type.name()).append(" generators:"); - sb.append(System.lineSeparator()); - - generators.stream() - .filter(g -> g.getTag().equals(type)) - .sorted(Comparator.comparing(CodegenConfig::getName)) - .forEach(generator -> sb.append(" - ").append(generator.getName()).append(System.lineSeparator())); - - sb.append(System.lineSeparator()); - sb.append(System.lineSeparator()); + appendForType(sb, type, type.name(), generators); } + appendForType(sb, null, "UNDIFINED", generators); } System.out.printf("%s%n", sb.toString()); } + + private void appendForType(StringBuilder sb, CodegenType type, String typeName, List generators) { + List list = generators.stream() + .filter(g -> Objects.equal(type, g.getTag())) + .sorted(Comparator.comparing(CodegenConfig::getName)) + .collect(Collectors.toList()); + + if(list.size() > 0) { + sb.append(typeName).append(" generators:"); + sb.append(System.lineSeparator()); + + list.stream() + .forEach(generator -> sb.append(" - ").append(generator.getName()).append(System.lineSeparator())); + + sb.append(System.lineSeparator()); + sb.append(System.lineSeparator()); + } + } } From 3ab6eb915c46ecb03f3d4897052691296beab0f4 Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Mon, 13 Aug 2018 16:33:04 +0200 Subject: [PATCH 02/11] Change the tag to 'CodegenType.OTHER' --- .../src/main/resources/codegen/generatorClass.mustache | 2 +- samples/meta-codegen/lib/pom.xml | 2 +- .../java/com/my/company/codegen/MyclientcodegenGenerator.java | 2 +- samples/meta-codegen/usage/.openapi-generator/VERSION | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache b/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache index acdeeba6f496..35491c6fbab7 100644 --- a/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache @@ -19,7 +19,7 @@ public class {{generatorClass}} extends DefaultCodegen implements CodegenConfig * @see org.openapitools.codegen.CodegenType */ public CodegenType getTag() { - return CodegenType.CLIENT; + return CodegenType.OTHER; } /** diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index dd8dcf14fea7..cbbbf4a49bb0 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -116,7 +116,7 @@ UTF-8 - 3.0.0-SNAPSHOT + 3.2.1-SNAPSHOT 1.0.0 4.8.1 diff --git a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java index 877b57783836..3e989ca02c54 100644 --- a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java +++ b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java @@ -19,7 +19,7 @@ public class MyclientcodegenGenerator extends DefaultCodegen implements CodegenC * @see org.openapitools.codegen.CodegenType */ public CodegenType getTag() { - return CodegenType.CLIENT; + return CodegenType.OTHER; } /** diff --git a/samples/meta-codegen/usage/.openapi-generator/VERSION b/samples/meta-codegen/usage/.openapi-generator/VERSION index 096bf47efe31..14900cee60e8 100644 --- a/samples/meta-codegen/usage/.openapi-generator/VERSION +++ b/samples/meta-codegen/usage/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.2.1-SNAPSHOT \ No newline at end of file From 2cd3722409b3710c27b882651c4f185bc8ef91ac Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Mon, 13 Aug 2018 16:43:49 +0200 Subject: [PATCH 03/11] Add ./bin/meta-codegen.sh to ensure-up-to-date --- bin/utils/ensure-up-to-date | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index e5fc703d5712..afa521f571cf 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -31,6 +31,7 @@ sleep 5 ./bin/typescript-inversify-petstore.sh > /dev/null 2>&1 ./bin/rust-server-petstore.sh > /dev/null 2>&1 ./bin/openapi3/haskell-http-client-petstore.sh > /dev/null 2>&1 +./bin/meta-codegen.sh # Check: if [ -n "$(git status --porcelain)" ]; then From 098d4841063fe3d57fc21adeab430cf592febf3b Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Tue, 14 Aug 2018 07:32:22 +0200 Subject: [PATCH 04/11] OpenAPI-Generator requires java 8 --- .../openapi-generator/src/main/resources/codegen/pom.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/codegen/pom.mustache b/modules/openapi-generator/src/main/resources/codegen/pom.mustache index 2548456f813a..cb3712e87ad6 100644 --- a/modules/openapi-generator/src/main/resources/codegen/pom.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/pom.mustache @@ -100,8 +100,8 @@ maven-compiler-plugin 3.6.1 - 1.7 - 1.7 + 1.8 + 1.8 From 87b45cfe8b27b472d81fa7d4c02f10f88c4be6e2 Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Wed, 15 Aug 2018 20:34:20 +0200 Subject: [PATCH 05/11] Use UNSPECIFIED instead of UNDEFINED --- .../main/java/org/openapitools/codegen/cmd/ListGenerators.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java index 530b25d23f8a..6ea036829d22 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/ListGenerators.java @@ -46,7 +46,7 @@ public void run() { for (CodegenType type : types) { appendForType(sb, type, type.name(), generators); } - appendForType(sb, null, "UNDIFINED", generators); + appendForType(sb, null, "UNSPECIFIED", generators); } System.out.printf("%s%n", sb.toString()); From c3678d04a3fbee3c52d11b7fe9a82dc6e1a6047f Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Wed, 15 Aug 2018 20:38:22 +0200 Subject: [PATCH 06/11] Run bin/meta-codegen.sh --- samples/meta-codegen/lib/README.md | 2 +- samples/meta-codegen/lib/pom.xml | 6 +++--- samples/meta-codegen/usage/.openapi-generator/VERSION | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/samples/meta-codegen/lib/README.md b/samples/meta-codegen/lib/README.md index e970d9f068fb..68e5cf5c6cfa 100644 --- a/samples/meta-codegen/lib/README.md +++ b/samples/meta-codegen/lib/README.md @@ -62,7 +62,7 @@ the object you have available during client generation: ``` # The following additional debug options are available for all codegen targets: -# -DdebugSwagger prints the OpenAPI Specification as interpreted by the codegen +# -DdebugOpenAPI prints the OpenAPI Specification as interpreted by the codegen # -DdebugModels prints models passed to the template engine # -DdebugOperations prints operations passed to the template engine # -DdebugSupportingFiles prints additional data passed to the template engine diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index cbbbf4a49bb0..b4a6d0dd23a9 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -100,8 +100,8 @@ maven-compiler-plugin 3.6.1 - 1.7 - 1.7 + 1.8 + 1.8 @@ -116,7 +116,7 @@ UTF-8 - 3.2.1-SNAPSHOT + 3.2.2-SNAPSHOT 1.0.0 4.8.1 diff --git a/samples/meta-codegen/usage/.openapi-generator/VERSION b/samples/meta-codegen/usage/.openapi-generator/VERSION index 14900cee60e8..105bb87d77b3 100644 --- a/samples/meta-codegen/usage/.openapi-generator/VERSION +++ b/samples/meta-codegen/usage/.openapi-generator/VERSION @@ -1 +1 @@ -3.2.1-SNAPSHOT \ No newline at end of file +3.2.2-SNAPSHOT \ No newline at end of file From 5cbd031987205920feb7a82819f8269bc0e21fe3 Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Mon, 20 Aug 2018 16:30:05 +0200 Subject: [PATCH 07/11] Make bin/meta-codegen.sh more robust Do not require openapi-generator to be installed in the local maven repository --- bin/meta-codegen.sh | 2 +- samples/meta-codegen/pom.xml | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 samples/meta-codegen/pom.xml diff --git a/bin/meta-codegen.sh b/bin/meta-codegen.sh index 00b679844649..00486c5ab412 100755 --- a/bin/meta-codegen.sh +++ b/bin/meta-codegen.sh @@ -30,7 +30,7 @@ ags="meta -n myClientCodegen -p com.my.company.codegen -o samples/meta-codegen/l java $JAVA_OPTS -jar $executable $ags -mvn verify -f samples/meta-codegen/lib/pom.xml +mvn clean package -f samples/meta-codegen/pom.xml ags2="generate -g myClientCodegen -i modules/openapi-generator/src/test/resources/2_0/petstore.json -o samples/meta-codegen/usage $@" diff --git a/samples/meta-codegen/pom.xml b/samples/meta-codegen/pom.xml new file mode 100644 index 000000000000..fc3ad25673e3 --- /dev/null +++ b/samples/meta-codegen/pom.xml @@ -0,0 +1,12 @@ + + 4.0.0 + org.openapitools + meta-codegen + 1.0.0 + pom + + lib/ + ../../modules/openapi-generator + + From 748ac2f06f9cabe9b42fab913431dbaae6a7f210 Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Thu, 23 Aug 2018 07:39:02 +0200 Subject: [PATCH 08/11] Update README --- .../main/resources/codegen/README.mustache | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/codegen/README.mustache b/modules/openapi-generator/src/main/resources/codegen/README.mustache index d8c6ab3ca32a..7b274871839f 100644 --- a/modules/openapi-generator/src/main/resources/codegen/README.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/README.mustache @@ -1,15 +1,16 @@ # OpenAPI Generator for the {{name}} library ## Overview -This is a boiler-plate project to generate your own client library with Swagger. Its goal is -to get you started with the basic plumbing so you can put in your own logic. It won't work without -your changes applied. +This is a boiler-plate project to generate your own project derived from an OpenAPI specification. +Its goal is to get you started with the basic plumbing so you can put in your own logic. +It won't work without your changes applied. -## What's Swagger? -The goal of Swaggerâ„¢ is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined via Swagger, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interfaces have done for lower-level programming, Swagger removes the guesswork in calling the service. +## What's OpenAPI +The goal of OpenAPI is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. +When properly described with OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. +Similar to what interfaces have done for lower-level programming, OpenAPI removes the guesswork in calling the service. - -Check out [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) for additional information about the Swagger project, including additional libraries with support for other languages and more. +Check out [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) for additional information about the OpenAPI project, including additional libraries with support for other languages and more. ## How do I use this? At this point, you've likely generated a client setup. It will include something along these lines: @@ -43,10 +44,17 @@ Once modified, you can run this: mvn package ``` -In your generator project. A single jar file will be produced in `target`. You can now use that with codegen: +In your generator project. A single jar file will be produced in `target`. You can now use that with [OpenAPI Generator](https://openapi-generator.tech): + +For mac/linux: +``` +java -cp /path/to/openapi-generator-cli.jar:/path/to/your.jar org.openapitools.codegen.OpenAPIGenerator generate -g {{name}} -i /path/to/openapi.yaml -o ./test +``` +(Do not forget to replace the values `/path/to/openapi-generator-cli.jar`, `/path/to/your.jar` and `/path/to/openapi.yaml` in the previous command) +For Windows users, you will need to use `;` instead of `:` in the classpath, e.g. ``` -java -cp /path/to/openapi-generator-cli.jar:/path/to/your.jar org.openapitools.codegen.Codegen -g {{name}} -i /path/to/openapi.yaml -o ./test +java -cp /path/to/openapi-generator-cli.jar;/path/to/your.jar org.openapitools.codegen.OpenAPIGenerator generate -g {{name}} -i /path/to/openapi.yaml -o ./test ``` Now your templates are available to the client generator and you can write output values @@ -67,8 +75,8 @@ the object you have available during client generation: # -DdebugOperations prints operations passed to the template engine # -DdebugSupportingFiles prints additional data passed to the template engine -java -DdebugOperations -cp /path/to/openapi-generator-cli.jar:/path/to/your.jar org.openapitools.codegen.Codegen -g {{name}} -i /path/to/swagger.yaml -o ./test +java -DdebugOperations -cp /path/to/openapi-generator-cli.jar:/path/to/your.jar org.openapitools.codegen.OpenAPIGenerator generate -g {{name}} -i /path/to/openapi.yaml -o ./test ``` -Will, for example, output the debug info for operations. You can use this info -in the `api.mustache` file. \ No newline at end of file +Will, for example, output the debug info for operations. +You can use this info in the `api.mustache` file. \ No newline at end of file From 457d8d7146645eb7ca8c8de19dcab75f19296a0a Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Thu, 23 Aug 2018 07:39:56 +0200 Subject: [PATCH 09/11] Update samples --- samples/meta-codegen/lib/README.md | 32 +++++++++++++++++++----------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/samples/meta-codegen/lib/README.md b/samples/meta-codegen/lib/README.md index 68e5cf5c6cfa..949071334367 100644 --- a/samples/meta-codegen/lib/README.md +++ b/samples/meta-codegen/lib/README.md @@ -1,15 +1,16 @@ # OpenAPI Generator for the myClientCodegen library ## Overview -This is a boiler-plate project to generate your own client library with Swagger. Its goal is -to get you started with the basic plumbing so you can put in your own logic. It won't work without -your changes applied. +This is a boiler-plate project to generate your own project derived from an OpenAPI specification. +Its goal is to get you started with the basic plumbing so you can put in your own logic. +It won't work without your changes applied. -## What's Swagger? -The goal of Swaggerâ„¢ is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined via Swagger, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interfaces have done for lower-level programming, Swagger removes the guesswork in calling the service. +## What's OpenAPI +The goal of OpenAPI is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. +When properly described with OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. +Similar to what interfaces have done for lower-level programming, OpenAPI removes the guesswork in calling the service. - -Check out [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) for additional information about the Swagger project, including additional libraries with support for other languages and more. +Check out [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) for additional information about the OpenAPI project, including additional libraries with support for other languages and more. ## How do I use this? At this point, you've likely generated a client setup. It will include something along these lines: @@ -43,10 +44,17 @@ Once modified, you can run this: mvn package ``` -In your generator project. A single jar file will be produced in `target`. You can now use that with codegen: +In your generator project. A single jar file will be produced in `target`. You can now use that with [OpenAPI Generator](https://openapi-generator.tech): + +For mac/linux: +``` +java -cp /path/to/openapi-generator-cli.jar:/path/to/your.jar org.openapitools.codegen.OpenAPIGenerator generate -g myClientCodegen -i /path/to/openapi.yaml -o ./test +``` +(Do not forget to replace the values `/path/to/openapi-generator-cli.jar`, `/path/to/your.jar` and `/path/to/openapi.yaml` in the previous command) +For Windows users, you will need to use `;` instead of `:` in the classpath, e.g. ``` -java -cp /path/to/openapi-generator-cli.jar:/path/to/your.jar org.openapitools.codegen.Codegen -g myClientCodegen -i /path/to/openapi.yaml -o ./test +java -cp /path/to/openapi-generator-cli.jar;/path/to/your.jar org.openapitools.codegen.OpenAPIGenerator generate -g myClientCodegen -i /path/to/openapi.yaml -o ./test ``` Now your templates are available to the client generator and you can write output values @@ -67,8 +75,8 @@ the object you have available during client generation: # -DdebugOperations prints operations passed to the template engine # -DdebugSupportingFiles prints additional data passed to the template engine -java -DdebugOperations -cp /path/to/openapi-generator-cli.jar:/path/to/your.jar org.openapitools.codegen.Codegen -g myClientCodegen -i /path/to/swagger.yaml -o ./test +java -DdebugOperations -cp /path/to/openapi-generator-cli.jar:/path/to/your.jar org.openapitools.codegen.OpenAPIGenerator generate -g myClientCodegen -i /path/to/openapi.yaml -o ./test ``` -Will, for example, output the debug info for operations. You can use this info -in the `api.mustache` file. \ No newline at end of file +Will, for example, output the debug info for operations. +You can use this info in the `api.mustache` file. \ No newline at end of file From d980dbd4d4641bf213f3dc861df54c481f9886e5 Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Thu, 23 Aug 2018 16:36:12 +0200 Subject: [PATCH 10/11] Add a --type option to select the generator type --- .../main/java/org/openapitools/codegen/cmd/Meta.java | 12 ++++++++++-- .../main/resources/codegen/generatorClass.mustache | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java index 1865550ca91f..c373aaa8c70d 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Meta.java @@ -67,6 +67,11 @@ public class Meta implements Runnable { description = "the package to put the main class into (defaults to org.openapitools.codegen)") private String targetPackage = "org.openapitools.codegen"; + @Option(name = {"-t", "--type"}, title = "type", + description = "the type of generator that is created", + allowedValues = {"CLIENT", "SERVER", "DOCUMENTATION", "CONFIG", "OTHER"}) + private String type = "OTHER"; + @Override public void run() { final File targetDir = new File(outputFolder); @@ -87,8 +92,11 @@ public void run() { String currentVersion = Version.readVersionFromResources(); Map data = - new ImmutableMap.Builder().put("generatorPackage", targetPackage) - .put("generatorClass", mainClass).put("name", name) + new ImmutableMap.Builder() + .put("generatorPackage", targetPackage) + .put("generatorClass", mainClass) + .put("name", name) + .put("generatorType", type) .put("fullyQualifiedGeneratorClass", targetPackage + "." + mainClass) .put("openapiGeneratorVersion", currentVersion).build(); diff --git a/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache b/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache index 35491c6fbab7..cefd218cb506 100644 --- a/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache @@ -19,7 +19,7 @@ public class {{generatorClass}} extends DefaultCodegen implements CodegenConfig * @see org.openapitools.codegen.CodegenType */ public CodegenType getTag() { - return CodegenType.OTHER; + return CodegenType.{{generatorType}}; } /** From 898e9729acfd79cd6bd8bb63672c914538514533 Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Thu, 23 Aug 2018 16:36:43 +0200 Subject: [PATCH 11/11] Use the --type option in the samples --- bin/meta-codegen.sh | 2 +- .../java/com/my/company/codegen/MyclientcodegenGenerator.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/meta-codegen.sh b/bin/meta-codegen.sh index 00486c5ab412..2a0f55cf8a08 100755 --- a/bin/meta-codegen.sh +++ b/bin/meta-codegen.sh @@ -26,7 +26,7 @@ then fi export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="meta -n myClientCodegen -p com.my.company.codegen -o samples/meta-codegen/lib $@" +ags="meta -n myClientCodegen -t DOCUMENTATION -p com.my.company.codegen -o samples/meta-codegen/lib $@" java $JAVA_OPTS -jar $executable $ags diff --git a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java index 3e989ca02c54..fd43a342519c 100644 --- a/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java +++ b/samples/meta-codegen/lib/src/main/java/com/my/company/codegen/MyclientcodegenGenerator.java @@ -19,7 +19,7 @@ public class MyclientcodegenGenerator extends DefaultCodegen implements CodegenC * @see org.openapitools.codegen.CodegenType */ public CodegenType getTag() { - return CodegenType.OTHER; + return CodegenType.DOCUMENTATION; } /**