openapi-codegen-ts icon indicating copy to clipboard operation
openapi-codegen-ts copied to clipboard

Fix swagger syntax of api.yaml. swagger2 does not support `oneOf`

Open ioggstream opened this issue 6 years ago • 0 comments

I expect

syntax of src/tests/api.yaml to be correct

Instead

opening on swagger editor I get the following error:

Structural error at definitions.OneOfTest
should NOT have additional properties
additionalProperty: oneOf
Jump to line 69

Note

This is because gen-api-models supports oneOf schema feature from OAS3. This ticket could be closed once OAS3 support will be completed:

  • the swagger2 schema will remove this test from the yaml
  • the openapi3 schema will support this use-case

ioggstream avatar May 07 '19 14:05 ioggstream