Closed
Description
openedon Sep 13, 2024
Right now we're converting OData Edm.Double to
oneOf:
- type: number
format: double
- type: string
- $ref: '#/components/schemas/ReferenceNumeric'
nullable: true
Reference numeric being
ReferenceNumeric:
enum:
- '-INF'
- INF
- NaN
While this is not technically invalid, it doesn't mean anything as per
A true value adds "null" to the allowed type specified by the type keyword, only if type is explicitly defined within the same Schema Object. Other Schema Object constraints retain their defined behavior, and therefore may disallow the use of null as a value. A false value leaves the specified or default type unmodified. The default value is false.
I believe we should instead emit
oneOf:
- type: number
format: double
nullable: true
- type: string
nullable: true
- $ref: '#/components/schemas/ReferenceNumeric'
Reference numeric being
ReferenceNumeric:
type: string
nullable: true
enum:
- '-INF'
- INF
- NaN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment