anyOf in OpenAPI 3.0
Hi experts,
I am facing issue on defining the AnyOf in YAML Open API 3.0 version.
sample:
weight:
description: >-
Please enter the weight information for line item. Either a
netValue or grossValue must be provided for the line item.
type: object
properties:
netValue:
description: Please enter the net weight value
type: number
minimum: 0
maximum: 999999999999
multipleOf: 0.001
example: 10
grossValue:
description: Please enter the gross weight value
type: number
minimum: 0
maximum: 999999999999
multipleOf: 0.001
example: 10
additionalProperties: false
anyOf:
- netValue
- grossValue
I am facing issue on anyOf which keep mentioned need to be an object for the netValue and grossValue.
What is the best way for me to proceed?
Appreciate inputs.
Thanks.