From 71d544c9f73ebf2cab92519be4b9be0febfb1f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= Date: Fri, 4 May 2018 10:19:07 +0200 Subject: [PATCH] Rename default packages in meta (#314) --- .../src/main/resources/codegen/generatorClass.mustache | 4 ++-- .../openapi-generator/src/main/resources/codegen/pom.mustache | 2 +- samples/meta-codegen/lib/pom.xml | 2 +- .../java/com/my/company/codegen/MyclientcodegenGenerator.java | 4 ++-- .../{io/swagger/client => org/openapitools}/api/PetApi.sample | 2 +- .../swagger/client => org/openapitools}/api/StoreApi.sample | 2 +- .../swagger/client => org/openapitools}/api/UserApi.sample | 2 +- .../swagger/client => org/openapitools}/model/Category.sample | 0 .../swagger/client => org/openapitools}/model/Order.sample | 0 .../{io/swagger/client => org/openapitools}/model/Pet.sample | 0 .../{io/swagger/client => org/openapitools}/model/Tag.sample | 0 .../{io/swagger/client => org/openapitools}/model/User.sample | 0 12 files changed, 9 insertions(+), 9 deletions(-) rename samples/meta-codegen/usage/src/{io/swagger/client => org/openapitools}/api/PetApi.sample (97%) rename samples/meta-codegen/usage/src/{io/swagger/client => org/openapitools}/api/StoreApi.sample (96%) rename samples/meta-codegen/usage/src/{io/swagger/client => org/openapitools}/api/UserApi.sample (97%) rename samples/meta-codegen/usage/src/{io/swagger/client => org/openapitools}/model/Category.sample (100%) rename samples/meta-codegen/usage/src/{io/swagger/client => org/openapitools}/model/Order.sample (100%) rename samples/meta-codegen/usage/src/{io/swagger/client => org/openapitools}/model/Pet.sample (100%) rename samples/meta-codegen/usage/src/{io/swagger/client => org/openapitools}/model/Tag.sample (100%) rename samples/meta-codegen/usage/src/{io/swagger/client => org/openapitools}/model/User.sample (100%) diff --git a/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache b/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache index 6801d0d0e7..db77ebe87b 100644 --- a/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/generatorClass.mustache @@ -76,12 +76,12 @@ public class {{generatorClass}} extends DefaultCodegen implements CodegenConfig /** * Api Package. Optional, if needed, this can be used in templates */ - apiPackage = "io.swagger.client.api"; + apiPackage = "org.openapitools.api"; /** * Model Package. Optional, if needed, this can be used in templates */ - modelPackage = "io.swagger.client.model"; + modelPackage = "org.openapitools.model"; /** * Reserved words. Override this with reserved words specific to your language diff --git a/modules/openapi-generator/src/main/resources/codegen/pom.mustache b/modules/openapi-generator/src/main/resources/codegen/pom.mustache index 75cbc3048e..eca9e0dfa6 100644 --- a/modules/openapi-generator/src/main/resources/codegen/pom.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/pom.mustache @@ -1,7 +1,7 @@ 4.0.0 - io.swagger + org.openapitools {{name}}-openapi-generator jar {{name}}-openapi-generator diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index bc25c1eea4..9135e396e5 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -1,7 +1,7 @@ 4.0.0 - io.swagger + org.openapitools myClientCodegen-openapi-generator jar myClientCodegen-openapi-generator 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 7ce43a5de8..720f24eda0 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 @@ -76,12 +76,12 @@ public class MyclientcodegenGenerator extends DefaultCodegen implements CodegenC /** * Api Package. Optional, if needed, this can be used in templates */ - apiPackage = "io.swagger.client.api"; + apiPackage = "org.openapitools.api"; /** * Model Package. Optional, if needed, this can be used in templates */ - modelPackage = "io.swagger.client.model"; + modelPackage = "org.openapitools.model"; /** * Reserved words. Override this with reserved words specific to your language diff --git a/samples/meta-codegen/usage/src/io/swagger/client/api/PetApi.sample b/samples/meta-codegen/usage/src/org/openapitools/api/PetApi.sample similarity index 97% rename from samples/meta-codegen/usage/src/io/swagger/client/api/PetApi.sample rename to samples/meta-codegen/usage/src/org/openapitools/api/PetApi.sample index 521c15a572..7b8b9c754d 100644 --- a/samples/meta-codegen/usage/src/io/swagger/client/api/PetApi.sample +++ b/samples/meta-codegen/usage/src/org/openapitools/api/PetApi.sample @@ -5,7 +5,7 @@ # like such: # use the package from the `apiPackage` variable -package: io.swagger.client.api +package: org.openapitools.api # operations block classname: PetApi diff --git a/samples/meta-codegen/usage/src/io/swagger/client/api/StoreApi.sample b/samples/meta-codegen/usage/src/org/openapitools/api/StoreApi.sample similarity index 96% rename from samples/meta-codegen/usage/src/io/swagger/client/api/StoreApi.sample rename to samples/meta-codegen/usage/src/org/openapitools/api/StoreApi.sample index 0d0be636f1..d66c28e857 100644 --- a/samples/meta-codegen/usage/src/io/swagger/client/api/StoreApi.sample +++ b/samples/meta-codegen/usage/src/org/openapitools/api/StoreApi.sample @@ -5,7 +5,7 @@ # like such: # use the package from the `apiPackage` variable -package: io.swagger.client.api +package: org.openapitools.api # operations block classname: StoreApi diff --git a/samples/meta-codegen/usage/src/io/swagger/client/api/UserApi.sample b/samples/meta-codegen/usage/src/org/openapitools/api/UserApi.sample similarity index 97% rename from samples/meta-codegen/usage/src/io/swagger/client/api/UserApi.sample rename to samples/meta-codegen/usage/src/org/openapitools/api/UserApi.sample index 419bb975fb..b3b0521753 100644 --- a/samples/meta-codegen/usage/src/io/swagger/client/api/UserApi.sample +++ b/samples/meta-codegen/usage/src/org/openapitools/api/UserApi.sample @@ -5,7 +5,7 @@ # like such: # use the package from the `apiPackage` variable -package: io.swagger.client.api +package: org.openapitools.api # operations block classname: UserApi diff --git a/samples/meta-codegen/usage/src/io/swagger/client/model/Category.sample b/samples/meta-codegen/usage/src/org/openapitools/model/Category.sample similarity index 100% rename from samples/meta-codegen/usage/src/io/swagger/client/model/Category.sample rename to samples/meta-codegen/usage/src/org/openapitools/model/Category.sample diff --git a/samples/meta-codegen/usage/src/io/swagger/client/model/Order.sample b/samples/meta-codegen/usage/src/org/openapitools/model/Order.sample similarity index 100% rename from samples/meta-codegen/usage/src/io/swagger/client/model/Order.sample rename to samples/meta-codegen/usage/src/org/openapitools/model/Order.sample diff --git a/samples/meta-codegen/usage/src/io/swagger/client/model/Pet.sample b/samples/meta-codegen/usage/src/org/openapitools/model/Pet.sample similarity index 100% rename from samples/meta-codegen/usage/src/io/swagger/client/model/Pet.sample rename to samples/meta-codegen/usage/src/org/openapitools/model/Pet.sample diff --git a/samples/meta-codegen/usage/src/io/swagger/client/model/Tag.sample b/samples/meta-codegen/usage/src/org/openapitools/model/Tag.sample similarity index 100% rename from samples/meta-codegen/usage/src/io/swagger/client/model/Tag.sample rename to samples/meta-codegen/usage/src/org/openapitools/model/Tag.sample diff --git a/samples/meta-codegen/usage/src/io/swagger/client/model/User.sample b/samples/meta-codegen/usage/src/org/openapitools/model/User.sample similarity index 100% rename from samples/meta-codegen/usage/src/io/swagger/client/model/User.sample rename to samples/meta-codegen/usage/src/org/openapitools/model/User.sample