metosin / ring-swagger

Swagger Spec for Clojure Web Apps
http://metosin.github.io/ring-swagger/doc/
371 stars 84 forks source link

oneOf => x-oneOf #129

Closed nha closed 7 years ago

nha commented 7 years ago
Swagger2 JSON Schema is defined using oneOf, but does not support it: https://github.com/OAI/OpenAPI-Specification/issues/57

(from #clojurians slack)

Swagger2 is a subset of JSON Schema, and does not include oneOf, anyOf, allOf. OpenAPI v3 does.

An alternative is to use x-oneOf, x-anyOf, x-allOf for Swagger2.

related: https://github.com/metosin/ring-swagger/issues/85

ikitommi commented 7 years ago

thanks!