Yelp / swagger_spec_validator

Other
104 stars 71 forks source link

Spec validation will not fail if items is not present and type is array #94

Closed macisamuele closed 6 years ago

macisamuele commented 6 years ago

The following specs are not valid according to Swagger 2.0 Specs, editor.swagger.io and according to swagger-tools npm package.

swagger: '2.0'
info:
  title: Example
produces:
- application/json
paths:
  /test:
    get:
      responses:
        '200':
          description: HTTP200
          schema:
            type: array

Error reported by editor.swagger.io https://image.ibb.co/ghkioJ/5186391944200192.png

Error reported by npm

API Errors:

  #/paths/~1test/get/responses/200/schema: Missing required property: items

1 error and 0 warnings