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 b313d606a81..745e9747b2c 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 6c5cf87646e..0be86b0de78 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 507c40e5cbe..00000000000
--- 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 ef14fdbbf33..ec079198a7c 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 8a32e53995d..b2cb1cdd4e8 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 46ba3da15d8..cba64d11771 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 39415409ce6..ff5c84462d0 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 306cf301b88..00000000000
--- 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 cf253fb7fa0..cb076add08e 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 507c40e5cbe..00000000000
--- 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 507c40e5cbe..00000000000
--- 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 507c40e5cbe..00000000000
--- 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 507c40e5cbe..00000000000
--- 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 507c40e5cbe..00000000000
--- 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 507c40e5cbe..00000000000
--- 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 507c40e5cbe..00000000000
--- 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 507c40e5cbe..00000000000
--- 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 e82f9f0c32d..fd77f0b021c 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 01b6bcb3860..0259ba12434 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 5607deb8a05..25781935072 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 8442b80bb44..d90bf7f1e1e 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 cfd8c761a44..c5d3edc9b4b 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 8442b80bb44..d90bf7f1e1e 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 0ab26b0f31f..7fb297b8633 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 c11ec54d7ca..8df90ec7395 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 306cf301b88..00000000000
--- 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