apigee-127 / swagger-node-runner

The heart of Swagger-Node
MIT License
102 stars 123 forks source link

Multiple response schemas fail #131

Open shuat opened 6 years ago

shuat commented 6 years ago
responses:
        "200":
          description: Success
          schema:
            oneOf:
              - $ref: "#/definitions/UserWithInt"
              - $ref: "#/definitions/UserWithString"

I get the following error

{ errors:
   [ { code: 'ONE_OF_MISSING',
       message: 'Not a valid response definition',
       path: [Array],
       inner: [Array] } ],
  warnings: [] }

However according to swagger specs this should be allowed.

theganyo commented 6 years ago

This would be an error in the OpenAPI library being used: https://github.com/apigee-127/sway. I'd check there to see if it's a known issue and report it there if not.