api-spec-converter
api-spec-converter copied to clipboard
openapi_3 > swagger_2: oneOf converts to {}
In the following schema excerpt:
GenericError:
oneOf:
- type: object
required:
- error_code
- error_message
properties:
error_code:
type: string
error_message:
type: string
description: An error response with a message in the body
- type: object
required:
- error_code
- error_messages
- error_message
properties:
error_code:
type: string
error_messages:
type: array
items:
type: string
error_message:
type: string
description: An error response with a message in the body
...the resulting schema looks like this:
GenericError: {}
Unfortunately, oneOf
is not supported in swagger 2.