opengeospatial / ogcapi-records

An open standard for the discovery of geospatial resources on the Web.
https://ogcapi.ogc.org/records
Other
58 stars 27 forks source link

null time schema issue? #272

Closed tomkralidis closed 1 year ago

tomkralidis commented 1 year ago

Originally posted by @tomkralidis in https://github.com/opengeospatial/ogcapi-records/issues/266#issuecomment-1562734183

There seems to be an issue when trying to validate recordGeoJSON.yaml using some schema tools (in my case check-jsonschema.

@m-mohr @pvretano @kalxas I've put forth this gist for review/comment. Note that I am using the schema in a non-OpenAPI context here in support of record validation.

m-mohr commented 1 year ago

nullable in JSON Schema is not defined. You need to add "null" as a type.

In OpenAPI you need to use nullable and can't use "null" as a type.

Unfortunate conflict in the two specs...

tomkralidis commented 1 year ago

Thanks @m-mohr. So downstream applications using recordGeoJSON.yaml as a schema in a non-OpenAPI context will hit this issue and can workaround depending on their schema workflow (example: https://github.com/wmo-im/wcmp2/blob/main/schemas/wcmpRecordGeoJSON.yaml#L21) ?

m-mohr commented 1 year ago

Yes