rsmp-nordic / rsmp_schema

JSON Schema for automatically validating RSMP messages
MIT License
1 stars 0 forks source link

S0006: allow empty emergencystate when status is False #69

Closed emiltin closed 1 year ago

emiltin commented 1 year ago

the 1.1 spec is not clear about the value of emergencystate when status=False.

Current implementations send an empty string. I suggest we allow this for 1.1 and older. in upcoming version of the sxl, this should be clarified

emiltin commented 1 year ago

allowing empty string if status=False can be done in json schema, but not with our sxl yaml source. instead we can allow emergencystate=0, but that means implementations that send null will fail tests.

otterdahl commented 1 year ago

If we allow null instead of empty strings, then we should update the core spec as well.

Section 4.4:

Empty values are sent as ""
emiltin commented 1 year ago

Benefits would be:

Drawbacks:

The simplest we can do now is probably to allow only integers (as string) and define that n=0 means to route active. In upcoming versions of core we can then consider the use of nulls and other native types throughout the spec.

emiltin commented 1 year ago

closing, as #70 allows emergencyState=0