Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove oneOf and other invalid schema properties #273

Closed
xiehan opened this issue Jan 11, 2016 · 1 comment
Closed

Remove oneOf and other invalid schema properties #273

xiehan opened this issue Jan 11, 2016 · 1 comment

Comments

@xiehan
Copy link
Contributor

xiehan commented Jan 11, 2016

I was super stoked to discover the oneOf property in the Schema definition, since we have a major use case for it in our API, but then I discovered just now that the Swagger 2.0 spec doesn't support it: OAI/OpenAPI-Specification#525

The discussion at OAI/OpenAPI-Specification#333 reveals that the list of unsupported properties is:

  • id
  • $schema
  • additionalItems
  • definitions
  • patternProperties
  • dependencies
  • anyOf
  • oneOf
  • not

Rather than confuse others who, like me, might jump on the chance to use this and then find their Swagger docs breaking validation, it would probably be better to remove all unsupported properties from @SWG\Schema.

@bfanger
Copy link
Collaborator

bfanger commented Jan 15, 2016

Bummer, the spec is very vague about which subset is or isn't supported. I hoped the swagger-ui team would just implement support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants