flexiblepower / s2-ws-json

A WebSockets and JSON based protocol specification implementing the EN50491-12-2 "S2" standard for home and building energy management
Apache License 2.0
25 stars 2 forks source link

Clarify if an ID is a UUID or a UUID-like string #20

Open lfse-slafleur opened 2 weeks ago

lfse-slafleur commented 2 weeks ago

The current specification of ID's in the various formats is a bit ambigious. The description of ID specifies UUID while the rules of ID specifiy a less restrictive form (2-64 characters, only alphanumeric characters etc.). JSON schema does have a UUID type (https://json-schema.org/understanding-json-schema/reference/string#resource-identifiers). If really a UUID is required we should make the rules regarding possible ID's stricter by changing the pattern or using the 'uuid' format. Or we should clarify the description that a UUID-like identifier is required.

Example: https://github.com/flexiblepower/s2-ws-json/blob/main/s2-json-schema/schemas/ID.schema.json#L7C5-L7C55 References An identifier expressed as a UUID while "pattern": "[a-zA-Z0-9\\-_:]{2,64}" which is less restrictive than a UUID

@wilcowijbrandi Perhaps you can clarify what the intent was?