From 07ebccd455f978043c59f7dfd254cdb12e651d69 Mon Sep 17 00:00:00 2001 From: kacbuk001 <39690085+kacbuk001@users.noreply.github.com> Date: Tue, 9 Apr 2019 04:38:06 +0200 Subject: [PATCH] Clean up the license field in various templates to ensure it's unlicense by default. (#2627) --- docs/generators/ruby.md | 2 +- .../codegen/languages/RubyClientCodegen.java | 4 +- .../main/resources/lumen/composer.mustache | 2 +- .../resources/php-symfony/composer.mustache | 2 +- .../src/main/resources/php/composer.mustache | 2 +- .../resources/ze-ph/composer.json.mustache | 2 +- .../php/OpenAPIClient-php/composer.json | 2 +- .../php/OpenAPIClient-php/composer.json | 2 +- .../application/config/path_handler.yml | 2 + .../openapi3/petstore/php-ze-ph/composer.json | 2 +- .../php-ze-ph/src/App/DTO/EnumTest.php | 21 ++++ .../src/App/DTO/HealthCheckResult.php | 19 ++++ .../php-ze-ph/src/App/DTO/NullableClass.php | 104 ++++++++++++++++++ .../src/App/DTO/OuterEnumDefaultValue.php | 12 ++ .../src/App/DTO/OuterEnumInteger.php | 12 ++ .../App/DTO/OuterEnumIntegerDefaultValue.php | 12 ++ .../php-ze-ph/src/App/Handler/FakeHealth.php | 34 ++++++ .../petstore/php-lumen/lib/composer.json | 2 +- .../SymfonyBundle-php/composer.json | 2 +- .../server/petstore/php-ze-ph/composer.json | 2 +- 20 files changed, 229 insertions(+), 13 deletions(-) create mode 100644 samples/server/openapi3/petstore/php-ze-ph/src/App/DTO/HealthCheckResult.php create mode 100644 samples/server/openapi3/petstore/php-ze-ph/src/App/DTO/NullableClass.php create mode 100644 samples/server/openapi3/petstore/php-ze-ph/src/App/DTO/OuterEnumDefaultValue.php create mode 100644 samples/server/openapi3/petstore/php-ze-ph/src/App/DTO/OuterEnumInteger.php create mode 100644 samples/server/openapi3/petstore/php-ze-ph/src/App/DTO/OuterEnumIntegerDefaultValue.php create mode 100644 samples/server/openapi3/petstore/php-ze-ph/src/App/Handler/FakeHealth.php diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index 356285065d4..e8a5a56b227 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -14,7 +14,7 @@ sidebar_label: ruby |gemName|gem name (convention: underscore_case).| |openapi_client| |moduleName|top module name (convention: CamelCase, usually corresponding to gem name).| |OpenAPIClient| |gemVersion|gem version.| |1.0.0| -|gemLicense|gem license. | |proprietary| +|gemLicense|gem license. | |unlicense| |gemRequiredRubyVersion|gem required Ruby version. | |>= 1.9| |gemHomepage|gem homepage. | |http://org.openapitools| |gemSummary|gem summary. | |A ruby wrapper for the REST APIs| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index 7a57ebb3e84..a887080a373 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -54,7 +54,7 @@ public class RubyClientCodegen extends AbstractRubyCodegen { protected String gemVersion = "1.0.0"; protected String specFolder = "spec"; protected String libFolder = "lib"; - protected String gemLicense = "proprietary"; + protected String gemLicense = "unlicense"; protected String gemRequiredRubyVersion = ">= 1.9"; protected String gemHomepage = "http://org.openapitools"; protected String gemSummary = "A ruby wrapper for the REST APIs"; @@ -120,7 +120,7 @@ public class RubyClientCodegen extends AbstractRubyCodegen { cliOptions.add(new CliOption(GEM_VERSION, "gem version.").defaultValue("1.0.0")); cliOptions.add(new CliOption(GEM_LICENSE, "gem license. "). - defaultValue("proprietary")); + defaultValue("unlicense")); cliOptions.add(new CliOption(GEM_REQUIRED_RUBY_VERSION, "gem required Ruby version. "). defaultValue(">= 1.9")); diff --git a/modules/openapi-generator/src/main/resources/lumen/composer.mustache b/modules/openapi-generator/src/main/resources/lumen/composer.mustache index a9e84359a31..433cfd18ad5 100644 --- a/modules/openapi-generator/src/main/resources/lumen/composer.mustache +++ b/modules/openapi-generator/src/main/resources/lumen/composer.mustache @@ -15,7 +15,7 @@ "api" ], "homepage": "http://openapi-generator.tech", - "license": "proprietary", + "license": "unlicense", "authors": [ { "name": "OpenAPI-Generator contributors", diff --git a/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache b/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache index 5b46965b614..038ad59879c 100644 --- a/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php-symfony/composer.mustache @@ -11,7 +11,7 @@ "api" ], "homepage": "https://github.com/openapitools/openapi-generator", - "license": "proprietary", + "license": "unlicense", "authors": [ { "name": "openapi-generator contributors", diff --git a/modules/openapi-generator/src/main/resources/php/composer.mustache b/modules/openapi-generator/src/main/resources/php/composer.mustache index 4bd76d6a1be..38582fafaac 100644 --- a/modules/openapi-generator/src/main/resources/php/composer.mustache +++ b/modules/openapi-generator/src/main/resources/php/composer.mustache @@ -14,7 +14,7 @@ "api" ], "homepage": "https://openapi-generator.tech", - "license": "proprietary", + "license": "unlicense", "authors": [ { "name": "OpenAPI-Generator contributors", diff --git a/modules/openapi-generator/src/main/resources/ze-ph/composer.json.mustache b/modules/openapi-generator/src/main/resources/ze-ph/composer.json.mustache index 411ea721d1d..c603ff4ac43 100644 --- a/modules/openapi-generator/src/main/resources/ze-ph/composer.json.mustache +++ b/modules/openapi-generator/src/main/resources/ze-ph/composer.json.mustache @@ -1,7 +1,7 @@ { "name": "{{gitUserId}}/{{gitRepoId}}", "description": "{{description}}", - "license": "proprietary", + "license": "unlicense", "version": "{{artifactVersion}}", "type": "project", "require": { diff --git a/samples/client/petstore/php/OpenAPIClient-php/composer.json b/samples/client/petstore/php/OpenAPIClient-php/composer.json index d8c4603f9ca..370d12656b2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/composer.json +++ b/samples/client/petstore/php/OpenAPIClient-php/composer.json @@ -11,7 +11,7 @@ "api" ], "homepage": "https://openapi-generator.tech", - "license": "proprietary", + "license": "unlicense", "authors": [ { "name": "OpenAPI-Generator contributors", diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/composer.json b/samples/openapi3/client/petstore/php/OpenAPIClient-php/composer.json index d8c4603f9ca..370d12656b2 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/composer.json +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/composer.json @@ -11,7 +11,7 @@ "api" ], "homepage": "https://openapi-generator.tech", - "license": "proprietary", + "license": "unlicense", "authors": [ { "name": "OpenAPI-Generator contributors", diff --git a/samples/server/openapi3/petstore/php-ze-ph/application/config/path_handler.yml b/samples/server/openapi3/petstore/php-ze-ph/application/config/path_handler.yml index 9ff5964b0eb..01c5ec66c4e 100644 --- a/samples/server/openapi3/petstore/php-ze-ph/application/config/path_handler.yml +++ b/samples/server/openapi3/petstore/php-ze-ph/application/config/path_handler.yml @@ -5,6 +5,7 @@ Articus\PathHandler\RouteInjection\Factory: - App\Handler\Fake - App\Handler\FakeBodyWithFileSchema - App\Handler\FakeBodyWithQueryParams + - App\Handler\FakeHealth - App\Handler\FakeInlineAdditionalProperties - App\Handler\FakeJsonFormData - App\Handler\FakeOuterBoolean @@ -46,6 +47,7 @@ Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory: App\Handler\Fake: [] App\Handler\FakeBodyWithFileSchema: [] App\Handler\FakeBodyWithQueryParams: [] + App\Handler\FakeHealth: [] App\Handler\FakeInlineAdditionalProperties: [] App\Handler\FakeJsonFormData: [] App\Handler\FakeOuterBoolean: [] diff --git a/samples/server/openapi3/petstore/php-ze-ph/composer.json b/samples/server/openapi3/petstore/php-ze-ph/composer.json index 7496b7dfda3..99c78857b2f 100644 --- a/samples/server/openapi3/petstore/php-ze-ph/composer.json +++ b/samples/server/openapi3/petstore/php-ze-ph/composer.json @@ -1,7 +1,7 @@ { "name": "GIT_USER_ID/GIT_REPO_ID", "description": "", - "license": "proprietary", + "license": "unlicense", "version": "1.0.0", "type": "project", "require": { diff --git a/samples/server/openapi3/petstore/php-ze-ph/src/App/DTO/EnumTest.php b/samples/server/openapi3/petstore/php-ze-ph/src/App/DTO/EnumTest.php index 098d8b8402e..bb904f70208 100644 --- a/samples/server/openapi3/petstore/php-ze-ph/src/App/DTO/EnumTest.php +++ b/samples/server/openapi3/petstore/php-ze-ph/src/App/DTO/EnumTest.php @@ -40,4 +40,25 @@ class EnumTest * @var \App\DTO\OuterEnum */ public $outer_enum; + /** + * @DTA\Data(field="outerEnumInteger", nullable=true) + * @DTA\Strategy(name="Object", options={"type":\App\DTO\OuterEnumInteger::class}) + * @DTA\Validator(name="Dictionary", options={"type":\App\DTO\OuterEnumInteger::class}) + * @var \App\DTO\OuterEnumInteger + */ + public $outer_enum_integer; + /** + * @DTA\Data(field="outerEnumDefaultValue", nullable=true) + * @DTA\Strategy(name="Object", options={"type":\App\DTO\OuterEnumDefaultValue::class}) + * @DTA\Validator(name="Dictionary", options={"type":\App\DTO\OuterEnumDefaultValue::class}) + * @var \App\DTO\OuterEnumDefaultValue + */ + public $outer_enum_default_value; + /** + * @DTA\Data(field="outerEnumIntegerDefaultValue", nullable=true) + * @DTA\Strategy(name="Object", options={"type":\App\DTO\OuterEnumIntegerDefaultValue::class}) + * @DTA\Validator(name="Dictionary", options={"type":\App\DTO\OuterEnumIntegerDefaultValue::class}) + * @var \App\DTO\OuterEnumIntegerDefaultValue + */ + public $outer_enum_integer_default_value; } diff --git a/samples/server/openapi3/petstore/php-ze-ph/src/App/DTO/HealthCheckResult.php b/samples/server/openapi3/petstore/php-ze-ph/src/App/DTO/HealthCheckResult.php new file mode 100644 index 00000000000..60c8a703119 --- /dev/null +++ b/samples/server/openapi3/petstore/php-ze-ph/src/App/DTO/HealthCheckResult.php @@ -0,0 +1,19 @@ +