forked from loafle/openapi-generator-original
fix(typescript): remove incorrect file extensions (#20194)
* fix(typescript): remove incorrect file extensions url, http, and https are Node.js core modules, and form-data should be loaded using a bare specifier. This commit removes the file extensions from these imports. * update samples
This commit is contained in:
parent
1eaa75bd36
commit
06f0b68eee
@ -1,10 +1,10 @@
|
|||||||
{{#platforms}}
|
{{#platforms}}
|
||||||
{{#node}}
|
{{#node}}
|
||||||
// TODO: evaluate if we can easily get rid of this library
|
// TODO: evaluate if we can easily get rid of this library
|
||||||
import {{^supportsES6}}* as{{/supportsES6}} FormData from "form-data{{importFileExtension}}";
|
import {{^supportsES6}}* as{{/supportsES6}} FormData from "form-data";
|
||||||
import { URL, URLSearchParams } from 'url{{importFileExtension}}';
|
import { URL, URLSearchParams } from 'url';
|
||||||
import * as http from 'http{{importFileExtension}}';
|
import * as http from 'http';
|
||||||
import * as https from 'https{{importFileExtension}}';
|
import * as https from 'https';
|
||||||
{{/node}}
|
{{/node}}
|
||||||
{{/platforms}}
|
{{/platforms}}
|
||||||
import { Observable, from } from {{#useRxJS}}'rxjs'{{/useRxJS}}{{^useRxJS}}'../rxjsStub{{importFileExtension}}'{{/useRxJS}};
|
import { Observable, from } from {{#useRxJS}}'rxjs'{{/useRxJS}}{{^useRxJS}}'../rxjsStub{{importFileExtension}}'{{/useRxJS}};
|
||||||
@ -169,7 +169,7 @@ export class RequestContext {
|
|||||||
}
|
}
|
||||||
{{#platforms}}
|
{{#platforms}}
|
||||||
{{#node}}
|
{{#node}}
|
||||||
|
|
||||||
public setAgent(agent: http.Agent | https.Agent) {
|
public setAgent(agent: http.Agent | https.Agent) {
|
||||||
this.agent = agent;
|
this.agent = agent;
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ export class RequestContext {
|
|||||||
public setHeaderParam(key: string, value: string): void {
|
public setHeaderParam(key: string, value: string): void {
|
||||||
this.headers[key] = value;
|
this.headers[key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setAgent(agent: http.Agent | https.Agent) {
|
public setAgent(agent: http.Agent | https.Agent) {
|
||||||
this.agent = agent;
|
this.agent = agent;
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ export class RequestContext {
|
|||||||
public setHeaderParam(key: string, value: string): void {
|
public setHeaderParam(key: string, value: string): void {
|
||||||
this.headers[key] = value;
|
this.headers[key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setAgent(agent: http.Agent | https.Agent) {
|
public setAgent(agent: http.Agent | https.Agent) {
|
||||||
this.agent = agent;
|
this.agent = agent;
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ export class RequestContext {
|
|||||||
public setHeaderParam(key: string, value: string): void {
|
public setHeaderParam(key: string, value: string): void {
|
||||||
this.headers[key] = value;
|
this.headers[key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setAgent(agent: http.Agent | https.Agent) {
|
public setAgent(agent: http.Agent | https.Agent) {
|
||||||
this.agent = agent;
|
this.agent = agent;
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ export class RequestContext {
|
|||||||
public setHeaderParam(key: string, value: string): void {
|
public setHeaderParam(key: string, value: string): void {
|
||||||
this.headers[key] = value;
|
this.headers[key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setAgent(agent: http.Agent | https.Agent) {
|
public setAgent(agent: http.Agent | https.Agent) {
|
||||||
this.agent = agent;
|
this.agent = agent;
|
||||||
}
|
}
|
||||||
|
@ -134,7 +134,7 @@ export class RequestContext {
|
|||||||
public setHeaderParam(key: string, value: string): void {
|
public setHeaderParam(key: string, value: string): void {
|
||||||
this.headers[key] = value;
|
this.headers[key] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setAgent(agent: http.Agent | https.Agent) {
|
public setAgent(agent: http.Agent | https.Agent) {
|
||||||
this.agent = agent;
|
this.agent = agent;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user