Description
java script generation fails with a swagger that uses items with array value:
swagger: '2.0'
info:
title: metadata for order
version: 11.1.13
description: metadata for order
paths:
'/api/version/orders/{id}':
parameters:
- name: id
in: path
description: order id
type: integer
required: true
get:
produces:
- application/vnd.oracle.resource+json;type=singular
consumes:
- application/x-www-form-urlencoded
summary: Retrieve an order instance
description: Retrieve an order instance
operationId: getOrder
responses:
default:
schema:
$ref: '#/definitions/order'
description: return order successfully
patch:
produces:
- application/vnd.oracle.resource+json;type=singular
consumes:
- application/vnd.oracle.resource+json;type=singular
summary: Update an order instance
description: Update an order instance
operationId: updateOrder
responses:
default:
schema:
$ref: '#/definitions/order'
description: order updated successfully
parameters:
- name: request
description: >-
The following table describes the body parameters in the request for
this task.
schema:
$ref: '#/definitions/order'
in: body
definitions:
order:
title: Order
description: A purchase order object
properties:
id:
type: integer
title: order id
description: identifier of an order
description:
type: string
title: Description
description: description of the order
lines:
type: array
items:
- type: string
- type: number
It 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!"