In the OpenAPI documentation there is example of using discriminator
components: responses: sampleObjectResponse: content: application/jso