APIs-guru / openapi-directory

🌐 Wikipedia for Web APIs. Directory of REST API definitions in OpenAPI 2.0/3.x format
https://apis.guru/
Creative Commons Zero v1.0 Universal
3.74k stars 561 forks source link

Invalid exclusive{Maximum|Minimum} values in groundhog-day #1251

Closed floitsch closed 2 months ago

floitsch commented 2 months ago

According to the json-schema spec, the exclusiveMaximum and exclusiveMinimum values must be numbers: https://json-schema.org/draft/2020-12/json-schema-validation#name-exclusivemaximum

However, the groundhog-day document has 'false' as values: https://github.com/APIs-guru/openapi-directory/blob/433a94f3e9e268f2b000b0b497785ede34332a7f/APIs/groundhog-day.com/1.2.1/openapi.yaml#L568

floitsch commented 2 months ago

openaq.local/2.0.0 Has a similar issue (just true instead of false): https://github.com/APIs-guru/openapi-directory/blob/main/APIs/openaq.local/2.0.0/openapi.yaml#L52

floitsch commented 2 months ago

So does shipengine: https://github.com/APIs-guru/openapi-directory/blob/main/APIs/shipengine.com/1.1.202304191404/openapi.yaml#L10746

floitsch commented 2 months ago

As does linqr: https://github.com/APIs-guru/openapi-directory/blob/433a94f3e9e268f2b000b0b497785ede34332a7f/APIs/linqr.app/2.0/openapi.yaml#L5398

floitsch commented 2 months ago

And svix: https://github.com/APIs-guru/openapi-directory/blob/433a94f3e9e268f2b000b0b497785ede34332a7f/APIs/svix.com/1.4/openapi.yaml#L8597

floitsch commented 2 months ago

daniweb: https://github.com/APIs-guru/openapi-directory/blob/433a94f3e9e268f2b000b0b497785ede34332a7f/APIs/daniweb.com/4/openapi.yaml#L93

floitsch commented 2 months ago

alertersystem: https://github.com/APIs-guru/openapi-directory/blob/433a94f3e9e268f2b000b0b497785ede34332a7f/APIs/alertersystem.com/1.7.0/openapi.yaml#L42168

floitsch commented 2 months ago

plaid: https://github.com/APIs-guru/openapi-directory/blob/433a94f3e9e268f2b000b0b497785ede34332a7f/APIs/plaid.com/2020-09-14_1.345.1/openapi.yaml#L31780

floitsch commented 2 months ago

Turns out the meaning of exclusiveMinimum and exclusiveMaximum has changed in a later draft, and I missed that these openapi documents were based on openapi 3.0.x which still used the wright-json-schema-validation draft.

In that draft these properties must be booleans: https://datatracker.ietf.org/doc/html/draft-wright-json-schema-validation-00#section-5.3

Sorry for the noise.