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
Code gen doesn't seem to understand the lines array even though the swagger editor takes the above swagger as valid.
The error messages is:
Unable to build target: Could not process model 'order'.Please make sure that your schema is correct!
Details:
Object
code: 1
type: "error"
message: "Unable to build target: Could not process model 'order'.Please make sure that your schema is correct!"
swagger: '2.0'info:
title: metadata for orderversion: 11.1.13description: metadata for orderpaths:
'/api/version/orders/{id}':
parameters:
- name: idin: pathdescription: order idtype: integerrequired: trueget:
produces:
- application/vnd.oracle.resource+json;type=singularconsumes:
- application/x-www-form-urlencodedsummary: Retrieve an order instancedescription: Retrieve an order instanceoperationId: getOrderresponses:
default:
schema:
$ref: '#/definitions/order'description: return order successfullypatch:
produces:
- application/vnd.oracle.resource+json;type=singularconsumes:
- application/vnd.oracle.resource+json;type=singularsummary: Update an order instancedescription: Update an order instanceoperationId: updateOrderresponses:
default:
schema:
$ref: '#/definitions/order'description: order updated successfullyparameters:
- name: requestdescription: >-The following table describes the body parameters in the request forthis task.schema:
$ref: '#/definitions/order'in: bodydefinitions:
order:
title: Orderdescription: A purchase order objectproperties:
id:
type: integertitle: order iddescription: identifier of an orderdescription:
type: stringtitle: Descriptiondescription: description of the orderlines:
type: arrayitems:
- type: string
- type: number ```##### Command line used for generationUsed the link from swagger editor##### Steps to reproduce1. go to swagger editor2. paste the example swagger3. click on Generate Client/javascript##### Related issueshttps://github.com/swagger-api/swagger-editor/issues/1136##### Suggest a FixIt should handle the array value for "items" based on JSON schema spec.The swagger spec says:
The following properties are taken from the JSON Schema definition but their definitions were adjusted to the Swagger Specification. Their definition is the same as the one from JSON Schema, only where the original definition references the JSON Schema definition, the Schema Object definition is used instead.itemsThe swagger meta schema defines "items" as either a schema or an array of schema:
"items": {"anyOf": [{"$ref": "#/definitions/schema"},{"type": "array","minItems": 1,"items": {"$ref": "#/definitions/schema"}}],"default": {}}
The text was updated successfully, but these errors were encountered:
Description
Code gen doesn't seem to understand the lines array even though the swagger editor takes the above swagger as valid.
The error messages is:
Unable to build target: Could not process model 'order'.Please make sure that your schema is correct!
Details:
Object
code: 1
type: "error"
message: "Unable to build target: Could not process model 'order'.Please make sure that your schema is correct!"
Swagger-codegen version
Used the javascript client gen from swagger editor ui: http://editor.swagger.io/#/
Swagger declaration file content or url
The text was updated successfully, but these errors were encountered: