Skip to content

Commit b1984f3

Browse files
alavkxmacjohnny
authored andcommitted
[TS] Fixes typescript-axios "File custom.d.ts not found" when building consumer TS project (#4230)
* remove unused file * build(package.json): update node and ts * remove ref to ambient declaration * remove other ref to ambient declaration * remove all references to custom.d.ts, rebuild * regenerate typescript axios samples
1 parent 9c46973 commit b1984f3

File tree

31 files changed

+8
-35
lines changed

31 files changed

+8
-35
lines changed

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/TypeScriptAxiosClientCodegen.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ public void processOpts() {
107107
supportingFiles.add(new SupportingFile("baseApi.mustache", "", "base.ts"));
108108
supportingFiles.add(new SupportingFile("api.mustache", "", "api.ts"));
109109
supportingFiles.add(new SupportingFile("configuration.mustache", "", "configuration.ts"));
110-
supportingFiles.add(new SupportingFile("custom.d.mustache", "", "custom.d.ts"));
111110
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
112111
supportingFiles.add(new SupportingFile("gitignore", "", ".gitignore"));
113112

modules/openapi-generator/src/main/resources/typescript-axios/api.mustache

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
{{>licenseInfo}}
43

54
{{^withSeparateModelsAndApi}}

modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{{#withSeparateModelsAndApi}}
22
// tslint:disable
3-
/// <reference path="{{apiRelativeToRoot}}custom.d.ts" />
43
{{>licenseInfo}}
54

65
import * as globalImportUrl from 'url';

modules/openapi-generator/src/main/resources/typescript-axios/baseApi.mustache

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
{{>licenseInfo}}
43

54
import { Configuration } from "./configuration";

modules/openapi-generator/src/main/resources/typescript-axios/custom.d.mustache

Lines changed: 0 additions & 1 deletion
This file was deleted.

modules/openapi-generator/src/main/resources/typescript-axios/model.mustache

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="{{modelRelativeToRoot}}custom.d.ts" />
32
{{>licenseInfo}}
43
{{#withSeparateModelsAndApi}}{{#imports}}
54
import { {{class}} } from './{{filename}}';{{/imports}}{{/withSeparateModelsAndApi}}

modules/openapi-generator/src/main/resources/typescript-axios/package.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"axios": "^0.18.0"
2222
},
2323
"devDependencies": {
24-
"@types/node": "^8.0.9",
25-
"typescript": "^2.4"
24+
"@types/node": "^12.11.5",
25+
"typescript": "^3.6.4"
2626
}{{#npmRepository}},{{/npmRepository}}
2727
{{#npmRepository}}
2828
"publishConfig": {

samples/client/petstore/typescript-axios/builds/default/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/default/base.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/es6-target/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/es6-target/base.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/es6-target/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"axios": "^0.18.0"
2222
},
2323
"devDependencies": {
24-
"@types/node": "^8.0.9",
25-
"typescript": "^2.4"
24+
"@types/node": "^12.11.5",
25+
"typescript": "^3.6.4"
2626
},
2727
"publishConfig": {
2828
"registry": "https://skimdb.npmjs.com/registry"

samples/client/petstore/typescript-axios/builds/with-complex-headers/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-complex-headers/base.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-interfaces/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-interfaces/base.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/pet-api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="../../../custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/store-api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="../../../custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/api/another/level/user-api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="../../../custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/base.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/api-response.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="../../../../custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/category.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="../../../../custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/order.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="../../../../custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/pet.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="../../../../custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/tag.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="../../../../custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/model/some/levels/deep/user.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="../../../../custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"axios": "^0.18.0"
2222
},
2323
"devDependencies": {
24-
"@types/node": "^8.0.9",
25-
"typescript": "^2.4"
24+
"@types/node": "^12.11.5",
25+
"typescript": "^3.6.4"
2626
},
2727
"publishConfig": {
2828
"registry": "https://skimdb.npmjs.com/registry"

samples/client/petstore/typescript-axios/builds/with-npm-version/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version/base.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// tslint:disable
2-
/// <reference path="./custom.d.ts" />
32
/**
43
* OpenAPI Petstore
54
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.

samples/client/petstore/typescript-axios/builds/with-npm-version/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
"axios": "^0.18.0"
2222
},
2323
"devDependencies": {
24-
"@types/node": "^8.0.9",
25-
"typescript": "^2.4"
24+
"@types/node": "^12.11.5",
25+
"typescript": "^3.6.4"
2626
},
2727
"publishConfig": {
2828
"registry": "https://skimdb.npmjs.com/registry"

0 commit comments

Comments
 (0)