Last active
February 28, 2020 14:45
-
-
Save vadjs/d66c310a13c1466280fd0dfebbd00634 to your computer and use it in GitHub Desktop.
ng-openapi-gen broken respose types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class ContractTypesService extends BaseService { | |
contractTypesGet$Json$ResponseOLD(params?: { | |
}): Observable<StrictHttpResponse<{ [key: string]: string }>> { | |
const rb = new RequestBuilder(this.rootUrl, ContractTypesService.ContractTypesGetPath, 'get'); | |
if (params) { | |
} | |
return this.http.request(rb.build({ | |
// FIXME: PROBLEM IS HERE | |
responseType: 'json', | |
accept: 'application/json' | |
})).pipe( | |
filter((r: any) => r instanceof HttpResponse), | |
map((r: HttpResponse<any>) => { | |
return r as StrictHttpResponse<{ [key: string]: string }>; | |
}) | |
); | |
} | |
contractTypesGet$Json$ResponseNEW(params?: { | |
}): Observable<StrictHttpResponse<{ [key: string]: string }>> { | |
const rb = new RequestBuilder(this.rootUrl, ContractTypesService.ContractTypesGetPath, 'get'); | |
if (params) { | |
} | |
return this.http.request(rb.build({ | |
// FIXME: PROBLEM IS HERE | |
responseType: 'text', | |
accept: 'text/json' | |
})).pipe( | |
filter((r: any) => r instanceof HttpResponse), | |
map((r: HttpResponse<any>) => { | |
return r as StrictHttpResponse<{ [key: string]: string }>; | |
}) | |
); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.1", | |
"info": { | |
"title": "Enumeration API", | |
"version": "v1" | |
}, | |
"servers": [ | |
{ | |
"url": "http://localhost" | |
} | |
], | |
"paths": { | |
"/Countries": { | |
"get": { | |
"tags": [ | |
"Countries" | |
], | |
"responses": { | |
"200": { | |
"description": "Success", | |
"content": { | |
"text/plain": { | |
"schema": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string" | |
} | |
} | |
}, | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string" | |
} | |
} | |
}, | |
"text/json": { | |
"schema": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"components": { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment