mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
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}}
|
||||
{{#node}}
|
||||
// TODO: evaluate if we can easily get rid of this library
|
||||
import {{^supportsES6}}* as{{/supportsES6}} FormData from "form-data{{importFileExtension}}";
|
||||
import { URL, URLSearchParams } from 'url{{importFileExtension}}';
|
||||
import * as http from 'http{{importFileExtension}}';
|
||||
import * as https from 'https{{importFileExtension}}';
|
||||
import {{^supportsES6}}* as{{/supportsES6}} FormData from "form-data";
|
||||
import { URL, URLSearchParams } from 'url';
|
||||
import * as http from 'http';
|
||||
import * as https from 'https';
|
||||
{{/node}}
|
||||
{{/platforms}}
|
||||
import { Observable, from } from {{#useRxJS}}'rxjs'{{/useRxJS}}{{^useRxJS}}'../rxjsStub{{importFileExtension}}'{{/useRxJS}};
|
||||
@ -169,7 +169,7 @@ export class RequestContext {
|
||||
}
|
||||
{{#platforms}}
|
||||
{{#node}}
|
||||
|
||||
|
||||
public setAgent(agent: http.Agent | https.Agent) {
|
||||
this.agent = agent;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ export class RequestContext {
|
||||
public setHeaderParam(key: string, value: string): void {
|
||||
this.headers[key] = value;
|
||||
}
|
||||
|
||||
|
||||
public setAgent(agent: http.Agent | https.Agent) {
|
||||
this.agent = agent;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ export class RequestContext {
|
||||
public setHeaderParam(key: string, value: string): void {
|
||||
this.headers[key] = value;
|
||||
}
|
||||
|
||||
|
||||
public setAgent(agent: http.Agent | https.Agent) {
|
||||
this.agent = agent;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ export class RequestContext {
|
||||
public setHeaderParam(key: string, value: string): void {
|
||||
this.headers[key] = value;
|
||||
}
|
||||
|
||||
|
||||
public setAgent(agent: http.Agent | https.Agent) {
|
||||
this.agent = agent;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ export class RequestContext {
|
||||
public setHeaderParam(key: string, value: string): void {
|
||||
this.headers[key] = value;
|
||||
}
|
||||
|
||||
|
||||
public setAgent(agent: http.Agent | https.Agent) {
|
||||
this.agent = agent;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ export class RequestContext {
|
||||
public setHeaderParam(key: string, value: string): void {
|
||||
this.headers[key] = value;
|
||||
}
|
||||
|
||||
|
||||
public setAgent(agent: http.Agent | https.Agent) {
|
||||
this.agent = agent;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user