How to add oneOf to the schema
yeshwanthPentakota opened this issue · comments
type Response struct {
field1 *string json:"field1,omitempty"
field2 *string json:"field2,omitempty"
}
I want to indicate that the response will either contain field1 or field2
Sample spec:
Response:
oneOf:
- $ref: '#/components/schemas/Response1'
- $ref: '#/components/schemas/Response2'