Skip to content

Parser creates inconsistent ArraySchema with type != array #1039

Closed

Description

@kerrykimbrough

Found in release=2.0.9...

The parser assumes any Schema object with an "items" property is an ArraySchema. In which case, the "type" property, if defined, ought to be "array". But subsequently any value for the "type" property is accepted. So it's possible to have an inconsistent ArraySchema with type=number, etc.

See OpenAPIDeserializer.getSchema()

To demonstrate, parse the following spec and inspect the result for GET /pets, parameter=tags

petstore-array-type.yaml.txt

Activity

  1. gracekarina commented on Apr 14, 2019

    @gracekarina
    Contributor

    Thanks for reporting this issue @kerrykimbrough. It's fixed now by the PR #1039. Please let us know if it keeps happening

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions