ebowman/api-first-hand

Enum cannot be found if used as a schema definition

slavaschmidt opened this issue · 0 comments

Example spec:

swagger: '2.0'
info:
  title: Failing spec
  description: Failing spec
  version: '0.0.2'
schemes:
  - http
consumes:
  - application/json
produces:
  - application/json

paths:
  /:
    post:
      parameters:
        - name: body
          in: body
          required: true
          schema:
            $ref: '#/definitions/AckStatus'
      responses:
        '200':
          description: 200
          schema:
            type: array
            items:
              $ref: '#/definitions/AckStatus'

definitions:

  AckStatus:
    type: string
    enum: [ "Acknowledged", "Not Ack", "In Work" ]