-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hey all together!
I'm having an issue with the generation. It seems like, that for me, no models are generated. The index.ts in the models directory is just empty (with the tslint:disable).
The APIs that got generated also have the type "void", even though they should return a type.
This is the standard example of an .Net Core application. The WeatherForecast should actually return the "WeatherForecast" class:
/**
* Response generated for [ 200 ] HTTP response code.
*/
getWeatherForecast(
requestHttpOptions?: HttpOptions,
observe?: 'body',
): Observable<void>;
getWeatherForecast(
requestHttpOptions?: HttpOptions,
observe?: 'response',
): Observable<HttpResponse<void>>;
getWeatherForecast(
requestHttpOptions?: HttpOptions,
observe?: 'events',
): Observable<HttpEvent<void>>;
getWeatherForecast(
requestHttpOptions?: HttpOptions,
observe: any = 'body',
): Observable<void | HttpResponse<void> | HttpEvent<void>> {
const path = `/WeatherForecast`;
const options = {
...this.options,
...requestHttpOptions,
observe,
};
return this.http.get<void>(`${this.domain}${path}`, options);
}Within the swagger.json, the type is visible. Am I doing something wrong or is the Swagger version too new or something?
{
"openapi": "3.0.1",
"info": {
"title": "MyApi",
"version": "1.0"
},
"paths": {
"/WeatherForecast": {
"get": {
"tags": [
"WeatherForecast"
],
"operationId": "GetWeatherForecast",
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WeatherForecast"
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"WeatherForecast": {
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date"
},
"temperatureC": {
"type": "integer",
"format": "int32"
},
"temperatureF": {
"type": "integer",
"format": "int32",
"readOnly": true
},
"summary": {
"type": "string",
"nullable": true
}
},
"additionalProperties": false
}
}
}
}Thanks for you help.
Metadata
Metadata
Assignees
Labels
No labels