mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 18:45:23 +00:00
removed isomorphic-fetch typing dependency (#6894)
* removed isomorphic-fetch typing dependency removed postinstall command * space * regenerated samples * updated security samples * fixed missing url module * added prepublish hook * regenerated samples * added npm build to build
This commit is contained in:
parent
0b4b25afff
commit
2b84118c9f
@ -1 +1,2 @@
|
|||||||
declare module 'portable-fetch';
|
declare module 'portable-fetch';
|
||||||
|
declare module 'url';
|
@ -14,13 +14,12 @@
|
|||||||
"typings": "./dist/index.d.ts",
|
"typings": "./dist/index.d.ts",
|
||||||
"scripts" : {
|
"scripts" : {
|
||||||
"build": "tsc --outDir dist/",
|
"build": "tsc --outDir dist/",
|
||||||
"postinstall": "npm run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"portable-fetch": "^3.0.0"
|
"portable-fetch": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/isomorphic-fetch": "0.0.34",
|
|
||||||
"@types/node": "^8.0.9",
|
"@types/node": "^8.0.9",
|
||||||
"typescript": "^2.0"
|
"typescript": "^2.0"
|
||||||
}{{#npmRepository}},{{/npmRepository}}
|
}{{#npmRepository}},{{/npmRepository}}
|
||||||
|
@ -1 +1 @@
|
|||||||
2.3.0-SNAPSHOT
|
2.4.0-SNAPSHOT
|
@ -89,7 +89,7 @@ export interface ModelReturn {
|
|||||||
* @type {number}
|
* @type {number}
|
||||||
* @memberof ModelReturn
|
* @memberof ModelReturn
|
||||||
*/
|
*/
|
||||||
return?: number;
|
_return?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -102,11 +102,11 @@ export const FakeApiFetchParamCreator = function (configuration?: Configuration)
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||||
* @param {string} [test code inject * ' " =end rn n r] To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
* @param {string} [testCodeInjectEndRnNR] To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
testCodeInjectEndRnNR(test code inject * ' " =end rn n r?: string, options: any = {}): FetchArgs {
|
testCodeInjectEndRnNR(testCodeInjectEndRnNR?: string, options: any = {}): FetchArgs {
|
||||||
const localVarPath = `/fake`;
|
const localVarPath = `/fake`;
|
||||||
const localVarUrlObj = url.parse(localVarPath, true);
|
const localVarUrlObj = url.parse(localVarPath, true);
|
||||||
const localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
|
const localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
|
||||||
@ -114,8 +114,8 @@ export const FakeApiFetchParamCreator = function (configuration?: Configuration)
|
|||||||
const localVarQueryParameter = {} as any;
|
const localVarQueryParameter = {} as any;
|
||||||
const localVarFormParams = new url.URLSearchParams();
|
const localVarFormParams = new url.URLSearchParams();
|
||||||
|
|
||||||
if (test code inject * ' " =end rn n r !== undefined) {
|
if (testCodeInjectEndRnNR !== undefined) {
|
||||||
localVarFormParams.set('test code inject */ ' " =end -- \r\n \n \r', test code inject * ' " =end rn n r as any);
|
localVarFormParams.set('test code inject */ ' " =end -- \r\n \n \r', testCodeInjectEndRnNR as any);
|
||||||
}
|
}
|
||||||
|
|
||||||
localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
|
localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
|
||||||
@ -143,12 +143,12 @@ export const FakeApiFp = function(configuration?: Configuration) {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||||
* @param {string} [test code inject * ' " =end rn n r] To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
* @param {string} [testCodeInjectEndRnNR] To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
testCodeInjectEndRnNR(test code inject * ' " =end rn n r?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response> {
|
testCodeInjectEndRnNR(testCodeInjectEndRnNR?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response> {
|
||||||
const localVarFetchArgs = FakeApiFetchParamCreator(configuration).testCodeInjectEndRnNR(test code inject * ' " =end rn n r, options);
|
const localVarFetchArgs = FakeApiFetchParamCreator(configuration).testCodeInjectEndRnNR(testCodeInjectEndRnNR, options);
|
||||||
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
||||||
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
||||||
if (response.status >= 200 && response.status < 300) {
|
if (response.status >= 200 && response.status < 300) {
|
||||||
@ -171,12 +171,12 @@ export const FakeApiFactory = function (configuration?: Configuration, fetch?: F
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||||
* @param {string} [test code inject * ' " =end rn n r] To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
* @param {string} [testCodeInjectEndRnNR] To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
*/
|
*/
|
||||||
testCodeInjectEndRnNR(test code inject * ' " =end rn n r?: string, options?: any) {
|
testCodeInjectEndRnNR(testCodeInjectEndRnNR?: string, options?: any) {
|
||||||
return FakeApiFp(configuration).testCodeInjectEndRnNR(test code inject * ' " =end rn n r, options)(fetch, basePath);
|
return FakeApiFp(configuration).testCodeInjectEndRnNR(testCodeInjectEndRnNR, options)(fetch, basePath);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -191,13 +191,13 @@ export class FakeApi extends BaseAPI {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||||
* @param {} [test code inject * ' " =end rn n r] To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
* @param {} [testCodeInjectEndRnNR] To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||||
* @param {*} [options] Override http request option.
|
* @param {*} [options] Override http request option.
|
||||||
* @throws {RequiredError}
|
* @throws {RequiredError}
|
||||||
* @memberof FakeApi
|
* @memberof FakeApi
|
||||||
*/
|
*/
|
||||||
public testCodeInjectEndRnNR(test code inject * ' " =end rn n r?: string, options?: any) {
|
public testCodeInjectEndRnNR(testCodeInjectEndRnNR?: string, options?: any) {
|
||||||
return FakeApiFp(this.configuration).testCodeInjectEndRnNR(test code inject * ' " =end rn n r, options)(this.fetch, this.basePath);
|
return FakeApiFp(this.configuration).testCodeInjectEndRnNR(testCodeInjectEndRnNR, options)(this.fetch, this.basePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1 +1,2 @@
|
|||||||
declare module 'portable-fetch';
|
declare module 'portable-fetch';
|
||||||
|
declare module 'url';
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
|||||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||||
|
|
||||||
if [ "$GIT_TOKEN" = "" ]; then
|
if [ "$GIT_TOKEN" = "" ]; then
|
||||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||||
else
|
else
|
||||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||||
|
@ -1 +1 @@
|
|||||||
2.3.1
|
2.4.0-SNAPSHOT
|
@ -1 +1,2 @@
|
|||||||
declare module 'portable-fetch';
|
declare module 'portable-fetch';
|
||||||
|
declare module 'url';
|
@ -1 +1 @@
|
|||||||
2.3.1
|
2.4.0-SNAPSHOT
|
@ -1 +1,2 @@
|
|||||||
declare module 'portable-fetch';
|
declare module 'portable-fetch';
|
||||||
|
declare module 'url';
|
@ -14,13 +14,12 @@
|
|||||||
"typings": "./dist/index.d.ts",
|
"typings": "./dist/index.d.ts",
|
||||||
"scripts" : {
|
"scripts" : {
|
||||||
"build": "tsc --outDir dist/",
|
"build": "tsc --outDir dist/",
|
||||||
"postinstall": "npm run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"portable-fetch": "^3.0.0"
|
"portable-fetch": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/isomorphic-fetch": "0.0.34",
|
|
||||||
"@types/node": "^8.0.9",
|
"@types/node": "^8.0.9",
|
||||||
"typescript": "^2.0"
|
"typescript": "^2.0"
|
||||||
},
|
},
|
||||||
|
@ -1 +1 @@
|
|||||||
2.3.1
|
2.4.0-SNAPSHOT
|
@ -1 +1,2 @@
|
|||||||
declare module 'portable-fetch';
|
declare module 'portable-fetch';
|
||||||
|
declare module 'url';
|
@ -14,13 +14,12 @@
|
|||||||
"typings": "./dist/index.d.ts",
|
"typings": "./dist/index.d.ts",
|
||||||
"scripts" : {
|
"scripts" : {
|
||||||
"build": "tsc --outDir dist/",
|
"build": "tsc --outDir dist/",
|
||||||
"postinstall": "npm run build"
|
"prepublishOnly": "npm run build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"portable-fetch": "^3.0.0"
|
"portable-fetch": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/isomorphic-fetch": "0.0.34",
|
|
||||||
"@types/node": "^8.0.9",
|
"@types/node": "^8.0.9",
|
||||||
"typescript": "^2.0"
|
"typescript": "^2.0"
|
||||||
},
|
},
|
||||||
|
@ -39,6 +39,20 @@
|
|||||||
</arguments>
|
</arguments>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>npm-build</id>
|
||||||
|
<phase>integration-test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>exec</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<executable>npm</executable>
|
||||||
|
<arguments>
|
||||||
|
<argument>run</argument>
|
||||||
|
<argument>build</argument>
|
||||||
|
</arguments>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
<execution>
|
<execution>
|
||||||
<id>npm-test</id>
|
<id>npm-test</id>
|
||||||
<phase>integration-test</phase>
|
<phase>integration-test</phase>
|
||||||
|
Loading…
Reference in New Issue
Block a user