From c3efb91e313d97b09723e05a16d5c3e08f7a4d01 Mon Sep 17 00:00:00 2001 From: Thibault Duperron Date: Wed, 15 May 2019 15:12:00 +0200 Subject: [PATCH 01/18] Disable jdk8 when using responseWrapper (#2873) Fix #2872 --- .../codegen/languages/SpringCodegen.java | 53 ++++++++++--------- .../java/spring/SpringCodegenTest.java | 12 +++++ 2 files changed, 41 insertions(+), 24 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java index 8d315b1c2c..fdaa2bce4e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SpringCodegen.java @@ -21,6 +21,7 @@ import com.samskivert.mustache.Mustache; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.PathItem; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.openapitools.codegen.*; import org.openapitools.codegen.languages.features.BeanValidationFeatures; @@ -36,6 +37,7 @@ import java.util.*; import java.util.regex.Matcher; import java.util.stream.Collectors; +import static org.apache.commons.lang3.StringUtils.isNotEmpty; import static org.openapitools.codegen.utils.StringUtils.camelize; public class SpringCodegen extends AbstractJavaCodegen @@ -377,7 +379,7 @@ public class SpringCodegen extends AbstractJavaCodegen if (this.java8) { additionalProperties.put("javaVersion", "1.8"); if (!SPRING_CLOUD_LIBRARY.equals(library)) { - additionalProperties.put("jdk8", "true"); + additionalProperties.put("jdk8", true); } if (this.async) { additionalProperties.put(RESPONSE_WRAPPER, "CompletableFuture"); @@ -395,29 +397,32 @@ public class SpringCodegen extends AbstractJavaCodegen // Some well-known Spring or Spring-Cloud response wrappers - switch (this.responseWrapper) { - case "Future": - case "Callable": - case "CompletableFuture": - additionalProperties.put(RESPONSE_WRAPPER, "java.util.concurrent." + this.responseWrapper); - break; - case "ListenableFuture": - additionalProperties.put(RESPONSE_WRAPPER, "org.springframework.util.concurrent.ListenableFuture"); - break; - case "DeferredResult": - additionalProperties.put(RESPONSE_WRAPPER, "org.springframework.web.context.request.async.DeferredResult"); - break; - case "HystrixCommand": - additionalProperties.put(RESPONSE_WRAPPER, "com.netflix.hystrix.HystrixCommand"); - break; - case "RxObservable": - additionalProperties.put(RESPONSE_WRAPPER, "rx.Observable"); - break; - case "RxSingle": - additionalProperties.put(RESPONSE_WRAPPER, "rx.Single"); - break; - default: - break; + if (isNotEmpty(this.responseWrapper)) { + additionalProperties.put("jdk8", false); + switch (this.responseWrapper) { + case "Future": + case "Callable": + case "CompletableFuture": + additionalProperties.put(RESPONSE_WRAPPER, "java.util.concurrent." + this.responseWrapper); + break; + case "ListenableFuture": + additionalProperties.put(RESPONSE_WRAPPER, "org.springframework.util.concurrent.ListenableFuture"); + break; + case "DeferredResult": + additionalProperties.put(RESPONSE_WRAPPER, "org.springframework.web.context.request.async.DeferredResult"); + break; + case "HystrixCommand": + additionalProperties.put(RESPONSE_WRAPPER, "com.netflix.hystrix.HystrixCommand"); + break; + case "RxObservable": + additionalProperties.put(RESPONSE_WRAPPER, "rx.Observable"); + break; + case "RxSingle": + additionalProperties.put(RESPONSE_WRAPPER, "rx.Single"); + break; + default: + break; + } } // add lambda for mustache templates diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java index 43bf0e830b..8059873a45 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/spring/SpringCodegenTest.java @@ -25,6 +25,8 @@ import org.openapitools.codegen.languages.SpringCodegen; import org.testng.Assert; import org.testng.annotations.Test; +import static org.openapitools.codegen.languages.SpringCodegen.RESPONSE_WRAPPER; + public class SpringCodegenTest { @Test @@ -110,4 +112,14 @@ public class SpringCodegenTest { Assert.assertEquals(codegen.additionalProperties().get(SpringCodegen.TITLE), "someTest"); Assert.assertEquals(codegen.additionalProperties().get(SpringCodegen.SERVER_PORT), "8088"); } + + @Test + public void interfaceDefaultImplDisableWithReponseWrapper() { + final SpringCodegen codegen = new SpringCodegen(); + codegen.additionalProperties().put(SpringCodegen.JAVA_8, true); + codegen.additionalProperties().put(RESPONSE_WRAPPER, "aWrapper"); + codegen.processOpts(); + + Assert.assertEquals(codegen.additionalProperties().get("jdk8"), false); + } } From c353f79342af2bc0c27373e552f8f78e64c5605c Mon Sep 17 00:00:00 2001 From: "Mateusz Szychowski (Muttley)" Date: Wed, 15 May 2019 15:12:30 +0200 Subject: [PATCH 02/18] [F#][Giraffe] Remove unused import (#2893) --- .../codegen/languages/FsharpGiraffeServerCodegen.java | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java index 1b3fc948d0..5a84940292 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/FsharpGiraffeServerCodegen.java @@ -18,7 +18,6 @@ package org.openapitools.codegen.languages; import com.samskivert.mustache.Mustache; import io.swagger.v3.oas.models.OpenAPI; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; import org.openapitools.codegen.CodegenConstants; import org.openapitools.codegen.CodegenOperation; From 87414352a552d1ae106f21b8ffb9a358c93e7d80 Mon Sep 17 00:00:00 2001 From: Sergey Moiseev Date: Wed, 15 May 2019 16:17:57 +0300 Subject: [PATCH 03/18] Add support of Bearer Basic Authorization to Ruby client (#2856) * Support for Bearer in Ruby Client * Update README.mustache * Update README.mustache * Update api_doc.mustache * Update api_doc.mustache * Update api_doc.mustache * samples * Uncommited changes * Formatting * More Formatting * Fomatting * More formatting * More formatting * Even more formatting * Even more formatting * More formatting * Even more formatting * More formatting * More formatting --- .../src/main/resources/ruby-client/README.mustache | 13 +++++++++---- .../main/resources/ruby-client/api_doc.mustache | 6 ++++-- .../resources/ruby-client/configuration.mustache | 14 ++++++++++++++ samples/openapi3/client/petstore/ruby/README.md | 2 +- .../openapi3/client/petstore/ruby/docs/FakeApi.md | 5 ++--- .../petstore/ruby/lib/petstore/configuration.rb | 5 +++-- 6 files changed, 33 insertions(+), 12 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/README.mustache b/modules/openapi-generator/src/main/resources/ruby-client/README.mustache index 00f50d8134..182bb34f4f 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/README.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/README.mustache @@ -65,10 +65,12 @@ Please follow the [installation](#installation) procedure and then run the follo require '{{{gemName}}}' {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}{{#hasAuthMethods}} # Setup authorization -{{{moduleName}}}.configure do |config|{{#authMethods}}{{#isBasic}} +{{{moduleName}}}.configure do |config|{{#authMethods}}{{#isBasic}}{{^isBasicBearer}} # Configure HTTP basic authorization: {{{name}}} - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD'{{/isBasic}}{{#isApiKey}} + config.username = 'YOUR_USERNAME' + config.password = 'YOUR_PASSWORD'{{/isBasicBearer}}{{#isBasicBearer}} + # Configure Bearer authorization{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}: {{{name}}} + config.access_token = 'YOUR_BEARER_TOKEN'{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} # Configure API key authorization: {{{name}}} config.api_key['{{{keyParamName}}}'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) @@ -128,7 +130,10 @@ Class | Method | HTTP request | Description - **API key parameter name**: {{keyParamName}} - **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} {{/isApiKey}} -{{#isBasic}}- **Type**: HTTP basic authentication +{{#isBasic}} +{{^isBasicBearer}}- **Type**: HTTP basic authentication +{{/isBasicBearer}}{{#isBasicBearer}}- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} +{{/isBasicBearer}} {{/isBasic}} {{#isOAuth}} diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache index 960c0552dc..dc163725e1 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_doc.mustache @@ -27,10 +27,12 @@ Method | HTTP request | Description require '{{{gemName}}}' {{#hasAuthMethods}} # setup authorization -{{{moduleName}}}.configure do |config|{{#authMethods}}{{#isBasic}} +{{{moduleName}}}.configure do |config|{{#authMethods}}{{#isBasic}}{{^isBasicBearer}} # Configure HTTP basic authorization: {{{name}}} config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD'{{/isBasic}}{{#isApiKey}} + config.password = 'YOUR PASSWORD'{{/isBasicBearer}}{{#isBasicBearer}} + # Configure Bearer authorization{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}: {{{name}}} + config.access_token = 'YOUR_BEARER_TOKEN'{{/isBasicBearer}}{{/isBasic}}{{#isApiKey}} # Configure API key authorization: {{{name}}} config.api_key['{{{keyParamName}}}'] = 'YOUR API KEY' # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache b/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache index d0d190ff2f..2f43306a3b 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache @@ -199,6 +199,7 @@ module {{moduleName}} }, {{/isApiKey}} {{#isBasic}} +{{^isBasicBearer}} '{{name}}' => { type: 'basic', @@ -206,6 +207,19 @@ module {{moduleName}} key: 'Authorization', value: basic_auth_token }, +{{/isBasicBearer}} +{{#isBasicBearer}} + '{{name}}' => + { + type: 'bearer', + in: 'header', + {{#bearerFormat}} + format: '{{{.}}}', + {{/bearerFormat}} + key: 'Authorization', + value: "Bearer #{access_token}" + }, +{{/isBasicBearer}} {{/isBasic}} {{#isOAuth}} '{{name}}' => diff --git a/samples/openapi3/client/petstore/ruby/README.md b/samples/openapi3/client/petstore/ruby/README.md index 80fd4176e9..6fb930ed9a 100644 --- a/samples/openapi3/client/petstore/ruby/README.md +++ b/samples/openapi3/client/petstore/ruby/README.md @@ -180,7 +180,7 @@ Class | Method | HTTP request | Description ### bearer_test -- **Type**: HTTP basic authentication +- **Type**: Bearer authentication (JWT) ### http_basic_test diff --git a/samples/openapi3/client/petstore/ruby/docs/FakeApi.md b/samples/openapi3/client/petstore/ruby/docs/FakeApi.md index b1168cc938..ab79170143 100644 --- a/samples/openapi3/client/petstore/ruby/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/ruby/docs/FakeApi.md @@ -547,9 +547,8 @@ Fake endpoint to test group parameters (optional) require 'petstore' # setup authorization Petstore.configure do |config| - # Configure HTTP basic authorization: bearer_test - config.username = 'YOUR USERNAME' - config.password = 'YOUR PASSWORD' + # Configure Bearer authorization (JWT): bearer_test + config.access_token = 'YOUR_BEARER_TOKEN' end api_instance = Petstore::FakeApi.new diff --git a/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb b/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb index 3bd4b80432..b3dca719e0 100644 --- a/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb +++ b/samples/openapi3/client/petstore/ruby/lib/petstore/configuration.rb @@ -212,10 +212,11 @@ module Petstore }, 'bearer_test' => { - type: 'basic', + type: 'bearer', in: 'header', + format: 'JWT', key: 'Authorization', - value: basic_auth_token + value: "Bearer #{access_token}" }, 'http_basic_test' => { From 42f47b7b0afe6e584446959dd43ebfdf401248c0 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Wed, 15 May 2019 22:25:34 +0800 Subject: [PATCH 04/18] add CAM logo to the website (#2898) --- website/dynamic/users.yml | 5 +++++ website/static/img/companies/cam.png | Bin 0 -> 55547 bytes 2 files changed, 5 insertions(+) create mode 100644 website/static/img/companies/cam.png diff --git a/website/dynamic/users.yml b/website/dynamic/users.yml index a6a6210976..d32144a8f8 100644 --- a/website/dynamic/users.yml +++ b/website/dynamic/users.yml @@ -23,6 +23,11 @@ image: "img/companies/boxever.svg" infoLink: "https://www.boxever.com/" pinned: false +- + caption: CAM + image: "img/companies/cam.png" + infoLink: "https://www.cam-inc.co.jp" + pinned: false - caption: FiNC Technologies image: "img/companies/finc-technologies.png" diff --git a/website/static/img/companies/cam.png b/website/static/img/companies/cam.png new file mode 100644 index 0000000000000000000000000000000000000000..58aaec918f020bcb6293597584ce7f957766b839 GIT binary patch literal 55547 zcmeEuhdY)1AOC%fkd=|_b&fql_R3bGsK{0_$|huI`+nIp&n0)miv zQ6GRmA*3yn5QHBw);oSSICo)!Dj?%q_403;!XQ@G^vQ->w~7SsTZtM@TWP0X)YWIy z*Gq_UJg$=>*mPp);6TZSc#J(c1vL*D%^@=Ph^zUbYlFJ@bi2uw{iiRFNT>SCgu49b znOstrXIXCNi`*4}5B&E(pC$z_#{c~WLG~D9vH$mX?5uEm|NZB9TAA#B|BpXDP5rG-=bC3AiCd&bUUgW1ZrF4sND)A#XPq5oaAsvfVkr%qr*>;wPIpHm6jtcr<= z>3DXjeP;9bSHCZB<6HJVG6<9nES5%5(%ussD7bU+U4rrNFYij-`ioXb(TpoAd0INjb{M_2c9Z@xx#Y|E`d4FiowU8WR_nBiR4Sb8Iif&6Q~vd-d~^l|Eg@Y{7xzJDTEm zG}iB?i=TVXdhfp<;xC1dt<~4jiCUOwuvGLI=I2uKQizd&2jV&%j;dWMyUr|0Br$^aZ<8)da_Nfw}yW(U(_qbOr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: update to work with dart 2.3.0 * dart2: update to work with dart 2.3.0 --- .../openapi-generator/src/main/resources/dart/pubspec.mustache | 2 +- .../openapi-generator/src/main/resources/dart2/pubspec.mustache | 2 +- .../client/petstore/dart/flutter_petstore/openapi/pubspec.yaml | 2 +- .../client/petstore/dart/openapi-browser-client/pubspec.yaml | 2 +- samples/client/petstore/dart/openapi/pubspec.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/dart/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart/pubspec.mustache index a338854b74..ef8fab4bb2 100644 --- a/modules/openapi-generator/src/main/resources/dart/pubspec.mustache +++ b/modules/openapi-generator/src/main/resources/dart/pubspec.mustache @@ -2,4 +2,4 @@ name: {{pubName}} version: {{pubVersion}} description: {{pubDescription}} dependencies: - http: '>=0.11.1 <0.12.0' + http: '>=0.11.1 <0.13.0' diff --git a/modules/openapi-generator/src/main/resources/dart2/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart2/pubspec.mustache index 388572afe6..008cee0b24 100644 --- a/modules/openapi-generator/src/main/resources/dart2/pubspec.mustache +++ b/modules/openapi-generator/src/main/resources/dart2/pubspec.mustache @@ -4,4 +4,4 @@ description: {{pubDescription}} environment: sdk: '>=2.0.0 <3.0.0' dependencies: - http: '>=0.11.1 <0.12.0' + http: '>=0.11.1 <0.13.0' diff --git a/samples/client/petstore/dart/flutter_petstore/openapi/pubspec.yaml b/samples/client/petstore/dart/flutter_petstore/openapi/pubspec.yaml index d54efb46a2..79e5223fcd 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/pubspec.yaml +++ b/samples/client/petstore/dart/flutter_petstore/openapi/pubspec.yaml @@ -2,4 +2,4 @@ name: openapi version: 1.0.0 description: OpenAPI API client dependencies: - http: '>=0.11.1 <0.12.0' + http: '>=0.11.1 <0.13.0' diff --git a/samples/client/petstore/dart/openapi-browser-client/pubspec.yaml b/samples/client/petstore/dart/openapi-browser-client/pubspec.yaml index d54efb46a2..79e5223fcd 100644 --- a/samples/client/petstore/dart/openapi-browser-client/pubspec.yaml +++ b/samples/client/petstore/dart/openapi-browser-client/pubspec.yaml @@ -2,4 +2,4 @@ name: openapi version: 1.0.0 description: OpenAPI API client dependencies: - http: '>=0.11.1 <0.12.0' + http: '>=0.11.1 <0.13.0' diff --git a/samples/client/petstore/dart/openapi/pubspec.yaml b/samples/client/petstore/dart/openapi/pubspec.yaml index d54efb46a2..79e5223fcd 100644 --- a/samples/client/petstore/dart/openapi/pubspec.yaml +++ b/samples/client/petstore/dart/openapi/pubspec.yaml @@ -2,4 +2,4 @@ name: openapi version: 1.0.0 description: OpenAPI API client dependencies: - http: '>=0.11.1 <0.12.0' + http: '>=0.11.1 <0.13.0' From f550553e3fa1cf7cc0bebf8bac4e91831d4417ac Mon Sep 17 00:00:00 2001 From: Vincent Devos <46601673+karismann@users.noreply.github.com> Date: Fri, 17 May 2019 07:55:24 +0200 Subject: [PATCH 06/18] [Typescript] gets package npm version from API specification (#2920) * [TypeScript] gets package npm version from API specification * forgot flowtyped --- docs/generators/javascript-flowtyped.md | 6 +- docs/generators/typescript-angular.md | 4 +- docs/generators/typescript-aurelia.md | 5 +- docs/generators/typescript-axios.md | 6 +- docs/generators/typescript-fetch.md | 6 +- docs/generators/typescript-inversify.md | 6 +- docs/generators/typescript-jquery.md | 6 +- docs/generators/typescript-node.md | 6 +- docs/generators/typescript-rxjs.md | 6 +- .../openapitools/codegen/DefaultCodegen.java | 15 ++++- .../AbstractTypeScriptClientCodegen.java | 67 +++++++++++++++++-- .../JavascriptFlowtypedClientCodegen.java | 25 ------- .../TypeScriptAngularClientCodegen.java | 57 ---------------- .../TypeScriptAngularJsClientCodegen.java | 6 ++ .../TypeScriptAureliaClientCodegen.java | 18 +---- .../TypeScriptAxiosClientCodegen.java | 41 ------------ .../TypeScriptFetchClientCodegen.java | 41 ------------ .../TypeScriptInversifyClientCodegen.java | 43 ------------ .../TypeScriptJqueryClientCodegen.java | 38 ----------- .../TypeScriptNodeClientCodegen.java | 42 +----------- .../TypeScriptRxjsClientCodegen.java | 41 ------------ ...ypeScriptAureliaClientOptionsProvider.java | 9 +-- .../TypeScriptFetchClientCodegenTest.java | 10 +++ .../TypeScriptNodeClientCodegenTest.java | 10 +++ 24 files changed, 134 insertions(+), 380 deletions(-) diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md index 831f5c1586..18c53c560d 100644 --- a/docs/generators/javascript-flowtyped.md +++ b/docs/generators/javascript-flowtyped.md @@ -13,7 +13,7 @@ sidebar_label: javascript-flowtyped |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |supportsES6|Generate code that conforms to ES6.| |false| -|npmName|The name under which you want to publish generated npm package| |null| -|npmVersion|The version of your npm package| |null| +|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 36e331ad84..0090d5472b 100644 --- a/docs/generators/typescript-angular.md +++ b/docs/generators/typescript-angular.md @@ -13,10 +13,10 @@ sidebar_label: typescript-angular |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |supportsES6|Generate code that conforms to ES6.| |false| -|npmName|The name under which you want to publish generated npm package. Required to generate a full angular package| |null| +|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| |npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| |taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false| |providedInRoot|Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0).| |false| diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md index 1313df5d5e..49e909d194 100644 --- a/docs/generators/typescript-aurelia.md +++ b/docs/generators/typescript-aurelia.md @@ -13,5 +13,6 @@ sidebar_label: typescript-aurelia |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |supportsES6|Generate code that conforms to ES6.| |false| -|npmName|The name under which you want to publish generated npm package| |null| -|npmVersion|The version of your npm package| |null| +|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md index 1623947770..efd9e5b4b5 100644 --- a/docs/generators/typescript-axios.md +++ b/docs/generators/typescript-axios.md @@ -13,10 +13,10 @@ sidebar_label: typescript-axios |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |supportsES6|Generate code that conforms to ES6.| |false| -|npmName|The name under which you want to publish generated npm package| |null| -|npmVersion|The version of your npm package| |null| +|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url of your private npmRepo in the package.json| |null| -|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| |withSeparateModelsAndApi|Put the model and api in separate folders and in separate classes| |false| |withoutPrefixEnums|Don't prefix enum names with class names| |false| diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md index 71742b582f..1ccb820eee 100644 --- a/docs/generators/typescript-fetch.md +++ b/docs/generators/typescript-fetch.md @@ -13,8 +13,8 @@ sidebar_label: typescript-fetch |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |supportsES6|Generate code that conforms to ES6.| |false| -|npmName|The name under which you want to publish generated npm package| |null| -|npmVersion|The version of your npm package| |null| +|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md index c521c73f4b..4a7cbc73c4 100644 --- a/docs/generators/typescript-inversify.md +++ b/docs/generators/typescript-inversify.md @@ -13,10 +13,10 @@ sidebar_label: typescript-inversify |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |supportsES6|Generate code that conforms to ES6.| |false| -|npmName|The name under which you want to publish generated npm package| |null| -|npmVersion|The version of your npm package| |null| +|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| |usePromise|Setting this property to use promise instead of observable inside every service.| |false| |taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false| diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md index b40fd66c3b..dd63595939 100644 --- a/docs/generators/typescript-jquery.md +++ b/docs/generators/typescript-jquery.md @@ -13,8 +13,8 @@ sidebar_label: typescript-jquery |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |supportsES6|Generate code that conforms to ES6.| |false| -|npmName|The name under which you want to publish generated npm package| |null| -|npmVersion|The version of your npm package| |null| +|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |jqueryAlreadyImported|When using this in legacy app using mix of typescript and javascript, this will only declare jquery and not import it| |false| diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md index 76fb292527..60dd406eb3 100644 --- a/docs/generators/typescript-node.md +++ b/docs/generators/typescript-node.md @@ -13,7 +13,7 @@ sidebar_label: typescript-node |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |supportsES6|Generate code that conforms to ES6.| |false| -|npmName|The name under which you want to publish generated npm package| |null| -|npmVersion|The version of your npm package| |null| +|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md index 2fd435e312..b2db2dc057 100644 --- a/docs/generators/typescript-rxjs.md +++ b/docs/generators/typescript-rxjs.md @@ -13,8 +13,8 @@ sidebar_label: typescript-rxjs |prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| |modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |camelCase| |supportsES6|Generate code that conforms to ES6.| |false| -|npmName|The name under which you want to publish generated npm package| |null| -|npmVersion|The version of your npm package| |null| +|npmName|The name under which you want to publish generated npm package. Required to generate a full package| |null| +|npmVersion|The version of your npm package. If not provided, using the version from the OpenAPI specification file.| |1.0.0| +|snapshot|When setting this property to true, the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |npmRepository|Use this property to set an url your private npmRepo in the package.json| |null| -|snapshot|When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm| |false| |withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index e24ac51949..5a89e31a19 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -4833,10 +4833,19 @@ public class DefaultCodegen implements CodegenConfig { } protected void updateOption(String key, String defaultValue) { + for (CliOption cliOption : cliOptions) { + if (cliOption.getOpt().equals(key)) { + cliOption.setDefault(defaultValue); + break; + } + } + } + + protected void removeOption(String key) { for(int i = 0; i < cliOptions.size(); i++) { - if(cliOptions.get(i).getOpt().equals(key)) { - cliOptions.get(i).setDefault(defaultValue); - return; + if (key.equals(cliOptions.get(i).getOpt())) { + cliOptions.remove(i); + break; } } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java index 68c1046af6..ab230e20be 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractTypeScriptClientCodegen.java @@ -17,6 +17,7 @@ package org.openapitools.codegen.languages; +import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.ArraySchema; import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.oas.models.parameters.Parameter; @@ -39,14 +40,19 @@ import static org.openapitools.codegen.utils.StringUtils.underscore; public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen implements CodegenConfig { private static final Logger LOGGER = LoggerFactory.getLogger(AbstractTypeScriptClientCodegen.class); - protected static final SimpleDateFormat SNAPSHOT_SUFFIX_FORMAT = new SimpleDateFormat("yyyyMMddHHmm", Locale.ROOT); - private static final String X_DISCRIMINATOR_TYPE = "x-discriminator-value"; private static final String UNDEFINED_VALUE = "undefined"; + public static final String NPM_NAME = "npmName"; + public static final String NPM_VERSION = "npmVersion"; + public static final String SNAPSHOT = "snapshot"; + + protected static final SimpleDateFormat SNAPSHOT_SUFFIX_FORMAT = new SimpleDateFormat("yyyyMMddHHmm", Locale.ROOT); protected String modelPropertyNaming = "camelCase"; protected Boolean supportsES6 = false; protected HashSet languageGenericTypes; + protected String npmName = null; + protected String npmVersion = "1.0.0"; public AbstractTypeScriptClientCodegen() { super(); @@ -119,8 +125,14 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp typeMapping.put("UUID", "string"); typeMapping.put("Error", "Error"); - cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue("camelCase")); + cliOptions.add(new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC).defaultValue(this.modelPropertyNaming)); cliOptions.add(new CliOption(CodegenConstants.SUPPORTS_ES6, CodegenConstants.SUPPORTS_ES6_DESC).defaultValue(String.valueOf(this.getSupportsES6()))); + this.cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package." + + " Required to generate a full package")); + this.cliOptions.add(new CliOption(NPM_VERSION, "The version of your npm package. If not provided, using the version from the OpenAPI specification file.").defaultValue(this.getNpmVersion())); + this.cliOptions.add(CliOption.newBoolean(SNAPSHOT, + "When setting this property to true, the version will be suffixed with -SNAPSHOT." + this.SNAPSHOT_SUFFIX_FORMAT.toPattern(), + false)); } @@ -144,6 +156,37 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp setSupportsES6(Boolean.valueOf(additionalProperties.get(CodegenConstants.SUPPORTS_ES6).toString())); additionalProperties.put("supportsES6", getSupportsES6()); } + + if (additionalProperties.containsKey(NPM_NAME)) { + this.setNpmName(additionalProperties.get(NPM_NAME).toString()); + } + + } + + @Override + public void preprocessOpenAPI(OpenAPI openAPI) { + + if (additionalProperties.containsKey(NPM_NAME)) { + + // If no npmVersion is provided in additional properties, version from API specification is used. + // If none of them is provided then fallbacks to default version + if (additionalProperties.containsKey(NPM_VERSION)) { + this.setNpmVersion(additionalProperties.get(NPM_VERSION).toString()); + } else if (openAPI.getInfo() != null && openAPI.getInfo().getVersion() != null) { + this.setNpmVersion(openAPI.getInfo().getVersion()); + } + + if (additionalProperties.containsKey(SNAPSHOT) && Boolean.valueOf(additionalProperties.get(SNAPSHOT).toString())) { + if (npmVersion.toUpperCase(Locale.ROOT).matches("^.*-SNAPSHOT$")) { + this.setNpmVersion(npmVersion + "." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); + } else { + this.setNpmVersion(npmVersion + "-SNAPSHOT." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); + } + } + additionalProperties.put(NPM_VERSION, npmVersion); + + } + } @Override @@ -197,7 +240,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp public String toVarName(String name) { name = this.toParamName(name); - // if the proprty name has any breaking characters such as :, ;, . etc. + // if the property name has any breaking characters such as :, ;, . etc. // then wrap the name within single quotes. // my:interface:property: string; => 'my:interface:property': string; if (propertyHasBreakingCharacters(name)) { @@ -568,6 +611,22 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp return supportsES6; } + public String getNpmName() { + return npmName; + } + + public void setNpmName(String npmName) { + this.npmName = npmName; + } + + public String getNpmVersion() { + return npmVersion; + } + + public void setNpmVersion(String npmVersion) { + this.npmVersion = npmVersion; + } + private void setDiscriminatorValue(CodegenModel model, String baseName, String value) { for (CodegenProperty prop : model.allVars) { if (prop.baseName.equals(baseName)) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java index f073bed32f..e213cd9235 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java @@ -32,13 +32,8 @@ import java.util.*; import static org.openapitools.codegen.utils.StringUtils.dashize; public class JavascriptFlowtypedClientCodegen extends AbstractTypeScriptClientCodegen { - public static final String NPM_NAME = "npmName"; - public static final String NPM_VERSION = "npmVersion"; public static final String NPM_REPOSITORY = "npmRepository"; - public static final String SNAPSHOT = "snapshot"; - protected String npmName = null; - protected String npmVersion = "1.0.0"; protected String npmRepository = null; public JavascriptFlowtypedClientCodegen() { @@ -105,10 +100,7 @@ public class JavascriptFlowtypedClientCodegen extends AbstractTypeScriptClientCo outputFolder = "generated-code/javascript-flowtyped"; embeddedTemplateDir = templateDir = "Javascript-Flowtyped"; - this.cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package")); - this.cliOptions.add(new CliOption(NPM_VERSION, "The version of your npm package")); this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json")); - this.cliOptions.add(new CliOption(SNAPSHOT, "When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); } @@ -130,23 +122,6 @@ public class JavascriptFlowtypedClientCodegen extends AbstractTypeScriptClientCo } private void addNpmPackageGeneration() { - if (additionalProperties.containsKey(NPM_NAME)) { - this.setNpmName(additionalProperties.get(NPM_NAME).toString()); - } - - if (additionalProperties.containsKey(NPM_VERSION)) { - this.setNpmVersion(additionalProperties.get(NPM_VERSION).toString()); - } - - if (additionalProperties.containsKey(SNAPSHOT) && Boolean.valueOf(additionalProperties.get(SNAPSHOT).toString())) { - if (npmVersion.toUpperCase(Locale.ROOT).matches("^.*-SNAPSHOT$")) { - this.setNpmVersion(npmVersion + "." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - else { - this.setNpmVersion(npmVersion + "-SNAPSHOT." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - } - additionalProperties.put(NPM_VERSION, npmVersion); if (additionalProperties.containsKey(NPM_REPOSITORY)) { this.setNpmRepository(additionalProperties.get(NPM_REPOSITORY).toString()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java index e5c8f1d002..b313d606a8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java @@ -38,10 +38,7 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode private static String CLASS_NAME_SUFFIX_PATTERN = "^[a-zA-Z0-9]*$"; private static String FILE_NAME_SUFFIX_PATTERN = "^[a-zA-Z0-9.-]*$"; - public static final String NPM_NAME = "npmName"; - public static final String NPM_VERSION = "npmVersion"; public static final String NPM_REPOSITORY = "npmRepository"; - public static final String SNAPSHOT = "snapshot"; public static final String WITH_INTERFACES = "withInterfaces"; public static final String TAGGED_UNIONS = "taggedUnions"; public static final String NG_VERSION = "ngVersion"; @@ -52,8 +49,6 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode public static final String MODEL_FILE_SUFFIX = "modelFileSuffix"; public static final String FILE_NAMING = "fileNaming"; - protected String npmName = null; - protected String npmVersion = "1.0.0"; protected String ngVersion = "7.0.0"; protected String npmRepository = null; protected String serviceSuffix = "Service"; @@ -76,14 +71,8 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode apiPackage = "api"; modelPackage = "model"; - this.cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package." + - " Required to generate a full angular package")); - this.cliOptions.add(new CliOption(NPM_VERSION, "The version of your npm package. If not provided, using the version from the OpenAPI specification file.").defaultValue(this.getNpmVersion())); this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json")); - this.cliOptions.add(CliOption.newBoolean(SNAPSHOT, - "When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm", - false)); this.cliOptions.add(CliOption.newBoolean(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", false)); @@ -200,10 +189,6 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode private void addNpmPackageGeneration(SemVer ngVersion) { - if (additionalProperties.containsKey(NPM_NAME)) { - this.setNpmName(additionalProperties.get(NPM_NAME).toString()); - } - if (additionalProperties.containsKey(NPM_REPOSITORY)) { this.setNpmRepository(additionalProperties.get(NPM_REPOSITORY).toString()); } @@ -282,32 +267,6 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode supportingFiles.add(new SupportingFile("tsconfig.mustache", getIndexDirectory(), "tsconfig.json")); } - @Override - public void preprocessOpenAPI(OpenAPI openAPI) { - - if (additionalProperties.containsKey(NPM_NAME)) { - - // If no npmVersion is provided in additional properties, version from API specification is used. - // If none of them is provided then fallbacks to default version - if (additionalProperties.containsKey(NPM_VERSION)) { - this.setNpmVersion(additionalProperties.get(NPM_VERSION).toString()); - } else if (openAPI.getInfo() != null && openAPI.getInfo().getVersion() != null) { - this.setNpmVersion(openAPI.getInfo().getVersion()); - } - - if (additionalProperties.containsKey(SNAPSHOT) && Boolean.valueOf(additionalProperties.get(SNAPSHOT).toString())) { - if (npmVersion.toUpperCase(Locale.ROOT).matches("^.*-SNAPSHOT$")) { - this.setNpmVersion(npmVersion + "." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } else { - this.setNpmVersion(npmVersion + "-SNAPSHOT." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - } - additionalProperties.put(NPM_VERSION, npmVersion); - - } - - } - private String getIndexDirectory() { String indexPackage = modelPackage.substring(0, Math.max(0, modelPackage.lastIndexOf('.'))); return indexPackage.replace('.', File.separatorChar); @@ -551,22 +510,6 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode return modelPackage() + "/" + toModelFilename(name); } - public String getNpmName() { - return npmName; - } - - public void setNpmName(String npmName) { - this.npmName = npmName; - } - - public String getNpmVersion() { - return npmVersion; - } - - public void setNpmVersion(String npmVersion) { - this.npmVersion = npmVersion; - } - public String getNpmRepository() { return npmRepository; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java index 7621cbe370..dc68aace1e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularJsClientCodegen.java @@ -33,6 +33,11 @@ public class TypeScriptAngularJsClientCodegen extends AbstractTypeScriptClientCo embeddedTemplateDir = templateDir = "typescript-angularjs"; apiPackage = "api"; modelPackage = "model"; + + removeOption(NPM_NAME); + removeOption(NPM_VERSION); + removeOption(SNAPSHOT); + } @Override @@ -48,6 +53,7 @@ public class TypeScriptAngularJsClientCodegen extends AbstractTypeScriptClientCo @Override public void processOpts() { super.processOpts(); + supportingFiles.add(new SupportingFile("models.mustache", modelPackage().replace('.', File.separatorChar), "models.ts")); supportingFiles.add(new SupportingFile("apis.mustache", apiPackage().replace('.', File.separatorChar), "api.ts")); supportingFiles.add(new SupportingFile("index.mustache", getIndexDirectory(), "index.ts")); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java index 2a9d2123ce..3ed6203c2a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAureliaClientCodegen.java @@ -18,7 +18,6 @@ package org.openapitools.codegen.languages; import org.openapitools.codegen.*; -import org.openapitools.codegen.utils.StringUtils; import java.util.*; @@ -26,12 +25,6 @@ import static org.openapitools.codegen.utils.StringUtils.*; public class TypeScriptAureliaClientCodegen extends AbstractTypeScriptClientCodegen { - public static final String NPM_NAME = "npmName"; - public static final String NPM_VERSION = "npmVersion"; - - protected String npmName = null; - protected String npmVersion = "1.0.0"; - public TypeScriptAureliaClientCodegen() { super(); @@ -43,8 +36,7 @@ public class TypeScriptAureliaClientCodegen extends AbstractTypeScriptClientCode outputFolder = "generated-code/typescript-aurelia"; embeddedTemplateDir = templateDir = "typescript-aurelia"; - this.cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package")); - this.cliOptions.add(new CliOption(NPM_VERSION, "The version of your npm package")); + } @Override @@ -77,14 +69,6 @@ public class TypeScriptAureliaClientCodegen extends AbstractTypeScriptClientCode public void processOpts() { super.processOpts(); - if (additionalProperties.containsKey(NPM_NAME)) { - this.setNpmName(additionalProperties.get(NPM_NAME).toString()); - } - - if (additionalProperties.containsKey(NPM_VERSION)) { - this.setNpmVersion(additionalProperties.get(NPM_VERSION).toString()); - } - // Set supporting files supportingFiles.add(new SupportingFile("models.mustache", "", "models.ts")); supportingFiles.add(new SupportingFile("index.ts.mustache", "", "index.ts")); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java index 2360aab7d1..fff5afb332 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java @@ -33,16 +33,11 @@ import java.util.*; public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodegen { - public static final String NPM_NAME = "npmName"; - public static final String NPM_VERSION = "npmVersion"; public static final String NPM_REPOSITORY = "npmRepository"; - public static final String SNAPSHOT = "snapshot"; public static final String WITH_INTERFACES = "withInterfaces"; public static final String SEPARATE_MODELS_AND_API = "withSeparateModelsAndApi"; public static final String WITHOUT_PREFIX_ENUMS = "withoutPrefixEnums"; - protected String npmName = null; - protected String npmVersion = "1.0.0"; protected String npmRepository = null; private String tsModelPackage = ""; @@ -57,10 +52,7 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege outputFolder = "generated-code/typescript-axios"; embeddedTemplateDir = templateDir = "typescript-axios"; - this.cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package")); - this.cliOptions.add(new CliOption(NPM_VERSION, "The version of your npm package")); this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url of your private npmRepo in the package.json")); - this.cliOptions.add(new CliOption(SNAPSHOT, "When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(SEPARATE_MODELS_AND_API, "Put the model and api in separate folders and in separate classes", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(WITHOUT_PREFIX_ENUMS, "Don't prefix enum names with class names", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); @@ -76,22 +68,6 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege return "Generates a TypeScript client library using axios."; } - public String getNpmName() { - return npmName; - } - - public void setNpmName(String npmName) { - this.npmName = npmName; - } - - public String getNpmVersion() { - return npmVersion; - } - - public void setNpmVersion(String npmVersion) { - this.npmVersion = npmVersion; - } - public String getNpmRepository() { return npmRepository; } @@ -235,23 +211,6 @@ public class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege } private void addNpmPackageGeneration() { - if (additionalProperties.containsKey(NPM_NAME)) { - this.setNpmName(additionalProperties.get(NPM_NAME).toString()); - } - - if (additionalProperties.containsKey(NPM_VERSION)) { - this.setNpmVersion(additionalProperties.get(NPM_VERSION).toString()); - } - - if (additionalProperties.containsKey(SNAPSHOT) && Boolean.valueOf(additionalProperties.get(SNAPSHOT).toString())) { - if (npmVersion.toUpperCase(Locale.ROOT).matches("^.*-SNAPSHOT$")) { - this.setNpmVersion(npmVersion + "." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - else { - this.setNpmVersion(npmVersion + "-SNAPSHOT." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - } - additionalProperties.put(NPM_VERSION, npmVersion); if (additionalProperties.containsKey(NPM_REPOSITORY)) { this.setNpmRepository(additionalProperties.get(NPM_REPOSITORY).toString()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java index 5dc9706fee..4d80efd6a7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptFetchClientCodegen.java @@ -33,14 +33,9 @@ import java.util.Map; public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodegen { - public static final String NPM_NAME = "npmName"; - public static final String NPM_VERSION = "npmVersion"; public static final String NPM_REPOSITORY = "npmRepository"; - public static final String SNAPSHOT = "snapshot"; public static final String WITH_INTERFACES = "withInterfaces"; - protected String npmName = null; - protected String npmVersion = "1.0.0"; protected String npmRepository = null; public TypeScriptFetchClientCodegen() { @@ -59,10 +54,7 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege this.modelTemplateFiles.put("models.mustache", ".ts"); this.addExtraReservedWords(); - this.cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package")); - this.cliOptions.add(new CliOption(NPM_VERSION, "The version of your npm package")); this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json")); - this.cliOptions.add(new CliOption(SNAPSHOT, "When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); } @@ -76,22 +68,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege return "Generates a TypeScript client library using Fetch API (beta)."; } - public String getNpmName() { - return npmName; - } - - public void setNpmName(String npmName) { - this.npmName = npmName; - } - - public String getNpmVersion() { - return npmVersion; - } - - public void setNpmVersion(String npmVersion) { - this.npmVersion = npmVersion; - } - public String getNpmRepository() { return npmRepository; } @@ -196,23 +172,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege } private void addNpmPackageGeneration() { - if (additionalProperties.containsKey(NPM_NAME)) { - this.setNpmName(additionalProperties.get(NPM_NAME).toString()); - } - - if (additionalProperties.containsKey(NPM_VERSION)) { - this.setNpmVersion(additionalProperties.get(NPM_VERSION).toString()); - } - - if (additionalProperties.containsKey(SNAPSHOT) && Boolean.valueOf(additionalProperties.get(SNAPSHOT).toString())) { - if (npmVersion.toUpperCase(Locale.ROOT).matches("^.*-SNAPSHOT$")) { - this.setNpmVersion(npmVersion + "." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - else { - this.setNpmVersion(npmVersion + "-SNAPSHOT." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - } - additionalProperties.put(NPM_VERSION, npmVersion); if (additionalProperties.containsKey(NPM_REPOSITORY)) { this.setNpmRepository(additionalProperties.get(NPM_REPOSITORY).toString()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java index 05464d1a1f..7714265d1e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptInversifyClientCodegen.java @@ -33,16 +33,11 @@ import static org.openapitools.codegen.utils.StringUtils.camelize; public class TypeScriptInversifyClientCodegen extends AbstractTypeScriptClientCodegen { - public static final String NPM_NAME = "npmName"; - public static final String NPM_VERSION = "npmVersion"; public static final String NPM_REPOSITORY = "npmRepository"; - public static final String SNAPSHOT = "snapshot"; public static final String WITH_INTERFACES = "withInterfaces"; public static final String USE_PROMISE = "usePromise"; public static final String TAGGED_UNIONS = "taggedUnions"; - protected String npmVersion = null; - protected String npmName = null; protected String npmRepository = null; private boolean taggedUnions = false; @@ -58,13 +53,8 @@ public class TypeScriptInversifyClientCodegen extends AbstractTypeScriptClientCo apiPackage = "api"; modelPackage = "model"; - this.cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package")); - this.cliOptions.add(new CliOption(NPM_VERSION, "The version of your npm package")); this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json")); - this.cliOptions.add(new CliOption(SNAPSHOT, - "When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm", - SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); @@ -122,23 +112,6 @@ public class TypeScriptInversifyClientCodegen extends AbstractTypeScriptClientCo } private void addNpmPackageGeneration() { - if (additionalProperties.containsKey(NPM_NAME)) { - this.setNpmName(additionalProperties.get(NPM_NAME).toString()); - } - - if (additionalProperties.containsKey(NPM_VERSION)) { - this.setNpmVersion(additionalProperties.get(NPM_VERSION).toString()); - } - - if (additionalProperties.containsKey(SNAPSHOT) && Boolean.valueOf(additionalProperties.get(SNAPSHOT).toString())) { - if (npmVersion.toUpperCase(Locale.ROOT).matches("^.*-SNAPSHOT$")) { - this.setNpmVersion(npmVersion + "." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - else { - this.setNpmVersion(npmVersion + "-SNAPSHOT." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - } - additionalProperties.put(NPM_VERSION, npmVersion); if (additionalProperties.containsKey(NPM_REPOSITORY)) { this.setNpmRepository(additionalProperties.get(NPM_REPOSITORY).toString()); @@ -348,22 +321,6 @@ public class TypeScriptInversifyClientCodegen extends AbstractTypeScriptClientCo return modelPackage() + "/" + toModelFilename(name); } - public String getNpmName() { - return npmName; - } - - public void setNpmName(String npmName) { - this.npmName = npmName; - } - - public String getNpmVersion() { - return npmVersion; - } - - public void setNpmVersion(String npmVersion) { - this.npmVersion = npmVersion; - } - public String getNpmRepository() { return npmRepository; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java index 379b2a0ee7..6c5cf87646 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java @@ -34,14 +34,10 @@ import java.util.Locale; public class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(TypeScriptJqueryClientCodegen.class); - public static final String NPM_NAME = "npmName"; - public static final String NPM_VERSION = "npmVersion"; public static final String NPM_REPOSITORY = "npmRepository"; public static final String SNAPSHOT = "snapshot"; public static final String JQUERY_ALREADY_IMPORTED = "jqueryAlreadyImported"; - protected String npmName = null; - protected String npmVersion = "1.0.0"; protected String npmRepository = null; public TypeScriptJqueryClientCodegen() { @@ -56,12 +52,7 @@ public class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodeg outputFolder = "generated-code/typescript-jquery"; embeddedTemplateDir = templateDir = "typescript-jquery"; - this.cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package")); - this.cliOptions.add(new CliOption(NPM_VERSION, "The version of your npm package")); this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json")); - this.cliOptions.add(new CliOption(SNAPSHOT, - "When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm", - SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(JQUERY_ALREADY_IMPORTED, "When using this in legacy app using mix of typescript and javascript, this will only declare jquery and not import it", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); @@ -77,18 +68,6 @@ public class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodeg return "Generates a TypeScript jquery client library."; } - public void setNpmName(String npmName) { - this.npmName = npmName; - } - - public void setNpmVersion(String npmVersion) { - this.npmVersion = npmVersion; - } - - public String getNpmVersion() { - return npmVersion; - } - public String getNpmRepository() { return npmRepository; } @@ -172,23 +151,6 @@ public class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodeg } private void addNpmPackageGeneration() { - if (additionalProperties.containsKey(NPM_NAME)) { - this.setNpmName(additionalProperties.get(NPM_NAME).toString()); - } - - if (additionalProperties.containsKey(NPM_VERSION)) { - this.setNpmVersion(additionalProperties.get(NPM_VERSION).toString()); - } - - if (additionalProperties.containsKey(SNAPSHOT) && Boolean.valueOf(additionalProperties.get(SNAPSHOT).toString())) { - if (npmVersion.toUpperCase(Locale.ROOT).matches("^.*-SNAPSHOT$")) { - this.setNpmVersion(npmVersion + "." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - else { - this.setNpmVersion(npmVersion + "-SNAPSHOT." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - } - additionalProperties.put(NPM_VERSION, npmVersion); if (additionalProperties.containsKey(NPM_REPOSITORY)) { this.setNpmRepository(additionalProperties.get(NPM_REPOSITORY).toString()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java index 3bffc213e4..bcad8aa989 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptNodeClientCodegen.java @@ -21,12 +21,10 @@ import io.swagger.v3.oas.models.media.Schema; import io.swagger.v3.parser.util.SchemaTypeUtil; import org.openapitools.codegen.*; import org.openapitools.codegen.utils.ModelUtils; -import org.openapitools.codegen.utils.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; -import java.text.SimpleDateFormat; import java.util.*; import static org.openapitools.codegen.utils.StringUtils.camelize; @@ -34,13 +32,8 @@ import static org.openapitools.codegen.utils.StringUtils.camelize; public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen { private static final Logger LOGGER = LoggerFactory.getLogger(TypeScriptNodeClientCodegen.class); - public static final String NPM_NAME = "npmName"; - public static final String NPM_VERSION = "npmVersion"; public static final String NPM_REPOSITORY = "npmRepository"; - public static final String SNAPSHOT = "snapshot"; - protected String npmName = null; - protected String npmVersion = "1.0.0"; protected String npmRepository = null; protected String apiSuffix = "Api"; @@ -61,12 +54,8 @@ public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen modelPackage = "model"; apiPackage = "api"; - this.cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package")); - this.cliOptions.add(new CliOption(NPM_VERSION, "The version of your npm package")); this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json")); - this.cliOptions.add(new CliOption(SNAPSHOT, - "When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm", - SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); + } @Override @@ -189,18 +178,6 @@ public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen return operations; } - public void setNpmName(String npmName) { - this.npmName = npmName; - } - - public void setNpmVersion(String npmVersion) { - this.npmVersion = npmVersion; - } - - public String getNpmVersion() { - return npmVersion; - } - public String getNpmRepository() { return npmRepository; } @@ -224,23 +201,6 @@ public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen } private void addNpmPackageGeneration() { - if (additionalProperties.containsKey(NPM_NAME)) { - this.setNpmName(additionalProperties.get(NPM_NAME).toString()); - } - - if (additionalProperties.containsKey(NPM_VERSION)) { - this.setNpmVersion(additionalProperties.get(NPM_VERSION).toString()); - } - - if (additionalProperties.containsKey(SNAPSHOT) && Boolean.valueOf(additionalProperties.get(SNAPSHOT).toString())) { - if (npmVersion.toUpperCase(Locale.ROOT).matches("^.*-SNAPSHOT$")) { - this.setNpmVersion(npmVersion + "." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - else { - this.setNpmVersion(npmVersion + "-SNAPSHOT." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - } - additionalProperties.put(NPM_VERSION, npmVersion); if (additionalProperties.containsKey(NPM_REPOSITORY)) { this.setNpmRepository(additionalProperties.get(NPM_REPOSITORY).toString()); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java index fef59ec90a..f7f96501dd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptRxjsClientCodegen.java @@ -33,14 +33,9 @@ import java.util.Map; public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen { - public static final String NPM_NAME = "npmName"; - public static final String NPM_VERSION = "npmVersion"; public static final String NPM_REPOSITORY = "npmRepository"; - public static final String SNAPSHOT = "snapshot"; public static final String WITH_INTERFACES = "withInterfaces"; - protected String npmName = null; - protected String npmVersion = "1.0.0"; protected String npmRepository = null; public TypeScriptRxjsClientCodegen() { @@ -59,10 +54,7 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen this.modelTemplateFiles.put("models.mustache", ".ts"); this.addExtraReservedWords(); - this.cliOptions.add(new CliOption(NPM_NAME, "The name under which you want to publish generated npm package")); - this.cliOptions.add(new CliOption(NPM_VERSION, "The version of your npm package")); this.cliOptions.add(new CliOption(NPM_REPOSITORY, "Use this property to set an url your private npmRepo in the package.json")); - this.cliOptions.add(new CliOption(SNAPSHOT, "When setting this property to true the version will be suffixed with -SNAPSHOT.yyyyMMddHHmm", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString())); } @@ -76,22 +68,6 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen return "Generates a TypeScript client library using Rxjs API."; } - public String getNpmName() { - return npmName; - } - - public void setNpmName(String npmName) { - this.npmName = npmName; - } - - public String getNpmVersion() { - return npmVersion; - } - - public void setNpmVersion(String npmVersion) { - this.npmVersion = npmVersion; - } - public String getNpmRepository() { return npmRepository; } @@ -186,23 +162,6 @@ public class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen } private void addNpmPackageGeneration() { - if (additionalProperties.containsKey(NPM_NAME)) { - this.setNpmName(additionalProperties.get(NPM_NAME).toString()); - } - - if (additionalProperties.containsKey(NPM_VERSION)) { - this.setNpmVersion(additionalProperties.get(NPM_VERSION).toString()); - } - - if (additionalProperties.containsKey(SNAPSHOT) && Boolean.valueOf(additionalProperties.get(SNAPSHOT).toString())) { - if (npmVersion.toUpperCase(Locale.ROOT).matches("^.*-SNAPSHOT$")) { - this.setNpmVersion(npmVersion + "." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - else { - this.setNpmVersion(npmVersion + "-SNAPSHOT." + SNAPSHOT_SUFFIX_FORMAT.format(new Date())); - } - } - additionalProperties.put(NPM_VERSION, npmVersion); if (additionalProperties.containsKey(NPM_REPOSITORY)) { this.setNpmRepository(additionalProperties.get(NPM_REPOSITORY).toString()); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java index 79818aee97..a35a49c738 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/TypeScriptAureliaClientOptionsProvider.java @@ -28,8 +28,8 @@ public class TypeScriptAureliaClientOptionsProvider implements OptionsProvider { public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true"; public static final Boolean SUPPORTS_ES6_VALUE = false; public static final String MODEL_PROPERTY_NAMING_VALUE = "camelCase"; - private static final String NMP_NAME = "npmName"; - private static final String NMP_VERSION = "1.0.0"; + private static final String NPM_NAME = "npmName"; + private static final String NPM_VERSION = "1.0.0"; public static final String ALLOW_UNICODE_IDENTIFIERS_VALUE = "false"; public static final String PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = "true"; @@ -45,8 +45,9 @@ public class TypeScriptAureliaClientOptionsProvider implements OptionsProvider { .put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE) .put(CodegenConstants.MODEL_PROPERTY_NAMING, MODEL_PROPERTY_NAMING_VALUE) .put(CodegenConstants.SUPPORTS_ES6, String.valueOf(SUPPORTS_ES6_VALUE)) - .put(TypeScriptAureliaClientCodegen.NPM_NAME, NMP_NAME) - .put(TypeScriptAureliaClientCodegen.NPM_VERSION, NMP_VERSION) + .put(TypeScriptAureliaClientCodegen.NPM_NAME, NPM_NAME) + .put(TypeScriptAureliaClientCodegen.NPM_VERSION, NPM_VERSION) + .put(TypeScriptAureliaClientCodegen.SNAPSHOT, Boolean.FALSE.toString()) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .build(); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java index 80e21806a3..2e18afea21 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/fetch/TypeScriptFetchClientCodegenTest.java @@ -1,5 +1,7 @@ package org.openapitools.codegen.typescript.fetch; +import io.swagger.v3.oas.models.OpenAPI; +import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.languages.TypeScriptFetchClientCodegen; import org.testng.Assert; import org.testng.annotations.Test; @@ -8,11 +10,14 @@ import org.testng.annotations.Test; public class TypeScriptFetchClientCodegenTest { @Test public void testSnapshotVersion() { + OpenAPI api = TestUtils.createOpenAPI(); TypeScriptFetchClientCodegen codegen = new TypeScriptFetchClientCodegen(); + codegen.additionalProperties().put("npmName", "@openapi/typescript-fetch-petstore"); codegen.additionalProperties().put("snapshot", true); codegen.additionalProperties().put("npmVersion", "1.0.0-SNAPSHOT"); codegen.processOpts(); + codegen.preprocessOpenAPI(api); Assert.assertTrue(codegen.getNpmVersion().matches("^1.0.0-SNAPSHOT.[0-9]{12}$")); @@ -21,6 +26,7 @@ public class TypeScriptFetchClientCodegenTest { codegen.additionalProperties().put("snapshot", true); codegen.additionalProperties().put("npmVersion", "3.0.0-M1"); codegen.processOpts(); + codegen.preprocessOpenAPI(api); Assert.assertTrue(codegen.getNpmVersion().matches("^3.0.0-M1-SNAPSHOT.[0-9]{12}$")); @@ -28,11 +34,14 @@ public class TypeScriptFetchClientCodegenTest { @Test public void testWithoutSnapshotVersion() { + OpenAPI api = TestUtils.createOpenAPI(); TypeScriptFetchClientCodegen codegen = new TypeScriptFetchClientCodegen(); + codegen.additionalProperties().put("npmName", "@openapi/typescript-fetch-petstore"); codegen.additionalProperties().put("snapshot", false); codegen.additionalProperties().put("npmVersion", "1.0.0-SNAPSHOT"); codegen.processOpts(); + codegen.preprocessOpenAPI(api); Assert.assertTrue(codegen.getNpmVersion().matches("^1.0.0-SNAPSHOT$")); @@ -41,6 +50,7 @@ public class TypeScriptFetchClientCodegenTest { codegen.additionalProperties().put("snapshot", false); codegen.additionalProperties().put("npmVersion", "3.0.0-M1"); codegen.processOpts(); + codegen.preprocessOpenAPI(api); Assert.assertTrue(codegen.getNpmVersion().matches("^3.0.0-M1$")); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeClientCodegenTest.java index 50c16244ca..93fb08719d 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/typescript/typescriptnode/TypeScriptNodeClientCodegenTest.java @@ -1,5 +1,7 @@ package org.openapitools.codegen.typescript.typescriptnode; +import io.swagger.v3.oas.models.OpenAPI; +import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.languages.TypeScriptNodeClientCodegen; import org.testng.Assert; import org.testng.annotations.Test; @@ -20,11 +22,14 @@ public class TypeScriptNodeClientCodegenTest { @Test public void testSnapshotVersion() { + OpenAPI api = TestUtils.createOpenAPI(); TypeScriptNodeClientCodegen codegen = new TypeScriptNodeClientCodegen(); + codegen.additionalProperties().put("npmName", "@openapi/typescript-angular-petstore"); codegen.additionalProperties().put("snapshot", true); codegen.additionalProperties().put("npmVersion", "1.0.0-SNAPSHOT"); codegen.processOpts(); + codegen.preprocessOpenAPI(api); Assert.assertTrue(codegen.getNpmVersion().matches("^1.0.0-SNAPSHOT.[0-9]{12}$")); @@ -33,6 +38,7 @@ public class TypeScriptNodeClientCodegenTest { codegen.additionalProperties().put("snapshot", true); codegen.additionalProperties().put("npmVersion", "3.0.0-M1"); codegen.processOpts(); + codegen.preprocessOpenAPI(api); Assert.assertTrue(codegen.getNpmVersion().matches("^3.0.0-M1-SNAPSHOT.[0-9]{12}$")); @@ -40,11 +46,14 @@ public class TypeScriptNodeClientCodegenTest { @Test public void testWithoutSnapshotVersion() { + OpenAPI api = TestUtils.createOpenAPI(); TypeScriptNodeClientCodegen codegen = new TypeScriptNodeClientCodegen(); + codegen.additionalProperties().put("npmName", "@openapi/typescript-angular-petstore"); codegen.additionalProperties().put("snapshot", false); codegen.additionalProperties().put("npmVersion", "1.0.0-SNAPSHOT"); codegen.processOpts(); + codegen.preprocessOpenAPI(api); Assert.assertTrue(codegen.getNpmVersion().matches("^1.0.0-SNAPSHOT$")); @@ -53,6 +62,7 @@ public class TypeScriptNodeClientCodegenTest { codegen.additionalProperties().put("snapshot", false); codegen.additionalProperties().put("npmVersion", "3.0.0-M1"); codegen.processOpts(); + codegen.preprocessOpenAPI(api); Assert.assertTrue(codegen.getNpmVersion().matches("^3.0.0-M1$")); From e85e1f112a3917ffd3f1daea0bddf063cda83609 Mon Sep 17 00:00:00 2001 From: sunn <33183834+etherealjoy@users.noreply.github.com> Date: Sat, 18 May 2019 11:57:23 +0200 Subject: [PATCH 07/18] Separate exception types (#2930) --- .../cpp-pistache-server/api-source.mustache | 12 ++- .../petstore/cpp-pistache/api/PetApi.cpp | 98 ++++++++++++------- .../server/petstore/cpp-pistache/api/PetApi.h | 2 +- .../petstore/cpp-pistache/api/StoreApi.cpp | 50 ++++++---- .../petstore/cpp-pistache/api/StoreApi.h | 2 +- .../petstore/cpp-pistache/api/UserApi.cpp | 98 ++++++++++++------- .../petstore/cpp-pistache/api/UserApi.h | 2 +- .../petstore/cpp-pistache/impl/PetApiImpl.cpp | 2 +- .../petstore/cpp-pistache/impl/PetApiImpl.h | 2 +- .../cpp-pistache/impl/StoreApiImpl.cpp | 2 +- .../petstore/cpp-pistache/impl/StoreApiImpl.h | 2 +- .../cpp-pistache/impl/UserApiImpl.cpp | 2 +- .../petstore/cpp-pistache/impl/UserApiImpl.h | 2 +- .../petstore/cpp-pistache/main-api-server.cpp | 2 +- .../cpp-pistache/model/ApiResponse.cpp | 2 +- .../petstore/cpp-pistache/model/ApiResponse.h | 2 +- .../petstore/cpp-pistache/model/Category.cpp | 2 +- .../petstore/cpp-pistache/model/Category.h | 2 +- .../petstore/cpp-pistache/model/Helpers.cpp | 2 +- .../petstore/cpp-pistache/model/Helpers.h | 2 +- .../petstore/cpp-pistache/model/Order.cpp | 2 +- .../petstore/cpp-pistache/model/Order.h | 2 +- .../petstore/cpp-pistache/model/Pet.cpp | 2 +- .../server/petstore/cpp-pistache/model/Pet.h | 2 +- .../petstore/cpp-pistache/model/Tag.cpp | 2 +- .../server/petstore/cpp-pistache/model/Tag.h | 2 +- .../petstore/cpp-pistache/model/User.cpp | 2 +- .../server/petstore/cpp-pistache/model/User.h | 2 +- 28 files changed, 195 insertions(+), 111 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-source.mustache b/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-source.mustache index c529fbea57..3f7f4e0b74 100644 --- a/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-source.mustache +++ b/modules/openapi-generator/src/main/resources/cpp-pistache-server/api-source.mustache @@ -79,10 +79,14 @@ void {{classname}}::{{operationIdSnakeCase}}_handler(const Pistache::Rest::Reque try { this->{{operationIdSnakeCase}}(request, response); {{/vendorExtensions.x-codegen-pistache-isParsingSupported}} - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } diff --git a/samples/server/petstore/cpp-pistache/api/PetApi.cpp b/samples/server/petstore/cpp-pistache/api/PetApi.cpp index 5ffab955c5..5ef93e9f73 100644 --- a/samples/server/petstore/cpp-pistache/api/PetApi.cpp +++ b/samples/server/petstore/cpp-pistache/api/PetApi.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -54,10 +54,14 @@ void PetApi::add_pet_handler(const Pistache::Rest::Request &request, Pistache::H try { nlohmann::json::parse(request.body()).get_to(body); this->add_pet(body, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -70,10 +74,14 @@ void PetApi::delete_pet_handler(const Pistache::Rest::Request &request, Pistache try { this->delete_pet(petId, apiKey, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -91,10 +99,14 @@ void PetApi::find_pets_by_status_handler(const Pistache::Rest::Request &request, try { this->find_pets_by_status(status, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -112,10 +124,14 @@ void PetApi::find_pets_by_tags_handler(const Pistache::Rest::Request &request, P try { this->find_pets_by_tags(tags, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -125,10 +141,14 @@ void PetApi::get_pet_by_id_handler(const Pistache::Rest::Request &request, Pista try { this->get_pet_by_id(petId, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -141,30 +161,42 @@ void PetApi::update_pet_handler(const Pistache::Rest::Request &request, Pistache try { nlohmann::json::parse(request.body()).get_to(body); this->update_pet(body, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } void PetApi::update_pet_with_form_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { try { this->update_pet_with_form(request, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } void PetApi::upload_file_handler(const Pistache::Rest::Request &request, Pistache::Http::ResponseWriter response) { try { this->upload_file(request, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } diff --git a/samples/server/petstore/cpp-pistache/api/PetApi.h b/samples/server/petstore/cpp-pistache/api/PetApi.h index c84ca38427..d991d13aba 100644 --- a/samples/server/petstore/cpp-pistache/api/PetApi.h +++ b/samples/server/petstore/cpp-pistache/api/PetApi.h @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/api/StoreApi.cpp b/samples/server/petstore/cpp-pistache/api/StoreApi.cpp index 98e4d387a1..6987e9cc85 100644 --- a/samples/server/petstore/cpp-pistache/api/StoreApi.cpp +++ b/samples/server/petstore/cpp-pistache/api/StoreApi.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -47,10 +47,14 @@ void StoreApi::delete_order_handler(const Pistache::Rest::Request &request, Pist try { this->delete_order(orderId, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -58,10 +62,14 @@ void StoreApi::get_inventory_handler(const Pistache::Rest::Request &request, Pis try { this->get_inventory(response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -71,10 +79,14 @@ void StoreApi::get_order_by_id_handler(const Pistache::Rest::Request &request, P try { this->get_order_by_id(orderId, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -87,10 +99,14 @@ void StoreApi::place_order_handler(const Pistache::Rest::Request &request, Pista try { nlohmann::json::parse(request.body()).get_to(body); this->place_order(body, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } diff --git a/samples/server/petstore/cpp-pistache/api/StoreApi.h b/samples/server/petstore/cpp-pistache/api/StoreApi.h index cde0755f13..f69875c467 100644 --- a/samples/server/petstore/cpp-pistache/api/StoreApi.h +++ b/samples/server/petstore/cpp-pistache/api/StoreApi.h @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/api/UserApi.cpp b/samples/server/petstore/cpp-pistache/api/UserApi.cpp index f539a61c7e..f64232454a 100644 --- a/samples/server/petstore/cpp-pistache/api/UserApi.cpp +++ b/samples/server/petstore/cpp-pistache/api/UserApi.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -54,10 +54,14 @@ void UserApi::create_user_handler(const Pistache::Rest::Request &request, Pistac try { nlohmann::json::parse(request.body()).get_to(body); this->create_user(body, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -69,10 +73,14 @@ void UserApi::create_users_with_array_input_handler(const Pistache::Rest::Reques try { nlohmann::json::parse(request.body()).get_to(body); this->create_users_with_array_input(body, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -84,10 +92,14 @@ void UserApi::create_users_with_list_input_handler(const Pistache::Rest::Request try { nlohmann::json::parse(request.body()).get_to(body); this->create_users_with_list_input(body, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -97,10 +109,14 @@ void UserApi::delete_user_handler(const Pistache::Rest::Request &request, Pistac try { this->delete_user(username, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -110,10 +126,14 @@ void UserApi::get_user_by_name_handler(const Pistache::Rest::Request &request, P try { this->get_user_by_name(username, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -139,10 +159,14 @@ void UserApi::login_user_handler(const Pistache::Rest::Request &request, Pistach try { this->login_user(username, password, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -150,10 +174,14 @@ void UserApi::logout_user_handler(const Pistache::Rest::Request &request, Pistac try { this->logout_user(response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } @@ -168,10 +196,14 @@ void UserApi::update_user_handler(const Pistache::Rest::Request &request, Pistac try { nlohmann::json::parse(request.body()).get_to(body); this->update_user(username, body, response); - } catch (std::runtime_error & e) { - //send a 400 error - response.send(Pistache::Http::Code::Bad_Request, e.what()); - return; + } catch (nlohmann::detail::exception &e) { + //send a 400 error + response.send(Pistache::Http::Code::Bad_Request, e.what()); + return; + } catch (std::runtime_error &e) { + //send a 500 error + response.send(Pistache::Http::Code::Internal_Server_Error, e.what()); + return; } } diff --git a/samples/server/petstore/cpp-pistache/api/UserApi.h b/samples/server/petstore/cpp-pistache/api/UserApi.h index 7083c76430..6c589979db 100644 --- a/samples/server/petstore/cpp-pistache/api/UserApi.h +++ b/samples/server/petstore/cpp-pistache/api/UserApi.h @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/impl/PetApiImpl.cpp b/samples/server/petstore/cpp-pistache/impl/PetApiImpl.cpp index b35b40899b..778117a18b 100644 --- a/samples/server/petstore/cpp-pistache/impl/PetApiImpl.cpp +++ b/samples/server/petstore/cpp-pistache/impl/PetApiImpl.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/impl/PetApiImpl.h b/samples/server/petstore/cpp-pistache/impl/PetApiImpl.h index 7b4f3d3240..9e9f3d145b 100644 --- a/samples/server/petstore/cpp-pistache/impl/PetApiImpl.h +++ b/samples/server/petstore/cpp-pistache/impl/PetApiImpl.h @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/impl/StoreApiImpl.cpp b/samples/server/petstore/cpp-pistache/impl/StoreApiImpl.cpp index 63030737b6..ef164eb054 100644 --- a/samples/server/petstore/cpp-pistache/impl/StoreApiImpl.cpp +++ b/samples/server/petstore/cpp-pistache/impl/StoreApiImpl.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/impl/StoreApiImpl.h b/samples/server/petstore/cpp-pistache/impl/StoreApiImpl.h index 71689ae18b..c993724631 100644 --- a/samples/server/petstore/cpp-pistache/impl/StoreApiImpl.h +++ b/samples/server/petstore/cpp-pistache/impl/StoreApiImpl.h @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/impl/UserApiImpl.cpp b/samples/server/petstore/cpp-pistache/impl/UserApiImpl.cpp index 2e7b06d956..7163a560bd 100644 --- a/samples/server/petstore/cpp-pistache/impl/UserApiImpl.cpp +++ b/samples/server/petstore/cpp-pistache/impl/UserApiImpl.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/impl/UserApiImpl.h b/samples/server/petstore/cpp-pistache/impl/UserApiImpl.h index 9bde4fc572..8f22c49988 100644 --- a/samples/server/petstore/cpp-pistache/impl/UserApiImpl.h +++ b/samples/server/petstore/cpp-pistache/impl/UserApiImpl.h @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/main-api-server.cpp b/samples/server/petstore/cpp-pistache/main-api-server.cpp index 053fd0dbce..191b60b771 100644 --- a/samples/server/petstore/cpp-pistache/main-api-server.cpp +++ b/samples/server/petstore/cpp-pistache/main-api-server.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/ApiResponse.cpp b/samples/server/petstore/cpp-pistache/model/ApiResponse.cpp index 93b2961d03..a78fb1cc7f 100644 --- a/samples/server/petstore/cpp-pistache/model/ApiResponse.cpp +++ b/samples/server/petstore/cpp-pistache/model/ApiResponse.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/ApiResponse.h b/samples/server/petstore/cpp-pistache/model/ApiResponse.h index 3291251d8c..7ecb6c9a82 100644 --- a/samples/server/petstore/cpp-pistache/model/ApiResponse.h +++ b/samples/server/petstore/cpp-pistache/model/ApiResponse.h @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/Category.cpp b/samples/server/petstore/cpp-pistache/model/Category.cpp index 80112511b8..2abb0c3c5e 100644 --- a/samples/server/petstore/cpp-pistache/model/Category.cpp +++ b/samples/server/petstore/cpp-pistache/model/Category.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/Category.h b/samples/server/petstore/cpp-pistache/model/Category.h index 4018607b43..fa12fdc0de 100644 --- a/samples/server/petstore/cpp-pistache/model/Category.h +++ b/samples/server/petstore/cpp-pistache/model/Category.h @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/Helpers.cpp b/samples/server/petstore/cpp-pistache/model/Helpers.cpp index 8c0e859b64..b518f8106d 100644 --- a/samples/server/petstore/cpp-pistache/model/Helpers.cpp +++ b/samples/server/petstore/cpp-pistache/model/Helpers.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/Helpers.h b/samples/server/petstore/cpp-pistache/model/Helpers.h index 8c62ecda5a..9c8c02c4ae 100644 --- a/samples/server/petstore/cpp-pistache/model/Helpers.h +++ b/samples/server/petstore/cpp-pistache/model/Helpers.h @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/Order.cpp b/samples/server/petstore/cpp-pistache/model/Order.cpp index a0bda775a5..b24cc0fce9 100644 --- a/samples/server/petstore/cpp-pistache/model/Order.cpp +++ b/samples/server/petstore/cpp-pistache/model/Order.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/Order.h b/samples/server/petstore/cpp-pistache/model/Order.h index b4d4598b74..d900b633f3 100644 --- a/samples/server/petstore/cpp-pistache/model/Order.h +++ b/samples/server/petstore/cpp-pistache/model/Order.h @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/Pet.cpp b/samples/server/petstore/cpp-pistache/model/Pet.cpp index 40699f1333..7781e283ce 100644 --- a/samples/server/petstore/cpp-pistache/model/Pet.cpp +++ b/samples/server/petstore/cpp-pistache/model/Pet.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/Pet.h b/samples/server/petstore/cpp-pistache/model/Pet.h index 22eeb9570f..f23ef47832 100644 --- a/samples/server/petstore/cpp-pistache/model/Pet.h +++ b/samples/server/petstore/cpp-pistache/model/Pet.h @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/Tag.cpp b/samples/server/petstore/cpp-pistache/model/Tag.cpp index 4a1349f0e9..b81cb82572 100644 --- a/samples/server/petstore/cpp-pistache/model/Tag.cpp +++ b/samples/server/petstore/cpp-pistache/model/Tag.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/Tag.h b/samples/server/petstore/cpp-pistache/model/Tag.h index bb5dff9f92..4b422931d7 100644 --- a/samples/server/petstore/cpp-pistache/model/Tag.h +++ b/samples/server/petstore/cpp-pistache/model/Tag.h @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/User.cpp b/samples/server/petstore/cpp-pistache/model/User.cpp index 9c467a10d8..66a026e9c7 100644 --- a/samples/server/petstore/cpp-pistache/model/User.cpp +++ b/samples/server/petstore/cpp-pistache/model/User.cpp @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/samples/server/petstore/cpp-pistache/model/User.h b/samples/server/petstore/cpp-pistache/model/User.h index 4b8cd2b196..1f4c17ce6a 100644 --- a/samples/server/petstore/cpp-pistache/model/User.h +++ b/samples/server/petstore/cpp-pistache/model/User.h @@ -2,7 +2,7 @@ * OpenAPI Petstore * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * -* OpenAPI spec version: 1.0.0 +* The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). From 4e579ff75bfe39f365e94be8d0b0eacf7e3f0dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= Date: Sun, 19 May 2019 21:25:16 +0200 Subject: [PATCH 08/18] [meta] remove cli dependency (#2896) --- .../org/openapitools/codegen/cmd/Meta.java | 2 +- .../codegen/debugGeneratorTest.mustache | 40 ------------------- .../codegen/generatorClassTest.mustache | 36 +++++++++++++++++ .../src/main/resources/codegen/pom.mustache | 5 --- samples/meta-codegen/lib/pom.xml | 5 --- .../codegen/MyclientcodegenGeneratorTest.java | 36 +++++++++++++++++ .../codegen/debug/DebugCodegenLauncher.java | 40 ------------------- samples/meta-codegen/pom.xml | 1 + 8 files changed, 74 insertions(+), 91 deletions(-) delete mode 100644 modules/openapi-generator/src/main/resources/codegen/debugGeneratorTest.mustache create mode 100644 modules/openapi-generator/src/main/resources/codegen/generatorClassTest.mustache create mode 100644 samples/meta-codegen/lib/src/test/java/com/my/company/codegen/MyclientcodegenGeneratorTest.java delete mode 100644 samples/meta-codegen/lib/src/test/java/org/openapitools/codegen/debug/DebugCodegenLauncher.java 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 8cee440fc3..4ec67be891 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 @@ -83,7 +83,7 @@ public class Meta implements Runnable { ImmutableList.of( new SupportingFile("pom.mustache", "", "pom.xml"), new SupportingFile("generatorClass.mustache", on(File.separator).join("src/main/java", asPath(targetPackage)), mainClass.concat(".java")), - new SupportingFile("debugGeneratorTest.mustache", on(File.separator).join("src/test/java", asPath("org.openapitools.codegen.debug")), "DebugCodegenLauncher.java"), + new SupportingFile("generatorClassTest.mustache", on(File.separator).join("src/test/java", asPath(targetPackage)), mainClass.concat("Test.java")), new SupportingFile("README.mustache", "", "README.md"), new SupportingFile("api.template", "src/main/resources" + File.separator + name,"api.mustache"), new SupportingFile("model.template", "src/main/resources" + File.separator + name,"model.mustache"), diff --git a/modules/openapi-generator/src/main/resources/codegen/debugGeneratorTest.mustache b/modules/openapi-generator/src/main/resources/codegen/debugGeneratorTest.mustache deleted file mode 100644 index 9a9836c114..0000000000 --- a/modules/openapi-generator/src/main/resources/codegen/debugGeneratorTest.mustache +++ /dev/null @@ -1,40 +0,0 @@ -package org.openapitools.codegen.debug; - -import org.junit.Test; -import org.openapitools.codegen.OpenAPIGenerator; - -/*** - * This test allows you to easily launch your code generation software under a debugger. - * Then run this test under debug mode. You will be able to step through your java code - * and then see the results in the out directory. - * - * To experiment with debugging your code generator: - * 1) Set a break point in {{generatorClass}}.java in the postProcessOperationsWithModels() method. - * 2) To launch this test in Eclipse: right-click | Debug As | JUnit Test - * - */ -public class DebugCodegenLauncher -{ - @Test - public void launchCodeGeneratorInDebugMode() - { - // use this test to launch you code generator in the debugger. - // this allows you to easily set break points in {{generatorClass}}. - String commandLineParams = - "generate "+ - "-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml "+ // sample swagger - "-t ./src/main/resources/{{name}} "+ // template directory - "-o out/{{name}} "+ // output directory - "-g {{name}} "; // use this codegen library - - try{ - OpenAPIGenerator.main( commandLineParams.split(" ") ); - } - catch(Exception ex) { - System.err.println(ex.toString()); - } - catch(Error er) { - System.err.println(er.toString()); - } - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/codegen/generatorClassTest.mustache b/modules/openapi-generator/src/main/resources/codegen/generatorClassTest.mustache new file mode 100644 index 0000000000..4267a928fc --- /dev/null +++ b/modules/openapi-generator/src/main/resources/codegen/generatorClassTest.mustache @@ -0,0 +1,36 @@ +package {{generatorPackage}}; + +import org.junit.Test; +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.config.CodegenConfigurator; + +/*** + * This test allows you to easily launch your code generation software under a debugger. + * Then run this test under debug mode. You will be able to step through your java code + * and then see the results in the out directory. + * + * To experiment with debugging your code generator: + * 1) Set a break point in {{generatorClass}}.java in the postProcessOperationsWithModels() method. + * 2) To launch this test in Eclipse: right-click | Debug As | JUnit Test + * + */ +public class {{generatorClass}}Test { + + // use this test to launch you code generator in the debugger. + // this allows you to easily set break points in MyclientcodegenGenerator. + @Test + public void launchCodeGenerator() { + // to understand how the 'openapi-generator-cli' module is using 'CodegenConfigurator', have a look at the 'Generate' class: + // https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("{{name}}") // use this codegen library + .setInputSpec("../../../modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // sample OpenAPI file + // .setInputSpec("https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // or from the server + .setOutputDir("out/{{name}}"); // output directory + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + generator.opts(clientOptInput).generate(); + } +} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/codegen/pom.mustache b/modules/openapi-generator/src/main/resources/codegen/pom.mustache index 8f9aa29225..628dd6552f 100644 --- a/modules/openapi-generator/src/main/resources/codegen/pom.mustache +++ b/modules/openapi-generator/src/main/resources/codegen/pom.mustache @@ -113,11 +113,6 @@ ${openapi-generator-version} provided - - org.openapitools - openapi-generator-cli - ${openapi-generator-version} - junit junit diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml index 0a904408cf..f6782f61d1 100644 --- a/samples/meta-codegen/lib/pom.xml +++ b/samples/meta-codegen/lib/pom.xml @@ -113,11 +113,6 @@ ${openapi-generator-version} provided - - org.openapitools - openapi-generator-cli - ${openapi-generator-version} - junit junit diff --git a/samples/meta-codegen/lib/src/test/java/com/my/company/codegen/MyclientcodegenGeneratorTest.java b/samples/meta-codegen/lib/src/test/java/com/my/company/codegen/MyclientcodegenGeneratorTest.java new file mode 100644 index 0000000000..cc5c810301 --- /dev/null +++ b/samples/meta-codegen/lib/src/test/java/com/my/company/codegen/MyclientcodegenGeneratorTest.java @@ -0,0 +1,36 @@ +package com.my.company.codegen; + +import org.junit.Test; +import org.openapitools.codegen.ClientOptInput; +import org.openapitools.codegen.DefaultGenerator; +import org.openapitools.codegen.config.CodegenConfigurator; + +/*** + * This test allows you to easily launch your code generation software under a debugger. + * Then run this test under debug mode. You will be able to step through your java code + * and then see the results in the out directory. + * + * To experiment with debugging your code generator: + * 1) Set a break point in MyclientcodegenGenerator.java in the postProcessOperationsWithModels() method. + * 2) To launch this test in Eclipse: right-click | Debug As | JUnit Test + * + */ +public class MyclientcodegenGeneratorTest { + + // use this test to launch you code generator in the debugger. + // this allows you to easily set break points in MyclientcodegenGenerator. + @Test + public void launchCodeGenerator() { + // to understand how the 'openapi-generator-cli' module is using 'CodegenConfigurator', have a look at the 'Generate' class: + // https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java + final CodegenConfigurator configurator = new CodegenConfigurator() + .setGeneratorName("myClientCodegen") // use this codegen library + .setInputSpec("../../../modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // sample OpenAPI file + // .setInputSpec("https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // or from the server + .setOutputDir("out/myClientCodegen"); // output directory + + final ClientOptInput clientOptInput = configurator.toClientOptInput(); + DefaultGenerator generator = new DefaultGenerator(); + generator.opts(clientOptInput).generate(); + } +} \ No newline at end of file diff --git a/samples/meta-codegen/lib/src/test/java/org/openapitools/codegen/debug/DebugCodegenLauncher.java b/samples/meta-codegen/lib/src/test/java/org/openapitools/codegen/debug/DebugCodegenLauncher.java deleted file mode 100644 index 46f2e3e314..0000000000 --- a/samples/meta-codegen/lib/src/test/java/org/openapitools/codegen/debug/DebugCodegenLauncher.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.openapitools.codegen.debug; - -import org.junit.Test; -import org.openapitools.codegen.OpenAPIGenerator; - -/*** - * This test allows you to easily launch your code generation software under a debugger. - * Then run this test under debug mode. You will be able to step through your java code - * and then see the results in the out directory. - * - * To experiment with debugging your code generator: - * 1) Set a break point in MyclientcodegenGenerator.java in the postProcessOperationsWithModels() method. - * 2) To launch this test in Eclipse: right-click | Debug As | JUnit Test - * - */ -public class DebugCodegenLauncher -{ - @Test - public void launchCodeGeneratorInDebugMode() - { - // use this test to launch you code generator in the debugger. - // this allows you to easily set break points in MyclientcodegenGenerator. - String commandLineParams = - "generate "+ - "-i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml "+ // sample swagger - "-t ./src/main/resources/myClientCodegen "+ // template directory - "-o out/myClientCodegen "+ // output directory - "-g myClientCodegen "; // use this codegen library - - try{ - OpenAPIGenerator.main( commandLineParams.split(" ") ); - } - catch(Exception ex) { - System.err.println(ex.toString()); - } - catch(Error er) { - System.err.println(er.toString()); - } - } -} \ No newline at end of file diff --git a/samples/meta-codegen/pom.xml b/samples/meta-codegen/pom.xml index fc3ad25673..530637969a 100644 --- a/samples/meta-codegen/pom.xml +++ b/samples/meta-codegen/pom.xml @@ -8,5 +8,6 @@ lib/ ../../modules/openapi-generator + ../../modules/openapi-generator-core From fdd08dc1f1251131471b738035f42e1c7841b949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Ros=C3=A9?= Date: Mon, 20 May 2019 04:03:17 +0200 Subject: [PATCH 09/18] Remove @fvarose from technical committee (#2936) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 87e864be5b..3b31ba2c86 100644 --- a/README.md +++ b/README.md @@ -750,7 +750,7 @@ If you want to join the committee, please kindly apply by sending an email to te | Apex | | | Bash | @frol (2017/07) @bkryza (2017/08) @kenjones-cisco (2017/09) | | C | @zhemant (2018/11) | -| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @fvarose (2017/11) @etherealjoy (2018/02) @martindelille (2018/03) | +| C++ | @ravinikam (2017/07) @stkrwork (2017/07) @etherealjoy (2018/02) @martindelille (2018/03) | | C# | @mandrean (2017/08), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert) | | Clojure | | | Dart | @ircecho (2017/07) @swipesight (2018/09) @jaumard (2018/09) | From 6bffe4dbc7340bfe7f00b0a1c0039c6ab7cf202b Mon Sep 17 00:00:00 2001 From: Vincent Devos <46601673+karismann@users.noreply.github.com> Date: Mon, 20 May 2019 05:20:48 +0200 Subject: [PATCH 10/18] [Groovy] improve code parsing body/form params (#2879) * [Groovy] improve code parsing body/form params * remove leading space * remove leading space --- docs/generators/groovy.md | 2 - .../openapitools/codegen/DefaultCodegen.java | 2 +- .../languages/AbstractApexCodegen.java | 13 ---- .../languages/AbstractJavaCodegen.java | 26 ++----- .../languages/GroovyClientCodegen.java | 5 +- .../languages/JavaJAXRSSpecServerCodegen.java | 10 +-- .../src/main/resources/Groovy/api.mustache | 48 +++++++------ .../groovy/org/openapitools/api/PetApi.groovy | 72 +++---------------- .../org/openapitools/api/StoreApi.groovy | 16 +---- .../org/openapitools/api/UserApi.groovy | 53 ++------------ 10 files changed, 51 insertions(+), 196 deletions(-) diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md index 16d4e284a1..e5ac52bafb 100644 --- a/docs/generators/groovy.md +++ b/docs/generators/groovy.md @@ -17,8 +17,6 @@ sidebar_label: groovy |groupId|groupId in generated pom.xml| |org.openapitools| |artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |openapi-groovy| |artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0| -|artifactUrl|artifact URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| -|artifactDescription|artifact description in generated pom.xml| |OpenAPI Java| |scmConnection|SCM connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmDeveloperConnection|SCM developer connection in generated pom.xml| |scm:git:git@github.com:openapitools/openapi-generator.git| |scmUrl|SCM URL in generated pom.xml| |https://github.com/openapitools/openapi-generator| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 5a89e31a19..7c928dee6c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -4862,7 +4862,7 @@ public class DefaultCodegen implements CodegenConfig { * * @param objs map of object */ - public void generateJSONSpecFile(Map objs) { + protected void generateJSONSpecFile(Map objs) { OpenAPI openAPI = (OpenAPI) objs.get("openAPI"); if (openAPI != null) { try { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java index 4f4e60730d..d2a20593f5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractApexCodegen.java @@ -652,19 +652,6 @@ public abstract class AbstractApexCodegen extends DefaultCodegen implements Code return escapeText(pattern); } - public boolean convertPropertyToBoolean(String propertyKey) { - boolean booleanValue = false; - if (additionalProperties.containsKey(propertyKey)) { - booleanValue = Boolean.valueOf(additionalProperties.get(propertyKey).toString()); - } - - return booleanValue; - } - - public void writePropertyBack(String propertyKey, boolean value) { - additionalProperties.put(propertyKey, value); - } - @Override public String sanitizeTag(String tag) { return camelize(sanitizeName(tag)); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 3c4ec0102c..8c7260f3b3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -1060,7 +1060,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code String defaultContentType = "application/json"; Set producesInfo = getProducesInfo(openAPI, operation); if (producesInfo != null && !producesInfo.isEmpty()) { - ArrayList produces = new ArrayList(producesInfo); + ArrayList produces = new ArrayList<>(producesInfo); StringBuilder sb = new StringBuilder(); for (String produce : produces) { if (defaultContentType.equalsIgnoreCase(produce)) { @@ -1085,7 +1085,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code @Override protected boolean needToImport(String type) { - return super.needToImport(type) && type.indexOf(".") < 0; + return super.needToImport(type) && !type.contains("."); } @Override @@ -1183,10 +1183,11 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code if (removedChildEnum) { // If we removed an entry from this model's vars, we need to ensure hasMore is updated - int count = 0, numVars = codegenProperties.size(); + int count = 0; + int numVars = codegenProperties.size(); for (CodegenProperty codegenProperty : codegenProperties) { count += 1; - codegenProperty.hasMore = (count < numVars) ? true : false; + codegenProperty.hasMore = count < numVars; } codegenModel.vars = codegenProperties; } @@ -1444,27 +1445,13 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code return escapeText(pattern); } - @Override - public boolean convertPropertyToBoolean(String propertyKey) { - boolean booleanValue = false; - if (additionalProperties.containsKey(propertyKey)) { - booleanValue = Boolean.valueOf(additionalProperties.get(propertyKey).toString()); - } - - return booleanValue; - } - - @Override - public void writePropertyBack(String propertyKey, boolean value) { - additionalProperties.put(propertyKey, value); - } - /** * Output the Getter name for boolean property, e.g. isActive * * @param name the name of the property * @return getter name based on naming convention */ + @Override public String toBooleanGetter(String name) { return booleanGetterPrefix + getterAndSetterCapitalize(name); } @@ -1505,7 +1492,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code return camelize(name, lowercaseFirstLetter); } - @Override public void postProcessFile(File file, String fileType) { if (file == null) { diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java index 94332fed9d..ecae95083c 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GroovyClientCodegen.java @@ -56,13 +56,15 @@ public class GroovyClientCodegen extends AbstractJavaCodegen { artifactId = "openapi-groovy"; dateLibrary = "legacy"; //TODO: add joda support to groovy - // clioOptions default redefinition need to be updated + // cliOptions default redefinition need to be updated updateOption(CodegenConstants.SOURCE_FOLDER, this.getSourceFolder()); updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.API_PACKAGE, apiPackage); updateOption(CodegenConstants.MODEL_PACKAGE, modelPackage); updateOption(DATE_LIBRARY, this.getDateLibrary()); + removeOption(CodegenConstants.ARTIFACT_URL); + removeOption(CodegenConstants.ARTIFACT_DESCRIPTION); } @@ -95,7 +97,6 @@ public class GroovyClientCodegen extends AbstractJavaCodegen { @Override public Map postProcessOperationsWithModels(Map operations, List allModels) { Map objs = (Map) operations.get("operations"); - List ops = (List) objs.get("operation"); for (CodegenOperation op : ops) { // Overwrite path to map variable with path parameters diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java index 67a8f39b08..776915734a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaJAXRSSpecServerCodegen.java @@ -54,7 +54,7 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { apiPackage = "org.openapitools.api"; modelPackage = "org.openapitools.model"; - // clioOptions default redifinition need to be updated + // cliOptions default redefinition need to be updated updateOption(CodegenConstants.INVOKER_PACKAGE, this.getInvokerPackage()); updateOption(CodegenConstants.ARTIFACT_ID, this.getArtifactId()); updateOption(CodegenConstants.API_PACKAGE, apiPackage); @@ -80,13 +80,7 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen { super.embeddedTemplateDir = templateDir = JAXRS_TEMPLATE_DIRECTORY_NAME + File.separator + "spec"; - for (int i = 0; i < cliOptions.size(); i++) { - if (CodegenConstants.LIBRARY.equals(cliOptions.get(i).getOpt())) { - cliOptions.remove(i); - break; - } - } - + removeOption(CodegenConstants.LIBRARY); CliOption library = new CliOption(CodegenConstants.LIBRARY, CodegenConstants.LIBRARY_DESC).defaultValue(DEFAULT_LIBRARY); Map supportedLibraries = new LinkedHashMap<>(); supportedLibraries.put(DEFAULT_LIBRARY, "JAXRS"); diff --git a/modules/openapi-generator/src/main/resources/Groovy/api.mustache b/modules/openapi-generator/src/main/resources/Groovy/api.mustache index 20fe23f962..daa1351ff7 100644 --- a/modules/openapi-generator/src/main/resources/Groovy/api.mustache +++ b/modules/openapi-generator/src/main/resources/Groovy/api.mustache @@ -20,12 +20,14 @@ class {{classname}} { def bodyParams def contentType - {{#allParams}}{{#required}} + {{#allParams}} + {{#required}} // verify required params are set if ({{paramName}} == null) { throw new RuntimeException("missing required params {{paramName}}") } - {{/required}}{{/allParams}} + {{/required}} + {{/allParams}} {{#queryParams}} if ({{paramName}} != null) { @@ -47,15 +49,19 @@ class {{classname}} { contentType = '{{{mediaType}}}'; {{/consumes.0}} {{/bodyParam}} + {{#bodyParams.0}} + {{^hasMore}} + bodyParams = {{paramName}} + {{/hasMore}} + {{#hasMore}} + bodyParams = [:] + bodyParams.put("{{baseName}}", {{paramName}}) + {{/hasMore}} + {{/bodyParams.0}} {{#bodyParams}} - // only one body parameter - if (1 == {{bodyParams.size}}) { - bodyParams = {{paramName}} - } - // array of body parameters - else { - bodyParams.put("{{baseName}}", {{paramName}}) - } + {{#secondaryParam}} + bodyParams.put("{{baseName}}", {{paramName}}) + {{/secondaryParam}} {{/bodyParams}} {{#hasFormParams}} @@ -63,20 +69,18 @@ class {{classname}} { contentType = '{{{mediaType}}}'; {{/consumes.0}} {{#formParams.0}} - // only one form parameter - if (1 == {{formParams.size}}) { - bodyParams = {{paramName}} - } - // array of form parameters - else { - bodyParams = [:] - } + {{^hasMore}} + bodyParams = {{paramName}} + {{/hasMore}} + {{#hasMore}} + bodyParams = [:] + bodyParams.put("{{baseName}}", {{paramName}}) + {{/hasMore}} {{/formParams.0}} {{#formParams}} - // array of form parameters - if (1 < {{formParams.size}}) { - bodyParams.put("{{baseName}}", {{paramName}}) - } + {{#secondaryParam}} + bodyParams.put("{{baseName}}", {{paramName}}) + {{/secondaryParam}} {{/formParams}} {{/hasFormParams}} diff --git a/samples/client/petstore/groovy/src/main/groovy/org/openapitools/api/PetApi.groovy b/samples/client/petstore/groovy/src/main/groovy/org/openapitools/api/PetApi.groovy index c022982020..60f3f7d45d 100644 --- a/samples/client/petstore/groovy/src/main/groovy/org/openapitools/api/PetApi.groovy +++ b/samples/client/petstore/groovy/src/main/groovy/org/openapitools/api/PetApi.groovy @@ -18,24 +18,15 @@ class PetApi { def bodyParams def contentType - // verify required params are set if (body == null) { throw new RuntimeException("missing required params body") } - contentType = 'application/json'; - // only one body parameter - if (1 == 1) { - bodyParams = body - } - // array of body parameters - else { - bodyParams.put("body", body) - } + bodyParams = body apiUtils.invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, bodyParams, contentType, @@ -53,12 +44,10 @@ class PetApi { def bodyParams def contentType - // verify required params are set if (petId == null) { throw new RuntimeException("missing required params petId") } - if (apiKey != null) { @@ -82,12 +71,10 @@ class PetApi { def bodyParams def contentType - // verify required params are set if (status == null) { throw new RuntimeException("missing required params status") } - if (status != null) { queryParams.put("status", status) @@ -111,12 +98,10 @@ class PetApi { def bodyParams def contentType - // verify required params are set if (tags == null) { throw new RuntimeException("missing required params tags") } - if (tags != null) { queryParams.put("tags", tags) @@ -140,12 +125,10 @@ class PetApi { def bodyParams def contentType - // verify required params are set if (petId == null) { throw new RuntimeException("missing required params petId") } - @@ -166,24 +149,15 @@ class PetApi { def bodyParams def contentType - // verify required params are set if (body == null) { throw new RuntimeException("missing required params body") } - contentType = 'application/json'; - // only one body parameter - if (1 == 1) { - bodyParams = body - } - // array of body parameters - else { - bodyParams.put("body", body) - } + bodyParams = body apiUtils.invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, bodyParams, contentType, @@ -201,33 +175,18 @@ class PetApi { def bodyParams def contentType - // verify required params are set if (petId == null) { throw new RuntimeException("missing required params petId") } - contentType = 'application/x-www-form-urlencoded'; - // only one form parameter - if (1 == 2) { - bodyParams = name - } - // array of form parameters - else { - bodyParams = [:] - } - // array of form parameters - if (1 < 2) { - bodyParams.put("name", name) - } - // array of form parameters - if (1 < 2) { - bodyParams.put("status", status) - } + bodyParams = [:] + bodyParams.put("name", name) + bodyParams.put("status", status) apiUtils.invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, bodyParams, contentType, "POST", "", @@ -244,33 +203,18 @@ class PetApi { def bodyParams def contentType - // verify required params are set if (petId == null) { throw new RuntimeException("missing required params petId") } - contentType = 'multipart/form-data'; - // only one form parameter - if (1 == 2) { - bodyParams = additionalMetadata - } - // array of form parameters - else { - bodyParams = [:] - } - // array of form parameters - if (1 < 2) { - bodyParams.put("additionalMetadata", additionalMetadata) - } - // array of form parameters - if (1 < 2) { - bodyParams.put("file", file) - } + bodyParams = [:] + bodyParams.put("additionalMetadata", additionalMetadata) + bodyParams.put("file", file) apiUtils.invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, bodyParams, contentType, "POST", "", diff --git a/samples/client/petstore/groovy/src/main/groovy/org/openapitools/api/StoreApi.groovy b/samples/client/petstore/groovy/src/main/groovy/org/openapitools/api/StoreApi.groovy index 154551d188..8e7a0ee9d2 100644 --- a/samples/client/petstore/groovy/src/main/groovy/org/openapitools/api/StoreApi.groovy +++ b/samples/client/petstore/groovy/src/main/groovy/org/openapitools/api/StoreApi.groovy @@ -17,12 +17,10 @@ class StoreApi { def bodyParams def contentType - // verify required params are set if (orderId == null) { throw new RuntimeException("missing required params orderId") } - @@ -43,7 +41,6 @@ class StoreApi { def bodyParams def contentType - @@ -64,12 +61,10 @@ class StoreApi { def bodyParams def contentType - // verify required params are set if (orderId == null) { throw new RuntimeException("missing required params orderId") } - @@ -90,24 +85,15 @@ class StoreApi { def bodyParams def contentType - // verify required params are set if (body == null) { throw new RuntimeException("missing required params body") } - contentType = 'application/json'; - // only one body parameter - if (1 == 1) { - bodyParams = body - } - // array of body parameters - else { - bodyParams.put("body", body) - } + bodyParams = body apiUtils.invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, bodyParams, contentType, diff --git a/samples/client/petstore/groovy/src/main/groovy/org/openapitools/api/UserApi.groovy b/samples/client/petstore/groovy/src/main/groovy/org/openapitools/api/UserApi.groovy index 2d0ec2ab73..8cc8398680 100644 --- a/samples/client/petstore/groovy/src/main/groovy/org/openapitools/api/UserApi.groovy +++ b/samples/client/petstore/groovy/src/main/groovy/org/openapitools/api/UserApi.groovy @@ -18,24 +18,15 @@ class UserApi { def bodyParams def contentType - // verify required params are set if (body == null) { throw new RuntimeException("missing required params body") } - contentType = 'application/json'; - // only one body parameter - if (1 == 1) { - bodyParams = body - } - // array of body parameters - else { - bodyParams.put("body", body) - } + bodyParams = body apiUtils.invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, bodyParams, contentType, @@ -53,24 +44,15 @@ class UserApi { def bodyParams def contentType - // verify required params are set if (body == null) { throw new RuntimeException("missing required params body") } - contentType = 'application/json'; - // only one body parameter - if (1 == 1) { - bodyParams = body - } - // array of body parameters - else { - bodyParams.put("body", body) - } + bodyParams = body apiUtils.invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, bodyParams, contentType, @@ -88,24 +70,15 @@ class UserApi { def bodyParams def contentType - // verify required params are set if (body == null) { throw new RuntimeException("missing required params body") } - contentType = 'application/json'; - // only one body parameter - if (1 == 1) { - bodyParams = body - } - // array of body parameters - else { - bodyParams.put("body", body) - } + bodyParams = body apiUtils.invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, bodyParams, contentType, @@ -123,12 +96,10 @@ class UserApi { def bodyParams def contentType - // verify required params are set if (username == null) { throw new RuntimeException("missing required params username") } - @@ -149,12 +120,10 @@ class UserApi { def bodyParams def contentType - // verify required params are set if (username == null) { throw new RuntimeException("missing required params username") } - @@ -175,17 +144,14 @@ class UserApi { def bodyParams def contentType - // verify required params are set if (username == null) { throw new RuntimeException("missing required params username") } - // verify required params are set if (password == null) { throw new RuntimeException("missing required params password") } - if (username != null) { queryParams.put("username", username) @@ -212,7 +178,6 @@ class UserApi { def bodyParams def contentType - @@ -233,29 +198,19 @@ class UserApi { def bodyParams def contentType - // verify required params are set if (username == null) { throw new RuntimeException("missing required params username") } - // verify required params are set if (body == null) { throw new RuntimeException("missing required params body") } - contentType = 'application/json'; - // only one body parameter - if (1 == 1) { - bodyParams = body - } - // array of body parameters - else { - bodyParams.put("body", body) - } + bodyParams = body apiUtils.invokeApi(onSuccess, onFailure, basePath, versionPath, resourcePath, queryParams, headerParams, bodyParams, contentType, From 81d53e29822812b296a9694d1e4215547835c7b1 Mon Sep 17 00:00:00 2001 From: Logan Moore Date: Mon, 20 May 2019 18:16:02 +1200 Subject: [PATCH 11/18] Change github link to the correct repo (#2938) --- .../src/main/resources/apex/licenseInfo.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/apex/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/apex/licenseInfo.mustache index 3b4ccbef53..3f52a36757 100644 --- a/modules/openapi-generator/src/main/resources/apex/licenseInfo.mustache +++ b/modules/openapi-generator/src/main/resources/apex/licenseInfo.mustache @@ -6,6 +6,6 @@ * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} * * NOTE: This class is auto generated by the OAS code generator program. - * https://github.com/OAS-api/OAS-codegen.git + * https://github.com/OpenAPITools/openapi-generator * Do not edit the class manually. */ From 10ac54f1b35147e6bd875bd0da07db7a297587ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20D=C3=B6rr?= Date: Mon, 20 May 2019 09:49:44 +0200 Subject: [PATCH 12/18] typescript-fetch: Remove superfluous closing parenthsesis which result in compilation errors (#2922) --- .../src/main/resources/typescript-fetch/apis.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache index 0ce4291e5d..6a1967c7c8 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache @@ -94,7 +94,7 @@ export class {{classname}} extends runtime.BaseAPI { {{#headerParams}} {{#isListContainer}} if (requestParameters.{{paramName}}) { - headerParameters['{{baseName}}'] = requestParameters.{{paramName}}.join(runtime.COLLECTION_FORMATS["{{collectionFormat}}"])); + headerParameters['{{baseName}}'] = requestParameters.{{paramName}}.join(runtime.COLLECTION_FORMATS["{{collectionFormat}}"]); } {{/isListContainer}} From 1ad6701f02be2901ef6a398c2d2809620273e338 Mon Sep 17 00:00:00 2001 From: drl-max <43247338+drl-max@users.noreply.github.com> Date: Mon, 20 May 2019 00:53:19 -0700 Subject: [PATCH 13/18] Wrote method to remove newline characters (Windows or Unix style) from both strings before comparing them. (#2927) --- .../codegen/java/jaxrs/JavaJaxrsBaseTest.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java index d9ffb021b0..e76f0bf6fe 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/jaxrs/JavaJaxrsBaseTest.java @@ -54,10 +54,14 @@ public abstract class JavaJaxrsBaseTest { } private void checkFileContains(MockDefaultGenerator generator, String path, String... lines) { - String file = generator.getFiles().get(path); + String file = linearize(generator.getFiles().get(path)); assertNotNull(file); for (String line : lines) - assertTrue(file.contains(line)); + assertTrue(file.contains(linearize(line))); + } + + private String linearize(String target) { + return target.replaceAll("\r?\n", "").replaceAll("\\s+", "\\s"); } @Test @@ -92,10 +96,10 @@ public abstract class JavaJaxrsBaseTest { } private void checkFileNotContains(MockDefaultGenerator generator, String path, String... lines) { - String file = generator.getFiles().get(path); + String file = linearize(generator.getFiles().get(path)); assertNotNull(file); for (String line : lines) - assertFalse(file.contains(line)); + assertFalse(file.contains(linearize(line))); } @Test From d5e24f01112157ac5b6a08b28a297ff89b74f74c Mon Sep 17 00:00:00 2001 From: Vincent Devos <46601673+karismann@users.noreply.github.com> Date: Mon, 20 May 2019 10:12:28 +0200 Subject: [PATCH 14/18] [JAVA] fix artifactVersion overriding snapshot parameter when set (#2891) --- .../languages/AbstractJavaCodegen.java | 20 +++++------ .../codegen/java/AbstractJavaCodegenTest.java | 35 ++++++++++++++++++- 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 8c7260f3b3..0ef33cf048 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -266,14 +266,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code additionalProperties.put(CodegenConstants.ARTIFACT_ID, artifactId); } - if (additionalProperties.containsKey(CodegenConstants.SNAPSHOT_VERSION)) { - Boolean useSnapshotVersion = Boolean.valueOf((String) additionalProperties.get(CodegenConstants.SNAPSHOT_VERSION)); - - if (useSnapshotVersion) { - this.setArtifactVersion(this.buildSnapshotVersion(this.artifactVersion)); - } - } - if (additionalProperties.containsKey(CodegenConstants.ARTIFACT_URL)) { this.setArtifactUrl((String) additionalProperties.get(CodegenConstants.ARTIFACT_URL)); } else { @@ -1047,12 +1039,16 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code this.setArtifactVersion((String) additionalProperties.get(CodegenConstants.ARTIFACT_VERSION)); } else if (openAPI.getInfo() != null && openAPI.getInfo().getVersion() != null) { this.setArtifactVersion(openAPI.getInfo().getVersion()); - additionalProperties.put(CodegenConstants.ARTIFACT_VERSION, artifactVersion); - } else { - //not set, use to be passed to template - additionalProperties.put(CodegenConstants.ARTIFACT_VERSION, artifactVersion); } + if (additionalProperties.containsKey(CodegenConstants.SNAPSHOT_VERSION)) { + Boolean useSnapshotVersion = Boolean.valueOf((String) additionalProperties.get(CodegenConstants.SNAPSHOT_VERSION)); + if (useSnapshotVersion) { + this.setArtifactVersion(this.buildSnapshotVersion(this.getArtifactVersion())); + } + } + additionalProperties.put(CodegenConstants.ARTIFACT_VERSION, artifactVersion); + } private static String getAccept(OpenAPI openAPI, Operation operation) { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java index 014d6278af..3db02060a1 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java @@ -225,6 +225,19 @@ public class AbstractJavaCodegenTest { Assert.assertEquals(codegen.getArtifactVersion(), "1.0.7"); } + @Test(description = "tests if API version specification is used if no version is provided in additional properties with snapshot version") + public void openApiSnapShotVersionTest() { + final P_AbstractJavaCodegen codegen = new P_AbstractJavaCodegen(); + + codegen.additionalProperties().put("snapshotVersion", "true"); + + OpenAPI api = TestUtils.createOpenAPI(); + codegen.processOpts(); + codegen.preprocessOpenAPI(api); + + Assert.assertEquals(codegen.getArtifactVersion(), "1.0.7-SNAPSHOT"); + } + @Test(description = "tests if artifactVersion additional property is used") public void additionalPropertyArtifactVersionTest() { final P_AbstractJavaCodegen codegen = new P_AbstractJavaCodegen(); @@ -238,22 +251,42 @@ public class AbstractJavaCodegenTest { Assert.assertEquals(codegen.getArtifactVersion(), "1.1.1"); } + @Test(description = "tests if artifactVersion additional property is used with snapshot parameter") + public void additionalPropertyArtifactSnapShotVersionTest() { + final P_AbstractJavaCodegen codegen = new P_AbstractJavaCodegen(); + + codegen.additionalProperties().put("artifactVersion", "1.1.1"); + codegen.additionalProperties().put("snapshotVersion", "true"); + + OpenAPI api = TestUtils.createOpenAPI(); + codegen.processOpts(); + codegen.preprocessOpenAPI(api); + + Assert.assertEquals(codegen.getArtifactVersion(), "1.1.1-SNAPSHOT"); + } + @Test(description = "tests if default version is used when neither OpenAPI version nor artifactVersion additional property has been provided") public void defaultVersionTest() { final P_AbstractJavaCodegen codegen = new P_AbstractJavaCodegen(); + OpenAPI api = TestUtils.createOpenAPI(); + api.getInfo().setVersion(null); codegen.processOpts(); + codegen.preprocessOpenAPI(api); Assert.assertEquals(codegen.getArtifactVersion(), "1.0.0"); } - @Test(description = "tests if default version is used when neither OpenAPI version nor artifactVersion additional property has been provided") + @Test(description = "tests if default version with snapshot is used when neither OpenAPI version nor artifactVersion additional property has been provided") public void snapshotVersionTest() { final P_AbstractJavaCodegen codegen = new P_AbstractJavaCodegen(); codegen.additionalProperties().put("snapshotVersion", "true"); + OpenAPI api = TestUtils.createOpenAPI(); + api.getInfo().setVersion(null); codegen.processOpts(); + codegen.preprocessOpenAPI(api); Assert.assertEquals(codegen.getArtifactVersion(), "1.0.0-SNAPSHOT"); } From 87c9de210f904adffffe6a905bfa9dd4321f2864 Mon Sep 17 00:00:00 2001 From: Erik Hvattum Date: Mon, 20 May 2019 10:54:43 +0200 Subject: [PATCH 15/18] Feature/typescript fetch/map templating (#2913) * Add openapi dictionary/map support to typescript-fetch client generator Change isContainer -> isListContainer for existing array support. Add isMapContainer control flow, adding map support. Add utility function to help map openapi map/dictionaries to ts maps. Close #1878 * Run typescript-fetch generator scripts and update output files --- .../typescript-fetch/modelGeneric.mustache | 28 +++++++++++++------ .../typescript-fetch/runtime.mustache | 7 +++++ .../builds/default/models/Category.ts | 2 +- .../builds/default/models/ModelApiResponse.ts | 2 +- .../builds/default/models/Order.ts | 2 +- .../builds/default/models/Pet.ts | 2 +- .../builds/default/models/Tag.ts | 2 +- .../builds/default/models/User.ts | 2 +- .../builds/default/runtime.ts | 7 +++++ .../builds/es6-target/models/Category.ts | 2 +- .../es6-target/models/ModelApiResponse.ts | 2 +- .../builds/es6-target/models/Order.ts | 2 +- .../builds/es6-target/models/Pet.ts | 2 +- .../builds/es6-target/models/Tag.ts | 2 +- .../builds/es6-target/models/User.ts | 2 +- .../builds/es6-target/runtime.ts | 7 +++++ .../builds/with-interfaces/models/Category.ts | 2 +- .../models/ModelApiResponse.ts | 2 +- .../builds/with-interfaces/models/Order.ts | 2 +- .../builds/with-interfaces/models/Pet.ts | 2 +- .../builds/with-interfaces/models/Tag.ts | 2 +- .../builds/with-interfaces/models/User.ts | 2 +- .../builds/with-interfaces/runtime.ts | 7 +++++ .../with-npm-version/models/Category.ts | 2 +- .../models/ModelApiResponse.ts | 2 +- .../builds/with-npm-version/models/Order.ts | 2 +- .../builds/with-npm-version/models/Pet.ts | 2 +- .../builds/with-npm-version/models/Tag.ts | 2 +- .../builds/with-npm-version/models/User.ts | 2 +- .../builds/with-npm-version/runtime.ts | 7 +++++ 30 files changed, 78 insertions(+), 33 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache index 476e984fad..fc160bb14b 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGeneric.mustache @@ -1,4 +1,4 @@ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; {{#hasImports}} import { {{#imports}} @@ -46,17 +46,22 @@ export function {{classname}}FromJSON(json: any): {{classname}} { {{/isDate}} {{/isPrimitiveType}} {{^isPrimitiveType}} - {{#isContainer}} + {{#isListContainer}} '{{name}}': {{^required}}!exists(json, '{{baseName}}') ? undefined : {{/required}}(json['{{baseName}}'] as Array).map({{#items}}{{datatype}}{{/items}}FromJSON), - {{/isContainer}} - {{^isContainer}} + {{/isListContainer}} + {{#isMapContainer}} + '{{name}}': {{^required}}!exists(json, '{{baseName}}') ? undefined : {{/required}}mapValues(json['{{baseName}}'], {{#items}}{{datatype}}{{/items}}FromJSON), + {{/isMapContainer}} + {{^isListContainer}} + {{^isMapContainer}} {{^isFreeFormObject}} '{{name}}': {{^required}}!exists(json, '{{baseName}}') ? undefined : {{/required}}{{datatype}}FromJSON(json['{{baseName}}']), {{/isFreeFormObject}} {{#isFreeFormObject}} '{{name}}': {{^required}}!exists(json, '{{baseName}}') ? undefined : {{/required}}json['{{baseName}}'], {{/isFreeFormObject}} - {{/isContainer}} + {{/isMapContainer}} + {{/isListContainer}} {{/isPrimitiveType}} {{/allVars}} }; @@ -78,17 +83,22 @@ export function {{classname}}ToJSON(value?: {{classname}}): any { '{{baseName}}': {{#isDate}}{{^required}}value.{{name}} === undefined ? undefined : {{/required}}value.{{name}}.toISOString().substr(0,10){{/isDate}}{{#isDateTime}}{{^required}}value.{{name}} === undefined ? undefined : {{/required}}value.{{name}}.toISOString(){{/isDateTime}}{{^isDate}}{{^isDateTime}}value.{{name}}{{/isDateTime}}{{/isDate}}, {{/isPrimitiveType}} {{^isPrimitiveType}} - {{#isContainer}} + {{#isListContainer}} '{{baseName}}': {{^required}}value.{{name}} === undefined ? undefined : {{/required}}(value.{{name}} as Array).map({{#items}}{{datatype}}{{/items}}ToJSON), - {{/isContainer}} - {{^isContainer}} + {{/isListContainer}} + {{#isMapContainer}} + '{{baseName}}': {{^required}}value.{{name}} === undefined ? undefined : {{/required}}mapValues(value.{{name}}, {{#items}}{{datatype}}{{/items}}ToJSON), + {{/isMapContainer}} + {{^isListContainer}} + {{^isMapContainer}} {{^isFreeFormObject}} '{{baseName}}': {{datatype}}ToJSON(value.{{name}}), {{/isFreeFormObject}} {{#isFreeFormObject}} '{{baseName}}': value.{{name}}, {{/isFreeFormObject}} - {{/isContainer}} + {{/isMapContainer}} + {{/isListContainer}} {{/isPrimitiveType}} {{/isReadOnly}} {{/allVars}} diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache index 624feac809..6f8038f5bd 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/runtime.mustache @@ -202,6 +202,13 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join('&'); } +export function mapValues(data: any, fn: (item: any) => any) { + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); +} + export interface RequestContext { fetch: FetchAPI; url: string; diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Category.ts index 99df10e5f1..f8809dccbe 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Category.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * A category for a pet * @export diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/default/models/ModelApiResponse.ts index 369973446b..8b8e2c45fe 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/ModelApiResponse.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * Describes the result of uploading an image resource * @export diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts index ef002a60fc..6ce0496794 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Order.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * An order for a pets from the pet store * @export diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts index 27de4cee46..770f991b89 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Pet.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; import { Category, CategoryFromJSON, diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/default/models/Tag.ts index a7dd455620..7c8098f6dc 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/Tag.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * A tag for a pet * @export diff --git a/samples/client/petstore/typescript-fetch/builds/default/models/User.ts b/samples/client/petstore/typescript-fetch/builds/default/models/User.ts index f42cf94d74..fd7430063f 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/models/User.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * A User who is purchasing from the pet store * @export diff --git a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts index 3af222044b..67a45b169f 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/default/runtime.ts @@ -213,6 +213,13 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join('&'); } +export function mapValues(data: any, fn: (item: any) => any) { + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); +} + export interface RequestContext { fetch: FetchAPI; url: string; diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/models/Category.ts index 99df10e5f1..f8809dccbe 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/models/Category.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * A category for a pet * @export diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/models/ModelApiResponse.ts index 369973446b..8b8e2c45fe 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/models/ModelApiResponse.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * Describes the result of uploading an image resource * @export diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/models/Order.ts index ef002a60fc..6ce0496794 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/models/Order.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * An order for a pets from the pet store * @export diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/models/Pet.ts index 27de4cee46..770f991b89 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/models/Pet.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; import { Category, CategoryFromJSON, diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/models/Tag.ts index a7dd455620..7c8098f6dc 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/models/Tag.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * A tag for a pet * @export diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/models/User.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/models/User.ts index f42cf94d74..fd7430063f 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/models/User.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * A User who is purchasing from the pet store * @export diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts b/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts index 3af222044b..67a45b169f 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/runtime.ts @@ -213,6 +213,13 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join('&'); } +export function mapValues(data: any, fn: (item: any) => any) { + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); +} + export interface RequestContext { fetch: FetchAPI; url: string; diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Category.ts index 99df10e5f1..f8809dccbe 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Category.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * A category for a pet * @export diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/ModelApiResponse.ts index 369973446b..8b8e2c45fe 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/ModelApiResponse.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * Describes the result of uploading an image resource * @export diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts index ef002a60fc..6ce0496794 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Order.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * An order for a pets from the pet store * @export diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts index 27de4cee46..770f991b89 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Pet.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; import { Category, CategoryFromJSON, diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Tag.ts index a7dd455620..7c8098f6dc 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/Tag.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * A tag for a pet * @export diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/User.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/User.ts index f42cf94d74..fd7430063f 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/models/User.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * A User who is purchasing from the pet store * @export diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts index 3af222044b..67a45b169f 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/runtime.ts @@ -213,6 +213,13 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join('&'); } +export function mapValues(data: any, fn: (item: any) => any) { + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); +} + export interface RequestContext { fetch: FetchAPI; url: string; diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Category.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Category.ts index 99df10e5f1..f8809dccbe 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Category.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Category.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * A category for a pet * @export diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/ModelApiResponse.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/ModelApiResponse.ts index 369973446b..8b8e2c45fe 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/ModelApiResponse.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/ModelApiResponse.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * Describes the result of uploading an image resource * @export diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Order.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Order.ts index ef002a60fc..6ce0496794 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Order.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Order.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * An order for a pets from the pet store * @export diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Pet.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Pet.ts index 27de4cee46..770f991b89 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Pet.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Pet.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; import { Category, CategoryFromJSON, diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Tag.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Tag.ts index a7dd455620..7c8098f6dc 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Tag.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/Tag.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * A tag for a pet * @export diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/User.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/User.ts index f42cf94d74..fd7430063f 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/User.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/models/User.ts @@ -11,7 +11,7 @@ * Do not edit the class manually. */ -import { exists } from '../runtime'; +import { exists, mapValues } from '../runtime'; /** * A User who is purchasing from the pet store * @export diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts b/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts index 3af222044b..67a45b169f 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/runtime.ts @@ -213,6 +213,13 @@ export function querystring(params: HTTPQuery, prefix: string = ''): string { .join('&'); } +export function mapValues(data: any, fn: (item: any) => any) { + return Object.keys(data).reduce( + (acc, key) => ({ ...acc, [key]: fn(data[key]) }), + {} + ); +} + export interface RequestContext { fetch: FetchAPI; url: string; From 3014ece6d805163419aabacee32da07756438cc4 Mon Sep 17 00:00:00 2001 From: Vincent Devos <46601673+karismann@users.noreply.github.com> Date: Mon, 20 May 2019 10:59:12 +0200 Subject: [PATCH 16/18] [Typescript] remove deprecated typings (#2880) * [Typescript] remove deprecated typings * add typescript-v7 CI tests --- .../TypeScriptAngularClientCodegen.java | 1 - .../TypeScriptJqueryClientCodegen.java | 2 -- .../typescript-angular/typings.mustache | 5 ----- .../typescript-jquery/README.mustache | 2 +- .../typescript-jquery/git_push.sh.mustache | 2 +- .../typescript-jquery/package.mustache | 10 +++++----- .../typescript-jquery/tsconfig.mustache | 3 +-- .../typescript-jquery/typings.mustache | 10 ---------- pom.xml | 2 +- .../typescript-angular-v2/npm/typings.json | 5 ----- .../with-interfaces/typings.json | 5 ----- .../typescript-angular-v4.3/npm/typings.json | 5 ----- .../typescript-angular-v4/npm/typings.json | 5 ----- .../builds/with-npm/typings.json | 5 ----- .../builds/with-npm/typings.json | 5 ----- .../builds/with-npm/typings.json | 5 ----- .../builds/with-npm/typings.json | 5 ----- .../default/src/app/app.component.spec.ts | 8 ++++---- .../tests/default/src/app/app.component.ts | 2 +- .../tests/default/src/test/api.spec.ts | 19 ++++++++++++++++++- .../typescript-jquery/default/git_push.sh | 2 +- .../petstore/typescript-jquery/npm/README.md | 2 +- .../typescript-jquery/npm/git_push.sh | 2 +- .../typescript-jquery/npm/package.json | 10 +++++----- .../typescript-jquery/npm/tsconfig.json | 3 +-- .../typescript-jquery/npm/typings.json | 10 ---------- 26 files changed, 41 insertions(+), 94 deletions(-) delete mode 100644 modules/openapi-generator/src/main/resources/typescript-angular/typings.mustache delete mode 100644 modules/openapi-generator/src/main/resources/typescript-jquery/typings.mustache delete mode 100644 samples/client/petstore/typescript-angular-v2/npm/typings.json delete mode 100644 samples/client/petstore/typescript-angular-v2/with-interfaces/typings.json delete mode 100644 samples/client/petstore/typescript-angular-v4.3/npm/typings.json delete mode 100644 samples/client/petstore/typescript-angular-v4/npm/typings.json delete mode 100644 samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/typings.json delete mode 100644 samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/typings.json delete mode 100644 samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/typings.json delete mode 100644 samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/typings.json delete mode 100644 samples/client/petstore/typescript-jquery/npm/typings.json diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java index b313d606a8..745e9747b2 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAngularClientCodegen.java @@ -263,7 +263,6 @@ public class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode //Files for building our lib supportingFiles.add(new SupportingFile("package.mustache", getIndexDirectory(), "package.json")); - supportingFiles.add(new SupportingFile("typings.mustache", getIndexDirectory(), "typings.json")); supportingFiles.add(new SupportingFile("tsconfig.mustache", getIndexDirectory(), "tsconfig.json")); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java index 6c5cf87646..0be86b0de7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptJqueryClientCodegen.java @@ -87,7 +87,6 @@ public class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodeg supportingFiles.add(new SupportingFile("index.mustache", getIndexDirectory(), "index.ts")); supportingFiles.add(new SupportingFile("variables.mustache", getIndexDirectory(), "variables.ts")); - //LOGGER.warn("check additionals: " + additionalProperties.get(NPM_NAME)); if (additionalProperties.containsKey(NPM_NAME)) { addNpmPackageGeneration(); } @@ -159,7 +158,6 @@ public class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodeg //Files for building our lib supportingFiles.add(new SupportingFile("README.mustache", getPackageRootDirectory(), "README.md")); supportingFiles.add(new SupportingFile("package.mustache", getPackageRootDirectory(), "package.json")); - supportingFiles.add(new SupportingFile("typings.mustache", getPackageRootDirectory(), "typings.json")); supportingFiles.add(new SupportingFile("tsconfig.mustache", getPackageRootDirectory(), "tsconfig.json")); } diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/typings.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/typings.mustache deleted file mode 100644 index 507c40e5cb..0000000000 --- a/modules/openapi-generator/src/main/resources/typescript-angular/typings.mustache +++ /dev/null @@ -1,5 +0,0 @@ -{ - "globalDependencies": { - "core-js": "registry:dt/core-js#0.0.0+20160725163759" - } -} diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/README.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/README.mustache index ef14fdbbf3..ec079198a7 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/README.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/README.mustache @@ -15,7 +15,7 @@ Module system * CommonJS * ES6 module system -It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)) +It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html)) ### Building diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/git_push.sh.mustache index 8a32e53995..b2cb1cdd4e 100755 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/git_push.sh.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/git_push.sh.mustache @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-typescript-jquery "minor update" git_user_id=$1 git_repo_id=$2 diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/package.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/package.mustache index 46ba3da15d..cba64d1177 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/package.mustache @@ -11,13 +11,13 @@ "dependencies": { "bluebird": "^3.3.5", "request": "^2.72.0", - "jquery": "^3.1.1" + "jquery": "^3.1" }, "devDependencies": { - "typescript": "2.2.2", - "typings": "^1.3.0" + "@types/jquery": "^3.1", + "typescript": "^2.4" }{{#npmRepository}}, - "publishConfig":{ - "registry":"{{npmRepository}}" + "publishConfig": { + "registry": "{{npmRepository}}" }{{/npmRepository}} } diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/tsconfig.mustache index 39415409ce..ff5c84462d 100644 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-jquery/tsconfig.mustache @@ -14,8 +14,7 @@ ] }, "files": [ - "index.ts", - "typings/index.d.ts" + "index.ts" ] } diff --git a/modules/openapi-generator/src/main/resources/typescript-jquery/typings.mustache b/modules/openapi-generator/src/main/resources/typescript-jquery/typings.mustache deleted file mode 100644 index 306cf301b8..0000000000 --- a/modules/openapi-generator/src/main/resources/typescript-jquery/typings.mustache +++ /dev/null @@ -1,10 +0,0 @@ -{ - "ambientDependencies": { - "bluebird": "registry:dt/bluebird#2.0.0+20160319051630", - "core-js": "registry:dt/core-js#0.0.0+20160317120654", - "node": "registry:dt/node#4.0.0+20160423143914" - }, - "globalDependencies": { - "jquery": "registry:dt/jquery#1.10.0+20170310222111" - } -} \ No newline at end of file diff --git a/pom.xml b/pom.xml index cf253fb7fa..cb076add08 100644 --- a/pom.xml +++ b/pom.xml @@ -1050,6 +1050,7 @@ samples/client/petstore/typescript-angular-v4/npm samples/client/petstore/typescript-angular-v4.3/npm samples/client/petstore/typescript-angular-v6-provided-in-root + samples/client/petstore/typescript-angular-v7-provided-in-root samples/server/petstore/rust-server samples/server/petstore/python-aiohttp @@ -1070,7 +1071,6 @@ samples/client/petstore/go - samples/client/petstore/typescript-angular-v6-provided-in-root samples/client/petstore/scala-httpclient diff --git a/samples/client/petstore/typescript-angular-v2/npm/typings.json b/samples/client/petstore/typescript-angular-v2/npm/typings.json deleted file mode 100644 index 507c40e5cb..0000000000 --- a/samples/client/petstore/typescript-angular-v2/npm/typings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "globalDependencies": { - "core-js": "registry:dt/core-js#0.0.0+20160725163759" - } -} diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/typings.json b/samples/client/petstore/typescript-angular-v2/with-interfaces/typings.json deleted file mode 100644 index 507c40e5cb..0000000000 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/typings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "globalDependencies": { - "core-js": "registry:dt/core-js#0.0.0+20160725163759" - } -} diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/typings.json b/samples/client/petstore/typescript-angular-v4.3/npm/typings.json deleted file mode 100644 index 507c40e5cb..0000000000 --- a/samples/client/petstore/typescript-angular-v4.3/npm/typings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "globalDependencies": { - "core-js": "registry:dt/core-js#0.0.0+20160725163759" - } -} diff --git a/samples/client/petstore/typescript-angular-v4/npm/typings.json b/samples/client/petstore/typescript-angular-v4/npm/typings.json deleted file mode 100644 index 507c40e5cb..0000000000 --- a/samples/client/petstore/typescript-angular-v4/npm/typings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "globalDependencies": { - "core-js": "registry:dt/core-js#0.0.0+20160725163759" - } -} diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/typings.json b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/typings.json deleted file mode 100644 index 507c40e5cb..0000000000 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/typings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "globalDependencies": { - "core-js": "registry:dt/core-js#0.0.0+20160725163759" - } -} diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/typings.json b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/typings.json deleted file mode 100644 index 507c40e5cb..0000000000 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/typings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "globalDependencies": { - "core-js": "registry:dt/core-js#0.0.0+20160725163759" - } -} diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/typings.json b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/typings.json deleted file mode 100644 index 507c40e5cb..0000000000 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/typings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "globalDependencies": { - "core-js": "registry:dt/core-js#0.0.0+20160725163759" - } -} diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/typings.json b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/typings.json deleted file mode 100644 index 507c40e5cb..0000000000 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/typings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "globalDependencies": { - "core-js": "registry:dt/core-js#0.0.0+20160725163759" - } -} diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.spec.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.spec.ts index e82f9f0c32..fd77f0b021 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.spec.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.spec.ts @@ -14,7 +14,7 @@ describe('AppComponent', () => { const apiConfigurationParams: ConfigurationParameters = { // add configuration params here - apiKeys: { api_key: "foobar" }, + apiKeys: { api_key: 'foobar' }, }; const apiConfig = new Configuration(apiConfigurationParams); @@ -47,17 +47,17 @@ describe('AppComponent', () => { expect(app).toBeTruthy(); })); - it(`should have as title 'Typescript Angular v6 (provided in root)'`, async(() => { + it(`should have as title 'Typescript Angular v7 (provided in root)'`, async(() => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('Typescript Angular v6 (provided in root)'); + expect(app.title).toEqual('Typescript Angular v7 (provided in root)'); })); it('should render title in a h1 tag', async(() => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Welcome to Typescript Angular v6 (provided in root)!'); + expect(compiled.querySelector('h1').textContent).toContain('Welcome to Typescript Angular v7 (provided in root)!'); })); describe(`constructor()`, () => { diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.ts index 01b6bcb386..0259ba1243 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/app/app.component.ts @@ -12,7 +12,7 @@ import { styleUrls: ['./app.component.css'] }) export class AppComponent { - title = 'Typescript Angular v6 (provided in root)'; + title = 'Typescript Angular v7 (provided in root)'; pet: Pet; store: { key: string, number: number }[]; diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/api.spec.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/api.spec.ts index 5607deb8a0..2578193507 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/api.spec.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/tests/default/src/test/api.spec.ts @@ -36,7 +36,7 @@ describe(`API (functionality)`, () => { const apiConfigurationParams: ConfigurationParameters = { // add configuration params here - apiKeys: { api_key: "foobar" } + apiKeys: { api_key: 'foobar' } }; const apiConfig = new Configuration(apiConfigurationParams); @@ -109,6 +109,23 @@ describe(`API (functionality)`, () => { ); })); + it(`should update the pet name by form`, async(() => { + const petService = TestBed.get(PetService); + const newName = `pet-${Date.now()}`; + createdPet.name = newName; + + petService.updatePetWithForm(createdPet.id, createdPet.name).subscribe( + result => expect(result).toBeFalsy(), + error => fail(`expected a result, not the error: ${error.message}`), + ); + + return petService.getPetById(createdPet.id).subscribe( + result => expect(result.name).toEqual(createdPet.name), + error => fail(`expected a result, not the error: ${error.message}`), + ); + + })); + it(`should delete the pet`, async(() => { const petService = TestBed.get(PetService); diff --git a/samples/client/petstore/typescript-jquery/default/git_push.sh b/samples/client/petstore/typescript-jquery/default/git_push.sh index 8442b80bb4..d90bf7f1e1 100644 --- a/samples/client/petstore/typescript-jquery/default/git_push.sh +++ b/samples/client/petstore/typescript-jquery/default/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-typescript-jquery "minor update" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/typescript-jquery/npm/README.md b/samples/client/petstore/typescript-jquery/npm/README.md index cfd8c761a4..c5d3edc9b4 100644 --- a/samples/client/petstore/typescript-jquery/npm/README.md +++ b/samples/client/petstore/typescript-jquery/npm/README.md @@ -15,7 +15,7 @@ Module system * CommonJS * ES6 module system -It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)) +It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html)) ### Building diff --git a/samples/client/petstore/typescript-jquery/npm/git_push.sh b/samples/client/petstore/typescript-jquery/npm/git_push.sh index 8442b80bb4..d90bf7f1e1 100644 --- a/samples/client/petstore/typescript-jquery/npm/git_push.sh +++ b/samples/client/petstore/typescript-jquery/npm/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-typescript-jquery "minor update" git_user_id=$1 git_repo_id=$2 diff --git a/samples/client/petstore/typescript-jquery/npm/package.json b/samples/client/petstore/typescript-jquery/npm/package.json index 0ab26b0f31..7fb297b863 100644 --- a/samples/client/petstore/typescript-jquery/npm/package.json +++ b/samples/client/petstore/typescript-jquery/npm/package.json @@ -11,13 +11,13 @@ "dependencies": { "bluebird": "^3.3.5", "request": "^2.72.0", - "jquery": "^3.1.1" + "jquery": "^3.1" }, "devDependencies": { - "typescript": "2.2.2", - "typings": "^1.3.0" + "@types/jquery": "^3.1", + "typescript": "^2.4" }, - "publishConfig":{ - "registry":"https://skimdb.npmjs.com/registry" + "publishConfig": { + "registry": "https://skimdb.npmjs.com/registry" } } diff --git a/samples/client/petstore/typescript-jquery/npm/tsconfig.json b/samples/client/petstore/typescript-jquery/npm/tsconfig.json index c11ec54d7c..8df90ec739 100644 --- a/samples/client/petstore/typescript-jquery/npm/tsconfig.json +++ b/samples/client/petstore/typescript-jquery/npm/tsconfig.json @@ -14,8 +14,7 @@ ] }, "files": [ - "index.ts", - "typings/index.d.ts" + "index.ts" ] } diff --git a/samples/client/petstore/typescript-jquery/npm/typings.json b/samples/client/petstore/typescript-jquery/npm/typings.json deleted file mode 100644 index 306cf301b8..0000000000 --- a/samples/client/petstore/typescript-jquery/npm/typings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "ambientDependencies": { - "bluebird": "registry:dt/bluebird#2.0.0+20160319051630", - "core-js": "registry:dt/core-js#0.0.0+20160317120654", - "node": "registry:dt/node#4.0.0+20160423143914" - }, - "globalDependencies": { - "jquery": "registry:dt/jquery#1.10.0+20170310222111" - } -} \ No newline at end of file From 8b34bc1f978fe7e11cd42050052c4c620599f7fd Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Mon, 20 May 2019 12:22:32 +0200 Subject: [PATCH 17/18] Set openApiGeneratorVersion to 4.0.1-SNAPSHOT (#2882) --- modules/openapi-generator-gradle-plugin/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties index 7b4544abd1..6c44116c02 100644 --- a/modules/openapi-generator-gradle-plugin/gradle.properties +++ b/modules/openapi-generator-gradle-plugin/gradle.properties @@ -1,4 +1,4 @@ -openApiGeneratorVersion=4.0.0 +openApiGeneratorVersion=4.0.1-SNAPSHOT # BEGIN placeholders # these are just placeholders to allow contributors to build directly From 18b66ed28c7a2c783e7c4e3c81f1817ec3cabf4f Mon Sep 17 00:00:00 2001 From: William Cheng Date: Mon, 20 May 2019 19:00:31 +0800 Subject: [PATCH 18/18] Add a link to the article published in 47northlabs.com (#2941) Add a link to the article published in 47northlabs.com --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3b31ba2c86..ce239e3167 100644 --- a/README.md +++ b/README.md @@ -586,6 +586,7 @@ Here are some companies/projects (alphabetical order) using OpenAPI Generator in - 2019-04-18 - [How to use OpenAPI3 for API developer (RubyKaigi 2019)](https://speakerdeck.com/ota42y/how-to-use-openapi3-for-api-developer) by [@ota42y](https://twitter.com/ota42y) at [RubyKaigi 2019](https://rubykaigi.org/2019) - 2019-04-29 - [A Beginner's Guide to Code Generation for REST APIs (OpenAPI Generator)](https://gum.co/openapi_generator_ebook) by [William Cheng](https://twitter.com/wing328) - 2019-05-01 - [Design and generate a REST API from Swagger / OpenAPI in Java, Python, C# and more](https://simply-how.com/design-and-generate-api-code-from-openapi) by [Simply How](https://simply-how.com/) +- 2019-05-17 - [Generate Spring Boot REST API using Swagger/OpenAPI](https://www.47northlabs.com/knowledge-base/generate-spring-boot-rest-api-using-swagger-openapi/) by [Antonie Zafirov](https://www.47northlabs.com/author/antonie-zafirov/) ## [6 - About Us](#table-of-contents)