Hi Folks,
I got hands on an OpenAPI schema that includes oneOfs, like:
shipper:
description: Shipper information, including contact information and address. Alternatively, a predefined shipper reference can be used.
oneOf:
- $ref: '#/components/schemas/Shipper'
- $ref: '#/components/schemas/ShipperReference'
This is a snippet from the DHL Shipment Rest API DHL Shipment Rest API.
I'm using this to boilerplate the Rest interface for my TypeScript application.
It appears that only the latter ref takes place - in this case ShipperReference.
Did I miss any configuration to support oneOfs?
I'm not expecting anything fancy here, a simple conjunct type like Shipper & ShipperReference would do the job here for what I need.
Thanks!
Hi Folks,
I got hands on an OpenAPI schema that includes
oneOfs, like:This is a snippet from the DHL Shipment Rest API DHL Shipment Rest API.
I'm using this to boilerplate the Rest interface for my TypeScript application.
It appears that only the latter
reftakes place - in this caseShipperReference.Did I miss any configuration to support
oneOfs?I'm not expecting anything fancy here, a simple conjunct type like
Shipper & ShipperReferencewould do the job here for what I need.Thanks!