You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my YAML didn't change
but now every returnType is set to null
I looked at what has changed, but I only found that there was a change vom cli version 43 to 44 and there some java framework changed.
The error occurs if you don't use inline responses but create a response under components / responses like this:
openapi: 3.0.1info:title: Simple APIversion: 1.0.0description: Eine einfache API mit einem Array von Objekten als Rückgabewert.paths:/items:get:summary: Hole ein Array von Objektendescription: Gibt eine Liste von Objekten zurück.responses:
'200':$ref: '#/components/responses/ItemListResponse'components:schemas:Item:type: objectproperties:id:type: integerexample: 1name:type: stringexample: "Testobjekt"price:type: numberformat: floatexample: 19.99responses:ItemListResponse:description: Erfolgreiche Antwort mit einer Liste von Objekten.content:application/json:schema:type: arrayitems:$ref: '#/components/schemas/Item'
Then the resulting DefaultApi.js looks like this:
/* * Simple API * Eine einfache API mit einem Array von Objekten als Rückgabewert. * * OpenAPI spec version: 1.0.0 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 3.0.65 * * Do not edit the class manually. * */importApiClientfrom"../ApiClient";/*** Default service.* @module api/DefaultApi* @version 1.0.0*/exportdefaultclassDefaultApi{/** * Constructs a new DefaultApi. * @alias module:api/DefaultApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instanc e} if unspecified. */constructor(apiClient){this.apiClient=apiClient||ApiClient.instance;}/** * Callback function to receive the result of the itemsGet operation. * @callback moduleapi/DefaultApi~itemsGetCallback * @param {String} error Error message, if any. * @param data This operation does not return a value. * @param {String} response The complete HTTP response. *//** * Hole ein Array von Objekten * Gibt eine Liste von Objekten zurück. * @param {module:api/DefaultApi~itemsGetCallback} callback The callback function, accepting three arguments: error, data, response */itemsGet(callback){letpostBody=null;letpathParams={};letqueryParams={};letheaderParams={};letformParams={};letauthNames=[];letcontentTypes=[];letaccepts=[];letreturnType=null;returnthis.apiClient.callApi('/items','GET',pathParams,queryParams,headerParams,formParams,postBody,authNames,contentTypes,accepts,returnType,callback);}}
And this won't give you the result of the server back.
The text was updated successfully, but these errors were encountered:
my YAML didn't change
but now every returnType is set to null
I looked at what has changed, but I only found that there was a change vom cli version 43 to 44 and there some java framework changed.
The error occurs if you don't use inline responses but create a response under components / responses like this:
Then the resulting DefaultApi.js looks like this:
And this won't give you the result of the server back.
The text was updated successfully, but these errors were encountered: