diff --git a/README.md b/README.md index e526479d127..87f37c8ca49 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@
-[![Stable releaases in Maven Central](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) [![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-orange)](./LICENSE) [![Open Collective backers](https://img.shields.io/opencollective/backers/openapi_generator?color=orange&label=OpenCollective%20Backers)](https://opencollective.com/openapi_generator) [![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM) [![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator) +[![Stable releases in Maven Central](https://img.shields.io/maven-metadata/v/https/repo1.maven.org/maven2/org/openapitools/openapi-generator/maven-metadata.xml.svg)](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.openapitools%22%20AND%20a%3A%22openapi-generator%22) [![Apache 2.0 License](https://img.shields.io/badge/License-Apache%202.0-orange)](./LICENSE) [![Open Collective backers](https://img.shields.io/opencollective/backers/openapi_generator?color=orange&label=OpenCollective%20Backers)](https://opencollective.com/openapi_generator) [![Join the Slack chat room](https://img.shields.io/badge/Slack-Join%20the%20chat%20room-orange)](https://join.slack.com/t/openapi-generator/shared_invite/enQtNzAyNDMyOTU0OTE1LTY5ZDBiNDI5NzI5ZjQ1Y2E5OWVjMjZkYzY1ZGM2MWQ4YWFjMzcyNDY5MGI4NjQxNDBiMTlmZTc5NjY2ZTQ5MGM) [![Follow OpenAPI Generator Twitter account to get the latest update](https://img.shields.io/twitter/follow/oas_generator.svg?style=social&label=Follow)](https://twitter.com/oas_generator)
diff --git a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache index 2f71d86109f..c3a83a84d6e 100644 --- a/modules/openapi-generator/src/main/resources/typescript/http/http.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/http/http.mustache @@ -7,9 +7,7 @@ import { URLSearchParams } from 'url'; {{/platforms}} {{#platforms}} {{^deno}} -// typings of url-parse are incorrect... -// @ts-ignore -import * as URLParse from "url-parse"; +import URLParse from "url-parse"; {{/deno}} {{/platforms}} import { Observable, from } from {{#useRxJS}}'rxjs'{{/useRxJS}}{{^useRxJS}}'../rxjsStub{{extensionForDeno}}'{{/useRxJS}}; diff --git a/modules/openapi-generator/src/main/resources/typescript/package.mustache b/modules/openapi-generator/src/main/resources/typescript/package.mustache index 807989026b1..e775b345eee 100644 --- a/modules/openapi-generator/src/main/resources/typescript/package.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/package.mustache @@ -51,7 +51,8 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^3.9.3", + "@types/url-parse": "1.4.4" }{{#npmRepository}},{{/npmRepository}} {{#npmRepository}} "publishConfig":{ diff --git a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache index 011a217eb06..6e3bd9bb349 100644 --- a/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache +++ b/modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache @@ -13,6 +13,9 @@ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* To import url-parse */ + "allowSyntheticDefaultImports": true, + "removeComments": true, "sourceMap": true, "outDir": "./dist", diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts index f19e206b19f..4a69a7f7f18 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/http/http.ts @@ -1,6 +1,4 @@ -// typings of url-parse are incorrect... -// @ts-ignore -import * as URLParse from "url-parse"; +import URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; export * from './isomorphic-fetch'; diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json index 1605e85eb13..78d313bd12e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/package.json @@ -22,6 +22,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^3.9.3", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json index 6576215ef87..68bff46d308 100644 --- a/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/composed-schemas/tsconfig.json @@ -13,6 +13,9 @@ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* To import url-parse */ + "allowSyntheticDefaultImports": true, + "removeComments": true, "sourceMap": true, "outDir": "./dist", diff --git a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts index a623aef1278..a380003eb6d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/default/http/http.ts @@ -1,9 +1,7 @@ // TODO: evaluate if we can easily get rid of this library import * as FormData from "form-data"; import { URLSearchParams } from 'url'; -// typings of url-parse are incorrect... -// @ts-ignore -import * as URLParse from "url-parse"; +import URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; export * from './isomorphic-fetch'; diff --git a/samples/openapi3/client/petstore/typescript/builds/default/package.json b/samples/openapi3/client/petstore/typescript/builds/default/package.json index f2676763610..830fc2abb28 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/package.json @@ -26,6 +26,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^3.9.3", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json index 3ada5c62a9f..1fd524c47e3 100644 --- a/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/default/tsconfig.json @@ -13,6 +13,9 @@ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* To import url-parse */ + "allowSyntheticDefaultImports": true, + "removeComments": true, "sourceMap": true, "outDir": "./dist", diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts index a623aef1278..a380003eb6d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/http/http.ts @@ -1,9 +1,7 @@ // TODO: evaluate if we can easily get rid of this library import * as FormData from "form-data"; import { URLSearchParams } from 'url'; -// typings of url-parse are incorrect... -// @ts-ignore -import * as URLParse from "url-parse"; +import URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; export * from './isomorphic-fetch'; diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json index 71908ad48ca..4102c747f78 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/package.json @@ -27,6 +27,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^3.9.3", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json index c09901ad10f..ec234242c2e 100644 --- a/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/inversify/tsconfig.json @@ -13,6 +13,9 @@ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* To import url-parse */ + "allowSyntheticDefaultImports": true, + "removeComments": true, "sourceMap": true, "outDir": "./dist", diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts index 4b9ef54beeb..d48c69e9781 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/http/http.ts @@ -1,6 +1,4 @@ -// typings of url-parse are incorrect... -// @ts-ignore -import * as URLParse from "url-parse"; +import URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; export * from './jquery'; diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json index 7c35bc6c6dd..aed6c6e9f95 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/package.json @@ -23,6 +23,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^3.9.3", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json index 6576215ef87..68bff46d308 100644 --- a/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/jquery/tsconfig.json @@ -13,6 +13,9 @@ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* To import url-parse */ + "allowSyntheticDefaultImports": true, + "removeComments": true, "sourceMap": true, "outDir": "./dist", diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts index a623aef1278..a380003eb6d 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/http/http.ts @@ -1,9 +1,7 @@ // TODO: evaluate if we can easily get rid of this library import * as FormData from "form-data"; import { URLSearchParams } from 'url'; -// typings of url-parse are incorrect... -// @ts-ignore -import * as URLParse from "url-parse"; +import URLParse from "url-parse"; import { Observable, from } from '../rxjsStub'; export * from './isomorphic-fetch'; diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json index f2676763610..830fc2abb28 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/package.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/package.json @@ -26,6 +26,7 @@ "url-parse": "^1.4.3" }, "devDependencies": { - "typescript": "^3.9.3" + "typescript": "^3.9.3", + "@types/url-parse": "1.4.4" } } diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json index 3ada5c62a9f..1fd524c47e3 100644 --- a/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json +++ b/samples/openapi3/client/petstore/typescript/builds/object_params/tsconfig.json @@ -13,6 +13,9 @@ "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* To import url-parse */ + "allowSyntheticDefaultImports": true, + "removeComments": true, "sourceMap": true, "outDir": "./dist",