SpaceApi / schema

SpaceAPI JSON schema files.
24 stars 14 forks source link

state.open cannot be undefined when supporting both v13 and v0.14 #86

Closed dbrgn closed 3 years ago

dbrgn commented 3 years ago

In v0.13 the state.open field was required but nullable. In v14 that was changed, the field is now optional but not nullable.

Unfortunately that means that it's not possible to have a v0.13+v14-compliant endpoint that sets the opening state to "undefined" :confused:

Do we need to take action, or do we just live with that fact for now?

rnestler commented 3 years ago

I think we should allow and just deprecate setting it to null for v14.

So for a strict v14 only check don't allow it / print a warning and for v0.13/v14 compatible mode require it.

rnestler commented 3 years ago

@SpaceApi/core What do you think about this? This is especially annoying when just wanting to have a static JSON file instead of a dynamic one. (See https://github.com/SpaceApi/directory/pull/168 for example)

dbrgn commented 3 years ago

I think we should allow and just deprecate setting it to null for v14.

So for a strict v14 only check don't allow it / print a warning and for v0.13/v14 compatible mode require it.

Yes, I agree!