You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose some very restrictive constraint to avoid that kind of issues :
alternatePath = "/" segment *( "/" segment)
prefix = "/" segment
segment = ALPHA * (ALPHA / DIGIT) // force segment to start by ALPHA making LWM2M path parsing easier
// no need to parse whole segment to know
// IF we are in the prefix/alternatePath OR in the Id of a LWM2M node
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
DIGIT = %x30-39 ; 0-9
Any opinion ?
The text was updated successfully, but these errors were encountered:
The Alternate path being a part of an URI path, I think it follows the format defined in RFC 3986:
path=path-abempty; begins with "/" or is empty/path-absolute; begins with "/" but not "//"/path-noscheme; begins with a non-colon segment/path-rootless; begins with a segment/path-empty; zero characterspath-abempty=*( "/"segment )
path-absolute="/" [ segment-nz*( "/"segment ) ]
path-noscheme=segment-nz-nc*( "/"segment )
path-rootless=segment-nz*( "/"segment )
path-empty= 0<pchar>segment=*pcharsegment-nz=1*pcharsegment-nz-nc=1*( unreserved/pct-encoded/sub-delims/"@" )
; non-zero-length segment without any colon ":"pchar=unreserved/pct-encoded/sub-delims/":"/"@"query=*( pchar/"/"/"?" )
fragment=*( pchar/"/"/"?" )
pct-encoded="%"HEXDIGHEXDIGunreserved=ALPHA/DIGIT/"-"/"."/"_"/"~"
As it is very permissive , this could lead to situation where alternate path can not be express in given content format.
E.g. You can use characters which are not allowed by SenML 😬
And with grammar you propose you can have an alternate path which looks like : /120 and so don't follow : This link MUST NOT contain numerical URI segment.
LWM2M specification define
Alternate Path
(see LWM2M-v1.2.1@transport§6.4.1. Alternate Path)And also
Device Prefix
when LWM2M Gateway is used (see Lightweight Machine to Machine Gateway Technical Specification)Both can be find in a LWM2M path.
E.g. :
/lwm2m/3/0/1
/d01/3/0/1
/lwm2m/d01/3/0/1
AFIAK, there is only 1 restriction about how
Alternate Path
should looks like :And nothing about
Device Prefix
(but I maybe missed something)I think it would be wiser to clearly define how path/prefix MUST look like else we risk to face some issue between different content format.
Currently this value can be see with different constraint in :
In Link format, absolute path should follow :
And in SenML :
I propose some very restrictive constraint to avoid that kind of issues :
Any opinion ?
The text was updated successfully, but these errors were encountered: