Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed isomorphic-fetch typing dependency #6894

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ The Swagger Codegen project is intended as a benefit for users of the Swagger /
* Generated code is intentionally _not_ subject to the parent project license

When code is generated from this project, it shall be considered **AS IS** and owned by the user of the software. There are no warranties--expressed or implied--for generated code. You can do what you wish with it, and once generated, the code is your responsibility and subject to the licensing terms that you deem appropriate.

License
-------

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
declare module 'portable-fetch';
declare module 'portable-fetch';
declare module 'url';
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
"typings": "./dist/index.d.ts",
"scripts" : {
"build": "tsc --outDir dist/",
"postinstall": "npm run build"
"prepublishOnly": "npm run build"
},
"dependencies": {
"portable-fetch": "^3.0.0"
},
"devDependencies": {
"@types/isomorphic-fetch": "0.0.34",
"@types/node": "^8.0.9",
"typescript": "^2.0"
}{{#npmRepository}},{{/npmRepository}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.0-SNAPSHOT
2.4.0-SNAPSHOT
28 changes: 14 additions & 14 deletions samples/client/petstore-security-test/typescript-fetch/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export interface ModelReturn {
* @type {number}
* @memberof ModelReturn
*/
return?: number;
_return?: number;
}


Expand All @@ -102,20 +102,20 @@ export const FakeApiFetchParamCreator = function (configuration?: Configuration)
/**
*
* @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.
* @throws {RequiredError}
*/
testCodeInjectEndRnNR(test code inject * ' " =end rn n r?: string, options: any = {}): FetchArgs {
testCodeInjectEndRnNR(testCodeInjectEndRnNR?: string, options: any = {}): FetchArgs {
const localVarPath = `/fake`;
const localVarUrlObj = url.parse(localVarPath, true);
const localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
const localVarFormParams = new url.URLSearchParams();

if (test code inject * ' " =end rn n r !== undefined) {
localVarFormParams.set('test code inject */ ' " =end -- \r\n \n \r', test code inject * ' " =end rn n r as any);
if (testCodeInjectEndRnNR !== undefined) {
localVarFormParams.set('test code inject */ ' " =end -- \r\n \n \r', testCodeInjectEndRnNR as any);
}

localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
Expand Down Expand Up @@ -143,12 +143,12 @@ export const FakeApiFp = function(configuration?: Configuration) {
/**
*
* @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.
* @throws {RequiredError}
*/
testCodeInjectEndRnNR(test code inject * &#39; &quot; &#x3D;end rn n r?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response> {
const localVarFetchArgs = FakeApiFetchParamCreator(configuration).testCodeInjectEndRnNR(test code inject * &#39; &quot; &#x3D;end rn n r, options);
testCodeInjectEndRnNR(testCodeInjectEndRnNR?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response> {
const localVarFetchArgs = FakeApiFetchParamCreator(configuration).testCodeInjectEndRnNR(testCodeInjectEndRnNR, options);
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
if (response.status >= 200 && response.status < 300) {
Expand All @@ -171,12 +171,12 @@ export const FakeApiFactory = function (configuration?: Configuration, fetch?: F
/**
*
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
* @param {string} [test code inject * &#39; &quot; &#x3D;end rn n r] To test code injection *_/ &#39; \&quot; &#x3D;end -- \\r\\n \\n \\r
* @param {string} [testCodeInjectEndRnNR] To test code injection *_/ &#39; \&quot; &#x3D;end -- \\r\\n \\n \\r
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
testCodeInjectEndRnNR(test code inject * &#39; &quot; &#x3D;end rn n r?: string, options?: any) {
return FakeApiFp(configuration).testCodeInjectEndRnNR(test code inject * &#39; &quot; &#x3D;end rn n r, options)(fetch, basePath);
testCodeInjectEndRnNR(testCodeInjectEndRnNR?: string, options?: any) {
return FakeApiFp(configuration).testCodeInjectEndRnNR(testCodeInjectEndRnNR, options)(fetch, basePath);
},
};
};
Expand All @@ -191,13 +191,13 @@ export class FakeApi extends BaseAPI {
/**
*
* @summary To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
* @param {} [test code inject * &#39; &quot; &#x3D;end rn n r] To test code injection *_/ &#39; \&quot; &#x3D;end -- \\r\\n \\n \\r
* @param {} [testCodeInjectEndRnNR] To test code injection *_/ &#39; \&quot; &#x3D;end -- \\r\\n \\n \\r
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FakeApi
*/
public testCodeInjectEndRnNR(test code inject * &#39; &quot; &#x3D;end rn n r?: string, options?: any) {
return FakeApiFp(this.configuration).testCodeInjectEndRnNR(test code inject * &#39; &quot; &#x3D;end rn n r, options)(this.fetch, this.basePath);
public testCodeInjectEndRnNR(testCodeInjectEndRnNR?: string, options?: any) {
return FakeApiFp(this.configuration).testCodeInjectEndRnNR(testCodeInjectEndRnNR, options)(this.fetch, this.basePath);
}

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
declare module 'portable-fetch';
declare module 'portable-fetch';
declare module 'url';
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined

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
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.1
2.4.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
declare module 'portable-fetch';
declare module 'portable-fetch';
declare module 'url';
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.1
2.4.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
declare module 'portable-fetch';
declare module 'portable-fetch';
declare module 'url';
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
"typings": "./dist/index.d.ts",
"scripts" : {
"build": "tsc --outDir dist/",
"postinstall": "npm run build"
"prepublishOnly": "npm run build"
},
"dependencies": {
"portable-fetch": "^3.0.0"
},
"devDependencies": {
"@types/isomorphic-fetch": "0.0.34",
"@types/node": "^8.0.9",
"typescript": "^2.0"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.1
2.4.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
declare module 'portable-fetch';
declare module 'portable-fetch';
declare module 'url';
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
"typings": "./dist/index.d.ts",
"scripts" : {
"build": "tsc --outDir dist/",
"postinstall": "npm run build"
"prepublishOnly": "npm run build"
},
"dependencies": {
"portable-fetch": "^3.0.0"
},
"devDependencies": {
"@types/isomorphic-fetch": "0.0.34",
"@types/node": "^8.0.9",
"typescript": "^2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@
</arguments>
</configuration>
</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>
<id>npm-test</id>
<phase>integration-test</phase>
Expand Down