Is it possible to define properties in a Swagger/OpenAPI definition that can be one of two types.
For example, our API allows a source ID to be sent as a string, or a source object. The source object has a fixed schema:
Source ID:
{
"source": "src_123"
}
Source Object:
{
"source": {
"foo": "bar"
}
}
I am unsure how to represent this in my Swagger definition.