swagger-editor
swagger-editor copied to clipboard
Field name "entries" in a schema causes swagger-editor to fail
When I type the field name entries, I received a message saying: "Unable to render this definition".
paths:
/pet:
post:
summary: "Add a new pet to the store"
description: ""
parameters:
- in: "body"
name: "body"
schema:
$ref: "#/definitions/Pet"
responses:
"405":
description: "Invalid input"
definitions:
Pet:
type: "object"
properties:
id:
type: "integer"
entries:
type: "array"
items:
type: "string"
I need to write entries as a field since my API requires this name.
If I change entries to entry, it works as expected.
paths:
/pet:
post:
summary: "Add a new pet to the store"
description: ""
parameters:
- in: "body"
name: "body"
schema:
$ref: "#/definitions/Pet"
responses:
"405":
description: "Invalid input"
definitions:
Pet:
type: "object"
properties:
id:
type: "integer"
entry:
type: "array"
items:
type: "string"
Can someone help me with this problem, why it fails when I use entries as a field name?
Thanks for the report! This issue is tracked in https://github.com/swagger-api/swagger-ui/issues/6016 so I'll close this one as a duplicate.
As a workaround please use editor v. 3.8.2, you can download it from the Releases page.