- Migration
- JSON Schema
Swaggerplus JSON Schema discriminator
Add to an Schema Object in an OpenAPI 2.0 API description document to use OAS 3.0 `discriminator` JSON Schema constructs. This allows converting OpenAPI 2.0 to OpenAPI 3.0 for tools which work with OpenAPI 3.0.
{"components":{"schemas":{"publication":{"x-oneOf":["#/definitions/book","#/definitions/magazine","#/definitions/newspaper"],"x-discriminator":{"propertyName":"publicationType"}}}}}