From 1afd59b58108b069a1c24e8ad283483aef5af945 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 16 Aug 2023 17:56:01 +0200 Subject: [PATCH 01/74] ODATA-1476 --- docs/odata-json-format/odata-json-format.html | 2 +- docs/odata-json-format/odata-json-format.md | 3 ++- docs/odata-json-format/odata-json-format.pdf | Bin 1518106 -> 1518230 bytes odata-json-format/7 Structural Property.md | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/odata-json-format/odata-json-format.html b/docs/odata-json-format/odata-json-format.html index 3b11fe491..7707a8de8 100644 --- a/docs/odata-json-format/odata-json-format.html +++ b/docs/odata-json-format/odata-json-format.html @@ -968,7 +968,7 @@

9 Str

An entity or complex type instance can have one or more stream properties.

The actual stream data is not usually contained in the representation. Instead stream property data is generally read and edited via URLs.

Depending on the metadata level, the stream property MAY be annotated to provide the read link, edit link, media type, and ETag of the media stream through a set of media* control information.

-

If the actual stream data is included inline, the control information mediaContentType MUST be present to indicate how the included stream property value is represented. Stream property values of media type application/json or one of its subtypes, optionally with format parameters, are represented as native JSON. Values of top-level type text, for example text/plain, are represented as a string, with JSON string escaping rules applied. Included stream data of other media types is represented as a base64url-encoded string value, see RFC4648, section 5.

+

If the actual stream data is included inline, the control information mediaContentType MUST be present to indicate how the included stream property value is represented. Stream property values of media type application/json or one of its subtypes, optionally with format parameters, are represented as native JSON. Values of top-level type text with an explicit or default charset of utf-8 or us-ascii, for example text/plain, are represented as a string, with JSON string escaping rules applied. Included stream data of other media types is represented as a base64url-encoded string value, see RFC4648, section 5.

If the included stream property has no value, the non-existing stream data is represented as null and the control information mediaContentType is not necessary.

Example 24:

diff --git a/docs/odata-json-format/odata-json-format.md b/docs/odata-json-format/odata-json-format.md index 5aa767045..245975c6f 100644 --- a/docs/odata-json-format/odata-json-format.md +++ b/docs/odata-json-format/odata-json-format.md @@ -1798,7 +1798,8 @@ If the actual stream data is included inline, the control information MUST be present to indicate how the included stream property value is represented. Stream property values of media type `application/json` or one of its subtypes, optionally with format parameters, are represented -as native JSON. Values of top-level type `text`, for example +as native JSON. Values of top-level type `text` with an explicit or +default `charset` of `utf-8` or `us-ascii`, for example `text/plain`, are represented as a string, with JSON string escaping rules applied. Included stream data of other media types is represented as a base64url-encoded string value, see diff --git a/docs/odata-json-format/odata-json-format.pdf b/docs/odata-json-format/odata-json-format.pdf index 51d65fd15ae6b014661a183eabbf054d6ddc5bba..0ae85063dcdd602e86aa707f375fb2fd1ebeaa5f 100644 GIT binary patch delta 12758 zcmZu%2~^En7caMg(xkc(ktj0cKMxrqMamE|XZ9hPqLAqyiVQ`HTPdMXrVvsYGCVw< zBq4LANG0ha>FL|IB=?-xTCMKd?Q`}%`|RPj_qnn8-aGGmZ@a0>ku1wHbi~~@4IkGi zLzJ2!$|fO7S%^|AM5!I3)Cp1QhA5kcD4T^S^+J^TAyHcw{`+l%pM}x_?ltpyFhBP7z^l(q56XSk_9B_}JK9q6v}h z)5m(T|Dyj*ou{`fuFQMff{qymtG}ftztcGUzE6;KP?=x(;6T92~td=Ubw_9EN<>gkV!*3tf_UW~1Rn_Z3J=XS^ zECm_|jz8h{)*?lb`l9X6s~IQbT3^q2@X5Z=G-1eUF89v;1Vw7?^4#6cQU~YuEh=%^ zDHQBCyb`xaZ&Iq2594{47=O`4@6$W-{1HJvPrRSpa-2@#<}T9KvW?ma&0=~zxi!XH z(Qc=t9X!M{r&~_QNg-*Q+^f&jFmLH^eGhtbp4_t2`gHQdoxTa7cPb_p4vnU+&2;n& z&p&o&QRk2u?l*S#-{^gnb+Qn%53UZrI4oveXVY4*8M1Qs`1^JVm7UHEw0!)|-0w{b zr+Gyel1DVXeQwEvfWREZylUt z6aMC{VxMxP{N`LTC5&G;=)u?Mah*3O9pDF0y)E5a+zG6tMiZwk<(-Cca))6bri>`L zK5otAir_0hn_TRm(bV+c35yTgw9sgyHN92KAu`!t`%GLfS1Cs>jP!d1%Ih(!1E=(}Kdr1CV6$t0^@sr*(!-VnO%JT%SL#rypGqIz z$u9IwI=>l(H!z! zqW1Z(W<^J>LSCF~|9pD;oYn`VW^+9}Cu-+rxa~L)byM(l7JWpO?I}qD%Di)!rXp5F3`f%?vR))~n!S3cXWdmvndiw}Khjr($h3 zW)3`=Tt4KJaQm5ib>?exj#v=ibky#%wJp=NOj~&lj-%H)C*FKqnc2PnfCwGSZ!3MB zd&a!nH#b2V^>kDBZ4-*aB3q@)S2;Cj_e{?7-@U(jy>ly{o(s6jqU(Waaa`rWLwA|l;rid2$?1>D$eUrkUrj5DYB6O(hb+Uv@ABvEvM=lB zzfO6lY|Mj=Uaqc#^}0#zw)c1%Yd2$M$8Ae>V<+$OInZ&~Qsuwgq0+~x_Z=(Vj=wtL z`=Oeoj3=WPZ|>|@6ntmUsP@Bz9#hMrOjnA*7K^9s5yW8E>$$GR z3!HBIT-45Wv-R*D``nNlvfzUlIo{~N|4#S$U(Z>eTeW_$Gvc`zz}%ghrIco7W=V4^ z^GkQT?Z_2B_{0~z{wlZH|9bz0Ed5(+T{Z}X_X1*%&17aQo#@lOt+Hcj$lH`-GZRl< zbT^59{PCn)r*>;tYL{U#_vAajJZDs1 zv%2e>@6BF}))?x1*?zRnqMf@8%I9A=zba!!Y=mzIm)H^Bp-Z;O-)UtUjGJ(Ie~8Y^ zsFs~QOX5mGO&^haCFi>?w24-`J07mHTW`%=WSa=w$dLQZO=4=1W_5Hut^v z_;uF4r%%Xbdlq%EU$fwI%F^J@kG#H=4UbIGHAp)ujTm$4Uce7!vrXQgvaP#5m}+9v zwBY0?%TJ^k;!pJXxW)RdcUi32^- zMx94F49;x{~&v6%_U2+>Sd+Ju?cI(6wfWxAC|u%ws*_e z7lAcX&pldPQ(+i#bb0yofV*qDEgwEGW8cPoIc$QrDJ!#J>C4rvv!_qE|SK_b*!W=U8BRIwW9hT z?>1Ze)%)1V*Nd{_{89pwoKN%Aw_eGw^okzdO!n)ywtq`DJJV`ht0yZStZ?-DF>?^F zF{_#W;C_!j4-1@hzvA2L;~yfeMyHH*p~X>iJD<7q?-$oz=R9XkXil8f4Qo33qvjg= z$GMVgn?7{$^l-app2Yf@PhERhPfBg$K3QHWGwOH4J@*Ym$G2P8(W|WUTT9&wss0O( zCQtBp(As>gc-4=X;1N|%4DAm^bsM|){JdNCA!TKuYwvd%z&@+&+ML{1(W^A;fhEK({sskoFy6@|nvtK`^i`&DgR#(q?AK$e(X=PTyh@G0{e;58W-o{UA zb*;&TG=E9F&2pvDrq-+C@{J?iH|=_5|HQCEiebM1VUFRjuw{-wdh$eLZoW=?u4m8r zS~gWN<}RykOTD8<_jCBiy{RnXS-_LpV1z!Pv2J&CG)K`CS}^Kwx8Ma-Yh`OP}jtzC}RvVO*IHbBmah3O=>l=1gwXt&@-)!9Sr1+Ru9~{1Kp5yc|H}2)38rz>y zmFr(weYUWgS-I`Ieu{41%|RB4xnHXW-DtgMxAOeAEt=zZ#e7N)*ZkNw?8i)U4{WKk z@>t7-S4Lj^rZg;;YNm{Nn4O|rQq(fN*P+Q-ZHu*|n(Ln{6ZA(+i`ufU`N@>Gi?k-3 z7-nm@;A6p+;M4qMg@Qi)l&jugt})4=@X|_+p!7kt3p8u`@ZmMq&kj%N_DuJ2^!4sj z2ftr+=2KDHM_HGH<=fj_bnXAZ$Z)bo`;rl-##s&R?=#)$+}=cb zja$|s!)DZqo*w5swlBzv_pUtbJKd!wL2v%bi2V`gifnF$m6udk_s=-*^y<4IC+>a|?7pr98b zR6o}9t@Yp!$q=;2k?C4*M(v#oHhil3xky6wY$^Ww82nu0iSxRKm z3*O0_$}~9zSt2)0SALLBl*u@OO!xXI@1@z2Cnz3SCGaB2rze+#Xc@!O3ZX(S)~V`W zArFv=qL^MNxPkC(9&pC0sGZmua4DMArlEq^4V1To$JhiV6&Akv@KfNEM40Rr0mRPiw!rC@61 zQ)RqBE23-V$F*pZqIL|nu(hCB644(tWT_pY7LQ~+Y(GQO!d50SV)_Du#&LpTu(s-7AnmHQ#Sl=BQkdyj#7i7Wt4kvZ zo+pvZ1De1fcL6j|3tcNvaOG+jPYE0tMV&^H1i>&Wn$+kaKqN)v>VQVm_+o}bOay$a zAYwxJ|5z*Vb%KA%1^FZ;@DyruQsuCm`i8*Ah?p{rsJ0>ON0KawpBQ`uwKT~x67{Dx z^^4j6VB~4k{3I*zh=L>u5rbF(lokj~us{;^a;4t^N`g1jnE3@-#22&mclYPj!6oB- z0&Z0i%=4#JC6&2ElEqFZQoI^t9Up@x1X#<`s1uS90GMS&fkO791c4MJR4@f{ahkxO zr-QtJ-8%&_j0hnqn&PqjXomQe0Hucf2#hR)Y7G~Hh7<4!43a%biXjMWEkmMKfD^Nf zy0s*dq&NXh$3PQVY(t*FLJZDE;(TzDKkpc>j^Y^sQ<~=}Qo2?T`+ z79gO|{oriamB4K_IJ)$!JV6p*MSMg4KQJ0-9QB2w8P+1rZiCF$%XhJ|O!_XkuT2=oV%}+9Lc{n3r9#k2c!{X`nO5(YpF>eP%RLiWKHLnXp! zz=+UTDBY;}SpqTx#>arCs|?-f=ps~i6`vx_$fARUxfIJnEmdCv?+FxErr?QzKwVVz z?$Bu9dV8=ehuMQ=q5jm#P>eFRu#vE%a1>VVSPmi{)eC?hc4Vl4s0mq4AP{FDSt#4T z_G_#}EKgv_f(7J>9h9e8Ot9*i1XYmd8iX_?8j|ICPTfdQiCA95PYj7(oe}sT(Id)G zB7_*~g&d7}FhnPT-2}&p1dCK6V5BkJ1YHJ;coM0qo~T(l0g5kT1x{dTd@ToWO7))k zyApANfSHjN>NA{b+CipNKgU&*G>A zDmi9q9@;$AF#!iqEK-R`@EJ690S!W4U2C9mShVpRFCeD_KFos9XHt#zy`d6;@zK)( zBP1_Gus~6m!$ID{QiMP;0(x}<;30HBN##e#eS%(yT>^<@ z0!pOe!4>SIDx<%1i^zk6B1RLTfkKpl#o#FFd=xrY?`LHrpPD*4d!F+7S5 zfhM9r6*4J-x(U!od@V~iBBgqu1bhsSDlIY+24W}zY>k)|XcUb^AJ70ypjLqK0&@Fs zVh(KyC`gg@ZU^UYFh39>GLQ`c(Kbffual54=s@{EE?Tz$r4qm4`mg*&0hCa)D!3Jl zPoU4h?id;#^mG(7oSfo~g+(U``xk{JeK-t*9UKw|c3UEpFZ4VB8bwqkienmPDZgtj zoQC}amDPa;pkeS5Xd;aU0d%Y+>Jl()KvN|pas&cvB`_K!K}bKG*y^F$ayXDl#8jzLQwI58f%0G&lvQP9f5PQvz}0fD2+Luldq!cC*` z0T~9fB=jKYkP&PFqrAHFG|p5gS`^Uauj4}9jfd&^0wor5ps0Qu{Q4kU#b`Y32p=BG^0yM8*+nAo9 zqd{RC#lp9uP!mGmgk=usn^2qzYZ-JB0yKC=P*WPx6AO(8>a!xC9d$jqG|UgsbjJ!DOQS6T_$7W~m}sI3vVf3LpJ4%Qpb-uO9jpSXFmr=~Y(u$&+JItB zRZhk3lcQk*tT1Z_EiDH*50xjvGYCop2ly?oK^(wrbQ%DTM`D!>OoXCS;H!&hwYdf* zig=iF&d`<%(h4~uB2uTd1aVXA)4WY5d_#o$CG_Vay`-Or21jJBPDRf)} zG#ahvs_KiH8fY+bz=Xiq7pMI>9j*h!P?Di>MHpc`i6Sx@oE1|>HR(VF0~Eka%|V7n zEzOG(_Vxf1MiT8kfQC)$Xn|xt!^!tPEwc0r;TZ`eQA~hhxCQFXBir+Qh<+fw>miF9QwA>mM7|?Z?&4 zEaAYvYZr_~A#G!Pf`rbSVOC0`hy-XHS_Xi|qmT(`kU&r&FpI$iLng1cLL+p5%j9uW zLxx5i69%`KR|9M$36zf}pi&{q(9kxjSqq>8_$q=Y>S$mFbg{}AFd8;Nf{8JQ4(EXe zvk7!9O^R@S)ipKV6Et9Gkz?Rl07acZgOZD`WuX3`G?qq_85A6Ne6Q#G4IKbvQ)t)$ zjYDG=o@Bscs1TR}VamW`K4yLaQi$4G2{wagU3DVRpaI47}Yq%}+v0bt`!2w)nW%mC$D`a$RKh=voDg$1Q z31phcz*qs*kYQDY8(GW}kRUM{Om0ycJUrtxzHwUfYnlkK2RPBifcCM)kbyB8jZJ3Y z+bi$@hVBQc3k^>RU_9oTfX=ZHgD)Fkz98@f`jQ6^L^PJFp^~Fd)&Qdjl>}LOhWs{^zAq_wxDlk@L>I=iak^&$&-Rq3^c4z8n75Wl5T12x{Z)pPPPN zs)|-=M5{ETRkCQ6RMXTCItMsE)?V?rxi&hy#tJ+7aI-F1${`0_s zrZ@+RwPH!ZfoBPhw4w#p0sc*sikA-!XPWT514|GbV@0uQ4l70^94N)ySfehAo53=3 z#hxNV8;KG*^0(itf9)cFfKAXa5K{PpllSkrFzqe1`1fsn0=+zm)Cl*Kxwu zolCF3zpzhum}YK$ADtKTtM}c{k)t1t`FUPZ>7zMXZ6-~Qm@#|wK+UM-es;3`X?{DsLv{}~OOMp^ z2)>r3H0qG}%+|eX_{EhU{Bqh>^?W;2(x};RG}5=?zO0>FT3WsNn!`Fv2Pb#>mn+tY zyHPN)+9LPt#S;@J$d>onSTnVHt#5iQHL{>z*&Plv`SdRrgSJO#iV0`6+X|9$DmilG4Pgp6s z+x}}a+xLQ9_uRxG^YgkLSyrVC&smo^_+pvo>^Zj=P94_u#gzUz*>k9b{SklNH_w`4 zvN=T>cyX+v(;5w@wvK*QbKS#E@9X70#zu5{qG=*|m+h_)-8c88L;em99-AGOJ9FFn z#GpRCe=hFpUm5y2@_OljB|0%HUWb?Wu3rAE-M>zIyn|hj**q-YdwTFr|9IP=W2=L= zE-)VIpR=W7+L5sOpTqOUrX3)A{0$eRhxN4OV_yuIwOXEY{7YGRUGMVzbl>h~Mt|>klWY+fcF^tR zlF*ppI(CO_Hcbn+j;Wc@V|{^ecyAxa36o^+@2wf3T2r?^aww6nk&`X<%w^Ud>DQ;2 znqnNZGkCr7myiwS4)1Dwa{hcEX`P6lpuKh8&_ZQFzUF5e`{zC{=k&U}@nqQ~x^tvi zhrGvx(`$o~5409~&~9T=+b(Ut)WhYt{%2L@r9gk9g4y*2+@9}<9+gom8o{AM$d(Z8XvqIr+S__=Hh!e$x~zI(5d&A zR-6hMH^yz8VTo0Ja9w;r*U=-4Vl?y4JZYzt_O&(dqW82Us{Fp!wzS*=gC!Sk+HS9z zkvcr$l)T#OyuMSKUeV-V_nU5C5feSR^xb&b@)1em2NB`>X`Z@=XBk?j5{eA!-!gQ%Y@{O$s)^;e%s$o z%{n7V2P(I`Ozss=2!99dD6g+Em8CvT?R%ze-m>hd2Sx<}TlWRt9ldDS4ExS1>sQ*< zqY5%d2A_2^N*wzpBiHK9QkL4@zQU`xmUqoeaOm=QRLQHMieHjqgdz*C{->Trzl`;q zS@da8MOx=WPRHx-#84Jx=JKlt9j|2>87{p1uUT#{i8&k9(JL=r-___iUova8&|RyB z*rsQ3Qm^Ps(Hfog0V{T-7DSCn>wow2RxR7}Z4a*;zQb_qAgivd(`69y@-esTP-Q~>V}}xj}?&uA)jgSI&DN*{PljtPmk74@#wv0@lq|t zN^`%Gn!~Cx`%3#x(<6G^F*xe8EGlUI^t1J`CGS=`y)U%=>ig&XRDlDg{o z=xsZ7+I|0+oox$4;_eve9!n3Idm?qqEC;QaT@_1~bT8^P*^Nt`a!J2xmPt=#;XRu2 zI+R!#l9x_o$NtB?d*nJ~QtZ%xebdqjvQwKoPwEaHa%N7h-X+|doj>x-zT%f3e51l><7HcM(9V*GbQ@lCo&q&Gd%C0qByV$PCYh|(fkwv`~ z=bgibdlf#?dDic#!M5>tjE3A#eQG7|Ipp?{p=tdVE!ExI`Qu8fQ-Y0dPy5_O?FPGM z?wkE8Svn>ecvQHJba1m=s~YIJX3LRjhCPOiq-(Y(oO~3ybD!^)gyq}jb=b-M*8eft zWdPeIw4z60jA;3H#tkvt-_^ldJ7C37o;w_$wdkL-QqFBVw`fJT9kE)A?`$0MwwwQU zPX~hu*1x9IB#f#%mf-5Kskd8umjv0=r?2*$ z&S)%}mG*e==cp;;<@Ij&Qfz(livM)h{IqD};TYXgJD)zX>Iv6A&wsU~M`idgGc5M! z_8p-8zY^lXc;`2zUnJ?HUj670cdzYZLqr;-7o>Y9@0#JB{DohK7XoXFX0U4R>7?a{m3H8IMLSc9isE$8|33 zGhltJrrRp>f4L-Wo7*#7N4EF5F<)G6|6srVD!%l=Eq6((XsxMzPo=tpTrmQYEyriKwDL5$DKEywG)zKG*@M8o& zKPivC=$O${n}Jqo6?IB|YUO_xH73CyLS`q3$R^{Q9 zXogab`l#N5XK2OKPq30;1%+>|=?)oOP5ED~sR?{0ath-*(}!>cR{6G0y#vd0O7D6& znieU7fW$9qKAIL3N57g*l5wmUZ!ABmMTw#ipDXVnrzjpdK72w63M~!!Lm3O(Khlu* zkO>s4)YFvPzyU=;!N}wbWGuxi4y%6=7)oKSCC`zOf~a_kNfK;?Gjf>LNtS1k1HxL7K(qk21GTplqL#snLMy>) znn02grhb9qu*Kk3_+s`4d_3yGAVd%_(}@Jt=u%QsiXcgmWN=0b%>uv&84SH0;95*G zA}1pIQGx(*+iI;uk`xR{S`*bYoO>K3DpAJn4wT@Q5@f#f~Cd`O;VgdV;gcJ7Ge}nh!`JF(Wrk=JPq@w z7M>0cNAV1*EeVJmjd(E7c+9yd9=rzKP#|!@0>lZ%N0X?dgF$%8N9qjiAQZm(@^=4+d*z*Q4P|xNTD~T8A3#4 zP?8`*3PCr7FvbM)43=6!E{%FR4ao;zD`5G9=0z49y+QxYIe-=j5nC)!nD+ykz)~;` z_CyXt2_oC<=}nFfLD$0Hqy~IKG8By!B8K|WVva*Soq-&M2!{PcB+)>LpdsZVnr0*# zvJXlGL!tI$Xtu?v8xKwMKj0G>#O|O4z&WT4fn(HpMy>y5^)rG%qR9t90v3vl2nYb( zPy}^hG{{I8jcs{hwS0B;O|Q@5Pt}%!m3a%TtYq{q8X=Ph({WPzo*tQYfY* zo<{-}iZKgW9%F)39P!4pcvGBfe%suq6LoQ(aTYy8X=*@7_>#BCgVT`s#Z>* zF!$jEhQ!yh40ad+c5FOgb1~*15Ybx4K_Fs_;d-bqa3Z7+^u{8DY-<|a7{g2wsWvBa zYGC9sN8-U55Iz!m2TavGD`HTT=STuM49SC|(`YdUV8EkkhUZu;+IWt`x)C0E@fPNHFH7piU z?*|DSiV}e)ppX@4BDNm^Z@6l0wJgRI!BQw_0vf;oT;Mq5z;{GzK#+z*i2vD#ejJ;`UH8X%gpS znh;rY%>_mbTLKNb8T2rKl~5-DypEx55E} zvHT4|EVNF`0|*j`7;>jz7=R*ouvUwHv{48H6IsQ6O9&6l??Gjlff#65P#{ zU_*e-m=FPli?9}(yHS9}P#_IPfSDw+A0QoCLT?O-9Yxm^=mj$q3wCOC6SxRm1Fh6R z14M-iW?*XmjrKh~vG64#G$TNlgJllrn^2resrx1b!vGB)4p6}?I^BTur0xSTMzA|} z7+yr1Na(ErTB1T=cz^~ZKvxQlW_ZpZIHV;|j|$PLIXoQ@SiWPS9meb_;zbXp`uIfv zGdF3AZ7Sc;!(;Y@SryvSHdGs45z$57eX0np6nX}Z!4=0bV#6#z-CH+_<5&W#WZ)<$ zI;A*P;cP1JD2aGrb1?10!~^(8^(?}u1mlBu8`LYIDZ)w!y!bSjqZM+3M-wbjz=RSD z5gy_TJq%2~P-lZO1(2w<6RAsA%c|ahoPbE9gM6St?!gvw=p+dEc=XUf6VM7y10F>x zIAAVPB2f$oL;w`1U=mtnj0Rsy#A(eQ*ys_kA5=Vq559KzjRyB`aveZ+P{I*Lj>g~w z&CwiMRl!CirfLr6v`BG*;bH5S29Qqz5njs>!SE=B0!>f>jjB*xd{NB+jYY!?3NnMX z|3DML|62=&DIC~kKO^rZ_$X7&RisXrh4ffp?$|%s^j*_8e+J*%WonWfF)Sibw$TV1sv{ zVKXD3LH$Dx2zeDvx(vK3AfYY6bQzFqE1Q7&0T8380+1b$Q6cdDj)WKtoB^nyeDKze z@xkl>ea2#Fs1+C^PoTMiY9N1*;)7 z7ABAuPyhkAif&e6Q{<@opVloR3EPqQVW2f_)?nl0jDb{*mQSDo#zapICPu?fjlG*U z{MLss;Fl<3Ri`&>KZy~4pf2dV(0B*HiiHzE9W2qnhyk5JF_1*ji44#Hz95q`K-o}> zkQ>8SG;ksCp8?PtvoLx@vnU{CEIdJ{EgbXP~hQw%iLjQrKY5_0_ t>V$wpF$WgyL@2<>jp2J9=(8laAYe_!KwG(s0sJlsw0@5sF2h~*{|_9CP%r=h diff --git a/odata-json-format/7 Structural Property.md b/odata-json-format/7 Structural Property.md index 6e0635d30..2e6a533d4 100644 --- a/odata-json-format/7 Structural Property.md +++ b/odata-json-format/7 Structural Property.md @@ -471,7 +471,8 @@ If the actual stream data is included inline, the control information MUST be present to indicate how the included stream property value is represented. Stream property values of media type `application/json` or one of its subtypes, optionally with format parameters, are represented -as native JSON. Values of top-level type `text`, for example +as native JSON. Values of top-level type `text` with an explicit or +default `charset` of `utf-8` or `us-ascii`, for example `text/plain`, are represented as a string, with JSON string escaping rules applied. Included stream data of other media types is represented as a base64url-encoded string value, see From 06d426bce6927da92c66003da64d3343e73d948b Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 17 Aug 2023 14:30:20 +0200 Subject: [PATCH 02/74] Update odata-json-format.pdf --- docs/odata-json-format/odata-json-format.pdf | Bin 1518230 -> 1518106 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/odata-json-format/odata-json-format.pdf b/docs/odata-json-format/odata-json-format.pdf index 0ae85063dcdd602e86aa707f375fb2fd1ebeaa5f..51d65fd15ae6b014661a183eabbf054d6ddc5bba 100644 GIT binary patch delta 12577 zcmZu&30%$D7gw)M{!ycPErXDuRDSz1F=;3yp&>}LOhWs{^zAq_wxDlk@L>I=iak^&$&-Rq3^c4z8n75Wl5T12x{Z)pPPPN zs)|-=M5{ETRkCQ6RMXTCItMsE)?V?rxi&hy#tJ+7aI-F1${`0_s zrZ@+RwPH!ZfoBPhw4w#p0sc*sikA-!XPWT514|GbV@0uQ4l70^94N)ySfehAo53=3 z#hxNV8;KG*^0(itf9)cFfKAXa5K{PpllSkrFzqe1`1fsn0=+zm)Cl*Kxwu zolCF3zpzhum}YK$ADtKTtM}c{k)t1t`FUPZ>7zMXZ6-~Qm@#|wK+UM-es;3`X?{DsLv{}~OOMp^ z2)>r3H0qG}%+|eX_{EhU{Bqh>^?W;2(x};RG}5=?zO0>FT3WsNn!`Fv2Pb#>mn+tY zyHPN)+9LPt#S;@J$d>onSTnVHt#5iQHL{>z*&Plv`SdRrgSJO#iV0`6+X|9$DmilG4Pgp6s z+x}}a+xLQ9_uRxG^YgkLSyrVC&smo^_+pvo>^Zj=P94_u#gzUz*>k9b{SklNH_w`4 zvN=T>cyX+v(;5w@wvK*QbKS#E@9X70#zu5{qG=*|m+h_)-8c88L;em99-AGOJ9FFn z#GpRCe=hFpUm5y2@_OljB|0%HUWb?Wu3rAE-M>zIyn|hj**q-YdwTFr|9IP=W2=L= zE-)VIpR=W7+L5sOpTqOUrX3)A{0$eRhxN4OV_yuIwOXEY{7YGRUGMVzbl>h~Mt|>klWY+fcF^tR zlF*ppI(CO_Hcbn+j;Wc@V|{^ecyAxa36o^+@2wf3T2r?^aww6nk&`X<%w^Ud>DQ;2 znqnNZGkCr7myiwS4)1Dwa{hcEX`P6lpuKh8&_ZQFzUF5e`{zC{=k&U}@nqQ~x^tvi zhrGvx(`$o~5409~&~9T=+b(Ut)WhYt{%2L@r9gk9g4y*2+@9}<9+gom8o{AM$d(Z8XvqIr+S__=Hh!e$x~zI(5d&A zR-6hMH^yz8VTo0Ja9w;r*U=-4Vl?y4JZYzt_O&(dqW82Us{Fp!wzS*=gC!Sk+HS9z zkvcr$l)T#OyuMSKUeV-V_nU5C5feSR^xb&b@)1em2NB`>X`Z@=XBk?j5{eA!-!gQ%Y@{O$s)^;e%s$o z%{n7V2P(I`Ozss=2!99dD6g+Em8CvT?R%ze-m>hd2Sx<}TlWRt9ldDS4ExS1>sQ*< zqY5%d2A_2^N*wzpBiHK9QkL4@zQU`xmUqoeaOm=QRLQHMieHjqgdz*C{->Trzl`;q zS@da8MOx=WPRHx-#84Jx=JKlt9j|2>87{p1uUT#{i8&k9(JL=r-___iUova8&|RyB z*rsQ3Qm^Ps(Hfog0V{T-7DSCn>wow2RxR7}Z4a*;zQb_qAgivd(`69y@-esTP-Q~>V}}xj}?&uA)jgSI&DN*{PljtPmk74@#wv0@lq|t zN^`%Gn!~Cx`%3#x(<6G^F*xe8EGlUI^t1J`CGS=`y)U%=>ig&XRDlDg{o z=xsZ7+I|0+oox$4;_eve9!n3Idm?qqEC;QaT@_1~bT8^P*^Nt`a!J2xmPt=#;XRu2 zI+R!#l9x_o$NtB?d*nJ~QtZ%xebdqjvQwKoPwEaHa%N7h-X+|doj>x-zT%f3e51l><7HcM(9V*GbQ@lCo&q&Gd%C0qByV$PCYh|(fkwv`~ z=bgibdlf#?dDic#!M5>tjE3A#eQG7|Ipp?{p=tdVE!ExI`Qu8fQ-Y0dPy5_O?FPGM z?wkE8Svn>ecvQHJba1m=s~YIJX3LRjhCPOiq-(Y(oO~3ybD!^)gyq}jb=b-M*8eft zWdPeIw4z60jA;3H#tkvt-_^ldJ7C37o;w_$wdkL-QqFBVw`fJT9kE)A?`$0MwwwQU zPX~hu*1x9IB#f#%mf-5Kskd8umjv0=r?2*$ z&S)%}mG*e==cp;;<@Ij&Qfz(livM)h{IqD};TYXgJD)zX>Iv6A&wsU~M`idgGc5M! z_8p-8zY^lXc;`2zUnJ?HUj670cdzYZLqr;-7o>Y9@0#JB{DohK7XoXFX0U4R>7?a{m3H8IMLSc9isE$8|33 zGhltJrrRp>f4L-Wo7*#7N4EF5F<)G6|6srVD!%l=Eq6((XsxMzPo=tpTrmQYEyriKwDL5$DKEywG)zKG*@M8o& zKPivC=$O${n}Jqo6?IB|YUO_xH73CyLS`q3$R^{Q9 zXogab`l#N5XK2OKPq30;1%+>|=?)oOP5ED~sR?{0ath-*(}!>cR{6G0y#vd0O7D6& znieU7fW$9qKAIL3N57g*l5wmUZ!ABmMTw#ipDXVnrzjpdK72w63M~!!Lm3O(Khlu* zkO>s4)YFvPzyU=;!N}wbWGuxi4y%6=7)oKSCC`zOf~a_kNfK;?Gjf>LNtS1k1HxL7K(qk21GTplqL#snLMy>) znn02grhb9qu*Kk3_+s`4d_3yGAVd%_(}@Jt=u%QsiXcgmWN=0b%>uv&84SH0;95*G zA}1pIQGx(*+iI;uk`xR{S`*bYoO>K3DpAJn4wT@Q5@f#f~Cd`O;VgdV;gcJ7Ge}nh!`JF(Wrk=JPq@w z7M>0cNAV1*EeVJmjd(E7c+9yd9=rzKP#|!@0>lZ%N0X?dgF$%8N9qjiAQZm(@^=4+d*z*Q4P|xNTD~T8A3#4 zP?8`*3PCr7FvbM)43=6!E{%FR4ao;zD`5G9=0z49y+QxYIe-=j5nC)!nD+ykz)~;` z_CyXt2_oC<=}nFfLD$0Hqy~IKG8By!B8K|WVva*Soq-&M2!{PcB+)>LpdsZVnr0*# zvJXlGL!tI$Xtu?v8xKwMKj0G>#O|O4z&WT4fn(HpMy>y5^)rG%qR9t90v3vl2nYb( zPy}^hG{{I8jcs{hwS0B;O|Q@5Pt}%!m3a%TtYq{q8X=Ph({WPzo*tQYfY* zo<{-}iZKgW9%F)39P!4pcvGBfe%suq6LoQ(aTYy8X=*@7_>#BCgVT`s#Z>* zF!$jEhQ!yh40ad+c5FOgb1~*15Ybx4K_Fs_;d-bqa3Z7+^u{8DY-<|a7{g2wsWvBa zYGC9sN8-U55Iz!m2TavGD`HTT=STuM49SC|(`YdUV8EkkhUZu;+IWt`x)C0E@fPNHFH7piU z?*|DSiV}e)ppX@4BDNm^Z@6l0wJgRI!BQw_0vf;oT;Mq5z;{GzK#+z*i2vD#ejJ;`UH8X%gpS znh;rY%>_mbTLKNb8T2rKl~5-DypEx55E} zvHT4|EVNF`0|*j`7;>jz7=R*ouvUwHv{48H6IsQ6O9&6l??Gjlff#65P#{ zU_*e-m=FPli?9}(yHS9}P#_IPfSDw+A0QoCLT?O-9Yxm^=mj$q3wCOC6SxRm1Fh6R z14M-iW?*XmjrKh~vG64#G$TNlgJllrn^2resrx1b!vGB)4p6}?I^BTur0xSTMzA|} z7+yr1Na(ErTB1T=cz^~ZKvxQlW_ZpZIHV;|j|$PLIXoQ@SiWPS9meb_;zbXp`uIfv zGdF3AZ7Sc;!(;Y@SryvSHdGs45z$57eX0np6nX}Z!4=0bV#6#z-CH+_<5&W#WZ)<$ zI;A*P;cP1JD2aGrb1?10!~^(8^(?}u1mlBu8`LYIDZ)w!y!bSjqZM+3M-wbjz=RSD z5gy_TJq%2~P-lZO1(2w<6RAsA%c|ahoPbE9gM6St?!gvw=p+dEc=XUf6VM7y10F>x zIAAVPB2f$oL;w`1U=mtnj0Rsy#A(eQ*ys_kA5=Vq559KzjRyB`aveZ+P{I*Lj>g~w z&CwiMRl!CirfLr6v`BG*;bH5S29Qqz5njs>!SE=B0!>f>jjB*xd{NB+jYY!?3NnMX z|3DML|62=&DIC~kKO^rZ_$X7&RisXrh4ffp?$|%s^j*_8e+J*%WonWfF)Sibw$TV1sv{ zVKXD3LH$Dx2zeDvx(vK3AfYY6bQzFqE1Q7&0T8380+1b$Q6cdDj)WKtoB^nyeDKze z@xkl>ea2#Fs1+C^PoTMiY9N1*;)7 z7ABAuPyhkAif&e6Q{<@opVloR3EPqQVW2f_)?nl0jDb{*mQSDo#zapICPu?fjlG*U z{MLss;Fl<3Ri`&>KZy~4pf2dV(0B*HiiHzE9W2qnhyk5JF_1*ji44#Hz95q`K-o}> zkQ>8SG;ksCp8?PtvoLx@vnU{CEIdJ{EgbXP~hQw%iLjQrKY5_0_ t>V$wpF$WgyL@2<>jp2J9=(8laAYe_!KwG(s0sJlsw0@5sF2h~*{|_9CP%r=h delta 12758 zcmZu%2~^En7caMg(xkc(ktj0cKMxrqMamE|XZ9hPqLAqyiVQ`HTPdMXrVvsYGCVw< zBq4LANG0ha>FL|IB=?-xTCMKd?Q`}%`|RPj_qnn8-aGGmZ@a0>ku1wHbi~~@4IkGi zLzJ2!$|fO7S%^|AM5!I3)Cp1QhA5kcD4T^S^+J^TAyHcw{`+l%pM}x_?ltpyFhBP7z^l(q56XSk_9B_}JK9q6v}h z)5m(T|Dyj*ou{`fuFQMff{qymtG}ftztcGUzE6;KP?=x(;6T92~td=Ubw_9EN<>gkV!*3tf_UW~1Rn_Z3J=XS^ zECm_|jz8h{)*?lb`l9X6s~IQbT3^q2@X5Z=G-1eUF89v;1Vw7?^4#6cQU~YuEh=%^ zDHQBCyb`xaZ&Iq2594{47=O`4@6$W-{1HJvPrRSpa-2@#<}T9KvW?ma&0=~zxi!XH z(Qc=t9X!M{r&~_QNg-*Q+^f&jFmLH^eGhtbp4_t2`gHQdoxTa7cPb_p4vnU+&2;n& z&p&o&QRk2u?l*S#-{^gnb+Qn%53UZrI4oveXVY4*8M1Qs`1^JVm7UHEw0!)|-0w{b zr+Gyel1DVXeQwEvfWREZylUt z6aMC{VxMxP{N`LTC5&G;=)u?Mah*3O9pDF0y)E5a+zG6tMiZwk<(-Cca))6bri>`L zK5otAir_0hn_TRm(bV+c35yTgw9sgyHN92KAu`!t`%GLfS1Cs>jP!d1%Ih(!1E=(}Kdr1CV6$t0^@sr*(!-VnO%JT%SL#rypGqIz z$u9IwI=>l(H!z! zqW1Z(W<^J>LSCF~|9pD;oYn`VW^+9}Cu-+rxa~L)byM(l7JWpO?I}qD%Di)!rXp5F3`f%?vR))~n!S3cXWdmvndiw}Khjr($h3 zW)3`=Tt4KJaQm5ib>?exj#v=ibky#%wJp=NOj~&lj-%H)C*FKqnc2PnfCwGSZ!3MB zd&a!nH#b2V^>kDBZ4-*aB3q@)S2;Cj_e{?7-@U(jy>ly{o(s6jqU(Waaa`rWLwA|l;rid2$?1>D$eUrkUrj5DYB6O(hb+Uv@ABvEvM=lB zzfO6lY|Mj=Uaqc#^}0#zw)c1%Yd2$M$8Ae>V<+$OInZ&~Qsuwgq0+~x_Z=(Vj=wtL z`=Oeoj3=WPZ|>|@6ntmUsP@Bz9#hMrOjnA*7K^9s5yW8E>$$GR z3!HBIT-45Wv-R*D``nNlvfzUlIo{~N|4#S$U(Z>eTeW_$Gvc`zz}%ghrIco7W=V4^ z^GkQT?Z_2B_{0~z{wlZH|9bz0Ed5(+T{Z}X_X1*%&17aQo#@lOt+Hcj$lH`-GZRl< zbT^59{PCn)r*>;tYL{U#_vAajJZDs1 zv%2e>@6BF}))?x1*?zRnqMf@8%I9A=zba!!Y=mzIm)H^Bp-Z;O-)UtUjGJ(Ie~8Y^ zsFs~QOX5mGO&^haCFi>?w24-`J07mHTW`%=WSa=w$dLQZO=4=1W_5Hut^v z_;uF4r%%Xbdlq%EU$fwI%F^J@kG#H=4UbIGHAp)ujTm$4Uce7!vrXQgvaP#5m}+9v zwBY0?%TJ^k;!pJXxW)RdcUi32^- zMx94F49;x{~&v6%_U2+>Sd+Ju?cI(6wfWxAC|u%ws*_e z7lAcX&pldPQ(+i#bb0yofV*qDEgwEGW8cPoIc$QrDJ!#J>C4rvv!_qE|SK_b*!W=U8BRIwW9hT z?>1Ze)%)1V*Nd{_{89pwoKN%Aw_eGw^okzdO!n)ywtq`DJJV`ht0yZStZ?-DF>?^F zF{_#W;C_!j4-1@hzvA2L;~yfeMyHH*p~X>iJD<7q?-$oz=R9XkXil8f4Qo33qvjg= z$GMVgn?7{$^l-app2Yf@PhERhPfBg$K3QHWGwOH4J@*Ym$G2P8(W|WUTT9&wss0O( zCQtBp(As>gc-4=X;1N|%4DAm^bsM|){JdNCA!TKuYwvd%z&@+&+ML{1(W^A;fhEK({sskoFy6@|nvtK`^i`&DgR#(q?AK$e(X=PTyh@G0{e;58W-o{UA zb*;&TG=E9F&2pvDrq-+C@{J?iH|=_5|HQCEiebM1VUFRjuw{-wdh$eLZoW=?u4m8r zS~gWN<}RykOTD8<_jCBiy{RnXS-_LpV1z!Pv2J&CG)K`CS}^Kwx8Ma-Yh`OP}jtzC}RvVO*IHbBmah3O=>l=1gwXt&@-)!9Sr1+Ru9~{1Kp5yc|H}2)38rz>y zmFr(weYUWgS-I`Ieu{41%|RB4xnHXW-DtgMxAOeAEt=zZ#e7N)*ZkNw?8i)U4{WKk z@>t7-S4Lj^rZg;;YNm{Nn4O|rQq(fN*P+Q-ZHu*|n(Ln{6ZA(+i`ufU`N@>Gi?k-3 z7-nm@;A6p+;M4qMg@Qi)l&jugt})4=@X|_+p!7kt3p8u`@ZmMq&kj%N_DuJ2^!4sj z2ftr+=2KDHM_HGH<=fj_bnXAZ$Z)bo`;rl-##s&R?=#)$+}=cb zja$|s!)DZqo*w5swlBzv_pUtbJKd!wL2v%bi2V`gifnF$m6udk_s=-*^y<4IC+>a|?7pr98b zR6o}9t@Yp!$q=;2k?C4*M(v#oHhil3xky6wY$^Ww82nu0iSxRKm z3*O0_$}~9zSt2)0SALLBl*u@OO!xXI@1@z2Cnz3SCGaB2rze+#Xc@!O3ZX(S)~V`W zArFv=qL^MNxPkC(9&pC0sGZmua4DMArlEq^4V1To$JhiV6&Akv@KfNEM40Rr0mRPiw!rC@61 zQ)RqBE23-V$F*pZqIL|nu(hCB644(tWT_pY7LQ~+Y(GQO!d50SV)_Du#&LpTu(s-7AnmHQ#Sl=BQkdyj#7i7Wt4kvZ zo+pvZ1De1fcL6j|3tcNvaOG+jPYE0tMV&^H1i>&Wn$+kaKqN)v>VQVm_+o}bOay$a zAYwxJ|5z*Vb%KA%1^FZ;@DyruQsuCm`i8*Ah?p{rsJ0>ON0KawpBQ`uwKT~x67{Dx z^^4j6VB~4k{3I*zh=L>u5rbF(lokj~us{;^a;4t^N`g1jnE3@-#22&mclYPj!6oB- z0&Z0i%=4#JC6&2ElEqFZQoI^t9Up@x1X#<`s1uS90GMS&fkO791c4MJR4@f{ahkxO zr-QtJ-8%&_j0hnqn&PqjXomQe0Hucf2#hR)Y7G~Hh7<4!43a%biXjMWEkmMKfD^Nf zy0s*dq&NXh$3PQVY(t*FLJZDE;(TzDKkpc>j^Y^sQ<~=}Qo2?T`+ z79gO|{oriamB4K_IJ)$!JV6p*MSMg4KQJ0-9QB2w8P+1rZiCF$%XhJ|O!_XkuT2=oV%}+9Lc{n3r9#k2c!{X`nO5(YpF>eP%RLiWKHLnXp! zz=+UTDBY;}SpqTx#>arCs|?-f=ps~i6`vx_$fARUxfIJnEmdCv?+FxErr?QzKwVVz z?$Bu9dV8=ehuMQ=q5jm#P>eFRu#vE%a1>VVSPmi{)eC?hc4Vl4s0mq4AP{FDSt#4T z_G_#}EKgv_f(7J>9h9e8Ot9*i1XYmd8iX_?8j|ICPTfdQiCA95PYj7(oe}sT(Id)G zB7_*~g&d7}FhnPT-2}&p1dCK6V5BkJ1YHJ;coM0qo~T(l0g5kT1x{dTd@ToWO7))k zyApANfSHjN>NA{b+CipNKgU&*G>A zDmi9q9@;$AF#!iqEK-R`@EJ690S!W4U2C9mShVpRFCeD_KFos9XHt#zy`d6;@zK)( zBP1_Gus~6m!$ID{QiMP;0(x}<;30HBN##e#eS%(yT>^<@ z0!pOe!4>SIDx<%1i^zk6B1RLTfkKpl#o#FFd=xrY?`LHrpPD*4d!F+7S5 zfhM9r6*4J-x(U!od@V~iBBgqu1bhsSDlIY+24W}zY>k)|XcUb^AJ70ypjLqK0&@Fs zVh(KyC`gg@ZU^UYFh39>GLQ`c(Kbffual54=s@{EE?Tz$r4qm4`mg*&0hCa)D!3Jl zPoU4h?id;#^mG(7oSfo~g+(U``xk{JeK-t*9UKw|c3UEpFZ4VB8bwqkienmPDZgtj zoQC}amDPa;pkeS5Xd;aU0d%Y+>Jl()KvN|pas&cvB`_K!K}bKG*y^F$ayXDl#8jzLQwI58f%0G&lvQP9f5PQvz}0fD2+Luldq!cC*` z0T~9fB=jKYkP&PFqrAHFG|p5gS`^Uauj4}9jfd&^0wor5ps0Qu{Q4kU#b`Y32p=BG^0yM8*+nAo9 zqd{RC#lp9uP!mGmgk=usn^2qzYZ-JB0yKC=P*WPx6AO(8>a!xC9d$jqG|UgsbjJ!DOQS6T_$7W~m}sI3vVf3LpJ4%Qpb-uO9jpSXFmr=~Y(u$&+JItB zRZhk3lcQk*tT1Z_EiDH*50xjvGYCop2ly?oK^(wrbQ%DTM`D!>OoXCS;H!&hwYdf* zig=iF&d`<%(h4~uB2uTd1aVXA)4WY5d_#o$CG_Vay`-Or21jJBPDRf)} zG#ahvs_KiH8fY+bz=Xiq7pMI>9j*h!P?Di>MHpc`i6Sx@oE1|>HR(VF0~Eka%|V7n zEzOG(_Vxf1MiT8kfQC)$Xn|xt!^!tPEwc0r;TZ`eQA~hhxCQFXBir+Qh<+fw>miF9QwA>mM7|?Z?&4 zEaAYvYZr_~A#G!Pf`rbSVOC0`hy-XHS_Xi|qmT(`kU&r&FpI$iLng1cLL+p5%j9uW zLxx5i69%`KR|9M$36zf}pi&{q(9kxjSqq>8_$q=Y>S$mFbg{}AFd8;Nf{8JQ4(EXe zvk7!9O^R@S)ipKV6Et9Gkz?Rl07acZgOZD`WuX3`G?qq_85A6Ne6Q#G4IKbvQ)t)$ zjYDG=o@Bscs1TR}VamW`K4yLaQi$4G2{wagU3DVRpaI47}Yq%}+v0bt`!2w)nW%mC$D`a$RKh=voDg$1Q z31phcz*qs*kYQDY8(GW}kRUM{Om0ycJUrtxzHwUfYnlkK2RPBifcCM)kbyB8jZJ3Y z+bi$@hVBQc3k^>RU_9oTfX=ZHgD)Fkz98@f`jQ6^L^PJFp^~Fd)&Qdjl> Date: Fri, 18 Aug 2023 09:32:30 +0200 Subject: [PATCH 03/74] ODATA-1432 --- docs/odata-csdl-json/odata-csdl-json.html | 4 ++-- docs/odata-csdl-json/odata-csdl-json.md | 6 +++--- docs/odata-csdl-xml/odata-csdl-xml.html | 4 ++-- docs/odata-csdl-xml/odata-csdl-xml.md | 6 +++--- odata-csdl/7 Structural Property.md | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index 63c4b415a..b2bf64378 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -1122,8 +1122,8 @@

$Type and }

7.2 Type Facets

-

Facets modify or constrain the acceptable values of a property.

-

For single-valued properties the facets apply to the value of the property. For collection-valued properties the facets apply to the items in the collection.

+

Facets modify or constrain the acceptable values of a type.

+

For single-valued model elements the facets apply to the value of the property. For collection-valued model elements the facets apply to the items in the collection.

7.2.1 Nullable

A Boolean value specifying whether the property can have the value null.

diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 227421dcd..a31839a87 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -1571,10 +1571,10 @@ value ## 7.2 Type Facets -Facets modify or constrain the acceptable values of a property. +Facets modify or constrain the acceptable values of a type. -For single-valued properties the facets apply to the value of the -property. For collection-valued properties the facets apply to the items +For single-valued model elements the facets apply to the value of the +property. For collection-valued model elements the facets apply to the items in the collection. ### 7.2.1 Nullable diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 7decafa94..a11721d85 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -1045,8 +1045,8 @@

Attribute Type<
<Property Name="Units" Type="Collection(Edm.String)" />

7.2 Type Facets

-

Facets modify or constrain the acceptable values of a property.

-

For single-valued properties the facets apply to the value of the property. For collection-valued properties the facets apply to the items in the collection.

+

Facets modify or constrain the acceptable values of a type.

+

For single-valued model elements the facets apply to the value of the property. For collection-valued model elements the facets apply to the items in the collection.

7.2.1 Nullable

A Boolean value specifying whether the property can have the value null.

diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 581686211..ad5fa2523 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -1469,10 +1469,10 @@ value ## 7.2 Type Facets -Facets modify or constrain the acceptable values of a property. +Facets modify or constrain the acceptable values of a type. -For single-valued properties the facets apply to the value of the -property. For collection-valued properties the facets apply to the items +For single-valued model elements the facets apply to the value of the +property. For collection-valued model elements the facets apply to the items in the collection. ### 7.2.1 Nullable diff --git a/odata-csdl/7 Structural Property.md b/odata-csdl/7 Structural Property.md index 065635b77..34076a205 100644 --- a/odata-csdl/7 Structural Property.md +++ b/odata-csdl/7 Structural Property.md @@ -154,10 +154,10 @@ value ## ##subsec Type Facets -Facets modify or constrain the acceptable values of a property. +Facets modify or constrain the acceptable values of a type. -For single-valued properties the facets apply to the value of the -property. For collection-valued properties the facets apply to the items +For single-valued model elements the facets apply to the value of the +model element. For collection-valued model elements the facets apply to the items in the collection. ### ##subsubsec Nullable From b4c81fb8cdf1d5a4892b1a55c4c7375aafcd8b70 Mon Sep 17 00:00:00 2001 From: ralfhandl Date: Fri, 18 Aug 2023 07:33:13 +0000 Subject: [PATCH 04/74] auto-refreshed --- docs/odata-csdl-json/odata-csdl-json.html | 2 +- docs/odata-csdl-json/odata-csdl-json.md | 2 +- docs/odata-csdl-xml/odata-csdl-xml.html | 2 +- docs/odata-csdl-xml/odata-csdl-xml.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index b2bf64378..259b07c70 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -1123,7 +1123,7 @@

$Type and 7.2 Type Facets

Facets modify or constrain the acceptable values of a type.

-

For single-valued model elements the facets apply to the value of the property. For collection-valued model elements the facets apply to the items in the collection.

+

For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

7.2.1 Nullable

A Boolean value specifying whether the property can have the value null.

diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index a31839a87..076c7d400 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -1574,7 +1574,7 @@ value Facets modify or constrain the acceptable values of a type. For single-valued model elements the facets apply to the value of the -property. For collection-valued model elements the facets apply to the items +model element. For collection-valued model elements the facets apply to the items in the collection. ### 7.2.1 Nullable diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index a11721d85..95f005136 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -1046,7 +1046,7 @@

Attribute Type<

7.2 Type Facets

Facets modify or constrain the acceptable values of a type.

-

For single-valued model elements the facets apply to the value of the property. For collection-valued model elements the facets apply to the items in the collection.

+

For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

7.2.1 Nullable

A Boolean value specifying whether the property can have the value null.

diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index ad5fa2523..3e40be144 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -1472,7 +1472,7 @@ value Facets modify or constrain the acceptable values of a type. For single-valued model elements the facets apply to the value of the -property. For collection-valued model elements the facets apply to the items +model element. For collection-valued model elements the facets apply to the items in the collection. ### 7.2.1 Nullable From 97abf44795feb851fc2c5419d9c24491fce21b07 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Fri, 18 Aug 2023 09:39:30 +0200 Subject: [PATCH 05/74] Rephrased --- docs/odata-csdl-json/odata-csdl-json.html | 2 +- docs/odata-csdl-json/odata-csdl-json.md | 2 +- docs/odata-csdl-xml/odata-csdl-xml.html | 2 +- docs/odata-csdl-xml/odata-csdl-xml.md | 2 +- odata-csdl/7 Structural Property.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index 259b07c70..ae020d33c 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -1122,7 +1122,7 @@

$Type and }

7.2 Type Facets

-

Facets modify or constrain the acceptable values of a type.

+

Facets modify or constrain the acceptable values of a model element's type.

For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

7.2.1 Nullable

A Boolean value specifying whether the property can have the value null.

diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 076c7d400..f4a11a328 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -1571,7 +1571,7 @@ value ## 7.2 Type Facets -Facets modify or constrain the acceptable values of a type. +Facets modify or constrain the acceptable values of a model element's type. For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 95f005136..a7d9782b6 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -1045,7 +1045,7 @@

Attribute Type<
<Property Name="Units" Type="Collection(Edm.String)" />

7.2 Type Facets

-

Facets modify or constrain the acceptable values of a type.

+

Facets modify or constrain the acceptable values of a model element's type.

For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

7.2.1 Nullable

A Boolean value specifying whether the property can have the value null.

diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 3e40be144..9ea2a93dd 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -1469,7 +1469,7 @@ value ## 7.2 Type Facets -Facets modify or constrain the acceptable values of a type. +Facets modify or constrain the acceptable values of a model element's type. For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items diff --git a/odata-csdl/7 Structural Property.md b/odata-csdl/7 Structural Property.md index 34076a205..45ef60512 100644 --- a/odata-csdl/7 Structural Property.md +++ b/odata-csdl/7 Structural Property.md @@ -154,7 +154,7 @@ value ## ##subsec Type Facets -Facets modify or constrain the acceptable values of a type. +Facets modify or constrain the acceptable values of a model element's type. For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items From f146c9a47b6c20b29b37431488c9b96e0c860570 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Fri, 18 Aug 2023 09:50:36 +0200 Subject: [PATCH 06/74] Rephrased --- docs/odata-csdl-json/odata-csdl-json.html | 2 +- docs/odata-csdl-json/odata-csdl-json.md | 2 +- docs/odata-csdl-xml/odata-csdl-xml.html | 2 +- docs/odata-csdl-xml/odata-csdl-xml.md | 2 +- odata-csdl/7 Structural Property.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index ae020d33c..014e1f286 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -1122,7 +1122,7 @@

$Type and }

7.2 Type Facets

-

Facets modify or constrain the acceptable values of a model element's type.

+

Facets modify or constrain the acceptable values for a model element of a given type.

For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

7.2.1 Nullable

A Boolean value specifying whether the property can have the value null.

diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index f4a11a328..d71af98f6 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -1571,7 +1571,7 @@ value ## 7.2 Type Facets -Facets modify or constrain the acceptable values of a model element's type. +Facets modify or constrain the acceptable values for a model element of a given type. For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index a7d9782b6..b975413d1 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -1045,7 +1045,7 @@

Attribute Type<
<Property Name="Units" Type="Collection(Edm.String)" />

7.2 Type Facets

-

Facets modify or constrain the acceptable values of a model element's type.

+

Facets modify or constrain the acceptable values for a model element of a given type.

For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

7.2.1 Nullable

A Boolean value specifying whether the property can have the value null.

diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 9ea2a93dd..388d59ed0 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -1469,7 +1469,7 @@ value ## 7.2 Type Facets -Facets modify or constrain the acceptable values of a model element's type. +Facets modify or constrain the acceptable values for a model element of a given type. For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items diff --git a/odata-csdl/7 Structural Property.md b/odata-csdl/7 Structural Property.md index 45ef60512..b7a9162d8 100644 --- a/odata-csdl/7 Structural Property.md +++ b/odata-csdl/7 Structural Property.md @@ -154,7 +154,7 @@ value ## ##subsec Type Facets -Facets modify or constrain the acceptable values of a model element's type. +Facets modify or constrain the acceptable values for a model element of a given type. For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items From 0e77d05e81110508bd87846062b7219a1bcff7c2 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Fri, 18 Aug 2023 10:59:21 +0200 Subject: [PATCH 07/74] ODATA-1472 --- docs/odata-protocol/odata-protocol.html | 5 +++-- docs/odata-protocol/odata-protocol.md | 12 +++++++++--- odata-protocol/11.4 Data Modification.md | 14 +++++++++++--- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index efb0fe964..3d1eb4a9f 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1788,7 +1788,7 @@

To update an individual entity, the client makes a PATCH or PUT request to a URL that identifies the entity. Services MAY restrict updates only to requests addressing the edit URL of the entity.

Services SHOULD support PATCH as the preferred means of updating an entity. PATCH provides more resiliency between clients and services by directly modifying only those values specified by the client.

-

The semantics of PATCH, as defined in RFC5789, is to merge the content in the request payload with the entity's current state, applying the update only to those components specified in the request body. Collection properties and primitive properties provided in the payload corresponding to updatable properties MUST replace the value of the corresponding property in the entity or complex type. Missing properties of the containing entity or complex property, including dynamic properties, MUST NOT be directly altered unless as a side effect of changes resulting from the provided properties.

+

The semantics of PATCH, as defined in RFC5789, is to merge the content in the request payload with the entity's current state, applying the update only to those components specified in the request body. Collection properties and primitive properties provided in the payload corresponding to updatable properties MUST replace the value of the corresponding property in the entity or complex type. Complex properties are updated by applying PATCH semantics recursively, see also section 11.4.9.3. Missing properties of the containing entity or complex property, including dynamic properties, MUST NOT be directly altered unless as a side effect of changes resulting from the provided properties.

Services MAY additionally support PUT but should be aware of the potential for data-loss in round-tripping properties that the client may not know about in advance, such as open or added properties, or properties not specified in metadata. Services that support PUT MUST replace all values of structural properties with those specified in the request body. Missing non-key, updatable structural properties not defined as dependent properties within a referential constraint MUST be set to their default values. Omitting a non-nullable property with no service-generated or default value from a PUT request results in a 400 Bad Request error. Missing dynamic structural properties MUST be removed or set to null.

For requests with an OData-Version header with a value of 4.01 or greater, the media stream of a media entity can be updated by specifying the base64url-encoded representation of the media stream as a virtual property $value.

Updating a dependent property that is tied to a key property of the principal entity through a referential constraint updates the relationship to point to the entity with the specified key value. If there is no such entity, the update fails.

@@ -1945,8 +1945,9 @@

Updating a primitive property or a complex property with a null value also sets the property to null.

11.4.9.3 Update a Complex Property

-

A successful PATCH request to the edit URL for a complex typed property updates that property. The request body MUST contain a single valid representation for the target complex type.

+

A successful PATCH request to the edit URL for a complex typed property updates that property. The request body MUST contain a single valid representation for the target complex type or one of its derived types.

The service MUST directly modify only those properties of the complex type specified in the payload of the PATCH request.

+

A complex-typed property can be set to different type in a PATCH request by specifying a different type in the update payload. Properties shared through inheritance, as well as dynamic properties, are retained (unless overwritten by new values in the payload). Other properties of the original type are discarded.

The service MAY additionally support clients sending a PUT request to a URL that specifies a complex type. In this case, the service MUST replace the entire complex property with the values specified in the request body and set all unspecified properties to their default value.

Upon successful completion the service responds with either 200 OK or 204 No Content. The client may request that the response SHOULD include a body by specifying a Prefer header with a value of return=representation.

Services MUST return an error if the property is not updatable.

diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index a21c32f45..d408b7910 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -4237,8 +4237,10 @@ the content in the request payload with the entity's current state, applying the update only to those components specified in the request body. Collection properties and primitive properties provided in the payload corresponding to updatable properties MUST replace the value of -the corresponding property in the entity or complex type. Missing -properties of the containing entity or complex property, including +the corresponding property in the entity or complex type. +Complex properties are updated by applying `PATCH` semantics recursively, +see also [section 11.4.9.3](#UpdateaComplexProperty). +Missing properties of the containing entity or complex property, including dynamic properties, MUST NOT be directly altered unless as a side effect of changes resulting from the provided properties. @@ -4755,11 +4757,15 @@ property to null. A successful `PATCH` request to the edit URL for a complex typed property updates that property. The request body MUST contain a single -valid representation for the target complex type. +valid representation for the target complex type or one of its derived types. The service MUST directly modify only those properties of the complex type specified in the payload of the `PATCH` request. +A complex-typed property can be set to different type in a `PATCH` request by specifying a different type in the update payload. +Properties shared through inheritance, as well as dynamic properties, are retained (unless overwritten by new values in the payload). +Other properties of the original type are discarded. + The service MAY additionally support clients sending a `PUT` request to a URL that specifies a complex type. In this case, the service MUST replace the entire complex property with the values specified in the diff --git a/odata-protocol/11.4 Data Modification.md b/odata-protocol/11.4 Data Modification.md index c08b936db..6771e8092 100644 --- a/odata-protocol/11.4 Data Modification.md +++ b/odata-protocol/11.4 Data Modification.md @@ -313,8 +313,10 @@ the content in the request payload with the entity's current state, applying the update only to those components specified in the request body. Collection properties and primitive properties provided in the payload corresponding to updatable properties MUST replace the value of -the corresponding property in the entity or complex type. Missing -properties of the containing entity or complex property, including +the corresponding property in the entity or complex type. +Complex properties are updated by applying `PATCH` semantics recursively, +see also [section ##UpdateaComplexProperty]. +Missing properties of the containing entity or complex property, including dynamic properties, MUST NOT be directly altered unless as a side effect of changes resulting from the provided properties. @@ -831,11 +833,17 @@ property to null. A successful `PATCH` request to the edit URL for a complex typed property updates that property. The request body MUST contain a single -valid representation for the target complex type. +valid representation for the target complex type or one of its derived types. The service MUST directly modify only those properties of the complex type specified in the payload of the `PATCH` request. +A complex-typed property can be set to different type in a `PATCH` request +by specifying a different type in the update payload. +Properties shared through inheritance, as well as dynamic properties, +are retained (unless overwritten by new values in the payload). +Other properties of the original type are discarded. + The service MAY additionally support clients sending a `PUT` request to a URL that specifies a complex type. In this case, the service MUST replace the entire complex property with the values specified in the From f51a30738b1d1bc91277c1bc105c8a5b2061eb83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Thu, 21 Sep 2023 10:14:53 +0200 Subject: [PATCH 08/74] Don't mention the BOM (#179) --- README.md | 13 ++++++++++++- lib/README.md | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 038cb9cd6..072df99e2 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,18 @@ Documents are generated from Markdown sources using Node.js modules described [h 3. Download and install [git](https://git-scm.com/), verify via `git -v` 4. Optionally download and install [GitHub Desktop](https://desktop.github.com/) 5. Clone this repository -6. In the local repository folder run `npm install`, verify via `npm test` +6. In the local repository folder run `npm install`, verify via `npm test` + Repeat this step if the test fails with an error message like the following after upgrading to a new Chrome version: + ``` + 1 failing + + 1) OASIS doc build + Puppeteer: + Error: Could not find Chrome (ver. 116.0.5845.96). This can occur if either + 1. you did not perform an installation before running the script (e.g. `npm install`) or + 2. your cache path is incorrectly configured (which is: C:\Users\D024504\.cache\puppeteer). + For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration. + ``` ### Document preparation diff --git a/lib/README.md b/lib/README.md index 09c5ae282..116dac314 100644 --- a/lib/README.md +++ b/lib/README.md @@ -89,7 +89,7 @@ The [`pdf.js`](pdf.js) module uses a headless browser ([`puppeteer`](https://git The following scripts can be executed manually or as part of a GitHub Action: -- [`npm run build`](build.js) runs the conversion and writes the Markdown output as well as the HTML output into the [`docs/*`](../docs) folder. The Markdown file starts with a byte-order mark (`EF BB BF`) so that it is recognized as UTF-8 when loaded from github.io. +- [`npm run build`](build.js) runs the conversion and writes the Markdown output as well as the HTML output into the [`docs/*`](../docs) folder. - [`npm run pdf`](build-pdf.mjs) runs the PDF conversion and writes the PDF document into the [`docs/*`](../docs) folder. - [`npm test`](../test) runs a test suite. From f6821c5c10f6418806b34a3149a988790142e178 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Fri, 29 Sep 2023 09:33:02 +0200 Subject: [PATCH 09/74] Support images subfolder (#180) - [x] copy sub-folder `images` in build script if it exists - [x] serve sub-folder `images` in live-reloading server --- .../images/api-1.drawio.svg | 186 +++++++++ .../images/api-2.drawio.svg | 355 ++++++++++++++++++ docs/odata-temporal-ext/images/db.drawio.svg | 260 +++++++++++++ .../odata-temporal-ext.html | 6 +- docs/odata-temporal-ext/odata-temporal-ext.md | 7 +- lib/build.js | 7 + lib/server.js | 15 +- odata-temporal-ext/2 Overview.md | 7 +- odata-temporal-ext/diagrams/README.md | 4 - odata-temporal-ext/diagrams/api-1.svg | 1 - odata-temporal-ext/diagrams/api-2.svg | 1 - odata-temporal-ext/diagrams/db.svg | 1 - .../diagrams/example-model.drawio | 191 ---------- odata-temporal-ext/images/api-1.drawio.svg | 186 +++++++++ odata-temporal-ext/images/api-2.drawio.svg | 355 ++++++++++++++++++ odata-temporal-ext/images/db.drawio.svg | 260 +++++++++++++ 16 files changed, 1632 insertions(+), 210 deletions(-) create mode 100644 docs/odata-temporal-ext/images/api-1.drawio.svg create mode 100644 docs/odata-temporal-ext/images/api-2.drawio.svg create mode 100644 docs/odata-temporal-ext/images/db.drawio.svg delete mode 100644 odata-temporal-ext/diagrams/README.md delete mode 100644 odata-temporal-ext/diagrams/api-1.svg delete mode 100644 odata-temporal-ext/diagrams/api-2.svg delete mode 100644 odata-temporal-ext/diagrams/db.svg delete mode 100644 odata-temporal-ext/diagrams/example-model.drawio create mode 100644 odata-temporal-ext/images/api-1.drawio.svg create mode 100644 odata-temporal-ext/images/api-2.drawio.svg create mode 100644 odata-temporal-ext/images/db.drawio.svg diff --git a/docs/odata-temporal-ext/images/api-1.drawio.svg b/docs/odata-temporal-ext/images/api-1.drawio.svg new file mode 100644 index 000000000..6759c3c24 --- /dev/null +++ b/docs/odata-temporal-ext/images/api-1.drawio.svg @@ -0,0 +1,186 @@ + + + + + + + + + +
+
+
+ Employee +
+
+
+
+ + Employee + +
+
+ + + +
+
+
+ ID: Edm.String {id} +
+
+
+
+ + ID: Edm.String {id} + +
+
+ + + +
+
+
+ Name: Edm.String +
+
+
+
+ + Name: Edm.String + +
+
+ + + +
+
+
+ Jobtitle: Edm.String +
+
+
+
+ + Jobtitle: Edm.String + +
+
+ + + + + + +
+
+
+ Department +
+
+
+
+ + Department + +
+
+ + + +
+
+
+ ID: Edm.String {id} +
+
+
+
+ + ID: Edm.String {id} + +
+
+ + + +
+
+
+ Name: Edm.String +
+
+
+
+ + Name: Edm.String + +
+
+ + + + + + +
+
+
+
+ + * + +
+
+ + Employees + +
+
+
+
+
+ + *... + +
+
+ + + +
+
+
+
+
+ + 1 + +
+
+ + Department + +
+
+
+
+
+
+ + 1... + +
+
+
+ + + + + Text is not SVG - cannot display + + + +
diff --git a/docs/odata-temporal-ext/images/api-2.drawio.svg b/docs/odata-temporal-ext/images/api-2.drawio.svg new file mode 100644 index 000000000..fc632b5c9 --- /dev/null +++ b/docs/odata-temporal-ext/images/api-2.drawio.svg @@ -0,0 +1,355 @@ + + + + + + + + + +
+
+
+ Employee_history +
+
+
+
+ + Employee_history + +
+
+ + + +
+
+
+ From: Edm.Date {id} +
+
+
+
+ + From: Edm.Date {id} + +
+
+ + + +
+
+
+ To: Edm.Date +
+
+
+
+ + To: Edm.Date + +
+
+ + + +
+
+
+ Name: Edm.String +
+
+
+
+ + Name: Edm.String + +
+
+ + + +
+
+
+ Jobtitle: Edm.String +
+
+
+
+ + Jobtitle: Edm.String + +
+
+ + + + + + +
+
+
+ Department_history +
+
+
+
+ + Department_history + +
+
+ + + +
+
+
+ From: Edm.Date {id} +
+
+
+
+ + From: Edm.Date {id} + +
+
+ + + +
+
+
+ To: Edm.Date +
+
+
+
+ + To: Edm.Date + +
+
+ + + +
+
+
+ Name: Edm.String +
+
+
+
+ + Name: Edm.String + +
+
+ + + +
+
+
+ Budget: Edm.Decimal +
+
+
+
+ + Budget: Edm.Decimal + +
+
+ + + + + + +
+
+
+ Employee +
+
+
+
+ + Employee + +
+
+ + + +
+
+
+ ID: Edm.String {id} +
+
+
+
+ + ID: Edm.String {id} + +
+
+ + + + + + +
+
+
+ Department +
+
+
+
+ + Department + +
+
+ + + +
+
+
+ ID: Edm.String {id} +
+
+
+
+ + ID: Edm.String {id} + +
+
+ + + + + +
+
+
+
+ + * + +
+
+ + Employees + +
+
+
+
+
+ + *... + +
+
+ + + + + +
+
+
+
+ + * + +
+
+ history +
+
+
+
+
+ + *... + +
+
+ + + + + +
+
+
+
+ + * + +
+
+ history +
+
+
+
+
+ + *... + +
+
+ + + +
+
+
+
+
+ + 1 + +
+
+ + Department + +
+
+
+
+
+
+ + 1... + +
+
+ + +
+ + + + + Text is not SVG - cannot display + + + +
diff --git a/docs/odata-temporal-ext/images/db.drawio.svg b/docs/odata-temporal-ext/images/db.drawio.svg new file mode 100644 index 000000000..555a9a428 --- /dev/null +++ b/docs/odata-temporal-ext/images/db.drawio.svg @@ -0,0 +1,260 @@ + + + + + + + + + +
+
+
+ Employee +
+
+
+
+ + Employee + +
+
+ + + + +
+
+
+ ID: String {id} +
+
+
+
+ + ID: String {id} + +
+
+ + + + +
+
+
+ From: Date {id} +
+
+
+
+ + From: Date {id} + +
+
+ + + + +
+
+
+ To: Date +
+
+
+
+ + To: Date + +
+
+ + + + +
+
+
+ Name: String +
+
+
+
+ + Name: String + +
+
+ + + + +
+
+
+ Jobtitle: String +
+
+
+
+ + Jobtitle: String + +
+
+ + + + +
+
+
+ Department.ID +
+
+
+
+ + Department.ID + +
+
+ + + + + + +
+
+
+ Department +
+
+
+
+ + Department + +
+
+ + + + +
+
+
+ ID: String {id} +
+
+
+
+ + ID: String {id} + +
+
+ + + + +
+
+
+ From: Date {id} +
+
+
+
+ + From: Date {id} + +
+
+ + + + +
+
+
+ To: Date +
+
+
+
+ + To: Date + +
+
+ + + + +
+
+
+ Name: String +
+
+
+
+ + Name: String + +
+
+ + + + +
+
+
+ Budget: Decimal +
+
+
+
+ + Budget: Decimal + +
+
+ + + +
+
+
+
+
+ 1 +
+
+
+
+
+
+ + 1 + +
+
+ + +
+ + + + + Text is not SVG - cannot display + + + +
diff --git a/docs/odata-temporal-ext/odata-temporal-ext.html b/docs/odata-temporal-ext/odata-temporal-ext.html index fe5427e4c..920e06732 100644 --- a/docs/odata-temporal-ext/odata-temporal-ext.html +++ b/docs/odata-temporal-ext/odata-temporal-ext.html @@ -330,18 +330,18 @@

2.1 Exampl

Example 2: model for api-1 with snapshot entity sets (hidden application time), key properties marked with {id}

-

Employee
Employee
ID: Edm.String {id}
ID: Edm.String {id}
Name: Edm.String
Name: Edm.String
Jobtitle: Edm.String
Jobtitle: Edm.String
Department
Department
ID: Edm.String {id}
ID: Edm.String {id}
Name: Edm.String
Name: Edm.String
*
Employees
*...
1
Department
1...
Text is not SVG - cannot display

+

API-1

and

Example 3: model for api-2 with timeline entity sets (visible application time), key properties marked with {id}

-

Employee_history
Employee_history
From: Edm.Date {id}
From: Edm.Date {id}
To: Edm.Date
To: Edm.Date
Name: Edm.String
Name: Edm.String
Jobtitle: Edm.String
Jobtitle: Edm.String
Department_history
Department_history
From: Edm.Date {id}
From: Edm.Date {id}
To: Edm.Date
To: Edm.Date
Name: Edm.String
Name: Edm.String
Budget: Edm.Decimal
Budget: Edm.Decimal
Employee
Employee
ID: Edm.String {id}
ID: Edm.String {id}
Department
Department
ID: Edm.String {id}
ID: Edm.String {id}
*
Employees
*...
*
history
*...
*
history
*...
1
Department
1...
Text is not SVG - cannot display

+

API-2

2.2 Example Data

Both API models in the previous section are views on the same underlying data. A possible storage model for this data is:

Example 4: simple storage model: object key in dark green, temporal sub-key in light green, foreign keys in orange, non-key fields in blue

-

Employee
Employee
ID: String {id}
ID: String {id}
From: Date {id}
From: Date {id}
To: Date
To: Date
Name: String
Name: String
Jobtitle: String
Jobtitle: String
Department.ID
Department.ID
Department
Department
ID: String {id}
ID: String {id}
From: Date {id}
From: Date {id}
To: Date
To: Date
Name: String
Name: String
Budget: Decimal
Budget: Decimal
1
1
Text is not SVG - cannot display

+

DB

The period start date is used as the temporal sub-key for identifying time slices together with the key of the temporal object.

Note: alternatively, the period end date could have been used as temporal sub-key, or the primary key of the time slice tables could have been an artificial key (sequence number, UUID, ...) with both the temporal object key and the period boundaries as non-key fields.

The following example data will be used to further illustrate the capabilities introduced by this extension. It assumes that the example services only support four-digit years.

diff --git a/docs/odata-temporal-ext/odata-temporal-ext.md b/docs/odata-temporal-ext/odata-temporal-ext.md index 0716934f4..067818a30 100644 --- a/docs/odata-temporal-ext/odata-temporal-ext.md +++ b/docs/odata-temporal-ext/odata-temporal-ext.md @@ -372,7 +372,7 @@ Example 2: model for `api-1` with snapshot entit application time), key properties marked with {id} ::: -
Employee
Employee
ID: Edm.String {id}
ID: Edm.String {id}
Name: Edm.String
Name: Edm.String
Jobtitle: Edm.String
Jobtitle: Edm.String
Department
Department
ID: Edm.String {id}
ID: Edm.String {id}
Name: Edm.String
Name: Edm.String
\*
Employees
\*...
1
Department
1...
Text is not SVG - cannot display
+![API-1](./images/api-1.drawio.svg) and @@ -381,7 +381,8 @@ Example 3: model for `api-2` with timeline entit application time), key properties marked with {id} ::: -
Employee_history
Employee_history
From: Edm.Date {id}
From: Edm.Date {id}
To: Edm.Date
To: Edm.Date
Name: Edm.String
Name: Edm.String
Jobtitle: Edm.String
Jobtitle: Edm.String
Department_history
Department_history
From: Edm.Date {id}
From: Edm.Date {id}
To: Edm.Date
To: Edm.Date
Name: Edm.String
Name: Edm.String
Budget: Edm.Decimal
Budget: Edm.Decimal
Employee
Employee
ID: Edm.String {id}
ID: Edm.String {id}
Department
Department
ID: Edm.String {id}
ID: Edm.String {id}
\*
Employees
\*...
\*
history
\*...
\*
history
\*...
1
Department
1...
Text is not SVG - cannot display
+![API-2](./images/api-2.drawio.svg) + ## 2.2 Example Data @@ -393,7 +394,7 @@ Example 4: simple storage model: object key in dark green, temporal sub-key in light green, foreign keys in orange, non-key fields in blue ::: -
Employee
Employee
ID: String {id}
ID: String {id}
From: Date {id}
From: Date {id}
To: Date
To: Date
Name: String
Name: String
Jobtitle: String
Jobtitle: String
Department.ID
Department.ID
Department
Department
ID: String {id}
ID: String {id}
From: Date {id}
From: Date {id}
To: Date
To: Date
Name: String
Name: String
Budget: Decimal
Budget: Decimal
1
1
Text is not SVG - cannot display
+![DB](./images/db.drawio.svg) The period start date is used as the temporal sub-key for identifying time slices together with the key of the temporal object. diff --git a/lib/build.js b/lib/build.js index ca1371e42..b538990d6 100644 --- a/lib/build.js +++ b/lib/build.js @@ -10,6 +10,13 @@ iterator(function (srcname, name, variant, meta) { fs.cpSync(`${__dirname}/../styles`, `${__dirname}/../docs/${name}/styles`, { recursive: true, }); + const srcImages = `${__dirname}/../${srcname}/images`; + if (fs.existsSync(srcImages)) { + const targetImages = `${__dirname}/../docs/${name}/images`; + if (fs.existsSync(targetImages)) + fs.rmSync(targetImages, { recursive: true }); + fs.cpSync(srcImages, targetImages, { recursive: true }); + } var md = fs.createWriteStream(`${__dirname}/../docs/${name}/${name}.md`); var html = pandoc({ "--metadata-file": `${__dirname}/../${srcname}/${variant}.yaml`, diff --git a/lib/server.js b/lib/server.js index c9e90dcae..4a77120ff 100644 --- a/lib/server.js +++ b/lib/server.js @@ -13,15 +13,16 @@ const connectLivereload = require("connect-livereload"); var app = express() .use(connectLivereload()) - .use("/styles", express.static(`${__dirname}/../styles`)) .get("/", function (_req, res, _next) { var docs = []; iterator(function (srcname, name, variant) { - docs.push(`
  • ${name}
  • `); + docs.push( + `
  • ${name}
  • ` + ); }); res.send(`

    Documents

      ${docs.join("")}
    `); }) - .get("/:doc", function (req, res, next) { + .get("/:doc/", function (req, res, next) { try { var branch = execSync("git branch --show-current", { cwd: __dirname, @@ -52,6 +53,14 @@ var app = express() } }); +iterator(function (srcname, name, variant) { + app.use(`/${srcname}/styles`, express.static(`${__dirname}/../styles`)); + app.use( + `/${srcname}/images`, + express.static(`${__dirname}/../${srcname}/images`) + ); +}); + if (module.parent) module.exports = app; else app.listen(8080, function () { diff --git a/odata-temporal-ext/2 Overview.md b/odata-temporal-ext/2 Overview.md index 3a4853bde..1ec00a67a 100644 --- a/odata-temporal-ext/2 Overview.md +++ b/odata-temporal-ext/2 Overview.md @@ -58,7 +58,7 @@ Example ##ex_api1: model for `api-1` with snapshot entity sets (hidden application time), key properties marked with {id} ::: -
    Employee
    Employee
    ID: Edm.String {id}
    ID: Edm.String {id}
    Name: Edm.String
    Name: Edm.String
    Jobtitle: Edm.String
    Jobtitle: Edm.String
    Department
    Department
    ID: Edm.String {id}
    ID: Edm.String {id}
    Name: Edm.String
    Name: Edm.String
    \*
    Employees
    \*...
    1
    Department
    1...
    Text is not SVG - cannot display
    +![API-1](./images/api-1.drawio.svg) and @@ -67,7 +67,8 @@ Example ##ex_api2: model for `api-2` with timeline entity sets (visible application time), key properties marked with {id} ::: -
    Employee_history
    Employee_history
    From: Edm.Date {id}
    From: Edm.Date {id}
    To: Edm.Date
    To: Edm.Date
    Name: Edm.String
    Name: Edm.String
    Jobtitle: Edm.String
    Jobtitle: Edm.String
    Department_history
    Department_history
    From: Edm.Date {id}
    From: Edm.Date {id}
    To: Edm.Date
    To: Edm.Date
    Name: Edm.String
    Name: Edm.String
    Budget: Edm.Decimal
    Budget: Edm.Decimal
    Employee
    Employee
    ID: Edm.String {id}
    ID: Edm.String {id}
    Department
    Department
    ID: Edm.String {id}
    ID: Edm.String {id}
    \*
    Employees
    \*...
    \*
    history
    \*...
    \*
    history
    \*...
    1
    Department
    1...
    Text is not SVG - cannot display
    +![API-2](./images/api-2.drawio.svg) + ## ##subsec Example Data @@ -79,7 +80,7 @@ Example ##ex: simple storage model: object key in dark green, temporal sub-key in light green, foreign keys in orange, non-key fields in blue ::: -
    Employee
    Employee
    ID: String {id}
    ID: String {id}
    From: Date {id}
    From: Date {id}
    To: Date
    To: Date
    Name: String
    Name: String
    Jobtitle: String
    Jobtitle: String
    Department.ID
    Department.ID
    Department
    Department
    ID: String {id}
    ID: String {id}
    From: Date {id}
    From: Date {id}
    To: Date
    To: Date
    Name: String
    Name: String
    Budget: Decimal
    Budget: Decimal
    1
    1
    Text is not SVG - cannot display
    +![DB](./images/db.drawio.svg) The period start date is used as the temporal sub-key for identifying time slices together with the key of the temporal object. diff --git a/odata-temporal-ext/diagrams/README.md b/odata-temporal-ext/diagrams/README.md deleted file mode 100644 index f3feb3edf..000000000 --- a/odata-temporal-ext/diagrams/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Diagrams in the [Draw.io](https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio) `example-model.drawio` file are exported as `*.svg` and then embedded into the `.md` files without changes. - -Note: star `*` characters in a diagram description needs to be escaped as `\*` to avoid -interpretation as markdown. diff --git a/odata-temporal-ext/diagrams/api-1.svg b/odata-temporal-ext/diagrams/api-1.svg deleted file mode 100644 index b17470763..000000000 --- a/odata-temporal-ext/diagrams/api-1.svg +++ /dev/null @@ -1 +0,0 @@ -
    Employee
    Employee
    ID: Edm.String {id}
    ID: Edm.String {id}
    Name: Edm.String
    Name: Edm.String
    Jobtitle: Edm.String
    Jobtitle: Edm.String
    Department
    Department
    ID: Edm.String {id}
    ID: Edm.String {id}
    Name: Edm.String
    Name: Edm.String
    \*
    Employees
    \*...
    1
    Department
    1...
    Text is not SVG - cannot display
    \ No newline at end of file diff --git a/odata-temporal-ext/diagrams/api-2.svg b/odata-temporal-ext/diagrams/api-2.svg deleted file mode 100644 index f832e2925..000000000 --- a/odata-temporal-ext/diagrams/api-2.svg +++ /dev/null @@ -1 +0,0 @@ -
    Employee_history
    Employee_history
    From: Edm.Date {id}
    From: Edm.Date {id}
    To: Edm.Date
    To: Edm.Date
    Name: Edm.String
    Name: Edm.String
    Jobtitle: Edm.String
    Jobtitle: Edm.String
    Department_history
    Department_history
    From: Edm.Date {id}
    From: Edm.Date {id}
    To: Edm.Date
    To: Edm.Date
    Name: Edm.String
    Name: Edm.String
    Budget: Edm.Decimal
    Budget: Edm.Decimal
    Employee
    Employee
    ID: Edm.String {id}
    ID: Edm.String {id}
    Department
    Department
    ID: Edm.String {id}
    ID: Edm.String {id}
    \*
    Employees
    \*...
    \*
    history
    \*...
    \*
    history
    \*...
    1
    Department
    1...
    Text is not SVG - cannot display
    \ No newline at end of file diff --git a/odata-temporal-ext/diagrams/db.svg b/odata-temporal-ext/diagrams/db.svg deleted file mode 100644 index 0cc58df72..000000000 --- a/odata-temporal-ext/diagrams/db.svg +++ /dev/null @@ -1 +0,0 @@ -
    Employee
    Employee
    ID: String {id}
    ID: String {id}
    From: Date {id}
    From: Date {id}
    To: Date
    To: Date
    Name: String
    Name: String
    Jobtitle: String
    Jobtitle: String
    Department.ID
    Department.ID
    Department
    Department
    ID: String {id}
    ID: String {id}
    From: Date {id}
    From: Date {id}
    To: Date
    To: Date
    Name: String
    Name: String
    Budget: Decimal
    Budget: Decimal
    1
    1
    Text is not SVG - cannot display
    \ No newline at end of file diff --git a/odata-temporal-ext/diagrams/example-model.drawio b/odata-temporal-ext/diagrams/example-model.drawio deleted file mode 100644 index 3e804637c..000000000 --- a/odata-temporal-ext/diagrams/example-model.drawio +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/odata-temporal-ext/images/api-1.drawio.svg b/odata-temporal-ext/images/api-1.drawio.svg new file mode 100644 index 000000000..6759c3c24 --- /dev/null +++ b/odata-temporal-ext/images/api-1.drawio.svg @@ -0,0 +1,186 @@ + + + + + + + + + +
    +
    +
    + Employee +
    +
    +
    +
    + + Employee + +
    +
    + + + +
    +
    +
    + ID: Edm.String {id} +
    +
    +
    +
    + + ID: Edm.String {id} + +
    +
    + + + +
    +
    +
    + Name: Edm.String +
    +
    +
    +
    + + Name: Edm.String + +
    +
    + + + +
    +
    +
    + Jobtitle: Edm.String +
    +
    +
    +
    + + Jobtitle: Edm.String + +
    +
    + + + + + + +
    +
    +
    + Department +
    +
    +
    +
    + + Department + +
    +
    + + + +
    +
    +
    + ID: Edm.String {id} +
    +
    +
    +
    + + ID: Edm.String {id} + +
    +
    + + + +
    +
    +
    + Name: Edm.String +
    +
    +
    +
    + + Name: Edm.String + +
    +
    + + + + + + +
    +
    +
    +
    + + * + +
    +
    + + Employees + +
    +
    +
    +
    +
    + + *... + +
    +
    + + + +
    +
    +
    +
    +
    + + 1 + +
    +
    + + Department + +
    +
    +
    +
    +
    +
    + + 1... + +
    +
    +
    + + + + + Text is not SVG - cannot display + + + +
    diff --git a/odata-temporal-ext/images/api-2.drawio.svg b/odata-temporal-ext/images/api-2.drawio.svg new file mode 100644 index 000000000..fc632b5c9 --- /dev/null +++ b/odata-temporal-ext/images/api-2.drawio.svg @@ -0,0 +1,355 @@ + + + + + + + + + +
    +
    +
    + Employee_history +
    +
    +
    +
    + + Employee_history + +
    +
    + + + +
    +
    +
    + From: Edm.Date {id} +
    +
    +
    +
    + + From: Edm.Date {id} + +
    +
    + + + +
    +
    +
    + To: Edm.Date +
    +
    +
    +
    + + To: Edm.Date + +
    +
    + + + +
    +
    +
    + Name: Edm.String +
    +
    +
    +
    + + Name: Edm.String + +
    +
    + + + +
    +
    +
    + Jobtitle: Edm.String +
    +
    +
    +
    + + Jobtitle: Edm.String + +
    +
    + + + + + + +
    +
    +
    + Department_history +
    +
    +
    +
    + + Department_history + +
    +
    + + + +
    +
    +
    + From: Edm.Date {id} +
    +
    +
    +
    + + From: Edm.Date {id} + +
    +
    + + + +
    +
    +
    + To: Edm.Date +
    +
    +
    +
    + + To: Edm.Date + +
    +
    + + + +
    +
    +
    + Name: Edm.String +
    +
    +
    +
    + + Name: Edm.String + +
    +
    + + + +
    +
    +
    + Budget: Edm.Decimal +
    +
    +
    +
    + + Budget: Edm.Decimal + +
    +
    + + + + + + +
    +
    +
    + Employee +
    +
    +
    +
    + + Employee + +
    +
    + + + +
    +
    +
    + ID: Edm.String {id} +
    +
    +
    +
    + + ID: Edm.String {id} + +
    +
    + + + + + + +
    +
    +
    + Department +
    +
    +
    +
    + + Department + +
    +
    + + + +
    +
    +
    + ID: Edm.String {id} +
    +
    +
    +
    + + ID: Edm.String {id} + +
    +
    + + + + + +
    +
    +
    +
    + + * + +
    +
    + + Employees + +
    +
    +
    +
    +
    + + *... + +
    +
    + + + + + +
    +
    +
    +
    + + * + +
    +
    + history +
    +
    +
    +
    +
    + + *... + +
    +
    + + + + + +
    +
    +
    +
    + + * + +
    +
    + history +
    +
    +
    +
    +
    + + *... + +
    +
    + + + +
    +
    +
    +
    +
    + + 1 + +
    +
    + + Department + +
    +
    +
    +
    +
    +
    + + 1... + +
    +
    + + +
    + + + + + Text is not SVG - cannot display + + + +
    diff --git a/odata-temporal-ext/images/db.drawio.svg b/odata-temporal-ext/images/db.drawio.svg new file mode 100644 index 000000000..555a9a428 --- /dev/null +++ b/odata-temporal-ext/images/db.drawio.svg @@ -0,0 +1,260 @@ + + + + + + + + + +
    +
    +
    + Employee +
    +
    +
    +
    + + Employee + +
    +
    + + + + +
    +
    +
    + ID: String {id} +
    +
    +
    +
    + + ID: String {id} + +
    +
    + + + + +
    +
    +
    + From: Date {id} +
    +
    +
    +
    + + From: Date {id} + +
    +
    + + + + +
    +
    +
    + To: Date +
    +
    +
    +
    + + To: Date + +
    +
    + + + + +
    +
    +
    + Name: String +
    +
    +
    +
    + + Name: String + +
    +
    + + + + +
    +
    +
    + Jobtitle: String +
    +
    +
    +
    + + Jobtitle: String + +
    +
    + + + + +
    +
    +
    + Department.ID +
    +
    +
    +
    + + Department.ID + +
    +
    + + + + + + +
    +
    +
    + Department +
    +
    +
    +
    + + Department + +
    +
    + + + + +
    +
    +
    + ID: String {id} +
    +
    +
    +
    + + ID: String {id} + +
    +
    + + + + +
    +
    +
    + From: Date {id} +
    +
    +
    +
    + + From: Date {id} + +
    +
    + + + + +
    +
    +
    + To: Date +
    +
    +
    +
    + + To: Date + +
    +
    + + + + +
    +
    +
    + Name: String +
    +
    +
    +
    + + Name: String + +
    +
    + + + + +
    +
    +
    + Budget: Decimal +
    +
    +
    +
    + + Budget: Decimal + +
    +
    + + + +
    +
    +
    +
    +
    + 1 +
    +
    +
    +
    +
    +
    + + 1 + +
    +
    + + +
    + + + + + Text is not SVG - cannot display + + + +
    From a26e3463acfb4360c5c2cf006c82af5574a5b136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Fri, 29 Sep 2023 10:39:50 +0200 Subject: [PATCH 10/74] Add slash if missing (#181) `app.get("/:doc/", ...)` is no different from `app.get("/:doc", ...)`. Both variants also serve requests like `/odata-csdl?variant=json`, but then the styles and images cannot be loaded. This PR redirects such a request to `/odata-csdl/?variant=json`. --- lib/server.js | 66 ++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/lib/server.js b/lib/server.js index 4a77120ff..c463ab948 100644 --- a/lib/server.js +++ b/lib/server.js @@ -17,39 +17,45 @@ var app = express() var docs = []; iterator(function (srcname, name, variant) { docs.push( - `
  • ${name}
  • ` + `
  • ${name}
  • `, ); }); res.send(`

    Documents

      ${docs.join("")}
    `); }) - .get("/:doc/", function (req, res, next) { - try { - var branch = execSync("git branch --show-current", { - cwd: __dirname, - }).toString(); - if (branch) req.query["-T"] = branch; - } catch (e) {} - try { - var number = new Number( - __dirname + "/../" + req.params.doc, - req.query.variant - ); - var meta = `${__dirname}/../${req.params.doc}/${ - req.query.variant || "meta" - }.yaml`; - delete req.query.variant; - res.type("html"); - var proc = pandoc({ - "--metadata-file": meta, - ...req.query, - }); - proc.stdout.pipe(res); - number.build(proc.stdin).catch((err) => { - console.error(); - console.error(err.join("\n")); - }); - } catch (err) { - next(); + .get("/:doc", function (req, res, next) { + if (req.path.endsWith("/")) { + try { + var branch = execSync("git branch --show-current", { + cwd: __dirname, + }).toString(); + if (branch) req.query["-T"] = branch; + } catch (e) {} + try { + var number = new Number( + __dirname + "/../" + req.params.doc, + req.query.variant, + ); + var meta = `${__dirname}/../${req.params.doc}/${ + req.query.variant || "meta" + }.yaml`; + delete req.query.variant; + res.type("html"); + var proc = pandoc({ + "--metadata-file": meta, + ...req.query, + }); + proc.stdout.pipe(res); + number.build(proc.stdin).catch((err) => { + console.error(); + console.error(err.join("\n")); + }); + } catch (err) { + next(); + } + } else { + var url = new URL("s://" + req.originalUrl); + url.pathname += "/"; + res.redirect(url.href.substring(4)); } }); @@ -57,7 +63,7 @@ iterator(function (srcname, name, variant) { app.use(`/${srcname}/styles`, express.static(`${__dirname}/../styles`)); app.use( `/${srcname}/images`, - express.static(`${__dirname}/../${srcname}/images`) + express.static(`${__dirname}/../${srcname}/images`), ); }); From 7a488a1168b99c07172aafcb837893010ba2ffcc Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Fri, 29 Sep 2023 11:34:28 +0200 Subject: [PATCH 11/74] strict routing instead of if (#182) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Got it to work 😄 --- lib/server.js | 70 +++++++++++++++++++++++++-------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/lib/server.js b/lib/server.js index c463ab948..8f1701479 100644 --- a/lib/server.js +++ b/lib/server.js @@ -11,7 +11,8 @@ liveReloadServer.watch(path.join(__dirname, "..")); const connectLivereload = require("connect-livereload"); -var app = express() +const app = express() + .enable("strict routing") .use(connectLivereload()) .get("/", function (_req, res, _next) { var docs = []; @@ -22,40 +23,39 @@ var app = express() }); res.send(`

    Documents

      ${docs.join("")}
    `); }) - .get("/:doc", function (req, res, next) { - if (req.path.endsWith("/")) { - try { - var branch = execSync("git branch --show-current", { - cwd: __dirname, - }).toString(); - if (branch) req.query["-T"] = branch; - } catch (e) {} - try { - var number = new Number( - __dirname + "/../" + req.params.doc, - req.query.variant, - ); - var meta = `${__dirname}/../${req.params.doc}/${ - req.query.variant || "meta" - }.yaml`; - delete req.query.variant; - res.type("html"); - var proc = pandoc({ - "--metadata-file": meta, - ...req.query, - }); - proc.stdout.pipe(res); - number.build(proc.stdin).catch((err) => { - console.error(); - console.error(err.join("\n")); - }); - } catch (err) { - next(); - } - } else { - var url = new URL("s://" + req.originalUrl); - url.pathname += "/"; - res.redirect(url.href.substring(4)); + .get("/:doc", function (req, res, _next) { + var url = new URL("s://" + req.originalUrl); + url.pathname += "/"; + res.redirect(url.href.substring(4)); + }) + .get("/:doc/", function (req, res, next) { + try { + var branch = execSync("git branch --show-current", { + cwd: __dirname, + }).toString(); + if (branch) req.query["-T"] = branch; + } catch (e) {} + try { + var number = new Number( + __dirname + "/../" + req.params.doc, + req.query.variant, + ); + var meta = `${__dirname}/../${req.params.doc}/${ + req.query.variant || "meta" + }.yaml`; + delete req.query.variant; + res.type("html"); + var proc = pandoc({ + "--metadata-file": meta, + ...req.query, + }); + proc.stdout.pipe(res); + number.build(proc.stdin).catch((err) => { + console.error(); + console.error(err.join("\n")); + }); + } catch (err) { + next(); } }); From 006e87ab97e6785b68b7cb11244f18222b310e66 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Fri, 29 Sep 2023 13:44:11 +0200 Subject: [PATCH 12/74] Liberation Sans in text of diagrams (#184) --- .../images/api-1.drawio.svg | 38 +++++----- .../images/api-2.drawio.svg | 74 +++++++++---------- docs/odata-temporal-ext/images/db.drawio.svg | 58 +++++++-------- odata-temporal-ext/images/api-1.drawio.svg | 38 +++++----- odata-temporal-ext/images/api-2.drawio.svg | 74 +++++++++---------- odata-temporal-ext/images/db.drawio.svg | 58 +++++++-------- 6 files changed, 170 insertions(+), 170 deletions(-) diff --git a/docs/odata-temporal-ext/images/api-1.drawio.svg b/docs/odata-temporal-ext/images/api-1.drawio.svg index 6759c3c24..d0414882c 100644 --- a/docs/odata-temporal-ext/images/api-1.drawio.svg +++ b/docs/odata-temporal-ext/images/api-1.drawio.svg @@ -1,4 +1,4 @@ - + @@ -9,13 +9,13 @@
    -
    +
    Employee
    - + Employee @@ -25,13 +25,13 @@
    -
    +
    ID: Edm.String {id}
    - + ID: Edm.String {id} @@ -41,13 +41,13 @@
    -
    +
    Name: Edm.String
    - + Name: Edm.String @@ -57,13 +57,13 @@
    -
    +
    Jobtitle: Edm.String
    - + Jobtitle: Edm.String @@ -76,13 +76,13 @@
    -
    +
    Department
    - + Department @@ -92,13 +92,13 @@
    -
    +
    ID: Edm.String {id}
    - + ID: Edm.String {id} @@ -108,13 +108,13 @@
    -
    +
    Name: Edm.String
    - + Name: Edm.String @@ -127,7 +127,7 @@
    -
    +
    * @@ -142,7 +142,7 @@
    - + *... @@ -152,7 +152,7 @@
    -
    +
    @@ -169,7 +169,7 @@
    - + 1... diff --git a/docs/odata-temporal-ext/images/api-2.drawio.svg b/docs/odata-temporal-ext/images/api-2.drawio.svg index fc632b5c9..b4cfe12b8 100644 --- a/docs/odata-temporal-ext/images/api-2.drawio.svg +++ b/docs/odata-temporal-ext/images/api-2.drawio.svg @@ -1,4 +1,4 @@ - + @@ -9,13 +9,13 @@
    -
    +
    Employee_history
    - + Employee_history @@ -25,13 +25,13 @@
    -
    +
    From: Edm.Date {id}
    - + From: Edm.Date {id} @@ -41,13 +41,13 @@
    -
    +
    To: Edm.Date
    - + To: Edm.Date @@ -57,13 +57,13 @@
    -
    +
    Name: Edm.String
    - + Name: Edm.String @@ -73,13 +73,13 @@
    -
    +
    Jobtitle: Edm.String
    - + Jobtitle: Edm.String @@ -92,13 +92,13 @@
    -
    +
    Department_history
    - + Department_history @@ -108,13 +108,13 @@
    -
    +
    From: Edm.Date {id}
    - + From: Edm.Date {id} @@ -124,13 +124,13 @@
    -
    +
    To: Edm.Date
    - + To: Edm.Date @@ -140,13 +140,13 @@
    -
    +
    Name: Edm.String
    - + Name: Edm.String @@ -156,13 +156,13 @@
    -
    +
    Budget: Edm.Decimal
    - + Budget: Edm.Decimal @@ -175,13 +175,13 @@
    -
    +
    Employee
    - + Employee @@ -191,13 +191,13 @@
    -
    +
    ID: Edm.String {id}
    - + ID: Edm.String {id} @@ -210,13 +210,13 @@
    -
    +
    Department
    - + Department @@ -226,13 +226,13 @@
    -
    +
    ID: Edm.String {id}
    - + ID: Edm.String {id} @@ -244,7 +244,7 @@
    -
    +
    * @@ -259,7 +259,7 @@
    - + *... @@ -271,7 +271,7 @@
    -
    +
    * @@ -284,7 +284,7 @@
    - + *... @@ -296,7 +296,7 @@
    -
    +
    * @@ -309,7 +309,7 @@
    - + *... @@ -319,7 +319,7 @@
    -
    +
    @@ -336,7 +336,7 @@
    - + 1... diff --git a/docs/odata-temporal-ext/images/db.drawio.svg b/docs/odata-temporal-ext/images/db.drawio.svg index 555a9a428..e1fa16baf 100644 --- a/docs/odata-temporal-ext/images/db.drawio.svg +++ b/docs/odata-temporal-ext/images/db.drawio.svg @@ -1,4 +1,4 @@ - + @@ -9,13 +9,13 @@
    -
    +
    Employee
    - + Employee @@ -26,13 +26,13 @@
    -
    +
    ID: String {id}
    - + ID: String {id} @@ -43,13 +43,13 @@
    -
    +
    From: Date {id}
    - + From: Date {id} @@ -60,13 +60,13 @@
    -
    +
    To: Date
    - + To: Date @@ -77,13 +77,13 @@
    -
    +
    Name: String
    - + Name: String @@ -94,13 +94,13 @@
    -
    +
    Jobtitle: String
    - + Jobtitle: String @@ -111,13 +111,13 @@
    -
    +
    Department.ID
    - + Department.ID @@ -130,13 +130,13 @@
    -
    +
    Department
    - + Department @@ -147,13 +147,13 @@
    -
    +
    ID: String {id}
    - + ID: String {id} @@ -164,13 +164,13 @@
    -
    +
    From: Date {id}
    - + From: Date {id} @@ -181,13 +181,13 @@
    -
    +
    To: Date
    - + To: Date @@ -198,13 +198,13 @@
    -
    +
    Name: String
    - + Name: String @@ -215,13 +215,13 @@
    -
    +
    Budget: Decimal
    - + Budget: Decimal @@ -231,7 +231,7 @@
    -
    +
    1 @@ -241,7 +241,7 @@
    - + 1 diff --git a/odata-temporal-ext/images/api-1.drawio.svg b/odata-temporal-ext/images/api-1.drawio.svg index 6759c3c24..d0414882c 100644 --- a/odata-temporal-ext/images/api-1.drawio.svg +++ b/odata-temporal-ext/images/api-1.drawio.svg @@ -1,4 +1,4 @@ - + @@ -9,13 +9,13 @@
    -
    +
    Employee
    - + Employee @@ -25,13 +25,13 @@
    -
    +
    ID: Edm.String {id}
    - + ID: Edm.String {id} @@ -41,13 +41,13 @@
    -
    +
    Name: Edm.String
    - + Name: Edm.String @@ -57,13 +57,13 @@
    -
    +
    Jobtitle: Edm.String
    - + Jobtitle: Edm.String @@ -76,13 +76,13 @@
    -
    +
    Department
    - + Department @@ -92,13 +92,13 @@
    -
    +
    ID: Edm.String {id}
    - + ID: Edm.String {id} @@ -108,13 +108,13 @@
    -
    +
    Name: Edm.String
    - + Name: Edm.String @@ -127,7 +127,7 @@
    -
    +
    * @@ -142,7 +142,7 @@
    - + *... @@ -152,7 +152,7 @@
    -
    +
    @@ -169,7 +169,7 @@
    - + 1... diff --git a/odata-temporal-ext/images/api-2.drawio.svg b/odata-temporal-ext/images/api-2.drawio.svg index fc632b5c9..b4cfe12b8 100644 --- a/odata-temporal-ext/images/api-2.drawio.svg +++ b/odata-temporal-ext/images/api-2.drawio.svg @@ -1,4 +1,4 @@ - + @@ -9,13 +9,13 @@
    -
    +
    Employee_history
    - + Employee_history @@ -25,13 +25,13 @@
    -
    +
    From: Edm.Date {id}
    - + From: Edm.Date {id} @@ -41,13 +41,13 @@
    -
    +
    To: Edm.Date
    - + To: Edm.Date @@ -57,13 +57,13 @@
    -
    +
    Name: Edm.String
    - + Name: Edm.String @@ -73,13 +73,13 @@
    -
    +
    Jobtitle: Edm.String
    - + Jobtitle: Edm.String @@ -92,13 +92,13 @@
    -
    +
    Department_history
    - + Department_history @@ -108,13 +108,13 @@
    -
    +
    From: Edm.Date {id}
    - + From: Edm.Date {id} @@ -124,13 +124,13 @@
    -
    +
    To: Edm.Date
    - + To: Edm.Date @@ -140,13 +140,13 @@
    -
    +
    Name: Edm.String
    - + Name: Edm.String @@ -156,13 +156,13 @@
    -
    +
    Budget: Edm.Decimal
    - + Budget: Edm.Decimal @@ -175,13 +175,13 @@
    -
    +
    Employee
    - + Employee @@ -191,13 +191,13 @@
    -
    +
    ID: Edm.String {id}
    - + ID: Edm.String {id} @@ -210,13 +210,13 @@
    -
    +
    Department
    - + Department @@ -226,13 +226,13 @@
    -
    +
    ID: Edm.String {id}
    - + ID: Edm.String {id} @@ -244,7 +244,7 @@
    -
    +
    * @@ -259,7 +259,7 @@
    - + *... @@ -271,7 +271,7 @@
    -
    +
    * @@ -284,7 +284,7 @@
    - + *... @@ -296,7 +296,7 @@
    -
    +
    * @@ -309,7 +309,7 @@
    - + *... @@ -319,7 +319,7 @@
    -
    +
    @@ -336,7 +336,7 @@
    - + 1... diff --git a/odata-temporal-ext/images/db.drawio.svg b/odata-temporal-ext/images/db.drawio.svg index 555a9a428..e1fa16baf 100644 --- a/odata-temporal-ext/images/db.drawio.svg +++ b/odata-temporal-ext/images/db.drawio.svg @@ -1,4 +1,4 @@ - + @@ -9,13 +9,13 @@
    -
    +
    Employee
    - + Employee @@ -26,13 +26,13 @@
    -
    +
    ID: String {id}
    - + ID: String {id} @@ -43,13 +43,13 @@
    -
    +
    From: Date {id}
    - + From: Date {id} @@ -60,13 +60,13 @@
    -
    +
    To: Date
    - + To: Date @@ -77,13 +77,13 @@
    -
    +
    Name: String
    - + Name: String @@ -94,13 +94,13 @@
    -
    +
    Jobtitle: String
    - + Jobtitle: String @@ -111,13 +111,13 @@
    -
    +
    Department.ID
    - + Department.ID @@ -130,13 +130,13 @@
    -
    +
    Department
    - + Department @@ -147,13 +147,13 @@
    -
    +
    ID: String {id}
    - + ID: String {id} @@ -164,13 +164,13 @@
    -
    +
    From: Date {id}
    - + From: Date {id} @@ -181,13 +181,13 @@
    -
    +
    To: Date
    - + To: Date @@ -198,13 +198,13 @@
    -
    +
    Name: String
    - + Name: String @@ -215,13 +215,13 @@
    -
    +
    Budget: Decimal
    - + Budget: Decimal @@ -231,7 +231,7 @@
    -
    +
    1 @@ -241,7 +241,7 @@
    - + 1 From b2216a5b947bec83ea1de2acd4b4739bff14d71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Fri, 29 Sep 2023 14:57:31 +0200 Subject: [PATCH 13/74] Improvements to the web server (#183) --- .../odata-temporal-ext.html | 807 +++++++++++++++++- docs/odata-temporal-ext/odata-temporal-ext.md | 805 ++++++++++++++++- lib/README.md | 7 +- lib/number.js | 35 +- lib/server.js | 15 +- odata-temporal-ext/2 Overview.md | 7 +- .../diagrams}/api-1.drawio.svg | 0 .../diagrams}/api-2.drawio.svg | 0 .../diagrams}/db.drawio.svg | 0 odata-temporal-ext/images/api-1.drawio.svg | 186 ---- odata-temporal-ext/images/api-2.drawio.svg | 355 -------- odata-temporal-ext/images/db.drawio.svg | 260 ------ 12 files changed, 1643 insertions(+), 834 deletions(-) rename {docs/odata-temporal-ext/images => odata-temporal-ext/diagrams}/api-1.drawio.svg (100%) rename {docs/odata-temporal-ext/images => odata-temporal-ext/diagrams}/api-2.drawio.svg (100%) rename {docs/odata-temporal-ext/images => odata-temporal-ext/diagrams}/db.drawio.svg (100%) delete mode 100644 odata-temporal-ext/images/api-1.drawio.svg delete mode 100644 odata-temporal-ext/images/api-2.drawio.svg delete mode 100644 odata-temporal-ext/images/db.drawio.svg diff --git a/docs/odata-temporal-ext/odata-temporal-ext.html b/docs/odata-temporal-ext/odata-temporal-ext.html index 920e06732..d9960b80f 100644 --- a/docs/odata-temporal-ext/odata-temporal-ext.html +++ b/docs/odata-temporal-ext/odata-temporal-ext.html @@ -330,18 +330,819 @@

    2.1 Exampl

    Example 2: model for api-1 with snapshot entity sets (hidden application time), key properties marked with {id}

    -

    API-1

    + + + + + + + + + +
    +
    +
    + Employee +
    +
    +
    +
    + + Employee + +
    +
    + + + +
    +
    +
    + ID: Edm.String {id} +
    +
    +
    +
    + + ID: Edm.String {id} + +
    +
    + + + +
    +
    +
    + Name: Edm.String +
    +
    +
    +
    + + Name: Edm.String + +
    +
    + + + +
    +
    +
    + Jobtitle: Edm.String +
    +
    +
    +
    + + Jobtitle: Edm.String + +
    +
    + + + + + + +
    +
    +
    + Department +
    +
    +
    +
    + + Department + +
    +
    + + + +
    +
    +
    + ID: Edm.String {id} +
    +
    +
    +
    + + ID: Edm.String {id} + +
    +
    + + + +
    +
    +
    + Name: Edm.String +
    +
    +
    +
    + + Name: Edm.String + +
    +
    + + + + + + +
    +
    +
    +
    + + * + +
    +
    + + Employees + +
    +
    +
    +
    +
    + + *... + +
    +
    + + + +
    +
    +
    +
    +
    + + 1 + +
    +
    + + Department + +
    +
    +
    +
    +
    +
    + + 1... + +
    +
    +
    + + + + + Text is not SVG - cannot display + + + +
    +

    and

    Example 3: model for api-2 with timeline entity sets (visible application time), key properties marked with {id}

    -

    API-2

    + + + + + + + + + +
    +
    +
    + Employee_history +
    +
    +
    +
    + + Employee_history + +
    +
    + + + +
    +
    +
    + From: Edm.Date {id} +
    +
    +
    +
    + + From: Edm.Date {id} + +
    +
    + + + +
    +
    +
    + To: Edm.Date +
    +
    +
    +
    + + To: Edm.Date + +
    +
    + + + +
    +
    +
    + Name: Edm.String +
    +
    +
    +
    + + Name: Edm.String + +
    +
    + + + +
    +
    +
    + Jobtitle: Edm.String +
    +
    +
    +
    + + Jobtitle: Edm.String + +
    +
    + + + + + + +
    +
    +
    + Department_history +
    +
    +
    +
    + + Department_history + +
    +
    + + + +
    +
    +
    + From: Edm.Date {id} +
    +
    +
    +
    + + From: Edm.Date {id} + +
    +
    + + + +
    +
    +
    + To: Edm.Date +
    +
    +
    +
    + + To: Edm.Date + +
    +
    + + + +
    +
    +
    + Name: Edm.String +
    +
    +
    +
    + + Name: Edm.String + +
    +
    + + + +
    +
    +
    + Budget: Edm.Decimal +
    +
    +
    +
    + + Budget: Edm.Decimal + +
    +
    + + + + + + +
    +
    +
    + Employee +
    +
    +
    +
    + + Employee + +
    +
    + + + +
    +
    +
    + ID: Edm.String {id} +
    +
    +
    +
    + + ID: Edm.String {id} + +
    +
    + + + + + + +
    +
    +
    + Department +
    +
    +
    +
    + + Department + +
    +
    + + + +
    +
    +
    + ID: Edm.String {id} +
    +
    +
    +
    + + ID: Edm.String {id} + +
    +
    + + + + + +
    +
    +
    +
    + + * + +
    +
    + + Employees + +
    +
    +
    +
    +
    + + *... + +
    +
    + + + + + +
    +
    +
    +
    + + * + +
    +
    + history +
    +
    +
    +
    +
    + + *... + +
    +
    + + + + + +
    +
    +
    +
    + + * + +
    +
    + history +
    +
    +
    +
    +
    + + *... + +
    +
    + + + +
    +
    +
    +
    +
    + + 1 + +
    +
    + + Department + +
    +
    +
    +
    +
    +
    + + 1... + +
    +
    + + +
    + + + + + Text is not SVG - cannot display + + + +
    +

    2.2 Example Data

    Both API models in the previous section are views on the same underlying data. A possible storage model for this data is:

    Example 4: simple storage model: object key in dark green, temporal sub-key in light green, foreign keys in orange, non-key fields in blue

    -

    DB

    + + + + + + + + + +
    +
    +
    + Employee +
    +
    +
    +
    + + Employee + +
    +
    + + + + +
    +
    +
    + ID: String {id} +
    +
    +
    +
    + + ID: String {id} + +
    +
    + + + + +
    +
    +
    + From: Date {id} +
    +
    +
    +
    + + From: Date {id} + +
    +
    + + + + +
    +
    +
    + To: Date +
    +
    +
    +
    + + To: Date + +
    +
    + + + + +
    +
    +
    + Name: String +
    +
    +
    +
    + + Name: String + +
    +
    + + + + +
    +
    +
    + Jobtitle: String +
    +
    +
    +
    + + Jobtitle: String + +
    +
    + + + + +
    +
    +
    + Department.ID +
    +
    +
    +
    + + Department.ID + +
    +
    + + + + + + +
    +
    +
    + Department +
    +
    +
    +
    + + Department + +
    +
    + + + + +
    +
    +
    + ID: String {id} +
    +
    +
    +
    + + ID: String {id} + +
    +
    + + + + +
    +
    +
    + From: Date {id} +
    +
    +
    +
    + + From: Date {id} + +
    +
    + + + + +
    +
    +
    + To: Date +
    +
    +
    +
    + + To: Date + +
    +
    + + + + +
    +
    +
    + Name: String +
    +
    +
    +
    + + Name: String + +
    +
    + + + + +
    +
    +
    + Budget: Decimal +
    +
    +
    +
    + + Budget: Decimal + +
    +
    + + + +
    +
    +
    +
    +
    + 1 +
    +
    +
    +
    +
    +
    + + 1 + +
    +
    + + +
    + + + + + Text is not SVG - cannot display + + + +
    +

    The period start date is used as the temporal sub-key for identifying time slices together with the key of the temporal object.

    Note: alternatively, the period end date could have been used as temporal sub-key, or the primary key of the time slice tables could have been an artificial key (sequence number, UUID, ...) with both the temporal object key and the period boundaries as non-key fields.

    The following example data will be used to further illustrate the capabilities introduced by this extension. It assumes that the example services only support four-digit years.

    diff --git a/docs/odata-temporal-ext/odata-temporal-ext.md b/docs/odata-temporal-ext/odata-temporal-ext.md index 067818a30..3c033c901 100644 --- a/docs/odata-temporal-ext/odata-temporal-ext.md +++ b/docs/odata-temporal-ext/odata-temporal-ext.md @@ -372,7 +372,192 @@ Example 2: model for `api-1` with snapshot entit application time), key properties marked with {id} ::: -![API-1](./images/api-1.drawio.svg) + + + + + + + + + +
    +
    +
    + Employee +
    +
    +
    +
    + + Employee + +
    +
    + + + +
    +
    +
    + ID: Edm.String {id} +
    +
    +
    +
    + + ID: Edm.String {id} + +
    +
    + + + +
    +
    +
    + Name: Edm.String +
    +
    +
    +
    + + Name: Edm.String + +
    +
    + + + +
    +
    +
    + Jobtitle: Edm.String +
    +
    +
    +
    + + Jobtitle: Edm.String + +
    +
    + + + + + + +
    +
    +
    + Department +
    +
    +
    +
    + + Department + +
    +
    + + + +
    +
    +
    + ID: Edm.String {id} +
    +
    +
    +
    + + ID: Edm.String {id} + +
    +
    + + + +
    +
    +
    + Name: Edm.String +
    +
    +
    +
    + + Name: Edm.String + +
    +
    + + + + + + +
    +
    +
    +
    + + * + +
    +
    + + Employees + +
    +
    +
    +
    +
    + + *... + +
    +
    + + + +
    +
    +
    +
    +
    + + 1 + +
    +
    + + Department + +
    +
    +
    +
    +
    +
    + + 1... + +
    +
    +
    + + + + + Text is not SVG - cannot display + + + +
    and @@ -381,8 +566,361 @@ Example 3: model for `api-2` with timeline entit application time), key properties marked with {id} ::: -![API-2](./images/api-2.drawio.svg) - + + + + + + + + + +
    +
    +
    + Employee_history +
    +
    +
    +
    + + Employee_history + +
    +
    + + + +
    +
    +
    + From: Edm.Date {id} +
    +
    +
    +
    + + From: Edm.Date {id} + +
    +
    + + + +
    +
    +
    + To: Edm.Date +
    +
    +
    +
    + + To: Edm.Date + +
    +
    + + + +
    +
    +
    + Name: Edm.String +
    +
    +
    +
    + + Name: Edm.String + +
    +
    + + + +
    +
    +
    + Jobtitle: Edm.String +
    +
    +
    +
    + + Jobtitle: Edm.String + +
    +
    + + + + + + +
    +
    +
    + Department_history +
    +
    +
    +
    + + Department_history + +
    +
    + + + +
    +
    +
    + From: Edm.Date {id} +
    +
    +
    +
    + + From: Edm.Date {id} + +
    +
    + + + +
    +
    +
    + To: Edm.Date +
    +
    +
    +
    + + To: Edm.Date + +
    +
    + + + +
    +
    +
    + Name: Edm.String +
    +
    +
    +
    + + Name: Edm.String + +
    +
    + + + +
    +
    +
    + Budget: Edm.Decimal +
    +
    +
    +
    + + Budget: Edm.Decimal + +
    +
    + + + + + + +
    +
    +
    + Employee +
    +
    +
    +
    + + Employee + +
    +
    + + + +
    +
    +
    + ID: Edm.String {id} +
    +
    +
    +
    + + ID: Edm.String {id} + +
    +
    + + + + + + +
    +
    +
    + Department +
    +
    +
    +
    + + Department + +
    +
    + + + +
    +
    +
    + ID: Edm.String {id} +
    +
    +
    +
    + + ID: Edm.String {id} + +
    +
    + + + + + +
    +
    +
    +
    + + * + +
    +
    + + Employees + +
    +
    +
    +
    +
    + + *... + +
    +
    + + + + + +
    +
    +
    +
    + + * + +
    +
    + history +
    +
    +
    +
    +
    + + *... + +
    +
    + + + + + +
    +
    +
    +
    + + * + +
    +
    + history +
    +
    +
    +
    +
    + + *... + +
    +
    + + + +
    +
    +
    +
    +
    + + 1 + +
    +
    + + Department + +
    +
    +
    +
    +
    +
    + + 1... + +
    +
    + + +
    + + + + + Text is not SVG - cannot display + + + +
    ## 2.2 Example Data @@ -394,7 +932,266 @@ Example 4: simple storage model: object key in dark green, temporal sub-key in light green, foreign keys in orange, non-key fields in blue ::: -![DB](./images/db.drawio.svg) + + + + + + + + + +
    +
    +
    + Employee +
    +
    +
    +
    + + Employee + +
    +
    + + + + +
    +
    +
    + ID: String {id} +
    +
    +
    +
    + + ID: String {id} + +
    +
    + + + + +
    +
    +
    + From: Date {id} +
    +
    +
    +
    + + From: Date {id} + +
    +
    + + + + +
    +
    +
    + To: Date +
    +
    +
    +
    + + To: Date + +
    +
    + + + + +
    +
    +
    + Name: String +
    +
    +
    +
    + + Name: String + +
    +
    + + + + +
    +
    +
    + Jobtitle: String +
    +
    +
    +
    + + Jobtitle: String + +
    +
    + + + + +
    +
    +
    + Department.ID +
    +
    +
    +
    + + Department.ID + +
    +
    + + + + + + +
    +
    +
    + Department +
    +
    +
    +
    + + Department + +
    +
    + + + + +
    +
    +
    + ID: String {id} +
    +
    +
    +
    + + ID: String {id} + +
    +
    + + + + +
    +
    +
    + From: Date {id} +
    +
    +
    +
    + + From: Date {id} + +
    +
    + + + + +
    +
    +
    + To: Date +
    +
    +
    +
    + + To: Date + +
    +
    + + + + +
    +
    +
    + Name: String +
    +
    +
    +
    + + Name: String + +
    +
    + + + + +
    +
    +
    + Budget: Decimal +
    +
    +
    +
    + + Budget: Decimal + +
    +
    + + + +
    +
    +
    +
    +
    + 1 +
    +
    +
    +
    +
    +
    + + 1 + +
    +
    + + +
    + + + + + Text is not SVG - cannot display + + + +
    The period start date is used as the temporal sub-key for identifying time slices together with the key of the temporal object. diff --git a/lib/README.md b/lib/README.md index 116dac314..40483f2b7 100644 --- a/lib/README.md +++ b/lib/README.md @@ -22,6 +22,7 @@ The [`number.js`](number.js) module generates a single Markdown document by prep - Generate section and example numbers - Generate a table of contents - Resolve references +- Include files like `$$$include images/drawing.svg$$$` - Replace placeholders like `$$$pagetitle$$$` with values from a [`meta.yaml`](../odata-data-aggregation-ext/meta.yaml) file - Join multiple lines that end with a single space into one line - Sections of the file between `: varXXX` and `:` or between `::: {.varXXX ...}` and `:::` belong to a variant. One source file can contain several variants. @@ -89,7 +90,11 @@ The [`pdf.js`](pdf.js) module uses a headless browser ([`puppeteer`](https://git The following scripts can be executed manually or as part of a GitHub Action: -- [`npm run build`](build.js) runs the conversion and writes the Markdown output as well as the HTML output into the [`docs/*`](../docs) folder. +- [`npm run build`](build.js) runs the conversion and writes the following into the [`docs/*`](../docs) folder: + - the Markdown output + - the HTML output + - a copy of the common [`styles`](../styles) folder + - a copy of the document-specific `*/images` folder, if this exists. - [`npm run pdf`](build-pdf.mjs) runs the PDF conversion and writes the PDF document into the [`docs/*`](../docs) folder. - [`npm test`](../test) runs a test suite. diff --git a/lib/number.js b/lib/number.js index 2d8efa6fa..a1c9357dd 100644 --- a/lib/number.js +++ b/lib/number.js @@ -15,7 +15,7 @@ class Number { this.meta = meta || yaml.load( - fs.readFileSync(dir + "/" + (this.variant || "meta") + ".yaml") + fs.readFileSync(dir + "/" + (this.variant || "meta") + ".yaml"), ); } @@ -71,7 +71,7 @@ class Number { this.toc[m[1]] = { sub: [] }; if (m[1].endsWith("sec")) { m = line.match( - / ##([A-Za-z0-9.]+)(?:_[A-Za-z0-9]+)?\s+(.+)$/ + / ##([A-Za-z0-9.]+)(?:_[A-Za-z0-9]+)?\s+(.+)$/, ); m[3] = m[2].replace(/[^A-Za-z0-9]/g, ""); } @@ -112,10 +112,10 @@ class Number { } this.match++; } - }.bind(this) + }.bind(this), ) .on("close", resolve); - }.bind(this) + }.bind(this), ); } @@ -134,19 +134,28 @@ class Number { function (line) { lineno++; if (this.skip(line)) return; - var m1 = line.match(/^\$\$\$(.*?isec)\$\$\$$/); + var m1 = line.match(/^\$\$\$include\s+(.*?)\$\$\$\s*$/); + if (m1) { + try { + out.write(fs.readFileSync(this.dir + "/" + m1[1])); + } catch (e) { + this.errors.push(e); + } + return; + } + m1 = line.match(/^\$\$\$(.*?isec)\$\$\$\s*$/); if (m1) this.tableofcontents(this.toc[m1[1]]?.sub || [], out, ""); else { line = line.replace( /\$\$\$(.*?)\$\$\$/g, function (m, p) { return this.meta[p] || m; - }.bind(this) + }.bind(this), ); for (var m, regex = /\]\(#(.*?)\)/g; (m = regex.exec(line)); ) if (!this.refs[m[1]]) this.errors.push( - `${this.dir}/${file}(${lineno}): Undefined link #${m[1]}` + `${this.dir}/${file}(${lineno}): Undefined link #${m[1]}`, ); m = line.match(/ ##([A-Za-z0-9.]+)(_([A-Za-z0-9]+))?/); var outline = line; @@ -171,19 +180,19 @@ class Number { if (r) return `${r}](#${p})`; else { this.errors.push( - `${this.dir}/${file}(${lineno}): Undefined link ##${p}` + `${this.dir}/${file}(${lineno}): Undefined link ##${p}`, ); return `~~${p}~~]`; } - }.bind(this) - ) + }.bind(this), + ), ); if (!/\S\s$/.test(line)) out.write("\n"); } - }.bind(this) + }.bind(this), ) .on("close", resolve); - }.bind(this) + }.bind(this), ); } @@ -192,7 +201,7 @@ class Number { out.write( `${indent}- [${ s.number.startsWith("i") ? "" : s.number + " " - }${s.name.replace(/,? $/, "")}](#${s.href})\n` + }${s.name.replace(/,? $/, "")}](#${s.href})\n`, ); this.tableofcontents(s.sub, out, indent + " "); } diff --git a/lib/server.js b/lib/server.js index 8f1701479..07961651a 100644 --- a/lib/server.js +++ b/lib/server.js @@ -10,6 +10,7 @@ const liveReloadServer = livereload.createServer({ extraExts: ["md"] }); liveReloadServer.watch(path.join(__dirname, "..")); const connectLivereload = require("connect-livereload"); +const statics = { images: {} }; const app = express() .enable("strict routing") @@ -57,16 +58,14 @@ const app = express() } catch (err) { next(); } + }) + .use("/:doc/styles", express.static(`${__dirname}/../styles`)) + .use("/:doc/images", function (req, res, next) { + (statics.images[req.params.doc] ||= express.static( + `${__dirname}/../${req.params.doc}/images`, + ))(req, res, next); }); -iterator(function (srcname, name, variant) { - app.use(`/${srcname}/styles`, express.static(`${__dirname}/../styles`)); - app.use( - `/${srcname}/images`, - express.static(`${__dirname}/../${srcname}/images`), - ); -}); - if (module.parent) module.exports = app; else app.listen(8080, function () { diff --git a/odata-temporal-ext/2 Overview.md b/odata-temporal-ext/2 Overview.md index 1ec00a67a..160f42f93 100644 --- a/odata-temporal-ext/2 Overview.md +++ b/odata-temporal-ext/2 Overview.md @@ -58,7 +58,7 @@ Example ##ex_api1: model for `api-1` with snapshot entity sets (hidden application time), key properties marked with {id} ::: -![API-1](./images/api-1.drawio.svg) +$$$include diagrams/api-1.drawio.svg$$$ and @@ -67,8 +67,7 @@ Example ##ex_api2: model for `api-2` with timeline entity sets (visible application time), key properties marked with {id} ::: -![API-2](./images/api-2.drawio.svg) - +$$$include diagrams/api-2.drawio.svg$$$ ## ##subsec Example Data @@ -80,7 +79,7 @@ Example ##ex: simple storage model: object key in dark green, temporal sub-key in light green, foreign keys in orange, non-key fields in blue ::: -![DB](./images/db.drawio.svg) +$$$include diagrams/db.drawio.svg$$$ The period start date is used as the temporal sub-key for identifying time slices together with the key of the temporal object. diff --git a/docs/odata-temporal-ext/images/api-1.drawio.svg b/odata-temporal-ext/diagrams/api-1.drawio.svg similarity index 100% rename from docs/odata-temporal-ext/images/api-1.drawio.svg rename to odata-temporal-ext/diagrams/api-1.drawio.svg diff --git a/docs/odata-temporal-ext/images/api-2.drawio.svg b/odata-temporal-ext/diagrams/api-2.drawio.svg similarity index 100% rename from docs/odata-temporal-ext/images/api-2.drawio.svg rename to odata-temporal-ext/diagrams/api-2.drawio.svg diff --git a/docs/odata-temporal-ext/images/db.drawio.svg b/odata-temporal-ext/diagrams/db.drawio.svg similarity index 100% rename from docs/odata-temporal-ext/images/db.drawio.svg rename to odata-temporal-ext/diagrams/db.drawio.svg diff --git a/odata-temporal-ext/images/api-1.drawio.svg b/odata-temporal-ext/images/api-1.drawio.svg deleted file mode 100644 index d0414882c..000000000 --- a/odata-temporal-ext/images/api-1.drawio.svg +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - -
    -
    -
    - Employee -
    -
    -
    -
    - - Employee - -
    -
    - - - -
    -
    -
    - ID: Edm.String {id} -
    -
    -
    -
    - - ID: Edm.String {id} - -
    -
    - - - -
    -
    -
    - Name: Edm.String -
    -
    -
    -
    - - Name: Edm.String - -
    -
    - - - -
    -
    -
    - Jobtitle: Edm.String -
    -
    -
    -
    - - Jobtitle: Edm.String - -
    -
    - - - - - - -
    -
    -
    - Department -
    -
    -
    -
    - - Department - -
    -
    - - - -
    -
    -
    - ID: Edm.String {id} -
    -
    -
    -
    - - ID: Edm.String {id} - -
    -
    - - - -
    -
    -
    - Name: Edm.String -
    -
    -
    -
    - - Name: Edm.String - -
    -
    - - - - - - -
    -
    -
    -
    - - * - -
    -
    - - Employees - -
    -
    -
    -
    -
    - - *... - -
    -
    - - - -
    -
    -
    -
    -
    - - 1 - -
    -
    - - Department - -
    -
    -
    -
    -
    -
    - - 1... - -
    -
    -
    - - - - - Text is not SVG - cannot display - - - -
    diff --git a/odata-temporal-ext/images/api-2.drawio.svg b/odata-temporal-ext/images/api-2.drawio.svg deleted file mode 100644 index b4cfe12b8..000000000 --- a/odata-temporal-ext/images/api-2.drawio.svg +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - - - - -
    -
    -
    - Employee_history -
    -
    -
    -
    - - Employee_history - -
    -
    - - - -
    -
    -
    - From: Edm.Date {id} -
    -
    -
    -
    - - From: Edm.Date {id} - -
    -
    - - - -
    -
    -
    - To: Edm.Date -
    -
    -
    -
    - - To: Edm.Date - -
    -
    - - - -
    -
    -
    - Name: Edm.String -
    -
    -
    -
    - - Name: Edm.String - -
    -
    - - - -
    -
    -
    - Jobtitle: Edm.String -
    -
    -
    -
    - - Jobtitle: Edm.String - -
    -
    - - - - - - -
    -
    -
    - Department_history -
    -
    -
    -
    - - Department_history - -
    -
    - - - -
    -
    -
    - From: Edm.Date {id} -
    -
    -
    -
    - - From: Edm.Date {id} - -
    -
    - - - -
    -
    -
    - To: Edm.Date -
    -
    -
    -
    - - To: Edm.Date - -
    -
    - - - -
    -
    -
    - Name: Edm.String -
    -
    -
    -
    - - Name: Edm.String - -
    -
    - - - -
    -
    -
    - Budget: Edm.Decimal -
    -
    -
    -
    - - Budget: Edm.Decimal - -
    -
    - - - - - - -
    -
    -
    - Employee -
    -
    -
    -
    - - Employee - -
    -
    - - - -
    -
    -
    - ID: Edm.String {id} -
    -
    -
    -
    - - ID: Edm.String {id} - -
    -
    - - - - - - -
    -
    -
    - Department -
    -
    -
    -
    - - Department - -
    -
    - - - -
    -
    -
    - ID: Edm.String {id} -
    -
    -
    -
    - - ID: Edm.String {id} - -
    -
    - - - - - -
    -
    -
    -
    - - * - -
    -
    - - Employees - -
    -
    -
    -
    -
    - - *... - -
    -
    - - - - - -
    -
    -
    -
    - - * - -
    -
    - history -
    -
    -
    -
    -
    - - *... - -
    -
    - - - - - -
    -
    -
    -
    - - * - -
    -
    - history -
    -
    -
    -
    -
    - - *... - -
    -
    - - - -
    -
    -
    -
    -
    - - 1 - -
    -
    - - Department - -
    -
    -
    -
    -
    -
    - - 1... - -
    -
    - - -
    - - - - - Text is not SVG - cannot display - - - -
    diff --git a/odata-temporal-ext/images/db.drawio.svg b/odata-temporal-ext/images/db.drawio.svg deleted file mode 100644 index e1fa16baf..000000000 --- a/odata-temporal-ext/images/db.drawio.svg +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - - -
    -
    -
    - Employee -
    -
    -
    -
    - - Employee - -
    -
    - - - - -
    -
    -
    - ID: String {id} -
    -
    -
    -
    - - ID: String {id} - -
    -
    - - - - -
    -
    -
    - From: Date {id} -
    -
    -
    -
    - - From: Date {id} - -
    -
    - - - - -
    -
    -
    - To: Date -
    -
    -
    -
    - - To: Date - -
    -
    - - - - -
    -
    -
    - Name: String -
    -
    -
    -
    - - Name: String - -
    -
    - - - - -
    -
    -
    - Jobtitle: String -
    -
    -
    -
    - - Jobtitle: String - -
    -
    - - - - -
    -
    -
    - Department.ID -
    -
    -
    -
    - - Department.ID - -
    -
    - - - - - - -
    -
    -
    - Department -
    -
    -
    -
    - - Department - -
    -
    - - - - -
    -
    -
    - ID: String {id} -
    -
    -
    -
    - - ID: String {id} - -
    -
    - - - - -
    -
    -
    - From: Date {id} -
    -
    -
    -
    - - From: Date {id} - -
    -
    - - - - -
    -
    -
    - To: Date -
    -
    -
    -
    - - To: Date - -
    -
    - - - - -
    -
    -
    - Name: String -
    -
    -
    -
    - - Name: String - -
    -
    - - - - -
    -
    -
    - Budget: Decimal -
    -
    -
    -
    - - Budget: Decimal - -
    -
    - - - -
    -
    -
    -
    -
    - 1 -
    -
    -
    -
    -
    -
    - - 1 - -
    -
    - - -
    - - - - - Text is not SVG - cannot display - - - -
    From 4abe7587414c17628b1abf25dcad6058e7fccd73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Fri, 6 Oct 2023 14:29:29 +0200 Subject: [PATCH 14/74] Update license in package.json (#185) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4d33eca48..33ce27150 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "clean-xxx": "node lib/clean.mjs odata-xxx/temp odata-xxx-v4.0" }, "author": "", - "license": "ISC", + "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "c8": "^8.0.0", "express": "^4", From 1fc6d39a79048bcb81ae520d74fe82b36e5f1b80 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 11 Oct 2023 17:33:51 +0200 Subject: [PATCH 15/74] ODATA-1411 (#126) https://issues.oasis-open.org/browse/ODATA-1411 --------- Co-authored-by: GeraldKrause <43336693+GeraldKrause@users.noreply.github.com> --- docs/odata-protocol/odata-protocol.html | 5 ++--- docs/odata-protocol/odata-protocol.md | 14 ++++---------- odata-protocol/11 Data Service Requests.md | 14 ++++---------- 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index fbc790cbf..d5b7302d9 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1321,9 +1321,8 @@

    If the service returns less than the full set of properties, either because the client specified a select or because the service returned a subset of properties in the absence of a select, the context URL MUST reflect the set of selected properties and projected expanded navigation properties.

    11.2.5.2 System Query Option $expand

    The $expand system query option indicates the related entities and stream values that MUST be represented inline. The service MUST return the specified content, and MAY choose to return additional information.

    -

    The value of the $expand query option is a comma-separated list of navigation property names, stream property names, or $value indicating the stream content of a media-entity.

    -

    For navigation properties, the navigation property name is optionally followed by a /$ref path segment or a /$count path segment, and optionally a parenthesized set of expand options (for filtering, sorting, selecting, paging, or expanding the related entities).

    -

    For a full description of the syntax used when building requests, see OData-URL.

    +

    The value of $expand is a comma-separated list of expand items. Each expand item is evaluated relative to the retrieved resource being expanded.

    +

    For a full description of the syntax used when building requests, see OData-URL, section 5.1.3.

    Example 38: for each customer entity within the Customers entity set the value of all related Orders will be represented inline

    GET http://host/service.svc/Customers?$expand=Orders
    diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index 98284010e..d78e7bf2f 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -2908,18 +2908,12 @@ The `$expand` system query option indicates the related entities and stream values that MUST be represented inline. The service MUST return the specified content, and MAY choose to return additional information. -The value of the `$expand` query option is a comma-separated list of -navigation property names, stream property names, or `$value` indicating -the stream content of a media-entity. - -For navigation properties, the navigation property name is optionally -followed by a `/$ref` path segment or a `/$count` path segment, and -optionally a parenthesized set of [expand options](#ExpandOptions) (for -filtering, sorting, selecting, paging, or expanding the related -entities). +The value of `$expand` is a comma-separated list of expand items. Each +expand item is evaluated relative to the retrieved resource being +expanded. For a full description of the syntax used when building requests, see -[OData-URL](#ODataURL). +[OData-URL](#ODataURL), section 5.1.3. ::: example Example 38: for each customer entity within the Customers entity set the diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index e3db32113..4643c6abf 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -383,18 +383,12 @@ The `$expand` system query option indicates the related entities and stream values that MUST be represented inline. The service MUST return the specified content, and MAY choose to return additional information. -The value of the `$expand` query option is a comma-separated list of -navigation property names, stream property names, or `$value` indicating -the stream content of a media-entity. - -For navigation properties, the navigation property name is optionally -followed by a `/$ref` path segment or a `/$count` path segment, and -optionally a parenthesized set of [expand options](#ExpandOptions) (for -filtering, sorting, selecting, paging, or expanding the related -entities). +The value of `$expand` is a comma-separated list of expand items. Each +expand item is evaluated relative to the retrieved resource being +expanded. For a full description of the syntax used when building requests, see -[OData-URL](#ODataURL). +[OData-URL](#ODataURL), section 5.1.3. ::: example Example ##ex: for each customer entity within the Customers entity set the From d5272c748215f3d944af172ef98e91d1d5ecfcce Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 11 Oct 2023 17:43:12 +0200 Subject: [PATCH 16/74] ODATA-1413 (#127) --- docs/odata-protocol/odata-protocol.html | 2 +- docs/odata-protocol/odata-protocol.md | 4 ++-- odata-protocol/11 Data Service Requests.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index d5b7302d9..0226a9658 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1695,7 +1695,7 @@
    -

    Example 70:

    -
    "@UI.RefreshOnChangeOf": "ChangedAt",
    -
    -"@Capabilities.UpdateRestrictions": {
    -  "NonUpdatableProperties": [
    -    "CreatedAt",
    -    "ChangedAt"
    -  ]
    -}
    +

    Example 71:

    +
    "@UI.RefreshOnChangeOf": "ChangedAt",
    +
    +"@Capabilities.UpdateRestrictions": {
    +  "NonUpdatableProperties": [
    +    "CreatedAt",
    +    "ChangedAt"
    +  ]
    +}

    14.4.1.7 Value Path

    The value path expression allows assigning a value by traversing an object graph. It can be used in annotations that target entity containers, entity sets, entity types, complex types, navigation properties of structured types, and structural properties of structured types. Its argument is an instance path.

    @@ -2637,14 +2723,14 @@

    $Path

    Path expressions are represented as an object with a single member $Path whose value is a string containing a path.

    -

    Example 71:

    -
    "@UI.DisplayName": {
    -  "$Path": "FirstName"
    -},
    -
    -"@UI.DisplayName#second": {
    -  "$Path": "@vCard.Address#work/FullName"
    -}
    +

    Example 72:

    +
    "@UI.DisplayName": {
    +  "$Path": "FirstName"
    +},
    +
    +"@UI.DisplayName#second": {
    +  "$Path": "@vCard.Address#work/FullName"
    +}

    14.4.2 Comparison and Logical Operators

    Annotations MAY use the following logical and comparison expressions which evaluate to a Boolean value. These expressions MAY be combined and they MAY be used anywhere instead of a Boolean expression.

    @@ -2679,99 +2765,99 @@

    <

    They MAY contain annotations.

    -

    Example 72:

    -
    {
    -  "$And": [
    -    {
    -      "$Path": "IsMale"
    -    },
    -    {
    -      "$Path": "IsMarried"
    -    }
    -  ]
    -},
    -{
    -  "$Or": [
    -    {
    -      "$Path": "IsMale"
    -    },
    -    {
    -      "$Path": "IsMarried"
    -    }
    -  ]
    -},
    -{
    -  "$Not": {
    -    "$Path": "IsMale"
    -  }
    -},
    -{
    -  "$Eq": [
    -    null,
    -    {
    -      "$Path": "IsMale"
    -    }
    -  ]
    -},
    -{
    -  "$Ne": [
    -    null,
    -    {
    -      "$Path": "IsMale"
    -    }
    -  ]
    -},
    -{
    -  "$Gt": [
    -    {
    -      "$Path": "Price"
    -    },
    -    20
    -  ]
    -},
    -{
    -  "$Ge": [
    -    {
    -      "$Path": "Price"
    -    },
    -    10
    -  ]
    -},
    -{
    -  "$Lt": [
    -    {
    -      "$Path": "Price"
    -    },
    -    20
    -  ]
    -},
    -{
    -  "$Le": [
    -    {
    -      "$Path": "Price"
    -    },
    -    100
    -  ]
    -},
    -{
    -  "$Has": [
    -    {
    -      "$Path": "Fabric"
    -    },
    -    "Red"
    -  ]
    -},
    -{
    -  "$In": [
    -    {
    -      "$Path": "Size"
    -    },
    -    [
    -      "XS",
    -      "S"
    -    ]
    -  ]
    -} ```
    +

    Example 73:

    +
    {
    +  "$And": [
    +    {
    +      "$Path": "IsMale"
    +    },
    +    {
    +      "$Path": "IsMarried"
    +    }
    +  ]
    +},
    +{
    +  "$Or": [
    +    {
    +      "$Path": "IsMale"
    +    },
    +    {
    +      "$Path": "IsMarried"
    +    }
    +  ]
    +},
    +{
    +  "$Not": {
    +    "$Path": "IsMale"
    +  }
    +},
    +{
    +  "$Eq": [
    +    null,
    +    {
    +      "$Path": "IsMale"
    +    }
    +  ]
    +},
    +{
    +  "$Ne": [
    +    null,
    +    {
    +      "$Path": "IsMale"
    +    }
    +  ]
    +},
    +{
    +  "$Gt": [
    +    {
    +      "$Path": "Price"
    +    },
    +    20
    +  ]
    +},
    +{
    +  "$Ge": [
    +    {
    +      "$Path": "Price"
    +    },
    +    10
    +  ]
    +},
    +{
    +  "$Lt": [
    +    {
    +      "$Path": "Price"
    +    },
    +    20
    +  ]
    +},
    +{
    +  "$Le": [
    +    {
    +      "$Path": "Price"
    +    },
    +    100
    +  ]
    +},
    +{
    +  "$Has": [
    +    {
    +      "$Path": "Fabric"
    +    },
    +    "Red"
    +  ]
    +},
    +{
    +  "$In": [
    +    {
    +      "$Path": "Size"
    +    },
    +    [
    +      "XS",
    +      "S"
    +    ]
    +  ]
    +} ```

    14.4.3 Arithmetic Operators

    Annotations MAY use the following arithmetic expressions which evaluate to a numeric value. These expressions MAY be combined, and they MAY be used anywhere instead of a numeric expression of the appropriate type. The semantics and evaluation rules for each arithmetic expression is identical to the corresponding arithmetic operator defined in OData-URL.

    @@ -2823,72 +2909,72 @@

    They MAY contain annotations.

    -

    Example 73:

    -
    {
    -  "$Add": [
    -    {
    -      "$Path": "StartDate"
    -    },
    -    {
    -      "$Path": "Duration"
    -    }
    -  ]
    -},
    -{
    -  "$Sub": [
    -    {
    -      "$Path": "Revenue"
    -    },
    -    {
    -      "$Path": "Cost"
    -    }
    -  ]
    -},
    -{
    -  "$Neg": {
    -    "$Path": "Height"
    -  }
    -},
    -{
    -  "$Mul": [
    -    {
    -      "$Path": "NetPrice"
    -    },
    -    {
    -      "$Path": "TaxRate"
    -    }
    -  ]
    -},
    -{
    -  "$Div": [
    -    {
    -      "$Path": "Quantity"
    -    },
    -    {
    -      "$Path": "QuantityPerParcel"
    -    }
    -  ]
    -},
    -{
    -  "$DivBy": [
    -    {
    -      "$Path": "Quantity"
    -    },
    -    {
    -      "$Path": "QuantityPerParcel"
    -    }
    -  ]
    -},
    -{
    -  "$Mod": [
    -    {
    -      "$Path": "Quantity"
    -    },
    -    {
    -      "$Path": "QuantityPerParcel"
    -    }
    -  ]
    -}
    +

    Example 74:

    +
    {
    +  "$Add": [
    +    {
    +      "$Path": "StartDate"
    +    },
    +    {
    +      "$Path": "Duration"
    +    }
    +  ]
    +},
    +{
    +  "$Sub": [
    +    {
    +      "$Path": "Revenue"
    +    },
    +    {
    +      "$Path": "Cost"
    +    }
    +  ]
    +},
    +{
    +  "$Neg": {
    +    "$Path": "Height"
    +  }
    +},
    +{
    +  "$Mul": [
    +    {
    +      "$Path": "NetPrice"
    +    },
    +    {
    +      "$Path": "TaxRate"
    +    }
    +  ]
    +},
    +{
    +  "$Div": [
    +    {
    +      "$Path": "Quantity"
    +    },
    +    {
    +      "$Path": "QuantityPerParcel"
    +    }
    +  ]
    +},
    +{
    +  "$DivBy": [
    +    {
    +      "$Path": "Quantity"
    +    },
    +    {
    +      "$Path": "QuantityPerParcel"
    +    }
    +  ]
    +},
    +{
    +  "$Mod": [
    +    {
    +      "$Path": "Quantity"
    +    },
    +    {
    +      "$Path": "QuantityPerParcel"
    +    }
    +  ]
    +}

    14.4.4 Apply Client-Side Functions

    The apply expression enables a value to be obtained by applying a client-side function. The apply expression MAY have operand expressions. The operand expressions are used as parameters to the client-side function.

    @@ -2902,25 +2988,25 @@

    OData-URL can be used as client-side functions, qualified with the namespace odata. The semantics of these client-side functions is identical to their counterpart function defined in OData-URL.

    For example, the odata.concat client-side function takes two or more expressions as arguments. Each argument MUST evaluate to a primitive or enumeration type. It returns a value of type Edm.String that is the concatenation of the literal representations of the results of the argument expressions. Values of primitive types other than Edm.String are represented according to the appropriate alternative in the primitiveValue rule of OData-ABNF, i.e. Edm.Binary as binaryValue, Edm.Boolean as booleanValue etc.

    -

    Example 74:

    -
    "@UI.DisplayName": {
    -  "$Apply": [
    -    "Product: ",
    -    {
    -      "$Path": "ProductName"
    -    },
    -    " (",
    -    {
    -      "$Path": "Available/Quantity"
    -    },
    -    " ",
    -    {
    -      "$Path": "Available/Unit"
    -    },
    -    " available)"
    -  ],
    -  "$Function": "odata.concat"
    -}
    +

    Example 75:

    +
    "@UI.DisplayName": {
    +  "$Apply": [
    +    "Product: ",
    +    {
    +      "$Path": "ProductName"
    +    },
    +    " (",
    +    {
    +      "$Path": "Available/Quantity"
    +    },
    +    " ",
    +    {
    +      "$Path": "Available/Unit"
    +    },
    +    " available)"
    +  ],
    +  "$Function": "odata.concat"
    +}

    ProductName is of type String, Quantity in complex type Available is of type Decimal, and Unit in Available is of type enumeration, so the result of the Path expression is represented as the member name of the enumeration value.

    14.4.4.2 Function odata.fillUriTemplate

    @@ -2931,57 +3017,57 @@

    labeled element expressions that evaluate to a collection of primitive values.

    Key-value maps are represented as labeled element expressions that evaluate to a collection of complex types with two properties that are used in lexicographic order. The first property is used as key, the second property as value.

    -

    Example 75: assuming there are no special characters in values of the Name property of the Actor entity

    -
    {
    -  "$Apply": [
    -    "http://host/someAPI/Actors/{actorName}/CV",
    -    {
    -      "$LabeledElement": {
    -        "$Path": "Actor/Name"
    -      },
    -      "$Name": "self.actorName"
    -    }
    -  ],
    -  "$Function": "odata.fillUriTemplate"
    -}
    +

    Example 76: assuming there are no special characters in values of the Name property of the Actor entity

    +
    {
    +  "$Apply": [
    +    "http://host/someAPI/Actors/{actorName}/CV",
    +    {
    +      "$LabeledElement": {
    +        "$Path": "Actor/Name"
    +      },
    +      "$Name": "self.actorName"
    +    }
    +  ],
    +  "$Function": "odata.fillUriTemplate"
    +}

    14.4.4.3 Function odata.matchesPattern

    The odata.matchesPattern client-side function takes two string expressions as arguments and returns a Boolean value.

    The function returns true if the second expression evaluates to an ECMAScript (JavaScript) regular expression and the result of the first argument expression matches that regular expression, using syntax and semantics of ECMAScript regular expressions.

    -

    Example 76: all non-empty FirstName values not containing the letters b, c, or d evaluate to true

    -
    {
    -  "$Apply": [
    -    {
    -      "$Path": "FirstName"
    -    },
    -    "^[^b-d]+$"
    -  ],
    -  "$Function": "odata.matchesPattern"
    -}
    +

    Example 77: all non-empty FirstName values not containing the letters b, c, or d evaluate to true

    +
    {
    +  "$Apply": [
    +    {
    +      "$Path": "FirstName"
    +    },
    +    "^[^b-d]+$"
    +  ],
    +  "$Function": "odata.matchesPattern"
    +}

    14.4.4.4 Function odata.uriEncode

    The odata.uriEncode client-side function takes one argument of primitive type and returns the URL-encoded OData literal that can be used as a key value in OData URLs or in the query part of OData URLs.

    Note: string literals are surrounded by single quotes as required by the paren-style key syntax.

    -

    Example 77:

    -
    {
    -  "$Apply": [
    -    "http://host/service/Genres({genreName})",
    -    {
    -      "$LabeledElement": {
    -        "$Apply": [
    -          {
    -            "$Path": "NameOfMovieGenre"
    -          }
    -        ],
    -        "$Function": "odata.uriEncode"
    -      },
    -      "$Name": "self.genreName"
    -    }
    -  ],
    -  "$Function": "odata.fillUriTemplate"
    -}
    +

    Example 78:

    +
    {
    +  "$Apply": [
    +    "http://host/service/Genres({genreName})",
    +    {
    +      "$LabeledElement": {
    +        "$Apply": [
    +          {
    +            "$Path": "NameOfMovieGenre"
    +          }
    +        ],
    +        "$Function": "odata.uriEncode"
    +      },
    +      "$Name": "self.genreName"
    +    }
    +  ],
    +  "$Function": "odata.fillUriTemplate"
    +}

    14.4.5 Cast

    The cast expression casts the value obtained from its single child expression to the specified type. The cast expression follows the same rules as the cast canonical function defined in OData-URL.

    @@ -2992,13 +3078,13 @@

    $Cast

    If the specified type is a primitive type or a collection of primitive types, the facet members $MaxLength, $Unicode, $Precision, $Scale, and $SRID MAY be specified if applicable to the specified primitive type. If the facet members are not specified, their values are considered unspecified.

    -

    Example 78:

    -
    "@UI.Threshold": {
    -  "$Cast": {
    -    "$Path": "Average"
    -  },
    -  "$Type": "Edm.Decimal"
    -}
    +

    Example 79:

    +
    "@UI.Threshold": {
    +  "$Cast": {
    +    "$Path": "Average"
    +  },
    +  "$Type": "Edm.Decimal"
    +}

    14.4.6 Collection

    The collection expression enables a value to be obtained from zero or more item expressions. The value calculated by the collection expression is the collection of the values calculated by each of the item expressions. The values of the child expressions MUST all be type compatible.

    @@ -3006,12 +3092,12 @@

    14.4.6 Collecti

    Collection expressions are represented as arrays with one array item per item expression within the collection expression.

    -

    Example 79:

    -
    "@seo.SeoTerms": [
    -  "Product",
    -  "Supplier",
    -  "Customer"
    -]
    +

    Example 80:

    +
    "@seo.SeoTerms": [
    +  "Product",
    +  "Supplier",
    +  "Customer"
    +]

    14.4.7 If-Then-Else

    The if-then-else expression enables a value to be obtained by evaluating a condition expression. It MUST contain exactly three child expressions. There is one exception to this rule: if and only if the if-then-else expression is an item of a collection expression, the third child expression MAY be omitted, reducing it to an if-then expression. This can be used to conditionally add an element to a collection.

    @@ -3024,16 +3110,16 @@

    $If

    It MAY contain annotations.

    -

    Example 80: the condition is a value path expression referencing the Boolean property IsFemale, whose value then determines the value of the $If expression (or so it was long ago)

    -
    "@person.Gender": {
    -  "$If": [
    -    {
    -      "$Path": "IsFemale"
    -    },
    -    "Female",
    -    "Male"
    -  ]
    -}
    +

    Example 81: the condition is a value path expression referencing the Boolean property IsFemale, whose value then determines the value of the $If expression (or so it was long ago)

    +
    "@person.Gender": {
    +  "$If": [
    +    {
    +      "$Path": "IsFemale"
    +    },
    +    "Female",
    +    "Male"
    +  ]
    +}

    14.4.8 Is-Of

    The is-of expression checks whether the value obtained from its single child expression is compatible with the specified type. It returns true if the child expression returns a type that is compatible with the specified type, and false otherwise.

    @@ -3044,13 +3130,13 @@

    $IsOf

    If the specified type is a primitive type or a collection of primitive types, the facet members $MaxLength, $Unicode, $Precision, $Scale, and $SRID MAY be specified if applicable to the specified primitive type. If the facet members are not specified, their values are considered unspecified.

    -

    Example 81:

    -
    "@Self.IsPreferredCustomer": {
    -  "$IsOf": {
    -    "$Path": "Customer"
    -  },
    -  "$Type": "self.PreferredCustomer"
    -}
    +

    Example 82:

    +
    "@Self.IsPreferredCustomer": {
    +  "$IsOf": {
    +    "$Path": "Customer"
    +  },
    +  "$Type": "self.PreferredCustomer"
    +}

    14.4.9 Labeled Element

    The labeled element expression assigns a name to its single child expression. The value of the child expression can then be reused elsewhere with a labeled element reference expression.

    @@ -3062,13 +3148,13 @@

    $LabeledEle

    It MAY contain annotations.

    -

    Example 82:

    -
    "@UI.DisplayName": {
    -  "$LabeledElement": {
    -    "$Path": "FirstName"
    -  },
    -  "$Name": "CustomerFirstName"
    -}
    +

    Example 83:

    +
    "@UI.DisplayName": {
    +  "$LabeledElement": {
    +    "$Path": "FirstName"
    +  },
    +  "$Name": "CustomerFirstName"
    +}

    14.4.10 Labeled Element Reference

    The labeled element reference expression MUST specify the qualified name of a labeled element expression in scope and returns the value of the identified labeled element expression as its value.

    @@ -3077,10 +3163,10 @@

    Labeled element reference expressions are represented as an object with a member $LabeledElementReference whose value is a string containing an qualified name.

    -

    Example 83:

    -
    "@UI.DisplayName": {
    -  "$LabeledElementReference": "self.CustomerFirstName"
    -}
    +

    Example 84:

    +
    "@UI.DisplayName": {
    +  "$LabeledElementReference": "self.CustomerFirstName"
    +}

    14.4.11 Null

    The null expression indicates the absence of a value. The null expression MAY be annotated.

    @@ -3088,19 +3174,19 @@

    14.4.11 Null

    Null expressions that do not contain annotations are represented as the literal null.

    -

    Example 84:

    -
    "@UI.DisplayName": null,
    +

    Example 85:

    +
    "@UI.DisplayName": null,

    $Null

    Null expression containing annotations are represented as an object with a member $Null whose value is the literal null.

    -

    Example 85:

    -
    "@UI.Address": {
    -  "$Null": null,
    -  "@self.Reason": "Private"
    -}
    +

    Example 86:

    +
    "@UI.Address": {
    +  "$Null": null,
    +  "@self.Reason": "Private"
    +}

    14.4.12 Record

    The record expression enables a new entity type or complex type instance to be constructed.

    @@ -3113,35 +3199,35 @@

    14.4.12 Record

    It MAY contain annotations for itself and its members. Annotations for record members are prefixed with the member name.

    -

    Example 86: this annotation "morphs" the entity type from example 8 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

    -
    "@person.Employee": {
    -  "@type": "https://example.org/vocabs/person#org.example.person.Manager",
    -  "@Core.Description": "Annotation on record",
    -  "GivenName": {
    -    "$Path": "FirstName"
    -  },
    -  "GivenName@Core.Description": "Annotation on record member",
    -  "Surname": {
    -    "$Path": "LastName"
    -  },
    -  "DirectSupervisor": {
    -    "$Path": "Manager"
    -  },
    -  "CostCenter": {
    -    "$UrlRef": {
    -      "$Apply": [
    -        "http://host/anotherservice/CostCenters('{ccid}')",
    -        {
    -          "$LabeledElement": {
    -            "$Path": "CostCenterID"
    -          },
    -          "$Name": "ccid"
    -        }
    -      ],
    -      "$Function": "odata.fillUriTemplate"
    -    }
    -  }
    -}
    +

    Example 87: this annotation "morphs" the entity type from example 8 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

    +
    "@person.Employee": {
    +  "@type": "https://example.org/vocabs/person#org.example.person.Manager",
    +  "@Core.Description": "Annotation on record",
    +  "GivenName": {
    +    "$Path": "FirstName"
    +  },
    +  "GivenName@Core.Description": "Annotation on record member",
    +  "Surname": {
    +    "$Path": "LastName"
    +  },
    +  "DirectSupervisor": {
    +    "$Path": "Manager"
    +  },
    +  "CostCenter": {
    +    "$UrlRef": {
    +      "$Apply": [
    +        "http://host/anotherservice/CostCenters('{ccid}')",
    +        {
    +          "$LabeledElement": {
    +            "$Path": "CostCenterID"
    +          },
    +          "$Name": "ccid"
    +        }
    +      ],
    +      "$Function": "odata.fillUriTemplate"
    +    }
    +  }
    +}

    14.4.13 URL Reference

    The URL reference expression enables a value to be obtained by sending a GET request.

    @@ -3153,30 +3239,30 @@

    $UrlRef

    It MAY contain annotations.

    -

    Example 87:

    -
    "@org.example.person.Supplier": {
    -  "$UrlRef": {
    -    "$Apply": [
    -      "http://host/service/Suppliers({suppID})",
    -      {
    -        "$LabeledElement": {
    -          "$Apply": [
    -            {
    -              "$Path": "SupplierId"
    -            }
    -          ],
    -          "$Function": "odata.uriEncode"
    -        },
    -        "$Name": "suppID"
    -      }
    -    ],
    -    "$Function": "odata.fillUriTemplate"
    -  }
    -},
    - 
    -"@Core.LongDescription#element": {
    -  "$UrlRef": "http://host/wiki/HowToUse"
    -}
    +

    Example 88:

    +
    "@org.example.person.Supplier": {
    +  "$UrlRef": {
    +    "$Apply": [
    +      "http://host/service/Suppliers({suppID})",
    +      {
    +        "$LabeledElement": {
    +          "$Apply": [
    +            {
    +              "$Path": "SupplierId"
    +            }
    +          ],
    +          "$Function": "odata.uriEncode"
    +        },
    +        "$Name": "suppID"
    +      }
    +    ],
    +    "$Function": "odata.fillUriTemplate"
    +  }
    +},
    + 
    +"@Core.LongDescription#element": {
    +  "$UrlRef": "http://host/wiki/HowToUse"
    +}

    15 Identifier and Path Values

    @@ -3201,7 +3287,7 @@

    15.4 Target Pat
  • The target path of a container child followed by a forward slash and one or more forward-slash separated property, navigation property, or type-cast segments
  • -

    Example 88: Target expressions

    +

    Example 89: Target expressions

    MySchema.MyEntityContainer/MyEntitySet
     MySchema.MyEntityContainer/MySingleton
     MySchema.MyEntityContainer/MySingleton/MyContainmentNavigationProperty
    @@ -3213,272 +3299,272 @@ 

    16 CSDL Ex

    Following are two basic examples of valid EDM models as represented in CSDL JSON. These examples demonstrate many of the topics covered above.

    16.1 Products and Categories Example

    -

    Example 89:

    -
    {
    -  "$Version": "4.0",
    -  "$EntityContainer": "ODataDemo.DemoService",
    -  "$Reference": {
    -    "https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.json": {
    -      "$Include": [
    -        {
    -          "$Namespace": "Org.OData.Core.V1",
    -          "$Alias": "Core",
    -          "@Core.DefaultNamespace": true
    -        }
    -      ]
    -    },
    -    "https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.json": {
    -      "$Include": [
    -        {
    -          "$Namespace": "Org.OData.Measures.V1",
    -          "$Alias": "Measures"
    -        }
    -      ]
    -    }
    -  },
    -  "ODataDemo": {
    -    "$Alias": "self",
    -    "@Core.DefaultNamespace": true,
    -    "Product": {
    -      "$Kind": "EntityType",
    -      "$HasStream": true,
    -      "$Key": [
    -        "ID"
    -      ],
    -      "ID": {},
    -      "Description": {
    -        "$Nullable": true,
    -        "@Core.IsLanguageDependent": true
    -      },
    -      "ReleaseDate": {
    -        "$Nullable": true,
    -        "$Type": "Edm.Date"
    -      },
    -      "DiscontinuedDate": {
    -        "$Nullable": true,
    -        "$Type": "Edm.Date"
    -      },
    -      "Rating": {
    -        "$Nullable": true,
    -        "$Type": "Edm.Int32"
    -      },
    -      "Price": {
    -        "$Nullable": true,
    -        "$Type": "Edm.Decimal",
    -        "@Measures.ISOCurrency": {
    -          "$Path": "Currency"
    -        }
    -      },
    -      "Currency": {
    -        "$Nullable": true,
    -        "$MaxLength": 3
    -      },
    -      "Category": {
    -        "$Kind": "NavigationProperty",
    -        "$Type": "self.Category",
    -        "$Partner": "Products"
    -      },
    -      "Supplier": {
    -        "$Kind": "NavigationProperty",
    -        "$Nullable": true,
    -        "$Type": "self.Supplier",
    -        "$Partner": "Products"
    -      }
    -    },
    -    "Category": {
    -      "$Kind": "EntityType",
    -      "$Key": [
    -        "ID"
    -      ],
    -      "ID": {
    -        "$Type": "Edm.Int32"
    -      },
    -      "Name": {
    -        "@Core.IsLanguageDependent": true
    -      },
    -      "Products": {
    -        "$Kind": "NavigationProperty",
    -        "$Partner": "Category",
    -        "$Collection": true,
    -        "$Type": "self.Product",
    -        "$OnDelete": "Cascade"
    -      }
    -    },
    -    "Supplier": {
    -      "$Kind": "EntityType",
    -      "$Key": [
    -        "ID"
    -      ],
    -      "ID": {},
    -      "Name": {
    -        "$Nullable": true
    -      },
    -      "Address": {
    -        "$Type": "self.Address"
    -      },
    -      "Concurrency": {
    -        "$Type": "Edm.Int32"
    -      },
    -      "Products": {
    -        "$Kind": "NavigationProperty",
    -        "$Partner": "Supplier",
    -        "$Collection": true,
    -        "$Type": "self.Product"
    -      }
    -    },
    -    "Country": {
    -      "$Kind": "EntityType",
    -      "$Key": [
    -        "Code"
    -      ],
    -      "Code": {
    -        "$MaxLength": 2
    -      },
    -      "Name": {
    -        "$Nullable": true
    -      }
    -    },
    -    "Address": {
    -      "$Kind": "ComplexType",
    -      "Street": {
    -        "$Nullable": true
    -      },
    -      "City": {
    -        "$Nullable": true
    -      },
    -      "State": {
    -        "$Nullable": true
    -      },
    -      "ZipCode": {
    -        "$Nullable": true
    -      },
    -      "CountryName": {
    -        "$Nullable": true
    -      },
    -      "Country": {
    -        "$Kind": "NavigationProperty",
    -        "$Nullable": true,
    -        "$Type": "self.Country",
    -        "$ReferentialConstraint": {
    -          "CountryName": "Name"
    -        }
    -      }
    -    },
    -    "ProductsByRating": [
    -      {
    -        "$Kind": "Function",
    -        "$Parameter": [
    -          {
    -            "$Name": "Rating",
    -            "$Nullable": true,
    -            "$Type": "Edm.Int32"
    -          }
    -        ],
    -        "$ReturnType": {
    -          "$Collection": true,
    -          "$Type": "self.Product"
    -        }
    -      }
    -    ],
    -    "DemoService": {
    -      "$Kind": "EntityContainer",
    -      "Products": {
    -        "$Collection": true,
    -        "$Type": "self.Product",
    -        "$NavigationPropertyBinding": {
    -          "Category": "Categories"
    -        }
    -      },
    -      "Categories": {
    -        "$Collection": true,
    -        "$Type": "self.Category",
    -        "$NavigationPropertyBinding": {
    -          "Products": "Products"
    -        },
    -        "@Core.Description": "Product Categories"
    -      },
    -      "Suppliers": {
    -        "$Collection": true,
    -        "$Type": "self.Supplier",
    -        "$NavigationPropertyBinding": {
    -          "Products": "Products",
    -          "Address/Country": "Countries"
    -        },
    -        "@Core.OptimisticConcurrency": [
    -          "Concurrency"
    -        ]
    -      },
    -      "Countries": {
    -        "$Collection": true,
    -        "$Type": "self.Country"
    -      },
    -      "MainSupplier": {
    -        "$Type": "self.Supplier",
    -        "$NavigationPropertyBinding": {
    -          "Products": "Products"
    -        },
    -        "@Core.Description": "Primary Supplier"
    -      },
    -      "ProductsByRating": {
    -        "$EntitySet": "Products",
    -        "$Function": "self.ProductsByRating"
    -      }
    -    }
    -  }
    -}
    +

    Example 90:

    +
    {
    +  "$Version": "4.0",
    +  "$EntityContainer": "ODataDemo.DemoService",
    +  "$Reference": {
    +    "https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.json": {
    +      "$Include": [
    +        {
    +          "$Namespace": "Org.OData.Core.V1",
    +          "$Alias": "Core",
    +          "@Core.DefaultNamespace": true
    +        }
    +      ]
    +    },
    +    "https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.json": {
    +      "$Include": [
    +        {
    +          "$Namespace": "Org.OData.Measures.V1",
    +          "$Alias": "Measures"
    +        }
    +      ]
    +    }
    +  },
    +  "ODataDemo": {
    +    "$Alias": "self",
    +    "@Core.DefaultNamespace": true,
    +    "Product": {
    +      "$Kind": "EntityType",
    +      "$HasStream": true,
    +      "$Key": [
    +        "ID"
    +      ],
    +      "ID": {},
    +      "Description": {
    +        "$Nullable": true,
    +        "@Core.IsLanguageDependent": true
    +      },
    +      "ReleaseDate": {
    +        "$Nullable": true,
    +        "$Type": "Edm.Date"
    +      },
    +      "DiscontinuedDate": {
    +        "$Nullable": true,
    +        "$Type": "Edm.Date"
    +      },
    +      "Rating": {
    +        "$Nullable": true,
    +        "$Type": "Edm.Int32"
    +      },
    +      "Price": {
    +        "$Nullable": true,
    +        "$Type": "Edm.Decimal",
    +        "@Measures.ISOCurrency": {
    +          "$Path": "Currency"
    +        }
    +      },
    +      "Currency": {
    +        "$Nullable": true,
    +        "$MaxLength": 3
    +      },
    +      "Category": {
    +        "$Kind": "NavigationProperty",
    +        "$Type": "self.Category",
    +        "$Partner": "Products"
    +      },
    +      "Supplier": {
    +        "$Kind": "NavigationProperty",
    +        "$Nullable": true,
    +        "$Type": "self.Supplier",
    +        "$Partner": "Products"
    +      }
    +    },
    +    "Category": {
    +      "$Kind": "EntityType",
    +      "$Key": [
    +        "ID"
    +      ],
    +      "ID": {
    +        "$Type": "Edm.Int32"
    +      },
    +      "Name": {
    +        "@Core.IsLanguageDependent": true
    +      },
    +      "Products": {
    +        "$Kind": "NavigationProperty",
    +        "$Partner": "Category",
    +        "$Collection": true,
    +        "$Type": "self.Product",
    +        "$OnDelete": "Cascade"
    +      }
    +    },
    +    "Supplier": {
    +      "$Kind": "EntityType",
    +      "$Key": [
    +        "ID"
    +      ],
    +      "ID": {},
    +      "Name": {
    +        "$Nullable": true
    +      },
    +      "Address": {
    +        "$Type": "self.Address"
    +      },
    +      "Concurrency": {
    +        "$Type": "Edm.Int32"
    +      },
    +      "Products": {
    +        "$Kind": "NavigationProperty",
    +        "$Partner": "Supplier",
    +        "$Collection": true,
    +        "$Type": "self.Product"
    +      }
    +    },
    +    "Country": {
    +      "$Kind": "EntityType",
    +      "$Key": [
    +        "Code"
    +      ],
    +      "Code": {
    +        "$MaxLength": 2
    +      },
    +      "Name": {
    +        "$Nullable": true
    +      }
    +    },
    +    "Address": {
    +      "$Kind": "ComplexType",
    +      "Street": {
    +        "$Nullable": true
    +      },
    +      "City": {
    +        "$Nullable": true
    +      },
    +      "State": {
    +        "$Nullable": true
    +      },
    +      "ZipCode": {
    +        "$Nullable": true
    +      },
    +      "CountryName": {
    +        "$Nullable": true
    +      },
    +      "Country": {
    +        "$Kind": "NavigationProperty",
    +        "$Nullable": true,
    +        "$Type": "self.Country",
    +        "$ReferentialConstraint": {
    +          "CountryName": "Name"
    +        }
    +      }
    +    },
    +    "ProductsByRating": [
    +      {
    +        "$Kind": "Function",
    +        "$Parameter": [
    +          {
    +            "$Name": "Rating",
    +            "$Nullable": true,
    +            "$Type": "Edm.Int32"
    +          }
    +        ],
    +        "$ReturnType": {
    +          "$Collection": true,
    +          "$Type": "self.Product"
    +        }
    +      }
    +    ],
    +    "DemoService": {
    +      "$Kind": "EntityContainer",
    +      "Products": {
    +        "$Collection": true,
    +        "$Type": "self.Product",
    +        "$NavigationPropertyBinding": {
    +          "Category": "Categories"
    +        }
    +      },
    +      "Categories": {
    +        "$Collection": true,
    +        "$Type": "self.Category",
    +        "$NavigationPropertyBinding": {
    +          "Products": "Products"
    +        },
    +        "@Core.Description": "Product Categories"
    +      },
    +      "Suppliers": {
    +        "$Collection": true,
    +        "$Type": "self.Supplier",
    +        "$NavigationPropertyBinding": {
    +          "Products": "Products",
    +          "Address/Country": "Countries"
    +        },
    +        "@Core.OptimisticConcurrency": [
    +          "Concurrency"
    +        ]
    +      },
    +      "Countries": {
    +        "$Collection": true,
    +        "$Type": "self.Country"
    +      },
    +      "MainSupplier": {
    +        "$Type": "self.Supplier",
    +        "$NavigationPropertyBinding": {
    +          "Products": "Products"
    +        },
    +        "@Core.Description": "Primary Supplier"
    +      },
    +      "ProductsByRating": {
    +        "$EntitySet": "Products",
    +        "$Function": "self.ProductsByRating"
    +      }
    +    }
    +  }
    +}

    16.2 Annotations for Products and Categories Example

    -

    Example 90:

    -
    {
    -  "$Version": "4.01",
    -  "$Reference": {
    -    "http://host/service/$metadata": {
    -      "$Include": [
    -        {
    -          "$Namespace": "ODataDemo",
    -          "$Alias": "target"
    -        }
    -      ]
    -    },
    -    "http://somewhere/Vocabulary/V1": {
    -      "$Include": [
    -        {
    -          "$Namespace": "Some.Vocabulary.V1",
    -          "$Alias": "Vocabulary1"
    -        }
    -      ]
    -    }
    -  },
    -  "External.Annotations": {
    -    "$Annotations": {
    -      "target.Supplier": {
    -        "@Vocabulary1.EMail": null,
    -        "@Vocabulary1.AccountID": {
    -          "$Path": "ID"
    -        },
    -        "@Vocabulary1.Title": "Supplier Info",
    -        "@Vocabulary1.DisplayName": {
    -          "$Apply": [
    -            {
    -              "$Path": "Name"
    -            },
    -            " in ",
    -            {
    -              "$Path": "Address/CountryName"
    -            }
    -          ],
    -          "$Function": "odata.concat"
    -        }
    -      },
    -      "target.Product": {
    -        "@Vocabulary1.Tags": [
    -          "MasterData"
    -        ]
    -      }
    -    }
    -  }
    -} ```
    +

    Example 91:

    +
    {
    +  "$Version": "4.01",
    +  "$Reference": {
    +    "http://host/service/$metadata": {
    +      "$Include": [
    +        {
    +          "$Namespace": "ODataDemo",
    +          "$Alias": "target"
    +        }
    +      ]
    +    },
    +    "http://somewhere/Vocabulary/V1": {
    +      "$Include": [
    +        {
    +          "$Namespace": "Some.Vocabulary.V1",
    +          "$Alias": "Vocabulary1"
    +        }
    +      ]
    +    }
    +  },
    +  "External.Annotations": {
    +    "$Annotations": {
    +      "target.Supplier": {
    +        "@Vocabulary1.EMail": null,
    +        "@Vocabulary1.AccountID": {
    +          "$Path": "ID"
    +        },
    +        "@Vocabulary1.Title": "Supplier Info",
    +        "@Vocabulary1.DisplayName": {
    +          "$Apply": [
    +            {
    +              "$Path": "Name"
    +            },
    +            " in ",
    +            {
    +              "$Path": "Address/CountryName"
    +            }
    +          ],
    +          "$Function": "odata.concat"
    +        }
    +      },
    +      "target.Product": {
    +        "@Vocabulary1.Tags": [
    +          "MasterData"
    +        ]
    +      }
    +    }
    +  }
    +} ```

    17 Conformance

    diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index a42be97a4..5f24c7709 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -257,6 +257,10 @@ modifications made necessary to fully cover OData CSDL Version 4.01. ## 1.1 Changes from Earlier Versions +Section | Feature / Change | Issue +--------|------------------|------ +[Section 14.4.1.2](#PathEvaluation)| New path evaluation rules for annotations targeting annotations and external targeting via container| [ODATA-1420](https://issues.oasis-open.org/browse/ODATA-1420) + ## 1.2 Glossary ### 1.2.1 Definitions of Terms @@ -4301,56 +4305,159 @@ Addresses/-1/Street #### 14.4.1.2 Path Evaluation -Annotations MAY be embedded within their target, or specified -separately, e.g. as part of a different schema, and specify a path to -their target model element. The latter situation is referred to as -*targeting* in the remainder of this section. - -For annotations embedded within or targeting an entity container, the -path is evaluated starting at the entity container, i.e. an empty path -resolves to the entity container, and non-empty paths MUST start with a -segment identifying a container child (entity set, function import, -action import, or singleton). The subsequent segments follow the rules -for paths targeting the corresponding child element. - -For annotations embedded within or targeting an entity set or a -singleton, the path is evaluated starting at the entity set or -singleton, i.e. an empty path resolves to the entity set or singleton, -and non-empty paths MUST follow the rules for annotations targeting the -declared entity type of the entity set or singleton. - -For annotations embedded within or targeting an entity type or complex -type, the path is evaluated starting at the type, i.e. an empty path -resolves to the type, and the first segment of a non-empty path MUST be -a structural or navigation property of the type, a [type -cast](#TypeCast), or a [term cast](#TermCast). - -For annotations embedded within a structural or navigation property of -an entity type or complex type, the path is evaluated starting at the -directly enclosing type. This allows e.g. specifying the value of an -annotation on one property to be calculated from values of other -properties of the same type. An empty path resolves to the enclosing -type, and non-empty paths MUST follow the rules for annotations -targeting the directly enclosing type. - -For annotations targeting a structural or navigation property of an -entity type or complex type, the path is evaluated starting at the -*outermost* entity type or complex type named in the target of the -annotation, i.e. an empty path resolves to the outermost type, and the -first segment of a non-empty path MUST be a structural or navigation -property of the outermost type, a [type cast](#TypeCast), or a [term -cast](#TermCast). - -For annotations embedded within or targeting an action, action import, -function, function import, parameter, or return type, the first segment -of the path MUST be a parameter name or `$ReturnType`. +Annotations MAY be embedded within their target, or specified separately, +e.g. as part of a different schema, and specify a path to their target model +element. The latter situation is referred to as *targeting* in the remainder of +this section. + +The *host* of an annotation is the model element targeted by the annotation, +unless that target is another annotation or a model element (collection, +record or property value) directly or indirectly embedded within another +annotation, in which case the host is the host of that other annotation. + +If the value of an annotation is expressed dynamically with a path +expression, the path evaluation rules for this expression depend upon the +model element by which the annotation is hosted. + +For annotations hosted by an entity container, the path is evaluated starting +at the entity container, i.e. an empty path resolves to the entity container, +and non-empty paths MUST start with a segment identifying a container child +(entity set, function import, action import, or singleton). The subsequent +segments follow the rules for path expressions targeting the corresponding +child element. + +For annotations hosted by an entity set or a singleton, the path is evaluated +starting at the entity set or singleton, i.e. an empty path resolves to the +entity set or singleton, and non-empty paths MUST follow the rules for +annotations targeting the declared entity type of the entity set or singleton. + +For annotations hosted by an entity type or complex type, the path is +evaluated starting at the type, i.e. an empty path resolves to the type, and +the first segment of a non-empty path MUST be a structural or navigation +property of the type, a [type cast](#TypeCast), or a [term cast](#TermCast). + +For annotations hosted by an action, action import, function, function +import, parameter, or return type, the first segment of the path MUST be the +name of a parameter of the action or function or `$ReturnType`. + +For annotations hosted by a structural or navigation property, the path +evaluation rules additionally depend upon how the annotation target is +specified, as follows: + +1. If the annotation is directly or indirectly embedded within the hosting + property, the path is evaluated starting at the directly enclosing type of + the hosting property. This allows e.g. specifying the value of an + annotation on one property to be calculated from values of other properties + of the same enclosing type. An empty path resolves to the enclosing type, + and non-empty paths MUST follow the rules for annotations targeting the + directly enclosing type. + +2. If the annotation uses targeting and the target path starts with an entity + container, or the annotation is directly or indirectly embedded within such an + annotation, the path is evaluated starting at the declared type of the + hosting property. An empty path resolves to the declared type of the + property, and non-empty paths MUST follow the rules for annotations + targeting the declared type of the property. If the type is primitive, the + first segment of a non-empty path MUST be a [type cast](#TypeCast) or a + [term cast](#TermCast). + +3. If the annotation uses targeting and the target path does not start with + an entity container, or the annotation is directly or indirectly embedded + within such an annotation, the path is evaluated starting at the *outermost* + entity type or complex type named in the target path. This allows e.g. + specifying the value of an annotation on one property to be calculated from + values of other properties of the outermost type. An empty path resolves to + the outermost type, and the first segment of a non-empty path MUST be a + structural or navigation property of the outermost type, a [type cast](#TypeCast), + or a [term cast](#TermCast). + +::: example +Example 67: Annotations hosted by property `A2` in various modes + +Path evaluation for the annotations in the first block starts at the directly +enclosing type `self.A` of the hosting property `A2`. +:::: varjson +```json +"self": { + "A": { + "$Kind": "EntityType", + "A1": { + "$Type": "Edm.Boolean" + }, + "A2": { + "$Type": "self.B" + "@Core.Description@Core.IsLanguageDependent": { + "$Path": "A1" + }, + "@Core.Description": "..." + } + }, + "B": { + "$Kind": "ComplexType", + "B1": { + "$Type": "Edm.Boolean" + } + }, +``` +:::: + + +Path evaluation for the annotations in the next block starts at the declared +type `self.B` of the hosting property `A2`. +:::: varjson +```json + "Container": { + "$Kind": "EntityContainer", + "SetA": { + "$Collection": true, + "$Type": "self.A" + } + }, + "$Annotations": { + "self.Container/SetA/A2": { + "@Core.Description#viaset@Core.IsLanguageDependent": { + "$Path": "B1" + }, + "@Core.Description#viaset": "..." + }, + "self.Container/SetA/A2/@Core.Description#viaset": { + "@Core.IsLanguageDependent": { + "$Path": "B1" + } + }, +``` +:::: + + +Path evaluation for the annotations in the final block starts at the outermost +type `self.A` named in the target path. +:::: varjson +```json + "self.A/A2": { + "@Core.Description#external@Core.IsLanguageDependent": { + "$Path": "A1" + }, + "@Core.Description#external": "..." + }, + "self.A/A2/@Core.Description": { + "@Core.IsLanguageDependent": { + "$Path": "A1" + } + } + } +} +``` +:::: + + +::: #### 14.4.1.3 Annotation Path The annotation path expression provides a value for terms or term properties that specify the [built-in types](#BuiltInTypesfordefiningVocabularyTerms) -`Edm.AnnotationPath or Edm.ModelElementPath`. Its argument is a [model +`Edm.AnnotationPath` or `Edm.ModelElementPath`. Its argument is a [model path](#PathExpressions) with the following restriction: - A non-null path MUST resolve to an annotation. @@ -4369,7 +4476,7 @@ path. ::: ::: {.varjson .example} -Example 67: +Example 68: ```json "@UI.ReferenceFacet": "Product/Supplier/@UI.LineItem", "@UI.CollectionFacet#Contacts": [ @@ -4397,7 +4504,7 @@ path. ::: ::: {.varjson .example} -Example 68: +Example 69: ```json "@org.example.MyFavoriteModelElement": "/self.someAction" ``` @@ -4426,7 +4533,7 @@ containing a path. ::: ::: {.varjson .example} -Example 69: +Example 70: ```json "@UI.HyperLink": "Supplier", @@ -4462,7 +4569,7 @@ Property path expressions are represented as a string containing a path. ::: ::: {.varjson .example} -Example 70: +Example 71: ```json "@UI.RefreshOnChangeOf": "ChangedAt", @@ -4496,7 +4603,7 @@ Path expressions are represented as an object with a single member ::: ::: {.varjson .example} -Example 71: +Example 72: ```json "@UI.DisplayName": { "$Path": "FirstName" @@ -4568,7 +4675,7 @@ They MAY contain [annotations](#Annotation). ::: ::: {.varjson .example} -Example 72: +Example 73: ```json { "$And": [ @@ -4708,7 +4815,7 @@ They MAY contain [annotations](#Annotation). ::: ::: {.varjson .example} -Example 73: +Example 74: ```json { "$Add": [ @@ -4821,7 +4928,7 @@ are represented according to the appropriate alternative in the `binaryValue`, `Edm.Boolean` as `booleanValue` etc. ::: {.varjson .example} -Example 74: +Example 75: ```json "@UI.DisplayName": { "$Apply": [ @@ -4880,7 +4987,7 @@ types with two properties that are used in lexicographic order. The first property is used as key, the second property as value. ::: {.varjson .example} -Example 75: assuming there are no special characters in values of the +Example 76: assuming there are no special characters in values of the Name property of the Actor entity ```json { @@ -4911,7 +5018,7 @@ expression, using syntax and semantics of [ECMAScript](#_ECMAScript) regular expressions. ::: {.varjson .example} -Example 76: all non-empty `FirstName` values not containing the letters +Example 77: all non-empty `FirstName` values not containing the letters `b`, `c`, or `d` evaluate to `true` ```json { @@ -4937,7 +5044,7 @@ Note: string literals are surrounded by single quotes as required by the paren-style key syntax. ::: {.varjson .example} -Example 77: +Example 78: ```json { "$Apply": [ @@ -4986,7 +5093,7 @@ considered unspecified. ::: ::: {.varjson .example} -Example 78: +Example 79: ```json "@UI.Threshold": { "$Cast": { @@ -5013,7 +5120,7 @@ item expression within the collection expression. ::: ::: {.varjson .example} -Example 79: +Example 80: ```json "@seo.SeoTerms": [ "Product", @@ -5060,7 +5167,7 @@ It MAY contain [annotations](#Annotation). ::: ::: {.varjson .example} -Example 80: the condition is a [value path expression](#ValuePath) +Example 81: the condition is a [value path expression](#ValuePath) referencing the Boolean property `IsFemale`, whose value then determines the value of the `$If` expression (or so it was long ago) ```json @@ -5104,7 +5211,7 @@ considered unspecified. ::: ::: {.varjson .example} -Example 81: +Example 82: ```json "@Self.IsPreferredCustomer": { "$IsOf": { @@ -5143,7 +5250,7 @@ It MAY contain [annotations](#Annotation). ::: ::: {.varjson .example} -Example 82: +Example 83: ```json "@UI.DisplayName": { "$LabeledElement": { @@ -5172,7 +5279,7 @@ an qualified name. ::: ::: {.varjson .example} -Example 83: +Example 84: ```json "@UI.DisplayName": { "$LabeledElementReference": "self.CustomerFirstName" @@ -5193,7 +5300,7 @@ literal `null`. ::: ::: {.varjson .example} -Example 84: +Example 85: ```json "@UI.DisplayName": null, ``` @@ -5207,7 +5314,7 @@ as an object with a member `$Null` whose value is the literal `null`. ::: ::: {.varjson .example} -Example 85: +Example 86: ```json "@UI.Address": { "$Null": null, @@ -5254,7 +5361,7 @@ Annotations for record members are prefixed with the member name. ::: ::: {.varjson .example} -Example 86: this annotation "morphs" the entity type from [example 8](#entitytype) into +Example 87: this annotation "morphs" the entity type from [example 8](#entitytype) into a structured type with two structural properties `GivenName` and `Surname` and two navigation properties `DirectSupervisor` and `CostCenter`. The first three properties simply rename properties of the @@ -5320,7 +5427,7 @@ It MAY contain [annotations](#Annotation). ::: ::: {.varjson .example} -Example 87: +Example 88: ```json "@org.example.person.Supplier": { "$UrlRef": { @@ -5404,7 +5511,7 @@ forward-slash separated property, navigation property, or type-cast segments ::: example -Example 88: Target expressions +Example 89: Target expressions ``` MySchema.MyEntityContainer/MyEntitySet MySchema.MyEntityContainer/MySingleton @@ -5425,7 +5532,7 @@ CSDL JSON. These examples demonstrate many of the topics covered above. ## 16.1 Products and Categories Example ::: {.varjson .example} -Example 89: +Example 90: ```json { "$Version": "4.0", @@ -5647,7 +5754,7 @@ Example 89: ## 16.2 Annotations for Products and Categories Example ::: {.varjson .example} -Example 90: +Example 91: ```json { "$Version": "4.01", diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index c152966ca..d03a48480 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -365,6 +365,22 @@

    Table of Contents

    1 Introduction

    OData services are described in terms of an Entity Model. The Common Schema Definition Language (CSDL) defines a representation of the entity model exposed by an OData service using the Extensible Markup Language (XML) 1.1 (Second Edition) XML-1.1 with further building blocks from the W3C XML Schema Definition Language (XSD) 1.1 as described in XML-Schema-1 and XML-Schema-2.

    1.1 Changes from Earlier Versions

    + + + + + + + + + + + + + + + +
    SectionFeature / ChangeIssue
    Section 14.4.1.2New path evaluation rules for annotations targeting annotations and external targeting via containerODATA-1420

    1.2 Glossary

    1.2.1 Definitions of Terms

    1.2.2 Acronyms and Abbreviations

    @@ -2423,14 +2439,64 @@

    14.4.1.1 Path

    14.4.1.2 Path Evaluation

    Annotations MAY be embedded within their target, or specified separately, e.g. as part of a different schema, and specify a path to their target model element. The latter situation is referred to as targeting in the remainder of this section.

    -

    For annotations embedded within or targeting an entity container, the path is evaluated starting at the entity container, i.e. an empty path resolves to the entity container, and non-empty paths MUST start with a segment identifying a container child (entity set, function import, action import, or singleton). The subsequent segments follow the rules for paths targeting the corresponding child element.

    -

    For annotations embedded within or targeting an entity set or a singleton, the path is evaluated starting at the entity set or singleton, i.e. an empty path resolves to the entity set or singleton, and non-empty paths MUST follow the rules for annotations targeting the declared entity type of the entity set or singleton.

    -

    For annotations embedded within or targeting an entity type or complex type, the path is evaluated starting at the type, i.e. an empty path resolves to the type, and the first segment of a non-empty path MUST be a structural or navigation property of the type, a type cast, or a term cast.

    -

    For annotations embedded within a structural or navigation property of an entity type or complex type, the path is evaluated starting at the directly enclosing type. This allows e.g. specifying the value of an annotation on one property to be calculated from values of other properties of the same type. An empty path resolves to the enclosing type, and non-empty paths MUST follow the rules for annotations targeting the directly enclosing type.

    -

    For annotations targeting a structural or navigation property of an entity type or complex type, the path is evaluated starting at the outermost entity type or complex type named in the target of the annotation, i.e. an empty path resolves to the outermost type, and the first segment of a non-empty path MUST be a structural or navigation property of the outermost type, a type cast, or a term cast.

    -

    For annotations embedded within or targeting an action, action import, function, function import, parameter, or return type, the first segment of the path MUST be a parameter name or $ReturnType.

    +

    The host of an annotation is the model element targeted by the annotation, unless that target is another annotation or a model element (collection, record or property value) directly or indirectly embedded within another annotation, in which case the host is the host of that other annotation.

    +

    If the value of an annotation is expressed dynamically with a path expression, the path evaluation rules for this expression depend upon the model element by which the annotation is hosted.

    +

    For annotations hosted by an entity container, the path is evaluated starting at the entity container, i.e. an empty path resolves to the entity container, and non-empty paths MUST start with a segment identifying a container child (entity set, function import, action import, or singleton). The subsequent segments follow the rules for path expressions targeting the corresponding child element.

    +

    For annotations hosted by an entity set or a singleton, the path is evaluated starting at the entity set or singleton, i.e. an empty path resolves to the entity set or singleton, and non-empty paths MUST follow the rules for annotations targeting the declared entity type of the entity set or singleton.

    +

    For annotations hosted by an entity type or complex type, the path is evaluated starting at the type, i.e. an empty path resolves to the type, and the first segment of a non-empty path MUST be a structural or navigation property of the type, a type cast, or a term cast.

    +

    For annotations hosted by an action, action import, function, function import, parameter, or return type, the first segment of the path MUST be the name of a parameter of the action or function or $ReturnType.

    +

    For annotations hosted by a structural or navigation property, the path evaluation rules additionally depend upon how the annotation target is specified, as follows:

    +
      +
    1. If the annotation is directly or indirectly embedded within the hosting property, the path is evaluated starting at the directly enclosing type of the hosting property. This allows e.g. specifying the value of an annotation on one property to be calculated from values of other properties of the same enclosing type. An empty path resolves to the enclosing type, and non-empty paths MUST follow the rules for annotations targeting the directly enclosing type.

    2. +
    3. If the annotation uses targeting and the target path starts with an entity container, or the annotation is directly or indirectly embedded within such an annotation, the path is evaluated starting at the declared type of the hosting property. An empty path resolves to the declared type of the property, and non-empty paths MUST follow the rules for annotations targeting the declared type of the property. If the type is primitive, the first segment of a non-empty path MUST be a type cast or a term cast.

    4. +
    5. If the annotation uses targeting and the target path does not start with an entity container, or the annotation is directly or indirectly embedded within such an annotation, the path is evaluated starting at the outermost entity type or complex type named in the target path. This allows e.g. specifying the value of an annotation on one property to be calculated from values of other properties of the outermost type. An empty path resolves to the outermost type, and the first segment of a non-empty path MUST be a structural or navigation property of the outermost type, a type cast, or a term cast.

    6. +
    +
    +

    Example 67: Annotations hosted by property A2 in various modes

    +

    Path evaluation for the annotations in the first block starts at the directly enclosing type self.A of the hosting property A2.

    +
    +
    <Schema Namespace="self">
    +  <EntityType Name="A">
    +    <Property Name="A1" Type="Edm.Boolean" Nullable="false" />
    +    <Property Name="A2" Type="self.B" Nullable="false">
    +      <Annotation Term="Core.Description" String="...">
    +        <Annotation Term="Core.IsLanguageDependent" Path="A1" />
    +      </Annotation>
    +    </Property>
    +  </EntityType>
    +  <ComplexType Name="B">
    +    <Property Name="B1" Type="Edm.Boolean" Nullable="false" />
    +  </ComplexType>
    +
    +

    Path evaluation for the annotations in the next block starts at the declared type self.B of the hosting property A2.

    +
    +
      <EntityContainer Name="Container">
    +    <EntitySet Name="SetA" EntityType="self.A" />
    +  </EntityContainer>
    +  <Annotations Target="self.Container/SetA/A2">
    +    <Annotation Term="Core.Description" Qualifier="viaset" String="...">
    +      <Annotation Term="Core.IsLanguageDependent" Path="B1" />
    +    </Annotation>
    +  </Annotations>
    +  <Annotations Target="self.Container/SetA/A2/@Core.Description#viaset">
    +    <Annotation Term="Core.IsLanguageDependent" Path="B1" />
    +  </Annotations>
    +
    +

    Path evaluation for the annotations in the final block starts at the outermost type self.A named in the target path.

    +
    +
      <Annotations Target="self.A/A2">
    +    <Annotation Term="Core.Description" Qualifier="external" String="...">
    +      <Annotation Term="Core.IsLanguageDependent" Path="A1" />
    +    </Annotation>
    +  </Annotations>
    +  <Annotations Target="self.A/A2/@Core.Description">
    +    <Annotation Term="Core.IsLanguageDependent" Path="A1" />
    +  </Annotations>
    +</Schema>
    +
    +

    14.4.1.3 Annotation Path

    -

    The annotation path expression provides a value for terms or term properties that specify the built-in types Edm.AnnotationPath or Edm.ModelElementPath. Its argument is a model path with the following restriction:

    +

    The annotation path expression provides a value for terms or term properties that specify the built-in types Edm.AnnotationPath or Edm.ModelElementPath. Its argument is a model path with the following restriction:

    • A non-null path MUST resolve to an annotation.
    @@ -2441,16 +2507,16 @@

    -

    Example 67:

    -
    <Annotation Term="UI.ReferenceFacet"
    -            AnnotationPath="Product/Supplier/@UI.LineItem" />
    -
    -<Annotation Term="UI.CollectionFacet" Qualifier="Contacts">
    -  <Collection>
    -    <AnnotationPath>Supplier/@Communication.Contact</AnnotationPath>
    -    <AnnotationPath>Customer/@Communication.Contact</AnnotationPath>
    -  </Collection>
    -</Annotation>
    +

    Example 68:

    +
    <Annotation Term="UI.ReferenceFacet"
    +            AnnotationPath="Product/Supplier/@UI.LineItem" />
    +
    +<Annotation Term="UI.CollectionFacet" Qualifier="Contacts">
    +  <Collection>
    +    <AnnotationPath>Supplier/@Communication.Contact</AnnotationPath>
    +    <AnnotationPath>Customer/@Communication.Contact</AnnotationPath>
    +  </Collection>
    +</Annotation>

    14.4.1.4 Model Element Path

    The model element path expression provides a value for terms or term properties that specify the built-in type Edm.ModelElementPath. Its argument is a model path.

    @@ -2460,13 +2526,13 @@

    -

    Example 68:

    -
    <Annotation Term="org.example.MyFavoriteModelElement"
    -            ModelElementPath="/org.example.someAction" />
    -
    -<Annotation Term="org.example.MyFavoriteModelElement">
    -  <ModelElementPath>/org.example.someAction</ModelElementPath>
    -</Annotation>
    +

    Example 69:

    +
    <Annotation Term="org.example.MyFavoriteModelElement"
    +            ModelElementPath="/org.example.someAction" />
    +
    +<Annotation Term="org.example.MyFavoriteModelElement">
    +  <ModelElementPath>/org.example.someAction</ModelElementPath>
    +</Annotation>

    14.4.1.5 Navigation Property Path

    The navigation property path expression provides a value for terms or term properties that specify the built-in types Edm.NavigationPropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

    @@ -2479,19 +2545,19 @@

    -

    Example 69:

    -
    <Annotation Term="UI.HyperLink" NavigationPropertyPath="Supplier" />
    -
    -<Annotation Term="Capabilities.UpdateRestrictions">
    -  <Record>
    -    <PropertyValue Property="NonUpdatableNavigationProperties">
    -      <Collection>
    -        <NavigationPropertyPath>Supplier</NavigationPropertyPath>
    -        <NavigationPropertyPath>Category</NavigationPropertyPath>
    -      </Collection>
    -    </PropertyValue>
    -  </Record>
    -</Annotation>
    +

    Example 70:

    +
    <Annotation Term="UI.HyperLink" NavigationPropertyPath="Supplier" />
    +
    +<Annotation Term="Capabilities.UpdateRestrictions">
    +  <Record>
    +    <PropertyValue Property="NonUpdatableNavigationProperties">
    +      <Collection>
    +        <NavigationPropertyPath>Supplier</NavigationPropertyPath>
    +        <NavigationPropertyPath>Category</NavigationPropertyPath>
    +      </Collection>
    +    </PropertyValue>
    +  </Record>
    +</Annotation>

    14.4.1.6 Property Path

    The property path expression provides a value for terms or term properties that specify one of the built-in types Edm.PropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

    @@ -2504,19 +2570,19 @@

    E

    The edm:PropertyPath MAY be provided using either element notation or attribute notation.

    -

    Example 70:

    -
    <Annotation Term="UI.RefreshOnChangeOf" PropertyPath="ChangedAt" />
    -
    -<Annotation Term="Capabilities.UpdateRestrictions">
    -  <Record>
    -    <PropertyValue Property="NonUpdatableProperties">
    -      <Collection>
    -        <PropertyPath>CreatedAt</PropertyPath>
    -        <PropertyPath>ChangedAt</PropertyPath>
    -      </Collection>
    -    </PropertyValue>
    -  </Record>
    -</Annotation>
    +

    Example 71:

    +
    <Annotation Term="UI.RefreshOnChangeOf" PropertyPath="ChangedAt" />
    +
    +<Annotation Term="Capabilities.UpdateRestrictions">
    +  <Record>
    +    <PropertyValue Property="NonUpdatableProperties">
    +      <Collection>
    +        <PropertyPath>CreatedAt</PropertyPath>
    +        <PropertyPath>ChangedAt</PropertyPath>
    +      </Collection>
    +    </PropertyValue>
    +  </Record>
    +</Annotation>

    14.4.1.7 Value Path

    The value path expression allows assigning a value by traversing an object graph. It can be used in annotations that target entity containers, entity sets, entity types, complex types, navigation properties of structured types, and structural properties of structured types. Its argument is an instance path.

    @@ -2526,12 +2592,12 @@

    Expression

    The edm:Path expression MAY be provided using element notation or attribute notation.

    -

    Example 71:

    -
    <Annotation Term="org.example.display.DisplayName" Path="FirstName" />
    -
    -<Annotation Term="org.example.display.DisplayName">
    -  <Path>@vCard.Address#work/FullName</Path>
    -</Annotation>
    +

    Example 72:

    +
    <Annotation Term="org.example.display.DisplayName" Path="FirstName" />
    +
    +<Annotation Term="org.example.display.DisplayName">
    +  <Path>@vCard.Address#work/FullName</Path>
    +</Annotation>

    14.4.2 Comparison and Logical Operators

    Annotations MAY use the following logical and comparison expressions which evaluate to a Boolean value. These expressions MAY be combined and they MAY be used anywhere instead of a Boolean expression.

    @@ -2566,53 +2632,53 @@

    edm:Annotation elements.

    -

    Example 72:

    -
    <And>
    -  <Path>IsMale</Path>
    -  <Path>IsMarried</Path>
    -</And>
    -<Or>
    -  <Path>IsMale</Path>
    -  <Path>IsMarried</Path>
    -</Or>
    -<Not>
    -  <Path>IsMale</Path>
    -</Not>
    -<Eq>
    -  <Null />
    -  <Path>IsMale</Path>
    -</Eq>
    -<Ne>
    -  <Null />
    -  <Path>IsMale</Path>
    -</Ne>
    -<Gt>
    -  <Path>Price</Path>
    -  <Int>20</Int>
    -</Gt>
    -<Ge>
    -  <Path>Price</Path>
    -  <Int>10</Int>
    -</Ge>
    -<Lt>
    -  <Path>Price</Path>
    -  <Int>20</Int>
    -</Lt>
    -<Le>
    -  <Path>Price</Path>
    -  <Int>100</Int>
    -</Le>
    -<Has>
    -  <Path>Fabric</Path>
    -  <EnumMember>org.example.Pattern/Red</EnumMember>
    -</Has>
    -<In>
    -  <Path>Size</Path>
    -  <Collection>
    -    <String>XS</String>
    -    <String>S</String>
    -  </Collection>
    -</In>
    +

    Example 73:

    +
    <And>
    +  <Path>IsMale</Path>
    +  <Path>IsMarried</Path>
    +</And>
    +<Or>
    +  <Path>IsMale</Path>
    +  <Path>IsMarried</Path>
    +</Or>
    +<Not>
    +  <Path>IsMale</Path>
    +</Not>
    +<Eq>
    +  <Null />
    +  <Path>IsMale</Path>
    +</Eq>
    +<Ne>
    +  <Null />
    +  <Path>IsMale</Path>
    +</Ne>
    +<Gt>
    +  <Path>Price</Path>
    +  <Int>20</Int>
    +</Gt>
    +<Ge>
    +  <Path>Price</Path>
    +  <Int>10</Int>
    +</Ge>
    +<Lt>
    +  <Path>Price</Path>
    +  <Int>20</Int>
    +</Lt>
    +<Le>
    +  <Path>Price</Path>
    +  <Int>100</Int>
    +</Le>
    +<Has>
    +  <Path>Fabric</Path>
    +  <EnumMember>org.example.Pattern/Red</EnumMember>
    +</Has>
    +<In>
    +  <Path>Size</Path>
    +  <Collection>
    +    <String>XS</String>
    +    <String>S</String>
    +  </Collection>
    +</In>

    14.4.3 Arithmetic Operators

    Annotations MAY use the following arithmetic expressions which evaluate to a numeric value. These expressions MAY be combined, and they MAY be used anywhere instead of a numeric expression of the appropriate type. The semantics and evaluation rules for each arithmetic expression is identical to the corresponding arithmetic operator defined in OData-URL.

    @@ -2664,34 +2730,34 @@

    They MAY contain edm:Annotation elements.

    -

    Example 73:

    -
    <Add>
    -  <Path>StartDate</Path>
    -  <Path>Duration</Path>
    -</Add>
    -<Sub>
    -  <Path>Revenue</Path>
    -  <Path>Cost</Path>
    -</Sub>
    -<Neg>
    -  <Path>Height</Path>
    -</Neg>
    -<Mul>
    -  <Path>NetPrice</Path>
    -  <Path>TaxRate</Path>
    -</Mul>
    -<Div>
    -  <Path>Quantity</Path>
    -  <Path>QuantityPerParcel</Path>
    -</Div>
    -<DivBy>
    -  <Path>Quantity</Path>
    -  <Path>QuantityPerParcel</Path>
    -</DivBy>
    -<Mod>
    -  <Path>Quantity</Path>
    -  <Path>QuantityPerParcel</Path>
    -</Mod>
    +

    Example 74:

    +
    <Add>
    +  <Path>StartDate</Path>
    +  <Path>Duration</Path>
    +</Add>
    +<Sub>
    +  <Path>Revenue</Path>
    +  <Path>Cost</Path>
    +</Sub>
    +<Neg>
    +  <Path>Height</Path>
    +</Neg>
    +<Mul>
    +  <Path>NetPrice</Path>
    +  <Path>TaxRate</Path>
    +</Mul>
    +<Div>
    +  <Path>Quantity</Path>
    +  <Path>QuantityPerParcel</Path>
    +</Div>
    +<DivBy>
    +  <Path>Quantity</Path>
    +  <Path>QuantityPerParcel</Path>
    +</DivBy>
    +<Mod>
    +  <Path>Quantity</Path>
    +  <Path>QuantityPerParcel</Path>
    +</Mod>

    14.4.4 Apply Client-Side Functions

    The apply expression enables a value to be obtained by applying a client-side function. The apply expression MAY have operand expressions. The operand expressions are used as parameters to the client-side function.

    @@ -2707,18 +2773,18 @@

    OData-URL can be used as client-side functions, qualified with the namespace odata. The semantics of these client-side functions is identical to their counterpart function defined in OData-URL.

    For example, the odata.concat client-side function takes two or more expressions as arguments. Each argument MUST evaluate to a primitive or enumeration type. It returns a value of type Edm.String that is the concatenation of the literal representations of the results of the argument expressions. Values of primitive types other than Edm.String are represented according to the appropriate alternative in the primitiveValue rule of OData-ABNF, i.e. Edm.Binary as binaryValue, Edm.Boolean as booleanValue etc.

    -

    Example 74:

    -
    <Annotation Term="org.example.display.DisplayName">
    -  <Apply Function="odata.concat">
    -    <String>Product: </String>
    -    <Path>ProductName</Path>
    -    <String> (</String>
    -    <Path>Available/Quantity</Path>
    -    <String> </String>
    -    <Path>Available/Unit</Path>
    -    <String> available)</String>
    -  </Apply>
    -</Annotation>
    +

    Example 75:

    +
    <Annotation Term="org.example.display.DisplayName">
    +  <Apply Function="odata.concat">
    +    <String>Product: </String>
    +    <Path>ProductName</Path>
    +    <String> (</String>
    +    <Path>Available/Quantity</Path>
    +    <String> </String>
    +    <Path>Available/Unit</Path>
    +    <String> available)</String>
    +  </Apply>
    +</Annotation>

    ProductName is of type String, Quantity in complex type Available is of type Decimal, and Unit in Available is of type enumeration, so the result of the Path expression is represented as the member name of the enumeration value.

    14.4.4.2 Function odata.fillUriTemplate

    @@ -2729,35 +2795,35 @@

    labeled element expressions that evaluate to a collection of primitive values.

    Key-value maps are represented as labeled element expressions that evaluate to a collection of complex types with two properties that are used in lexicographic order. The first property is used as key, the second property as value.

    -

    Example 75: assuming there are no special characters in values of the Name property of the Actor entity

    -
    <Apply Function="odata.fillUriTemplate">
    -  <String>http://host/someAPI/Actors/{actorName}/CV</String>
    -  <LabeledElement Name="actorName" Path="Actor/Name" />
    -</Apply>
    +

    Example 76: assuming there are no special characters in values of the Name property of the Actor entity

    +
    <Apply Function="odata.fillUriTemplate">
    +  <String>http://host/someAPI/Actors/{actorName}/CV</String>
    +  <LabeledElement Name="actorName" Path="Actor/Name" />
    +</Apply>

    14.4.4.3 Function odata.matchesPattern

    The odata.matchesPattern client-side function takes two string expressions as arguments and returns a Boolean value.

    The function returns true if the second expression evaluates to an ECMAScript (JavaScript) regular expression and the result of the first argument expression matches that regular expression, using syntax and semantics of ECMAScript regular expressions.

    -

    Example 76: all non-empty FirstName values not containing the letters b, c, or d evaluate to true

    -
    <Apply Function="odata.matchesPattern">
    -  <Path>FirstName</Path>
    -  <String>^[^b-d]+$</String>
    -</Apply>
    +

    Example 77: all non-empty FirstName values not containing the letters b, c, or d evaluate to true

    +
    <Apply Function="odata.matchesPattern">
    +  <Path>FirstName</Path>
    +  <String>^[^b-d]+$</String>
    +</Apply>

    14.4.4.4 Function odata.uriEncode

    The odata.uriEncode client-side function takes one argument of primitive type and returns the URL-encoded OData literal that can be used as a key value in OData URLs or in the query part of OData URLs.

    Note: string literals are surrounded by single quotes as required by the paren-style key syntax.

    -

    Example 77:

    -
    <Apply Function="odata.fillUriTemplate">
    -  <String>http://host/service/Genres({genreName})</String>
    -  <LabeledElement Name="genreName">
    -    <Apply Function="odata.uriEncode" >
    -      <Path>NameOfMovieGenre</Path>
    -    </Apply>
    -  </LabeledElement>
    -</Apply>
    +

    Example 78:

    +
    <Apply Function="odata.fillUriTemplate">
    +  <String>http://host/service/Genres({genreName})</String>
    +  <LabeledElement Name="genreName">
    +    <Apply Function="odata.uriEncode" >
    +      <Path>NameOfMovieGenre</Path>
    +    </Apply>
    +  </LabeledElement>
    +</Apply>

    14.4.5 Cast

    The cast expression casts the value obtained from its single child expression to the specified type. The cast expression follows the same rules as the cast canonical function defined in OData-URL.

    @@ -2770,12 +2836,12 @@

    If the specified type is a primitive type or a collection of a primitive type, the facet attributes MaxLength, Unicode, Precision, Scale, and SRID MAY be specified if applicable to the specified primitive type. If the facet attributes are not specified, their values are considered unspecified.

    -

    Example 78:

    -
    <Annotation Term="org.example.display.Threshold">
    -  <Cast Type="Edm.Decimal">
    -    <Path>Average</Path>
    -  </Cast>
    -</Annotation>
    +

    Example 79:

    +
    <Annotation Term="org.example.display.Threshold">
    +  <Cast Type="Edm.Decimal">
    +    <Path>Average</Path>
    +  </Cast>
    +</Annotation>

    14.4.6 Collection

    The collection expression enables a value to be obtained from zero or more item expressions. The value calculated by the collection expression is the collection of the values calculated by each of the item expressions. The values of the child expressions MUST all be type compatible.

    @@ -2784,14 +2850,14 @@

    Expre

    The edm:Collection element contains zero or more child expressions.

    -

    Example 79:

    -
    <Annotation Term="org.example.seo.SeoTerms">
    -  <Collection>
    -    <String>Product</String>
    -    <String>Supplier</String>
    -    <String>Customer</String>
    -  </Collection>
    -</Annotation>
    +

    Example 80:

    +
    <Annotation Term="org.example.seo.SeoTerms">
    +  <Collection>
    +    <String>Product</String>
    +    <String>Supplier</String>
    +    <String>Customer</String>
    +  </Collection>
    +</Annotation>

    14.4.7 If-Then-Else

    The if-then-else expression enables a value to be obtained by evaluating a condition expression. It MUST contain exactly three child expressions. There is one exception to this rule: if and only if the if-then-else expression is an item of a collection expression, the third child expression MAY be omitted, reducing it to an if-then expression. This can be used to conditionally add an element to a collection.

    @@ -2804,14 +2870,14 @@

    Expression edm:

    It MAY contain edm:Annotation elements.

    -

    Example 80: the condition is a value path expression referencing the Boolean property IsFemale, whose value then determines the value of the edm:If expression (or so it was long ago)

    -
    <Annotation Term="org.example.person.Gender">
    -  <If>
    -    <Path>IsFemale</Path>
    -    <String>Female</String>
    -    <String>Male</String>
    -  </If>
    -</Annotation>
    +

    Example 81: the condition is a value path expression referencing the Boolean property IsFemale, whose value then determines the value of the edm:If expression (or so it was long ago)

    +
    <Annotation Term="org.example.person.Gender">
    +  <If>
    +    <Path>IsFemale</Path>
    +    <String>Female</String>
    +    <String>Male</String>
    +  </If>
    +</Annotation>

    14.4.8 Is-Of

    The is-of expression checks whether the value obtained from its single child expression is compatible with the specified type. It returns true if the child expression returns a type that is compatible with the specified type, and false otherwise.

    @@ -2822,12 +2888,12 @@

    Expression In element notation it MAY contain edm:Annotation elements.

    -

    Example 81:

    -
    <Annotation Term="self.IsPreferredCustomer">
    -  <IsOf Type="self.PreferredCustomer">
    -    <Path>Customer</Path>
    -  </IsOf>
    -</Annotation>
    +

    Example 82:

    +
    <Annotation Term="self.IsPreferredCustomer">
    +  <IsOf Type="self.PreferredCustomer">
    +    <Path>Customer</Path>
    +  </IsOf>
    +</Annotation>

    14.4.9 Labeled Element

    The labeled element expression assigns a name to its single child expression. The value of the child expression can then be reused elsewhere with a labeled element reference expression.

    @@ -2842,16 +2908,16 @@

    -

    Example 82:

    -
    <Annotation Term="org.example.display.DisplayName">
    -  <LabeledElement Name="CustomerFirstName" Path="FirstName" />
    -</Annotation>
    -
    -<Annotation Term="org.example.display.DisplayName">
    -  <LabeledElement Name="CustomerFirstName">
    -    <Path>FirstName</Path>
    -  </LabeledElement>
    -</Annotation>
    +

    Example 83:

    +
    <Annotation Term="org.example.display.DisplayName">
    +  <LabeledElement Name="CustomerFirstName" Path="FirstName" />
    +</Annotation>
    +
    +<Annotation Term="org.example.display.DisplayName">
    +  <LabeledElement Name="CustomerFirstName">
    +    <Path>FirstName</Path>
    +  </LabeledElement>
    +</Annotation>

    14.4.10 Labeled Element Reference

    The labeled element reference expression MUST specify the qualified name of a labeled element expression in scope and returns the value of the identified labeled element expression as its value.

    @@ -2860,10 +2926,10 @@

    -

    Example 83:

    -
    <Annotation Term="org.example.display.DisplayName">
    -  <LabeledElementReference>Model.CustomerFirstName</LabeledElementReference>
    -</Annotation>
    +

    Example 84:

    +
    <Annotation Term="org.example.display.DisplayName">
    +  <LabeledElementReference>Model.CustomerFirstName</LabeledElementReference>
    +</Annotation>

    14.4.11 Null

    The null expression indicates the absence of a value. The null expression MAY be annotated.

    @@ -2872,18 +2938,18 @@

    Expression

    The edm:Null element MAY contain edm:Annotation elements.

    -

    Example 84:

    -
    <Annotation Term="org.example.display.DisplayName">
    -  <Null/>
    -</Annotation>
    +

    Example 85:

    +
    <Annotation Term="org.example.display.DisplayName">
    +  <Null/>
    +</Annotation>
    -

    Example 85:

    -
    <Annotation Term="@UI.Address">
    -  <Null>
    -    <Annotation Term="self.Reason" String="Private" />
    -  </Null>
    -</Annotation>
    +

    Example 86:

    +
    <Annotation Term="@UI.Address">
    +  <Null>
    +    <Annotation Term="self.Reason" String="Private" />
    +  </Null>
    +</Annotation>

    14.4.12 Record

    The record expression enables a new entity type or complex type instance to be constructed.

    @@ -2903,26 +2969,26 @@

    -

    Example 86: this annotation "morphs" the entity type from example 8 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

    -
    <Annotation Term="org.example.person.Employee">
    -  <Record>
    -    <Annotation Term="Core.Description" String="Annotation on record" />
    -    <PropertyValue Property="GivenName" Path="FirstName">
    -      <Annotation Term="Core.Description"
    -                  String="Annotation on record member" />
    -    </PropertyValue>
    -    <PropertyValue Property="Surname" Path="LastName" />
    -    <PropertyValue Property="DirectSupervisor" Path="Manager" />
    -    <PropertyValue Property="CostCenter">
    -      <UrlRef>
    -        <Apply Function="odata.fillUriTemplate">
    -          <String>http://host/anotherservice/CostCenters('{ccid}')</String>
    -          <LabeledElement Name="ccid" Path="CostCenterID" />
    -        </Apply>
    -      </UrlRef>
    -    </PropertyValue>
    -  </Record>
    -</Annotation>
    +

    Example 87: this annotation "morphs" the entity type from example 8 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

    +
    <Annotation Term="org.example.person.Employee">
    +  <Record>
    +    <Annotation Term="Core.Description" String="Annotation on record" />
    +    <PropertyValue Property="GivenName" Path="FirstName">
    +      <Annotation Term="Core.Description"
    +                  String="Annotation on record member" />
    +    </PropertyValue>
    +    <PropertyValue Property="Surname" Path="LastName" />
    +    <PropertyValue Property="DirectSupervisor" Path="Manager" />
    +    <PropertyValue Property="CostCenter">
    +      <UrlRef>
    +        <Apply Function="odata.fillUriTemplate">
    +          <String>http://host/anotherservice/CostCenters('{ccid}')</String>
    +          <LabeledElement Name="ccid" Path="CostCenterID" />
    +        </Apply>
    +      </UrlRef>
    +    </PropertyValue>
    +  </Record>
    +</Annotation>

    14.4.13 URL Reference

    The URL reference expression enables a value to be obtained by sending a GET request.

    @@ -2935,25 +3001,25 @@

    Expression In element notation it MAY contain edm:Annotation elements.

    -

    Example 87:

    -
    <Annotation Term="org.example.person.Supplier">
    -  <UrlRef>
    -    <Apply Function="odata.fillUriTemplate">
    -      <String>http://host/service/Suppliers({suppID})</String>
    -      <LabeledElement Name="suppID">
    -      <Apply Function="odata.uriEncode">
    -        <Path>SupplierId</Path>
    -      </Apply>
    -      </LabeledElement>
    -     </Apply>
    -  </UrlRef>
    -</Annotation>
    -
    -<Annotation Term="Core.LongDescription">
    -  <UrlRef><String>http://host/wiki/HowToUse</String></UrlRef>
    -</Annotation>
    -
    -<Annotation Term="Core.LongDescription" UrlRef="http://host/wiki/HowToUse" />
    +

    Example 88:

    +
    <Annotation Term="org.example.person.Supplier">
    +  <UrlRef>
    +    <Apply Function="odata.fillUriTemplate">
    +      <String>http://host/service/Suppliers({suppID})</String>
    +      <LabeledElement Name="suppID">
    +      <Apply Function="odata.uriEncode">
    +        <Path>SupplierId</Path>
    +      </Apply>
    +      </LabeledElement>
    +     </Apply>
    +  </UrlRef>
    +</Annotation>
    +
    +<Annotation Term="Core.LongDescription">
    +  <UrlRef><String>http://host/wiki/HowToUse</String></UrlRef>
    +</Annotation>
    +
    +<Annotation Term="Core.LongDescription" UrlRef="http://host/wiki/HowToUse" />

    15 Identifier and Path Values

    @@ -2978,7 +3044,7 @@

    15.4 Target Pat
  • The target path of a container child followed by a forward slash and one or more forward-slash separated property, navigation property, or type-cast segments
  • -

    Example 88: Target expressions

    +

    Example 89: Target expressions

    MySchema.MyEntityContainer/MyEntitySet
     MySchema.MyEntityContainer/MySingleton
     MySchema.MyEntityContainer/MySingleton/MyContainmentNavigationProperty
    @@ -2990,154 +3056,154 @@ 

    16 CSDL Ex

    Following are two basic examples of valid EDM models as represented in CSDL. These examples demonstrate many of the topics covered above.

    16.1 Products and Categories Example

    -

    Example 89:

    -
    <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    -           xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.0">
    -  <edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
    -    <edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
    -      <Annotation Term="Core.DefaultNamespace" />
    -    </edmx:Include>
    -  </edmx:Reference>
    -  <edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml">
    -    <edmx:Include Alias="Measures" Namespace="Org.OData.Measures.V1" />
    -  </edmx:Reference>
    -  <edmx:DataServices>
    -    <Schema Namespace="ODataDemo">
    -      <EntityType Name="Product" HasStream="true">
    -        <Key>
    -          <PropertyRef Name="ID" />
    -        </Key>
    -        <Property Name="ID" Type="Edm.Int32" Nullable="false" />
    -        <Property Name="Description" Type="Edm.String" >
    -          <Annotation Term="Core.IsLanguageDependent" />
    -        </Property>
    -        <Property Name="ReleaseDate" Type="Edm.Date" />
    -        <Property Name="DiscontinuedDate" Type="Edm.Date" />
    -        <Property Name="Rating" Type="Edm.Int32" />
    -        <Property Name="Price" Type="Edm.Decimal" Scale="variable">
    -          <Annotation Term="Measures.ISOCurrency" Path="Currency" />
    -        </Property>
    -        <Property Name="Currency" Type="Edm.String" MaxLength="3" />
    -        <NavigationProperty Name="Category" Type="ODataDemo.Category"
    -                            Nullable="false" Partner="Products" />
    -        <NavigationProperty Name="Supplier" Type="ODataDemo.Supplier"
    -                            Partner="Products" />
    -      </EntityType>
    -      <EntityType Name="Category">
    -        <Key>
    -         <PropertyRef Name="ID" />
    -        </Key>
    -        <Property Name="ID" Type="Edm.Int32" Nullable="false" />
    -        <Property Name="Name" Type="Edm.String" Nullable="false">
    -          <Annotation Term="Core.IsLanguageDependent" />
    -        </Property>
    -        <NavigationProperty Name="Products" Partner="Category"
    -                            Type="Collection(ODataDemo.Product)">
    -          <OnDelete Action="Cascade" />
    -        </NavigationProperty>
    -      </EntityType>
    -      <EntityType Name="Supplier">
    -        <Key>
    -          <PropertyRef Name="ID" />
    -        </Key>
    -        <Property Name="ID" Type="Edm.String" Nullable="false" />
    -        <Property Name="Name" Type="Edm.String" />
    -        <Property Name="Address" Type="ODataDemo.Address" Nullable="false" />
    -        <Property Name="Concurrency" Type="Edm.Int32" Nullable="false" />
    -        <NavigationProperty Name="Products" Partner="Supplier"
    -                            Type="Collection(ODataDemo.Product)" />
    -      </EntityType>
    -      <EntityType Name="Country">
    -        <Key>
    -          <PropertyRef Name="Code" />
    -        </Key>
    -        <Property Name="Code" Type="Edm.String" MaxLength="2"
    -                              Nullable="false" />
    -        <Property Name="Name" Type="Edm.String" />
    -      </EntityType>
    -      <ComplexType Name="Address">
    -        <Property Name="Street" Type="Edm.String" />
    -        <Property Name="City" Type="Edm.String" />
    -        <Property Name="State" Type="Edm.String" />
    -        <Property Name="ZipCode" Type="Edm.String" />
    -        <Property Name="CountryName" Type="Edm.String" />
    -        <NavigationProperty Name="Country" Type="ODataDemo.Country">
    -          <ReferentialConstraint Property="CountryName"  
    -                                 ReferencedProperty="Name" />
    -        </NavigationProperty>
    -      </ComplexType>
    -      <Function Name="ProductsByRating">
    -        <Parameter Name="Rating" Type="Edm.Int32" />
    -        <ReturnType Type="Collection(ODataDemo.Product)" />
    -      </Function>
    -      <EntityContainer Name="DemoService">
    -        <EntitySet Name="Products" EntityType="ODataDemo.Product">
    -          <NavigationPropertyBinding Path="Category" Target="Categories" />
    -        </EntitySet>
    -        <EntitySet Name="Categories" EntityType="ODataDemo.Category">
    -          <NavigationPropertyBinding Path="Products" Target="Products" />
    -          <Annotation Term="Core.Description" String="Product Categories" />
    -        </EntitySet>
    -        <EntitySet Name="Suppliers" EntityType="ODataDemo.Supplier">
    -          <NavigationPropertyBinding Path="Products" Target="Products" />
    -          <NavigationPropertyBinding Path="Address/Country"
    -                                     Target="Countries" />
    -          <Annotation Term="Core.OptimisticConcurrency">
    -            <Collection>
    -              <PropertyPath>Concurrency</PropertyPath>
    -            </Collection>
    -          </Annotation>
    -        </EntitySet>
    -        <Singleton Name="MainSupplier" Type="self.Supplier">
    -          <NavigationPropertyBinding Path="Products" Target="Products" />
    -          <Annotation Term="Core.Description" String="Primary Supplier" />
    -        </Singleton>
    -        <EntitySet Name="Countries" EntityType="ODataDemo.Country" />
    -        <FunctionImport Name="ProductsByRating" EntitySet="Products"
    -                        Function="ODataDemo.ProductsByRating" />
    -      </EntityContainer>
    -    </Schema>
    -  </edmx:DataServices>
    -</edmx:Edmx>
    +

    Example 90:

    +
    <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    +           xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.0">
    +  <edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
    +    <edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
    +      <Annotation Term="Core.DefaultNamespace" />
    +    </edmx:Include>
    +  </edmx:Reference>
    +  <edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml">
    +    <edmx:Include Alias="Measures" Namespace="Org.OData.Measures.V1" />
    +  </edmx:Reference>
    +  <edmx:DataServices>
    +    <Schema Namespace="ODataDemo">
    +      <EntityType Name="Product" HasStream="true">
    +        <Key>
    +          <PropertyRef Name="ID" />
    +        </Key>
    +        <Property Name="ID" Type="Edm.Int32" Nullable="false" />
    +        <Property Name="Description" Type="Edm.String" >
    +          <Annotation Term="Core.IsLanguageDependent" />
    +        </Property>
    +        <Property Name="ReleaseDate" Type="Edm.Date" />
    +        <Property Name="DiscontinuedDate" Type="Edm.Date" />
    +        <Property Name="Rating" Type="Edm.Int32" />
    +        <Property Name="Price" Type="Edm.Decimal" Scale="variable">
    +          <Annotation Term="Measures.ISOCurrency" Path="Currency" />
    +        </Property>
    +        <Property Name="Currency" Type="Edm.String" MaxLength="3" />
    +        <NavigationProperty Name="Category" Type="ODataDemo.Category"
    +                            Nullable="false" Partner="Products" />
    +        <NavigationProperty Name="Supplier" Type="ODataDemo.Supplier"
    +                            Partner="Products" />
    +      </EntityType>
    +      <EntityType Name="Category">
    +        <Key>
    +         <PropertyRef Name="ID" />
    +        </Key>
    +        <Property Name="ID" Type="Edm.Int32" Nullable="false" />
    +        <Property Name="Name" Type="Edm.String" Nullable="false">
    +          <Annotation Term="Core.IsLanguageDependent" />
    +        </Property>
    +        <NavigationProperty Name="Products" Partner="Category"
    +                            Type="Collection(ODataDemo.Product)">
    +          <OnDelete Action="Cascade" />
    +        </NavigationProperty>
    +      </EntityType>
    +      <EntityType Name="Supplier">
    +        <Key>
    +          <PropertyRef Name="ID" />
    +        </Key>
    +        <Property Name="ID" Type="Edm.String" Nullable="false" />
    +        <Property Name="Name" Type="Edm.String" />
    +        <Property Name="Address" Type="ODataDemo.Address" Nullable="false" />
    +        <Property Name="Concurrency" Type="Edm.Int32" Nullable="false" />
    +        <NavigationProperty Name="Products" Partner="Supplier"
    +                            Type="Collection(ODataDemo.Product)" />
    +      </EntityType>
    +      <EntityType Name="Country">
    +        <Key>
    +          <PropertyRef Name="Code" />
    +        </Key>
    +        <Property Name="Code" Type="Edm.String" MaxLength="2"
    +                              Nullable="false" />
    +        <Property Name="Name" Type="Edm.String" />
    +      </EntityType>
    +      <ComplexType Name="Address">
    +        <Property Name="Street" Type="Edm.String" />
    +        <Property Name="City" Type="Edm.String" />
    +        <Property Name="State" Type="Edm.String" />
    +        <Property Name="ZipCode" Type="Edm.String" />
    +        <Property Name="CountryName" Type="Edm.String" />
    +        <NavigationProperty Name="Country" Type="ODataDemo.Country">
    +          <ReferentialConstraint Property="CountryName"  
    +                                 ReferencedProperty="Name" />
    +        </NavigationProperty>
    +      </ComplexType>
    +      <Function Name="ProductsByRating">
    +        <Parameter Name="Rating" Type="Edm.Int32" />
    +        <ReturnType Type="Collection(ODataDemo.Product)" />
    +      </Function>
    +      <EntityContainer Name="DemoService">
    +        <EntitySet Name="Products" EntityType="ODataDemo.Product">
    +          <NavigationPropertyBinding Path="Category" Target="Categories" />
    +        </EntitySet>
    +        <EntitySet Name="Categories" EntityType="ODataDemo.Category">
    +          <NavigationPropertyBinding Path="Products" Target="Products" />
    +          <Annotation Term="Core.Description" String="Product Categories" />
    +        </EntitySet>
    +        <EntitySet Name="Suppliers" EntityType="ODataDemo.Supplier">
    +          <NavigationPropertyBinding Path="Products" Target="Products" />
    +          <NavigationPropertyBinding Path="Address/Country"
    +                                     Target="Countries" />
    +          <Annotation Term="Core.OptimisticConcurrency">
    +            <Collection>
    +              <PropertyPath>Concurrency</PropertyPath>
    +            </Collection>
    +          </Annotation>
    +        </EntitySet>
    +        <Singleton Name="MainSupplier" Type="self.Supplier">
    +          <NavigationPropertyBinding Path="Products" Target="Products" />
    +          <Annotation Term="Core.Description" String="Primary Supplier" />
    +        </Singleton>
    +        <EntitySet Name="Countries" EntityType="ODataDemo.Country" />
    +        <FunctionImport Name="ProductsByRating" EntitySet="Products"
    +                        Function="ODataDemo.ProductsByRating" />
    +      </EntityContainer>
    +    </Schema>
    +  </edmx:DataServices>
    +</edmx:Edmx>

    16.2 Annotations for Products and Categories Example

    -

    Example 90:

    -
    <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    -           Version="4.01">
    -  <edmx:Reference Uri="http://host/service/$metadata">
    -    <edmx:Include Namespace="ODataDemo" Alias="target" />
    -  </edmx:Reference>
    -  <edmx:Reference Uri="http://somewhere/Vocabulary/V1">
    -    <edmx:Include Alias="Vocabulary1" Namespace="Some.Vocabulary.V1" />
    -  </edmx:Reference>
    -  <edmx:DataServices>
    -    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm"
    -            Namespace="External.Annotations">
    -      <Annotations Target="ODataDemo.Supplier">
    -        <Annotation Term="Vocabulary1.EMail">
    -          <Null />
    -        </Annotation>
    -        <Annotation Term="Vocabulary1.AccountID" Path="ID" />
    -        <Annotation Term="Vocabulary1.Title" String="Supplier Info" />
    -        <Annotation Term="Vocabulary1.DisplayName">
    -        <Apply Function="odata.concat">
    -            <Path>Name</Path>
    -            <String> in </String>
    -            <Path>Address/CountryName</Path>
    -          </Apply>
    -        </Annotation>
    -      </Annotations>
    -      <Annotations Target="ODataDemo.Product">
    -        <Annotation Term="Vocabulary1.Tags">
    -          <Collection>
    -            <String>MasterData</String>
    -          </Collection>
    -        </Annotation>
    -      </Annotations>
    -  </Schema>
    -  </edmx:DataServices>
    -</edmx:Edmx>
    +

    Example 91:

    +
    <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    +           Version="4.01">
    +  <edmx:Reference Uri="http://host/service/$metadata">
    +    <edmx:Include Namespace="ODataDemo" Alias="target" />
    +  </edmx:Reference>
    +  <edmx:Reference Uri="http://somewhere/Vocabulary/V1">
    +    <edmx:Include Alias="Vocabulary1" Namespace="Some.Vocabulary.V1" />
    +  </edmx:Reference>
    +  <edmx:DataServices>
    +    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm"
    +            Namespace="External.Annotations">
    +      <Annotations Target="ODataDemo.Supplier">
    +        <Annotation Term="Vocabulary1.EMail">
    +          <Null />
    +        </Annotation>
    +        <Annotation Term="Vocabulary1.AccountID" Path="ID" />
    +        <Annotation Term="Vocabulary1.Title" String="Supplier Info" />
    +        <Annotation Term="Vocabulary1.DisplayName">
    +        <Apply Function="odata.concat">
    +            <Path>Name</Path>
    +            <String> in </String>
    +            <Path>Address/CountryName</Path>
    +          </Apply>
    +        </Annotation>
    +      </Annotations>
    +      <Annotations Target="ODataDemo.Product">
    +        <Annotation Term="Vocabulary1.Tags">
    +          <Collection>
    +            <String>MasterData</String>
    +          </Collection>
    +        </Annotation>
    +      </Annotations>
    +  </Schema>
    +  </edmx:DataServices>
    +</edmx:Edmx>

    17 Conformance

    diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index a7c83d8a7..c659f089e 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -255,6 +255,10 @@ Schema Definition Language (XSD) 1.1 as described in ## 1.1 Changes from Earlier Versions +Section | Feature / Change | Issue +--------|------------------|------ +[Section 14.4.1.2](#PathEvaluation)| New path evaluation rules for annotations targeting annotations and external targeting via container| [ODATA-1420](https://issues.oasis-open.org/browse/ODATA-1420) + ## 1.2 Glossary ### 1.2.1 Definitions of Terms @@ -4208,56 +4212,139 @@ Addresses/-1/Street #### 14.4.1.2 Path Evaluation -Annotations MAY be embedded within their target, or specified -separately, e.g. as part of a different schema, and specify a path to -their target model element. The latter situation is referred to as -*targeting* in the remainder of this section. - -For annotations embedded within or targeting an entity container, the -path is evaluated starting at the entity container, i.e. an empty path -resolves to the entity container, and non-empty paths MUST start with a -segment identifying a container child (entity set, function import, -action import, or singleton). The subsequent segments follow the rules -for paths targeting the corresponding child element. - -For annotations embedded within or targeting an entity set or a -singleton, the path is evaluated starting at the entity set or -singleton, i.e. an empty path resolves to the entity set or singleton, -and non-empty paths MUST follow the rules for annotations targeting the -declared entity type of the entity set or singleton. - -For annotations embedded within or targeting an entity type or complex -type, the path is evaluated starting at the type, i.e. an empty path -resolves to the type, and the first segment of a non-empty path MUST be -a structural or navigation property of the type, a [type -cast](#TypeCast), or a [term cast](#TermCast). - -For annotations embedded within a structural or navigation property of -an entity type or complex type, the path is evaluated starting at the -directly enclosing type. This allows e.g. specifying the value of an -annotation on one property to be calculated from values of other -properties of the same type. An empty path resolves to the enclosing -type, and non-empty paths MUST follow the rules for annotations -targeting the directly enclosing type. - -For annotations targeting a structural or navigation property of an -entity type or complex type, the path is evaluated starting at the -*outermost* entity type or complex type named in the target of the -annotation, i.e. an empty path resolves to the outermost type, and the -first segment of a non-empty path MUST be a structural or navigation -property of the outermost type, a [type cast](#TypeCast), or a [term -cast](#TermCast). - -For annotations embedded within or targeting an action, action import, -function, function import, parameter, or return type, the first segment -of the path MUST be a parameter name or `$ReturnType`. +Annotations MAY be embedded within their target, or specified separately, +e.g. as part of a different schema, and specify a path to their target model +element. The latter situation is referred to as *targeting* in the remainder of +this section. + +The *host* of an annotation is the model element targeted by the annotation, +unless that target is another annotation or a model element (collection, +record or property value) directly or indirectly embedded within another +annotation, in which case the host is the host of that other annotation. + +If the value of an annotation is expressed dynamically with a path +expression, the path evaluation rules for this expression depend upon the +model element by which the annotation is hosted. + +For annotations hosted by an entity container, the path is evaluated starting +at the entity container, i.e. an empty path resolves to the entity container, +and non-empty paths MUST start with a segment identifying a container child +(entity set, function import, action import, or singleton). The subsequent +segments follow the rules for path expressions targeting the corresponding +child element. + +For annotations hosted by an entity set or a singleton, the path is evaluated +starting at the entity set or singleton, i.e. an empty path resolves to the +entity set or singleton, and non-empty paths MUST follow the rules for +annotations targeting the declared entity type of the entity set or singleton. + +For annotations hosted by an entity type or complex type, the path is +evaluated starting at the type, i.e. an empty path resolves to the type, and +the first segment of a non-empty path MUST be a structural or navigation +property of the type, a [type cast](#TypeCast), or a [term cast](#TermCast). + +For annotations hosted by an action, action import, function, function +import, parameter, or return type, the first segment of the path MUST be the +name of a parameter of the action or function or `$ReturnType`. + +For annotations hosted by a structural or navigation property, the path +evaluation rules additionally depend upon how the annotation target is +specified, as follows: + +1. If the annotation is directly or indirectly embedded within the hosting + property, the path is evaluated starting at the directly enclosing type of + the hosting property. This allows e.g. specifying the value of an + annotation on one property to be calculated from values of other properties + of the same enclosing type. An empty path resolves to the enclosing type, + and non-empty paths MUST follow the rules for annotations targeting the + directly enclosing type. + +2. If the annotation uses targeting and the target path starts with an entity + container, or the annotation is directly or indirectly embedded within such an + annotation, the path is evaluated starting at the declared type of the + hosting property. An empty path resolves to the declared type of the + property, and non-empty paths MUST follow the rules for annotations + targeting the declared type of the property. If the type is primitive, the + first segment of a non-empty path MUST be a [type cast](#TypeCast) or a + [term cast](#TermCast). + +3. If the annotation uses targeting and the target path does not start with + an entity container, or the annotation is directly or indirectly embedded + within such an annotation, the path is evaluated starting at the *outermost* + entity type or complex type named in the target path. This allows e.g. + specifying the value of an annotation on one property to be calculated from + values of other properties of the outermost type. An empty path resolves to + the outermost type, and the first segment of a non-empty path MUST be a + structural or navigation property of the outermost type, a [type cast](#TypeCast), + or a [term cast](#TermCast). + +::: example +Example 67: Annotations hosted by property `A2` in various modes + +Path evaluation for the annotations in the first block starts at the directly +enclosing type `self.A` of the hosting property `A2`. + +:::: varxml +```xml + + + + + + + + + + + + +``` +:::: + +Path evaluation for the annotations in the next block starts at the declared +type `self.B` of the hosting property `A2`. + +:::: varxml +```xml + + + + + + + + + + + +``` +:::: + +Path evaluation for the annotations in the final block starts at the outermost +type `self.A` named in the target path. + +:::: varxml +```xml + + + + + + + + + +``` +:::: + +::: #### 14.4.1.3 Annotation Path The annotation path expression provides a value for terms or term properties that specify the [built-in types](#BuiltInTypesfordefiningVocabularyTerms) -`Edm.AnnotationPath or Edm.ModelElementPath`. Its argument is a [model +`Edm.AnnotationPath` or `Edm.ModelElementPath`. Its argument is a [model path](#PathExpressions) with the following restriction: - A non-null path MUST resolve to an annotation. @@ -4280,7 +4367,7 @@ notation or attribute notation. ::: ::: {.varxml .example} -Example 67: +Example 68: ```xml @@ -4314,7 +4401,7 @@ notation or attribute notation. ::: ::: {.varxml .example} -Example 68: +Example 69: ```xml @@ -4350,7 +4437,7 @@ element notation or attribute notation. ::: ::: {.varxml .example} -Example 69: +Example 70: ```xml @@ -4393,7 +4480,7 @@ attribute notation. ::: ::: {.varxml .example} -Example 70: +Example 71: ```xml @@ -4431,7 +4518,7 @@ attribute notation. ::: ::: {.varxml .example} -Example 71: +Example 72: ```xml @@ -4498,7 +4585,7 @@ They MAY contain [`edm:Annotation`](#Annotation) elements. ::: ::: {.varxml .example} -Example 72: +Example 73: ```xml IsMale @@ -4591,7 +4678,7 @@ They MAY contain [`edm:Annotation`](#Annotation) elements. ::: ::: {.varxml .example} -Example 73: +Example 74: ```xml StartDate @@ -4668,7 +4755,7 @@ are represented according to the appropriate alternative in the ::: {.varxml .example} -Example 74: +Example 75: ```xml @@ -4720,7 +4807,7 @@ first property is used as key, the second property as value. ::: {.varxml .example} -Example 75: assuming there are no special characters in values of the +Example 76: assuming there are no special characters in values of the Name property of the Actor entity ```xml @@ -4743,7 +4830,7 @@ expression, using syntax and semantics of ::: {.varxml .example} -Example 76: all non-empty `FirstName` values not containing the letters +Example 77: all non-empty `FirstName` values not containing the letters `b`, `c`, or `d` evaluate to `true` ```xml @@ -4764,7 +4851,7 @@ paren-style key syntax. ::: {.varxml .example} -Example 77: +Example 78: ```xml http://host/service/Genres({genreName}) @@ -4809,7 +4896,7 @@ are considered unspecified. ::: ::: {.varxml .example} -Example 78: +Example 79: ```xml @@ -4836,7 +4923,7 @@ The `edm:Collection` element contains zero or more child expressions. ::: ::: {.varxml .example} -Example 79: +Example 80: ```xml @@ -4885,7 +4972,7 @@ It MAY contain [`edm:Annotation`](#Annotation) elements. ::: ::: {.varxml .example} -Example 80: the condition is a [value path expression](#ValuePath) +Example 81: the condition is a [value path expression](#ValuePath) referencing the Boolean property `IsFemale`, whose value then determines the value of the `edm:If` expression (or so it was long ago) ```xml @@ -4922,7 +5009,7 @@ elements. ::: ::: {.varxml .example} -Example 81: +Example 82: ```xml @@ -4965,7 +5052,7 @@ The value of `Name` is the labeled element's name. ::: ::: {.varxml .example} -Example 82: +Example 83: ```xml @@ -4996,7 +5083,7 @@ of a labeled element expression in its body. ::: ::: {.varxml .example} -Example 83: +Example 84: ```xml Model.CustomerFirstName @@ -5021,7 +5108,7 @@ elements. ::: ::: {.varxml .example} -Example 84: +Example 85: ```xml @@ -5030,7 +5117,7 @@ Example 84: ::: ::: {.varxml .example} -Example 85: +Example 86: ```xml @@ -5091,7 +5178,7 @@ enclosing `edm:Record` expression. ::: ::: {.varxml .example} -Example 86: this annotation "morphs" the entity type from [example 8](#entitytype) into +Example 87: this annotation "morphs" the entity type from [example 8](#entitytype) into a structured type with two structural properties `GivenName` and `Surname` and two navigation properties `DirectSupervisor` and `CostCenter`. The first three properties simply rename properties of the @@ -5152,7 +5239,7 @@ elements. ::: ::: {.varxml .example} -Example 87: +Example 88: ```xml @@ -5229,7 +5316,7 @@ forward-slash separated property, navigation property, or type-cast segments ::: example -Example 88: Target expressions +Example 89: Target expressions ``` MySchema.MyEntityContainer/MyEntitySet MySchema.MyEntityContainer/MySingleton @@ -5251,7 +5338,7 @@ CSDL. These examples demonstrate many of the topics covered above. ::: {.varxml .example} -Example 89: +Example 90: ```xml @@ -5369,7 +5456,7 @@ Example 89: ::: {.varxml .example} -Example 90: +Example 91: ```xml diff --git a/odata-csdl/1 Introduction.md b/odata-csdl/1 Introduction.md index 54ba31c12..b46000b13 100644 --- a/odata-csdl/1 Introduction.md +++ b/odata-csdl/1 Introduction.md @@ -27,6 +27,12 @@ Schema Definition Language (XSD) 1.1 as described in ## ##subsec Changes from Earlier Versions +Section | Feature / Change | Issue +--------|------------------|------ +[Section ##PathEvaluation]| +New path evaluation rules for annotations targeting annotations and external targeting via container| +[ODATA-1420](https://issues.oasis-open.org/browse/ODATA-1420) + ## ##subsec Glossary ### ##subsubsec Definitions of Terms diff --git a/odata-csdl/14 Vocabulary and Annotation.md b/odata-csdl/14 Vocabulary and Annotation.md index 8933056ed..4d83e8d12 100644 --- a/odata-csdl/14 Vocabulary and Annotation.md +++ b/odata-csdl/14 Vocabulary and Annotation.md @@ -1364,56 +1364,203 @@ Addresses/-1/Street #### ##subsubsubsec Path Evaluation -Annotations MAY be embedded within their target, or specified -separately, e.g. as part of a different schema, and specify a path to -their target model element. The latter situation is referred to as -*targeting* in the remainder of this section. - -For annotations embedded within or targeting an entity container, the -path is evaluated starting at the entity container, i.e. an empty path -resolves to the entity container, and non-empty paths MUST start with a -segment identifying a container child (entity set, function import, -action import, or singleton). The subsequent segments follow the rules -for paths targeting the corresponding child element. - -For annotations embedded within or targeting an entity set or a -singleton, the path is evaluated starting at the entity set or -singleton, i.e. an empty path resolves to the entity set or singleton, -and non-empty paths MUST follow the rules for annotations targeting the -declared entity type of the entity set or singleton. - -For annotations embedded within or targeting an entity type or complex -type, the path is evaluated starting at the type, i.e. an empty path -resolves to the type, and the first segment of a non-empty path MUST be -a structural or navigation property of the type, a [type -cast](#TypeCast), or a [term cast](#TermCast). - -For annotations embedded within a structural or navigation property of -an entity type or complex type, the path is evaluated starting at the -directly enclosing type. This allows e.g. specifying the value of an -annotation on one property to be calculated from values of other -properties of the same type. An empty path resolves to the enclosing -type, and non-empty paths MUST follow the rules for annotations -targeting the directly enclosing type. - -For annotations targeting a structural or navigation property of an -entity type or complex type, the path is evaluated starting at the -*outermost* entity type or complex type named in the target of the -annotation, i.e. an empty path resolves to the outermost type, and the -first segment of a non-empty path MUST be a structural or navigation -property of the outermost type, a [type cast](#TypeCast), or a [term -cast](#TermCast). - -For annotations embedded within or targeting an action, action import, -function, function import, parameter, or return type, the first segment -of the path MUST be a parameter name or `$ReturnType`. +Annotations MAY be embedded within their target, or specified separately, +e.g. as part of a different schema, and specify a path to their target model +element. The latter situation is referred to as *targeting* in the remainder of +this section. + +The *host* of an annotation is the model element targeted by the annotation, +unless that target is another annotation or a model element (collection, +record or property value) directly or indirectly embedded within another +annotation, in which case the host is the host of that other annotation. + +If the value of an annotation is expressed dynamically with a path +expression, the path evaluation rules for this expression depend upon the +model element by which the annotation is hosted. + +For annotations hosted by an entity container, the path is evaluated starting +at the entity container, i.e. an empty path resolves to the entity container, +and non-empty paths MUST start with a segment identifying a container child +(entity set, function import, action import, or singleton). The subsequent +segments follow the rules for path expressions targeting the corresponding +child element. + +For annotations hosted by an entity set or a singleton, the path is evaluated +starting at the entity set or singleton, i.e. an empty path resolves to the +entity set or singleton, and non-empty paths MUST follow the rules for +annotations targeting the declared entity type of the entity set or singleton. + +For annotations hosted by an entity type or complex type, the path is +evaluated starting at the type, i.e. an empty path resolves to the type, and +the first segment of a non-empty path MUST be a structural or navigation +property of the type, a [type cast](#TypeCast), or a [term cast](#TermCast). + +For annotations hosted by an action, action import, function, function +import, parameter, or return type, the first segment of the path MUST be the +name of a parameter of the action or function or `$ReturnType`. + +For annotations hosted by a structural or navigation property, the path +evaluation rules additionally depend upon how the annotation target is +specified, as follows: + +1. If the annotation is directly or indirectly embedded within the hosting + property, the path is evaluated starting at the directly enclosing type of + the hosting property. This allows e.g. specifying the value of an + annotation on one property to be calculated from values of other properties + of the same enclosing type. An empty path resolves to the enclosing type, + and non-empty paths MUST follow the rules for annotations targeting the + directly enclosing type. + +2. If the annotation uses targeting and the target path starts with an entity + container, or the annotation is directly or indirectly embedded within such an + annotation, the path is evaluated starting at the declared type of the + hosting property. An empty path resolves to the declared type of the + property, and non-empty paths MUST follow the rules for annotations + targeting the declared type of the property. If the type is primitive, the + first segment of a non-empty path MUST be a [type cast](#TypeCast) or a + [term cast](#TermCast). + +3. If the annotation uses targeting and the target path does not start with + an entity container, or the annotation is directly or indirectly embedded + within such an annotation, the path is evaluated starting at the *outermost* + entity type or complex type named in the target path. This allows e.g. + specifying the value of an annotation on one property to be calculated from + values of other properties of the outermost type. An empty path resolves to + the outermost type, and the first segment of a non-empty path MUST be a + structural or navigation property of the outermost type, a [type cast](#TypeCast), + or a [term cast](#TermCast). + +::: example +Example ##ex: Annotations hosted by property `A2` in various modes + +Path evaluation for the annotations in the first block starts at the directly +enclosing type `self.A` of the hosting property `A2`. +:::: varjson +```json +"self": { + "A": { + "$Kind": "EntityType", + "A1": { + "$Type": "Edm.Boolean" + }, + "A2": { + "$Type": "self.B" + "@Core.Description@Core.IsLanguageDependent": { + "$Path": "A1" + }, + "@Core.Description": "..." + } + }, + "B": { + "$Kind": "ComplexType", + "B1": { + "$Type": "Edm.Boolean" + } + }, +``` +:::: + +:::: varxml +```xml + + + + + + + + + + + + +``` +:::: + +Path evaluation for the annotations in the next block starts at the declared +type `self.B` of the hosting property `A2`. +:::: varjson +```json + "Container": { + "$Kind": "EntityContainer", + "SetA": { + "$Collection": true, + "$Type": "self.A" + } + }, + "$Annotations": { + "self.Container/SetA/A2": { + "@Core.Description#viaset@Core.IsLanguageDependent": { + "$Path": "B1" + }, + "@Core.Description#viaset": "..." + }, + "self.Container/SetA/A2/@Core.Description#viaset": { + "@Core.IsLanguageDependent": { + "$Path": "B1" + } + }, +``` +:::: + +:::: varxml +```xml + + + + + + + + + + + +``` +:::: + +Path evaluation for the annotations in the final block starts at the outermost +type `self.A` named in the target path. +:::: varjson +```json + "self.A/A2": { + "@Core.Description#external@Core.IsLanguageDependent": { + "$Path": "A1" + }, + "@Core.Description#external": "..." + }, + "self.A/A2/@Core.Description": { + "@Core.IsLanguageDependent": { + "$Path": "A1" + } + } + } +} +``` +:::: + +:::: varxml +```xml + + + + + + + + + +``` +:::: + +::: #### ##subsubsubsec Annotation Path The annotation path expression provides a value for terms or term properties that specify the [built-in types](#BuiltInTypesfordefiningVocabularyTerms) -`Edm.AnnotationPath or Edm.ModelElementPath`. Its argument is a [model +`Edm.AnnotationPath` or `Edm.ModelElementPath`. Its argument is a [model path](#PathExpressions) with the following restriction: - A non-null path MUST resolve to an annotation. From f757737e8ec3c5cb5ab7be8d499f13149249d979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Wed, 18 Oct 2023 18:22:16 +0200 Subject: [PATCH 25/74] ODATA-1434 (#71) --- docs/odata-csdl-json/odata-csdl-json.html | 2 +- docs/odata-csdl-json/odata-csdl-json.md | 8 ++++---- docs/odata-csdl-xml/odata-csdl-xml.html | 2 +- docs/odata-csdl-xml/odata-csdl-xml.md | 8 ++++---- odata-csdl/13 Entity Container.md | 8 ++++---- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index f928b071b..c18e50971 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -1886,7 +1886,7 @@

    $Nullabl

    13.4 Navigation Property Binding

    If the entity type of an entity set or singleton declares navigation properties, a navigation property binding allows describing which entity set or singleton will contain the related entities.

    -

    An entity set or a singleton SHOULD specify a navigation property binding for each navigation property of its entity type, including navigation properties defined on complex typed properties or derived types.

    +

    An entity set or a singleton SHOULD contain a navigation property binding for each non-containment navigation property that can be reached from the entity type through a sequence of type casts, complex properties, or containment navigation properties.

    If omitted, clients MUST assume that the target entity set or singleton can vary per related entity.

    13.4.1 Navigation Property Path Binding

    A navigation property binding MUST specify a path to a navigation property of the entity set's or singleton's declared entity type, or a navigation property reached through a chain of type casts, complex properties, or containment navigation properties. If the navigation property is defined on a subtype, the path MUST contain the qualified name of the subtype, followed by a forward slash, followed by the navigation property name. If the navigation property is defined on a complex type used in the definition of the entity set's entity type, the path MUST contain a forward-slash separated list of complex property names and qualified type names that describe the path leading to the navigation property.

    diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 5f24c7709..c04fb57ab 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -3238,10 +3238,10 @@ If the entity type of an entity set or singleton declares navigation properties, a navigation property binding allows describing which entity set or singleton will contain the related entities. -An [entity set](#EntitySet) or a [singleton](#Singleton) SHOULD specify -a navigation property binding for each [navigation -property](#NavigationProperty) of its entity type, including navigation -properties defined on complex typed properties or derived types. +An [entity set](#EntitySet) or a [singleton](#Singleton) SHOULD contain a navigation +property binding for each non-containment navigation property that can be reached +from the entity type through a sequence of type casts, complex properties, +or containment navigation properties. If omitted, clients MUST assume that the target entity set or singleton can vary per related entity. diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index d03a48480..2b950cace 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -1702,7 +1702,7 @@

    13.4 Navigation Property Binding

    If the entity type of an entity set or singleton declares navigation properties, a navigation property binding allows describing which entity set or singleton will contain the related entities.

    -

    An entity set or a singleton SHOULD specify a navigation property binding for each navigation property of its entity type, including navigation properties defined on complex typed properties or derived types.

    +

    An entity set or a singleton SHOULD contain a navigation property binding for each non-containment navigation property that can be reached from the entity type through a sequence of type casts, complex properties, or containment navigation properties.

    If omitted, clients MUST assume that the target entity set or singleton can vary per related entity.

    13.4.1 Navigation Property Path Binding

    A navigation property binding MUST specify a path to a navigation property of the entity set's or singleton's declared entity type, or a navigation property reached through a chain of type casts, complex properties, or containment navigation properties. If the navigation property is defined on a subtype, the path MUST contain the qualified name of the subtype, followed by a forward slash, followed by the navigation property name. If the navigation property is defined on a complex type used in the definition of the entity set's entity type, the path MUST contain a forward-slash separated list of complex property names and qualified type names that describe the path leading to the navigation property.

    diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index c659f089e..6ee5d8f18 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -3042,10 +3042,10 @@ If the entity type of an entity set or singleton declares navigation properties, a navigation property binding allows describing which entity set or singleton will contain the related entities. -An [entity set](#EntitySet) or a [singleton](#Singleton) SHOULD specify -a navigation property binding for each [navigation -property](#NavigationProperty) of its entity type, including navigation -properties defined on complex typed properties or derived types. +An [entity set](#EntitySet) or a [singleton](#Singleton) SHOULD contain a navigation +property binding for each non-containment navigation property that can be reached +from the entity type through a sequence of type casts, complex properties, +or containment navigation properties. If omitted, clients MUST assume that the target entity set or singleton can vary per related entity. diff --git a/odata-csdl/13 Entity Container.md b/odata-csdl/13 Entity Container.md index 318c6e1b8..89fda7b92 100644 --- a/odata-csdl/13 Entity Container.md +++ b/odata-csdl/13 Entity Container.md @@ -399,10 +399,10 @@ If the entity type of an entity set or singleton declares navigation properties, a navigation property binding allows describing which entity set or singleton will contain the related entities. -An [entity set](#EntitySet) or a [singleton](#Singleton) SHOULD specify -a navigation property binding for each [navigation -property](#NavigationProperty) of its entity type, including navigation -properties defined on complex typed properties or derived types. +An [entity set](#EntitySet) or a [singleton](#Singleton) SHOULD contain a navigation +property binding for each non-containment navigation property that can be reached +from the entity type through a sequence of type casts, complex properties, +or containment navigation properties. If omitted, clients MUST assume that the target entity set or singleton can vary per related entity. From d34565766cd684d5001164a9659b47abc476dbd5 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 18 Oct 2023 18:25:29 +0200 Subject: [PATCH 26/74] ODATA-1437 (#136) --- docs/odata-protocol/odata-protocol.html | 4 ++-- docs/odata-protocol/odata-protocol.md | 7 +++---- odata-protocol/11.4 Data Modification.md | 7 +++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 895176b8f..93ca3f362 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1977,10 +1977,10 @@

    11.4.9.4 Update a Collection Property

    A successful PUT request to the edit URL of a collection property updates that collection. The message body MUST contain the desired new value, formatted as a collection property according to the specified format.

    The service MUST replace the entire value with the value supplied in the request body.

    -

    A successful POST request to the edit URL of a collection property adds an item to the collection. The body of the request MUST be a single item to be added to the collection. If the collection is ordered, the item is added to the end of the collection, and $index MAY be used to specify a zero-based ordinal position to insert the new value, with a negative value indicating an ordinal position from the end of the collection.

    +

    A successful POST request to the edit URL of a collection property adds an item to the collection. The body of the request MUST be a single item to be added to the collection. If the collection is ordered, the item is added to the end of the collection, and if the collection supports positional insert $index MAY be used to specify the insert position.

    A successful DELETE request to the edit URL of a collection property deletes all items in that collection.

    Since collection members have no individual identity, PATCH is not supported for collection properties.

    -

    Upon successful completion the service responds with either 200 OK or 204 No Content. The client may request that the response SHOULD include a body by specifying a Prefer header with a value of return=representation.

    +

    Upon successful completion the service responds with either 200 OK and a representation of the updated collection, or 204 No Content. The client may request that the response SHOULD include a body by specifying a Prefer header with a value of return=representation.

    Services MUST return an error if the property is not updatable.

    11.4.10 Managing Members of an Ordered Collection

    Collections annotated with the Core.Ordered term (see OData-VocCore) have a stable order. Members of an ordered collection of primitive and complex types can be individually updated or deleted by invoking an update operation against the URL of the collection appended by a segment containing the zero-based ordinal of the item within the collection. A negative ordinal number indexes from the end of the collection, with -1 representing the last item in the collection.

    diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index d7eb1b837..d96562274 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -4832,10 +4832,9 @@ request body. A successful `POST` request to the edit URL of a collection property adds an item to the collection. The body of the request MUST be a single item to be added to the collection. If the collection is ordered, the -item is added to the end of the collection, and +item is added to the end of the collection, and if the collection supports positional insert [`$index`](#RequestinganIndividualMemberofanOrderedCollection) MAY be used to specify -a zero-based ordinal position to insert the new value, with a negative -value indicating an ordinal position from the end of the collection. +the insert position. A successful `DELETE` request to the edit URL of a collection property deletes all items in that collection. @@ -4844,7 +4843,7 @@ Since collection members have no individual identity, `PATCH` is not supported for collection properties. Upon successful completion the service responds with either -[`200 OK`](#ResponseCode200OK) or +[`200 OK`](#ResponseCode200OK) and a representation of the updated collection, or [`204 No Content`](#ResponseCode204NoContent). The client may request that the response SHOULD include a body by specifying a [Prefer header](#Preferencereturnrepresentationandreturnminimal) with a value of diff --git a/odata-protocol/11.4 Data Modification.md b/odata-protocol/11.4 Data Modification.md index 5e4fdbeee..de9cf7b1d 100644 --- a/odata-protocol/11.4 Data Modification.md +++ b/odata-protocol/11.4 Data Modification.md @@ -907,10 +907,9 @@ request body. A successful `POST` request to the edit URL of a collection property adds an item to the collection. The body of the request MUST be a single item to be added to the collection. If the collection is ordered, the -item is added to the end of the collection, and +item is added to the end of the collection, and if the collection supports positional insert [`$index`](#RequestinganIndividualMemberofanOrderedCollection) MAY be used to specify -a zero-based ordinal position to insert the new value, with a negative -value indicating an ordinal position from the end of the collection. +the insert position. A successful `DELETE` request to the edit URL of a collection property deletes all items in that collection. @@ -919,7 +918,7 @@ Since collection members have no individual identity, `PATCH` is not supported for collection properties. Upon successful completion the service responds with either -[`200 OK`](#ResponseCode200OK) or +[`200 OK`](#ResponseCode200OK) and a representation of the updated collection, or [`204 No Content`](#ResponseCode204NoContent). The client may request that the response SHOULD include a body by specifying a [Prefer header](#Preferencereturnrepresentationandreturnminimal) with a value of From d0f4c2c780aca9aec7c9a063e57588cbbc869de9 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 18 Oct 2023 18:37:42 +0200 Subject: [PATCH 27/74] ODATA-1450 (#101) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Heiko Theißen --- docs/odata-protocol/odata-protocol.html | 26 +++++++++++++----------- docs/odata-protocol/odata-protocol.md | 10 +++++---- odata-protocol/11.4 Data Modification.md | 10 +++++---- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 93ca3f362..c08c2aa73 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1748,30 +1748,32 @@

    -

    Example 77: using the JSON format, 4.01 clients can create a new manager entity with links to two existing employees by including the entity-ids within the DirectReports navigation property

    +

    Example 77: using the JSON format, 4.01 clients can create a new manager entity with links to an existing manager (of managers) and to two existing employees by including the entity-ids within the Manager and DirectReports navigation properties

    {
       "@type":"#Northwind.Manager",
       "ID": 1,
       "FirstName": "Pat",
       "LastName": "Griswold",
    -  "DirectReports": [
    -    {"@id": "Employees(5)"},
    -    {"@id": "Employees(6)"}
    -  ]
    -}
    + "Manager": { "@id": "Employees(0)" }, +  "DirectReports": [ +    {"@id": "Employees(5)"}, +    {"@id": "Employees(6)"} +  ] +}

    Upon successful completion of the operation, the service creates the requested entity and relates it to the requested existing entities.

    If the target URL for the collection the entity is created in and binding information provided in the POST body contradicts the implicit binding information provided by the request URL, the request MUST fail, and the service responds with 400 Bad Request.

    diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index d96562274..a3c993393 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -4134,14 +4134,15 @@ The representation for referencing related entities is format-specific. ::: example Example 76: using the JSON format, 4.0 clients can create a new manager -entity with links to two existing employees by applying the `odata.bind` -annotation to the `DirectReports` navigation property +entity with links to an existing manager (of managers) and to two existing employees by applying the `odata.bind` +annotation to the `Manager` and `DirectReports` navigation properties ```json {   "@odata.type":"#Northwind.Manager",   "ID": 1,   "FirstName": "Pat",   "LastName": "Griswold", + "Manager@odata.bind": "http://host/service/Employees(0)",   "DirectReports@odata.bind": [     "http://host/service/Employees(5)",     "http://host/service/Employees(6)" @@ -4152,14 +4153,15 @@ annotation to the `DirectReports` navigation property ::: example Example 77: using the JSON format, 4.01 clients can create a new manager -entity with links to two existing employees by including the entity-ids -within the `DirectReports` navigation property +entity with links to an existing manager (of managers) and to two existing employees by including the entity-ids +within the `Manager` and `DirectReports` navigation properties ```json {   "@type":"#Northwind.Manager",   "ID": 1,   "FirstName": "Pat",   "LastName": "Griswold", + "Manager": { "@id": "Employees(0)" },   "DirectReports": [     {"@id": "Employees(5)"},     {"@id": "Employees(6)"} diff --git a/odata-protocol/11.4 Data Modification.md b/odata-protocol/11.4 Data Modification.md index de9cf7b1d..94697768c 100644 --- a/odata-protocol/11.4 Data Modification.md +++ b/odata-protocol/11.4 Data Modification.md @@ -208,14 +208,15 @@ The representation for referencing related entities is format-specific. ::: example Example ##ex: using the JSON format, 4.0 clients can create a new manager -entity with links to two existing employees by applying the `odata.bind` -annotation to the `DirectReports` navigation property +entity with links to an existing manager (of managers) and to two existing employees by applying the `odata.bind` +annotation to the `Manager` and `DirectReports` navigation properties ```json {   "@odata.type":"#Northwind.Manager",   "ID": 1,   "FirstName": "Pat",   "LastName": "Griswold", + "Manager@odata.bind": "http://host/service/Employees(0)",   "DirectReports@odata.bind": [     "http://host/service/Employees(5)",     "http://host/service/Employees(6)" @@ -226,14 +227,15 @@ annotation to the `DirectReports` navigation property ::: example Example ##ex: using the JSON format, 4.01 clients can create a new manager -entity with links to two existing employees by including the entity-ids -within the `DirectReports` navigation property +entity with links to an existing manager (of managers) and to two existing employees by including the entity-ids +within the `Manager` and `DirectReports` navigation properties ```json {   "@type":"#Northwind.Manager",   "ID": 1,   "FirstName": "Pat",   "LastName": "Griswold", + "Manager": { "@id": "Employees(0)" },   "DirectReports": [     {"@id": "Employees(5)"},     {"@id": "Employees(6)"} From 4b9ff9b044d374a5139034c2757fd3d130ead40b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Wed, 18 Oct 2023 18:44:18 +0200 Subject: [PATCH 28/74] ODATA-1464 (#70) Co-authored-by: Ralf Handl --- docs/odata-csdl-json/odata-csdl-json.html | 2 +- docs/odata-csdl-json/odata-csdl-json.md | 1 + docs/odata-csdl-xml/odata-csdl-xml.html | 2 +- docs/odata-csdl-xml/odata-csdl-xml.md | 1 + odata-csdl/14 Vocabulary and Annotation.md | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index c18e50971..b73cb87a6 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -3032,7 +3032,7 @@

    }

    14.4.4.3 Function odata.matchesPattern

    -

    The odata.matchesPattern client-side function takes two string expressions as arguments and returns a Boolean value.

    +

    The odata.matchesPattern client-side function takes two string expressions as arguments and returns a Boolean value. It is the counterpart of the identically named URL function OData-URL, section 5.1.1.7.1.

    The function returns true if the second expression evaluates to an ECMAScript (JavaScript) regular expression and the result of the first argument expression matches that regular expression, using syntax and semantics of ECMAScript regular expressions.

    Example 77: all non-empty FirstName values not containing the letters b, c, or d evaluate to true

    diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index c04fb57ab..19eafa7cc 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -5010,6 +5010,7 @@ Name property of the Actor entity The `odata.matchesPattern` client-side function takes two string expressions as arguments and returns a Boolean value. +It is the counterpart of the identically named URL function [OData-URL, section 5.1.1.7.1](#ODataURL). The function returns true if the second expression evaluates to an [ECMAScript](#_ECMAScript) (JavaScript) regular expression and diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 2b950cace..3192e4162 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -2802,7 +2802,7 @@

    </Apply>

    14.4.4.3 Function odata.matchesPattern

    -

    The odata.matchesPattern client-side function takes two string expressions as arguments and returns a Boolean value.

    +

    The odata.matchesPattern client-side function takes two string expressions as arguments and returns a Boolean value. It is the counterpart of the identically named URL function OData-URL, section 5.1.1.7.1.

    The function returns true if the second expression evaluates to an ECMAScript (JavaScript) regular expression and the result of the first argument expression matches that regular expression, using syntax and semantics of ECMAScript regular expressions.

    Example 77: all non-empty FirstName values not containing the letters b, c, or d evaluate to true

    diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 6ee5d8f18..9b70b1e11 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -4821,6 +4821,7 @@ Name property of the Actor entity The `odata.matchesPattern` client-side function takes two string expressions as arguments and returns a Boolean value. +It is the counterpart of the identically named URL function [OData-URL, section 5.1.1.7.1](#ODataURL). The function returns true if the second expression evaluates to an [ECMAScript](#_ECMAScript) (JavaScript) regular expression and diff --git a/odata-csdl/14 Vocabulary and Annotation.md b/odata-csdl/14 Vocabulary and Annotation.md index 4d83e8d12..450d918c4 100644 --- a/odata-csdl/14 Vocabulary and Annotation.md +++ b/odata-csdl/14 Vocabulary and Annotation.md @@ -2398,6 +2398,7 @@ Name property of the Actor entity The `odata.matchesPattern` client-side function takes two string expressions as arguments and returns a Boolean value. +It is the counterpart of the identically named URL function [OData-URL, section 5.1.1.7.1](#ODataURL). The function returns true if the second expression evaluates to an [ECMAScript](#_ECMAScript) (JavaScript) regular expression and From 7a4eb1f1d89e5247b1fbbcf43746bdaba4dc9935 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 18 Oct 2023 18:48:06 +0200 Subject: [PATCH 29/74] ODATA-1465 (#137) --- docs/odata-protocol/odata-protocol.html | 2 +- docs/odata-protocol/odata-protocol.md | 4 ++-- odata-protocol/11.4 Data Modification.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index c08c2aa73..909676b60 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1877,7 +1877,7 @@

    1

    A PUT or PATCH request MUST NOT be treated as an update if an If-None-Match header is specified with a value of *.

    11.4.5 Delete an Entity

    To delete an individual entity, the client makes a DELETE request to a URL that identifies the entity. Services MAY restrict deletes only to requests addressing the edit URL of the entity.

    -

    The request body SHOULD be empty. Singleton entities can be deleted if they are nullable. Services supporting this SHOULD advertise it by annotating the singleton with the term Capabilities.DeleteRestrictions (nested property Deletable with value true) defined in OData-VocCap.

    +

    The request body SHOULD be empty. Top-level singleton entities can be deleted if they are nullable. Services supporting this MAY advertise it by annotating the singleton with the term Capabilities.DeleteRestrictions (nested property Deletable with value true) defined in OData-VocCap.

    On successful completion of the delete, the response MUST be 204 No Content and contain an empty body.

    Services MUST implicitly remove relations to and from an entity when deleting it; clients need not delete the relations explicitly.

    Services MAY implicitly delete or modify related entities if required by integrity constraints. If integrity constraints are declared in $metadata using a ReferentialConstraint element, services MUST modify affected related entities according to the declared integrity constraints, e.g. by deleting dependent entities, or setting dependent properties to null or their default value.

    diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index a3c993393..39201ca3a 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -4497,8 +4497,8 @@ To delete an individual entity, the client makes a `DELETE` request to a URL that identifies the entity. Services MAY restrict deletes only to requests addressing the [edit URL](#ReadURLsandEditURLs) of the entity. -The request body SHOULD be empty. Singleton entities can be deleted if -they are nullable. Services supporting this SHOULD advertise it by +The request body SHOULD be empty. Top-level singleton entities can be deleted if +they are nullable. Services supporting this MAY advertise it by annotating the singleton with the term `Capabilities.DeleteRestrictions` (nested property `Deletable` with value `true`) defined in [OData-VocCap](#ODataVocCap). diff --git a/odata-protocol/11.4 Data Modification.md b/odata-protocol/11.4 Data Modification.md index 94697768c..885435a89 100644 --- a/odata-protocol/11.4 Data Modification.md +++ b/odata-protocol/11.4 Data Modification.md @@ -571,8 +571,8 @@ To delete an individual entity, the client makes a `DELETE` request to a URL that identifies the entity. Services MAY restrict deletes only to requests addressing the [edit URL](#ReadURLsandEditURLs) of the entity. -The request body SHOULD be empty. Singleton entities can be deleted if -they are nullable. Services supporting this SHOULD advertise it by +The request body SHOULD be empty. Top-level singleton entities can be deleted if +they are nullable. Services supporting this MAY advertise it by annotating the singleton with the term `Capabilities.DeleteRestrictions` (nested property `Deletable` with value `true`) defined in [OData-VocCap](#ODataVocCap). From 82494366aa66b4206c2ed4ebf31877dc246a1a3f Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 18 Oct 2023 19:00:25 +0200 Subject: [PATCH 30/74] ODATA-1469 (#139) --- .../odata-url-conventions.html | 3 +-- docs/odata-url-conventions/odata-url-conventions.md | 12 ++++-------- odata-url-conventions/5 Query Options.md | 13 +++++-------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/docs/odata-url-conventions/odata-url-conventions.html b/docs/odata-url-conventions/odata-url-conventions.html index 74d94207d..d9d507164 100644 --- a/docs/odata-url-conventions/odata-url-conventions.html +++ b/docs/odata-url-conventions/odata-url-conventions.html @@ -1826,7 +1826,7 @@

    Example 128: rating and release date of all products

    http://host/service/Products?$select=Rating,ReleaseDate
    @@ -1865,7 +1865,6 @@

    5.1.5 System Query Option $orderby

    The $orderby system query option allows clients to request resources in a particular order.

    The semantics of $orderby are covered in the OData-Protocol document.

    diff --git a/docs/odata-url-conventions/odata-url-conventions.md b/docs/odata-url-conventions/odata-url-conventions.md index 539e4f221..55d5060a4 100644 --- a/docs/odata-url-conventions/odata-url-conventions.md +++ b/docs/odata-url-conventions/odata-url-conventions.md @@ -3511,10 +3511,10 @@ The `$select` system query option is interpreted relative to the entity type or complex type of the resources identified by the resource path section of the URL. Each select item in the `$select` clause indicates that the response MUST include the declared or dynamic properties, -actions and functions identified by that select item. The simplest form -of a select item explicitly requests a property defined on the entity -type of the resources identified by the resource path section of the -URL. +actions and functions identified by that select item. If a select item is a path expression traversing an entity or complex property that is `null` on an instance, then +the null-valued entity or complex property is included and represented as `null`. +The simplest form of a select item explicitly requests a property defined on the entity +type of the resources identified by the resource path section of the URL. ::: example Example 128: rating and release date of all products @@ -3639,10 +3639,6 @@ of properties, open properties, navigation properties, actions and functions to be returned is equal to the union of the set of those identified by each select item. -If a select item is a path expression requesting a component of a -complex property and the complex property is `null` on an instance, then -the component is treated as `null` as well. - ### 5.1.5 System Query Option `$orderby` The `$orderby` system query option allows clients to request resources diff --git a/odata-url-conventions/5 Query Options.md b/odata-url-conventions/5 Query Options.md index 6efb1e028..5f31b0087 100644 --- a/odata-url-conventions/5 Query Options.md +++ b/odata-url-conventions/5 Query Options.md @@ -2120,10 +2120,11 @@ The `$select` system query option is interpreted relative to the entity type or complex type of the resources identified by the resource path section of the URL. Each select item in the `$select` clause indicates that the response MUST include the declared or dynamic properties, -actions and functions identified by that select item. The simplest form -of a select item explicitly requests a property defined on the entity -type of the resources identified by the resource path section of the -URL. +actions and functions identified by that select item. +If a select item is a path expression traversing an entity or complex property that is `null` on an instance, then +the null-valued entity or complex property is included and represented as `null`. +The simplest form of a select item explicitly requests a property defined on the entity +type of the resources identified by the resource path section of the URL. ::: example Example ##ex: rating and release date of all products @@ -2248,10 +2249,6 @@ of properties, open properties, navigation properties, actions and functions to be returned is equal to the union of the set of those identified by each select item. -If a select item is a path expression requesting a component of a -complex property and the complex property is `null` on an instance, then -the component is treated as `null` as well. - ### ##subsubsec System Query Option `$orderby` The `$orderby` system query option allows clients to request resources From bebb3edc0a2516f611f20611e91acbc018bb7f9c Mon Sep 17 00:00:00 2001 From: D024504 Date: Thu, 19 Oct 2023 08:29:34 +0200 Subject: [PATCH 31/74] As discussed in OData TC 2023-10-18 --- docs/odata-protocol/odata-protocol.html | 6 ++++++ docs/odata-protocol/odata-protocol.md | 20 ++++++++++++++++++++ odata-protocol/11 Data Service Requests.md | 15 +++++++++++++++ odata-protocol/11.5 Operations.md | 4 ++++ 4 files changed, 45 insertions(+) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 909676b60..df1d83df2 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -307,6 +307,7 @@

    Table of Contents

  • 11.2.4 Requesting Individual Properties
  • 11.2.5 Specifying Properties to Return
      @@ -1287,6 +1288,10 @@

      11.2.4.2 Requesting Stream Properties

      +

      If the property being requested has type Edm.Stream (see OData-URL, section 9), the media type of the response is the media type of the stream, subject to content negotiation based on the Accept header of the request. The response body is the octet-stream that represents the raw value of the stream with that media type.

      +

      Note this response format disregards any $format system query option.

      +

      Appending /$value to the property URL of a stream property returns 400 Bad Request.

      11.2.5 Specifying Properties to Return

      The $select and $expand system query options enable the client to specify the set of structural properties and navigation properties to include in a response. The service MAY include additional properties not specified in $select and $expand, including properties not defined in the metadata document.

      11.2.5.1 System Query Option $select

      @@ -2124,6 +2129,7 @@

      requesting stream properties.

      Parameter values passed to functions MUST be specified either as a URL literal (for primitive values) or as a JSON formatted OData object (for complex values, or collections of primitive or complex values). Entity typed values are passed as JSON formatted entities that MAY include a subset of the properties, or just the entity reference, as appropriate to the function.  

      If a collection-valued function has no result for a given parameter value combination, the response is the format-specific representation of an empty collection. If a single-valued function with a nullable return-type has no result, the service returns 204 No Content.

      If a single-valued function with a non-nullable return type has no result, the service returns 4xx. For functions that return a single entity 404 Not Found is the appropriate response code.

      diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index 39201ca3a..e1b4c2ac8 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -205,6 +205,7 @@ For complete copyright information please see the full Notices section in an App - [11.2.3 Requesting the Media Stream of a Media Entity using `$value`](#RequestingtheMediaStreamofaMediaEntityusingvalue) - [11.2.4 Requesting Individual Properties](#RequestingIndividualProperties) - [11.2.4.1 Requesting a Property's Raw Value using `$value`](#RequestingaPropertysRawValueusingvalue) + - [11.2.4.2 Requesting Stream Properties](#RequestingStreamProperties) - [11.2.5 Specifying Properties to Return](#SpecifyingPropertiestoReturn) - [11.2.5.1 System Query Option `$select`](#SystemQueryOptionselect) - [11.2.5.2 System Query Option `$expand`](#SystemQueryOptionexpand) @@ -2791,6 +2792,21 @@ GET http://host/service/Products(1)/Name/$value ``` ::: +#### 11.2.4.2 Requesting Stream Properties + +If the property being requested has type `Edm.Stream` (see +[OData-URL, section 9](#ODataURL)), the media type of the response is the +media type of the stream, subject to content negotiation based on the +[`Accept`](#HeaderAccept) header of the request. +The response body is the octet-stream that represents the raw +value of the stream with that media type. + +Note this response format disregards any [`$format`](#SystemQueryOptionformat) +system query option. + +Appending `/$value` to the property URL of a stream property returns +`400 Bad Request`. + ### 11.2.5 Specifying Properties to Return The [`$select`](#SystemQueryOptionselect) and @@ -5287,6 +5303,10 @@ POST http://host/service/MyShoppingCart()/Items ``` ::: +If the function returns a value of type `Edm.Stream` and no additional path +segments follow the function invocation, the response to the `GET` request +obeys the rules for [requesting stream properties](#RequestingStreamProperties). + Parameter values passed to functions MUST be specified either as a URL literal (for primitive values) or as a JSON formatted OData object (for complex values, or collections of primitive or complex values). Entity diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index 9167fa2a2..605df8c7b 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -266,6 +266,21 @@ GET http://host/service/Products(1)/Name/$value ``` ::: +#### ##subsubsubsec Requesting Stream Properties + +If the property being requested has type `Edm.Stream` (see +[OData-URL, section 9](#ODataURL)), the media type of the response is the +media type of the stream, subject to content negotiation based on the +[`Accept`](#HeaderAccept) header of the request. +The response body is the octet-stream that represents the raw +value of the stream with that media type. + +Note this response format disregards any [`$format`](#SystemQueryOptionformat) +system query option. + +Appending `/$value` to the property URL of a stream property returns +`400 Bad Request`. + ### ##subsubsec Specifying Properties to Return The [`$select`](#SystemQueryOptionselect) and diff --git a/odata-protocol/11.5 Operations.md b/odata-protocol/11.5 Operations.md index e00bc941d..88b423127 100644 --- a/odata-protocol/11.5 Operations.md +++ b/odata-protocol/11.5 Operations.md @@ -208,6 +208,10 @@ POST http://host/service/MyShoppingCart()/Items ``` ::: +If the function returns a value of type `Edm.Stream` and no additional path +segments follow the function invocation, the response to the `GET` request +obeys the rules for [requesting stream properties](#RequestingStreamProperties). + Parameter values passed to functions MUST be specified either as a URL literal (for primitive values) or as a JSON formatted OData object (for complex values, or collections of primitive or complex values). Entity From 8d5223bd831abd3b8071a197e5ec29d9c096774f Mon Sep 17 00:00:00 2001 From: D024504 Date: Thu, 19 Oct 2023 08:58:38 +0200 Subject: [PATCH 32/74] _Stream property_ is only defined later --- docs/odata-protocol/odata-protocol.html | 2 +- docs/odata-protocol/odata-protocol.md | 4 ++-- odata-protocol/11 Data Service Requests.md | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index df1d83df2..05937d81b 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1291,7 +1291,7 @@

      11.2.4.2 Requesting Stream Properties

      If the property being requested has type Edm.Stream (see OData-URL, section 9), the media type of the response is the media type of the stream, subject to content negotiation based on the Accept header of the request. The response body is the octet-stream that represents the raw value of the stream with that media type.

      Note this response format disregards any $format system query option.

      -

      Appending /$value to the property URL of a stream property returns 400 Bad Request.

      +

      Appending /$value to the property URL of a property of type Edm.Stream returns 400 Bad Request.

      11.2.5 Specifying Properties to Return

      The $select and $expand system query options enable the client to specify the set of structural properties and navigation properties to include in a response. The service MAY include additional properties not specified in $select and $expand, including properties not defined in the metadata document.

      11.2.5.1 System Query Option $select

      diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index e1b4c2ac8..0bf307d13 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -2804,8 +2804,8 @@ value of the stream with that media type. Note this response format disregards any [`$format`](#SystemQueryOptionformat) system query option. -Appending `/$value` to the property URL of a stream property returns -`400 Bad Request`. +Appending `/$value` to the property URL of a property of type `Edm.Stream` +returns `400 Bad Request`. ### 11.2.5 Specifying Properties to Return diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index 605df8c7b..f80ec8d27 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -278,8 +278,8 @@ value of the stream with that media type. Note this response format disregards any [`$format`](#SystemQueryOptionformat) system query option. -Appending `/$value` to the property URL of a stream property returns -`400 Bad Request`. +Appending `/$value` to the property URL of a property of type `Edm.Stream` +returns `400 Bad Request`. ### ##subsubsec Specifying Properties to Return From 4e00c11818bc48adfa908665baa0091e86b788d6 Mon Sep 17 00:00:00 2001 From: D024504 Date: Thu, 19 Oct 2023 08:59:45 +0200 Subject: [PATCH 33/74] content _type_ negotiation --- docs/odata-protocol/odata-protocol.html | 2 +- docs/odata-protocol/odata-protocol.md | 2 +- odata-protocol/11 Data Service Requests.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 05937d81b..15ce9a89e 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1289,7 +1289,7 @@

      11.2.4.2 Requesting Stream Properties

      -

      If the property being requested has type Edm.Stream (see OData-URL, section 9), the media type of the response is the media type of the stream, subject to content negotiation based on the Accept header of the request. The response body is the octet-stream that represents the raw value of the stream with that media type.

      +

      If the property being requested has type Edm.Stream (see OData-URL, section 9), the media type of the response is the media type of the stream, subject to content type negotiation based on the Accept header of the request. The response body is the octet-stream that represents the raw value of the stream with that media type.

      Note this response format disregards any $format system query option.

      Appending /$value to the property URL of a property of type Edm.Stream returns 400 Bad Request.

      11.2.5 Specifying Properties to Return

      diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index 0bf307d13..65d6b76a9 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -2796,7 +2796,7 @@ GET http://host/service/Products(1)/Name/$value If the property being requested has type `Edm.Stream` (see [OData-URL, section 9](#ODataURL)), the media type of the response is the -media type of the stream, subject to content negotiation based on the +media type of the stream, subject to content type negotiation based on the [`Accept`](#HeaderAccept) header of the request. The response body is the octet-stream that represents the raw value of the stream with that media type. diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index f80ec8d27..5339e96ce 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -270,7 +270,7 @@ GET http://host/service/Products(1)/Name/$value If the property being requested has type `Edm.Stream` (see [OData-URL, section 9](#ODataURL)), the media type of the response is the -media type of the stream, subject to content negotiation based on the +media type of the stream, subject to content type negotiation based on the [`Accept`](#HeaderAccept) header of the request. The response body is the octet-stream that represents the raw value of the stream with that media type. From 0fd6ce22aedb0840a89f040633f426c9bd34d796 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 19 Oct 2023 09:33:30 +0200 Subject: [PATCH 34/74] ODATA-1456 (#102) --- docs/odata-url-conventions/odata-url-conventions.html | 4 ++-- docs/odata-url-conventions/odata-url-conventions.md | 4 ++-- odata-url-conventions/5 Query Options.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/odata-url-conventions/odata-url-conventions.html b/docs/odata-url-conventions/odata-url-conventions.html index d9d507164..64222437b 100644 --- a/docs/odata-url-conventions/odata-url-conventions.html +++ b/docs/odata-url-conventions/odata-url-conventions.html @@ -1419,9 +1419,9 @@
      5.1.1.12.1 case5.1.1.13 Lambda Operators

      OData defines two operators that evaluate a Boolean expression on a collection. Both must be prepended with a path expression that identifies a collection.

      4.01 Services MUST support case-insensitive lambda operator names. Clients that want to work with 4.0 services MUST use lower case lambda operator names.

      -

      The argument of a lambda operator is a case-sensitive lambda variable name followed by a colon (:) and a Boolean expression that uses the lambda variable name to refer to properties of members of the collection identified by the path expression.

      +

      The argument of a lambda operator is a case-sensitive lambda variable name followed by a colon (:) and a Boolean expression that uses the lambda variable name to refer to properties of the instance or of members of the collection identified by the path expression.

      If the name chosen for the lambda variable matches a property name of the current resource referenced by the resource path, the lambda variable takes precedence. Clients can prefix properties of the current resource referenced by the resource path with $it.

      -

      Other path expressions in the Boolean expression neither prefixed with the lambda variable nor $it are evaluated in the scope of the collection instances at the origin of the path expression prepended to the lambda operator.

      +

      Other path expressions in the Boolean expression neither prefixed with the lambda variable nor $it are evaluated in the scope of the instance or of members of the collection at the origin of the path expression prepended to the lambda operator.

      5.1.1.13.1 any

      The any operator applies a Boolean expression to each member of a collection and returns true if and only if the expression is true for any member of the collection, otherwise it returns false. This implies that the any operator always returns false for an empty collection.

      The any operator can be used without an argument expression. This short form returns false if and only if the collection is empty.

      diff --git a/docs/odata-url-conventions/odata-url-conventions.md b/docs/odata-url-conventions/odata-url-conventions.md index 55d5060a4..8ea6a3eb4 100644 --- a/docs/odata-url-conventions/odata-url-conventions.md +++ b/docs/odata-url-conventions/odata-url-conventions.md @@ -2840,7 +2840,7 @@ operator names. The argument of a lambda operator is a case-sensitive lambda variable name followed by a colon (`:`) and a Boolean expression that uses the -lambda variable name to refer to properties of members of the collection +lambda variable name to refer to properties of the instance or of members of the collection identified by the path expression. If the name chosen for the lambda variable matches a property name of @@ -2850,7 +2850,7 @@ resource referenced by the resource path with [`$it`](#it). Other path expressions in the Boolean expression neither prefixed with the lambda variable nor `$it` are evaluated in the scope of the -collection instances at the origin of the path expression prepended to +instance or of members of the collection at the origin of the path expression prepended to the lambda operator. ##### 5.1.1.13.1 `any` diff --git a/odata-url-conventions/5 Query Options.md b/odata-url-conventions/5 Query Options.md index 5f31b0087..fa7224133 100644 --- a/odata-url-conventions/5 Query Options.md +++ b/odata-url-conventions/5 Query Options.md @@ -1446,7 +1446,7 @@ operator names. The argument of a lambda operator is a case-sensitive lambda variable name followed by a colon (`:`) and a Boolean expression that uses the -lambda variable name to refer to properties of members of the collection +lambda variable name to refer to properties of the instance or of members of the collection identified by the path expression. If the name chosen for the lambda variable matches a property name of @@ -1456,7 +1456,7 @@ resource referenced by the resource path with [`$it`](#it). Other path expressions in the Boolean expression neither prefixed with the lambda variable nor `$it` are evaluated in the scope of the -collection instances at the origin of the path expression prepended to +instance or of members of the collection at the origin of the path expression prepended to the lambda operator. ##### ##subsubsubsubsec `any` From 225e8c400828fa30f125cb8fd1feb94651cdc2eb Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 19 Oct 2023 11:23:26 +0200 Subject: [PATCH 35/74] Extract Type Facets to chapter Enttiy Model --- docs/odata-csdl-json/odata-csdl-json.html | 680 ++++++++++----------- docs/odata-csdl-json/odata-csdl-json.md | 543 ++++++++-------- docs/odata-csdl-xml/odata-csdl-xml.html | 475 +++++++------- docs/odata-csdl-xml/odata-csdl-xml.md | 531 ++++++++-------- odata-csdl/1 Introduction.md | 300 +++++++++ odata-csdl/12 Action and Function.md | 4 +- odata-csdl/14 Vocabulary and Annotation.md | 58 +- odata-csdl/7 Structural Property.md | 311 +--------- 8 files changed, 1485 insertions(+), 1417 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index e313b24bb..899e0a430 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -191,9 +191,17 @@

      Table of Contents

    • 3.1 Nominal Types
    • 3.2 Structured Types
    • 3.3 Primitive Types
    • -
    • 3.4 Built-In Abstract Types
    • -
    • 3.5 Built-In Types for defining Vocabulary Terms
    • -
    • 3.6 Annotations
    • +
    • 3.4 Type Facets +
    • +
    • 3.5 Built-In Abstract Types
    • +
    • 3.6 Built-In Types for defining Vocabulary Terms
    • +
    • 3.7 Annotations
  • 4 CSDL JSON Document
      @@ -217,16 +225,8 @@

      Table of Contents

    • 7 Structural Property
    • 8 Navigation Property
        @@ -621,7 +621,103 @@

        3.3

        Edm.Stream is a primitive type that can be used as a property of an entity type or complex type, the underlying type for a type definition, or the binding parameter or return type of an action or function. Edm.Stream, or a type definition whose underlying type is Edm.Stream, cannot be used in collections or for non-binding parameters to functions or actions.

        Some of these types allow facets, defined in section "Type Facets".

        See rule primitiveLiteral in OData-ABNF for the representation of primitive type values in URLs and OData-JSON for the representation in requests and responses.

        -

        3.4 Built-In Abstract Types

        +

        3.4 Type Facets

        +

        Facets modify or constrain the acceptable values for a model element of a given primitive type, for example a structural property, action or function parameter, action or function return type, or term.

        +

        For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

        +

        3.4.1 MaxLength

        +

        A positive integer value specifying the maximum length of a binary, stream or string value. For binary or stream values this is the octet length of the binary data, for string values it is the character length (number of code points for Unicode).

        +

        If no maximum length is specified, clients SHOULD expect arbitrary length.

        +
        +

        $MaxLength

        +

        The value of $MaxLength is a positive integer.

        +

        Note: OData-CSDL-XML defines a symbolic value max that is only allowed in OData 4.0 responses. This symbolic value is not allowed in CDSL JSON documents at all. Services MAY instead specify the concrete maximum length supported for the type by the service or omit the member entirely.

        +
        +

        3.4.2 Precision

        +

        For a decimal value: the maximum number of significant decimal digits of the model element's value; it MUST be a positive integer.

        +

        For a temporal value (datetime-with-timezone-offset, duration, or time-of-day): the number of decimal places allowed in the seconds portion of the value; it MUST be a non-negative integer between zero and twelve.

        +

        Note: service authors SHOULD be aware that some clients are unable to support a precision greater than 28 for decimal values and 7 for temporal values. Client developers MUST be aware of the potential for data loss when round-tripping values of greater precision. Updating via PATCH and exclusively specifying modified values will reduce the risk for unintended data loss.

        +

        Note: model elements with duration values and a granularity less than seconds (e.g. minutes, hours, days) can be annotated with term Measures.DurationGranularity, see OData-VocMeasures.

        +
        +

        $Precision

        +

        The value of $Precision is a number.

        +

        Absence of $Precision means arbitrary precision.

        +
        +
        +

        Example 2: Precision facet applied to the DateTimeOffset type

        +
        "SuggestedTimes": {
        +  "$Type": "Edm.DateTimeOffset",
        +  "$Collection": true,
        +  "$Precision": 6
        +}
        +
        +

        3.4.3 Scale

        +

        A non-negative integer value specifying the maximum number of digits allowed to the right of the decimal point, or one of the symbolic values floating or variable.

        +

        The value floating means that the decimal value represents a decimal floating-point number whose number of significant digits is the value of the Precision facet. OData 4.0 responses MUST NOT specify the value floating.

        +

        The value variable means that the number of digits to the right of the decimal point can vary from zero to the value of the Precision facet.

        +

        An integer value means that the number of digits to the right of the decimal point may vary from zero to the value of the Scale facet, and the number of digits to the left of the decimal point may vary from one to the value of the Precision facet minus the value of the Scale facet. If Precision is equal to Scale, a single zero MUST precede the decimal point.

        +

        The value of Scale MUST be less than or equal to the value of Precision.

        +

        Note: if the underlying data store allows negative scale, services may use a Precision with the absolute value of the negative scale added to the actual number of significant decimal digits, and client-provided values may have to be rounded before being stored.

        +
        +

        $Scale

        +

        The value of $Scale is a number or a string with one of the symbolic values floating or variable.

        +

        Services SHOULD use lower-case values; clients SHOULD accept values in a case-insensitive manner.

        +

        Absence of $Scale means variable.

        +
        +
        +

        Example 3: Precision=3 and Scale=2.
        +Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3

        +
        "Amount32": {
        +  "$Nullable": true,
        +  "$Type": "Edm.Decimal",
        +  "$Precision": 3,
        +  "$Scale": 2
        +}
        +
        +
        +

        Example 4: Precision=2 equals Scale.
        +Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2

        +
        "Amount22": {
        +  "$Nullable": true,
        +  "$Type": "Edm.Decimal",
        +  "$Precision": 2,
        +  "$Scale": 2
        +}
        +
        +
        +

        Example 5: Precision=3 and a variable Scale.
        +Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed values: 12.34, 1234 and 123.4 due to the limited precision.

        +
        "Amount3v": {
        +  "$Nullable": true,
        +  "$Type": "Edm.Decimal",
        +  "$Precision": 3
        +}
        +
        +
        +

        Example 6: Precision=7 and a floating Scale.
        +Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: 1e-102 and 1e97 due to the limited precision.

        +
        "Amount7f": {
        +  "$Nullable": true,
        +  "$Type": "Edm.Decimal",
        +  "$Precision": 7,
        +  "$Scale": "floating"
        +}
        +
        +

        3.4.4 Unicode

        +

        For a string-typed model element the Unicode facet indicates whether the it might contain and accept string values with Unicode characters (code points) beyond the ASCII character set. The value false indicates that the it will only contain and accept string values with characters limited to the ASCII character set.

        +

        If no value is specified, the Unicode facet defaults to true.

        +
        +

        $Unicode

        +

        The value of $Unicode is one of the Boolean literals true or false. Absence of the member means true.

        +
        +

        3.4.5 SRID

        +

        For a geometry- or geography-typed model element the SRID facet identifies which spatial reference system is applied to its values.

        +

        The value of the SRID facet MUST be a non-negative integer or the special value variable. If no value is specified, the facet defaults to 0 for Geometry types or 4326 for Geography types.

        +

        The valid values of the SRID facet and their meanings are as defined by the European Petroleum Survey Group EPSG.

        +
        +

        $SRID

        +

        The value of $SRID is a string containing a number or the symbolic value variable.

        +
        +

        3.5 Built-In Abstract Types

        The following built-in abstract types can be used within a model:

  • @@ -714,22 +810,22 @@

    The reference object MAY contain the members $Include and $IncludeAnnotations as well as annotations.

    -

    Example 3: references to other CSDL documents

    -
    {
    -  ...
    -  "$Reference": {
    -    "http://vocabs.odata.org/capabilities/v1": {
    -      ...
    -    },
    -    "http://vocabs.odata.org/core/v1": {
    -      ...
    -    },
    -    "http://example.org/display/v1": {
    -      ...
    -    }
    -  },
    -  ...
    -}
    +

    Example 8: references to other CSDL documents

    +
    {
    +  ...
    +  "$Reference": {
    +    "http://vocabs.odata.org/capabilities/v1": {
    +      ...
    +    },
    +    "http://vocabs.odata.org/core/v1": {
    +      ...
    +    },
    +    "http://example.org/display/v1": {
    +      ...
    +    }
    +  },
    +  ...
    +}

    4.2 Included Schema

    A reference MAY include zero or more schemas from the referenced document.

    @@ -751,38 +847,38 @@

    $Alias

    The value of $Alias is a string containing the alias for the included schema.

    -

    Example 4: references to entity models containing definitions of vocabulary terms

    -
    {
    -  ...
    -  "$Reference": {
    -    "http://vocabs.odata.org/capabilities/v1": {
    -      "$Include": [
    -        {
    -          "$Namespace": "Org.OData.Capabilities.V1",
    -          "$Alias": "Capabilities"
    -        }
    -      ]
    -    },
    -    "http://vocabs.odata.org/core/v1": {
    -      "$Include": [
    -        {
    -          "$Namespace": "Org.OData.Core.V1",
    -          "$Alias": "Core",
    -          "@Core.DefaultNamespace": true
    -        }
    -      ]
    -    },
    -    "http://example.org/display/v1": {
    -      "$Include": [
    -        {
    -          "$Namespace": "org.example.display",
    -          "$Alias": "UI"
    -        }
    -      ]
    -    }
    -  },
    -  ...
    -}
    +

    Example 9: references to entity models containing definitions of vocabulary terms

    +
    {
    +  ...
    +  "$Reference": {
    +    "http://vocabs.odata.org/capabilities/v1": {
    +      "$Include": [
    +        {
    +          "$Namespace": "Org.OData.Capabilities.V1",
    +          "$Alias": "Capabilities"
    +        }
    +      ]
    +    },
    +    "http://vocabs.odata.org/core/v1": {
    +      "$Include": [
    +        {
    +          "$Namespace": "Org.OData.Core.V1",
    +          "$Alias": "Core",
    +          "@Core.DefaultNamespace": true
    +        }
    +      ]
    +    },
    +    "http://example.org/display/v1": {
    +      "$Include": [
    +        {
    +          "$Namespace": "org.example.display",
    +          "$Alias": "UI"
    +        }
    +      ]
    +    }
    +  },
    +  ...
    +}

    4.3 Included Annotations

    In addition to including whole schemas with all model constructs defined within that schema, a reference may include annotations.

    @@ -802,33 +898,33 @@

    -

    Example 5: reference documents that contain annotations

    -
    {
    -  ...
    -  "$Reference": {
    -    "http://odata.org/ann/b": {
    -      "$IncludeAnnotations": [
    -        {
    -          "$TermNamespace": "org.example.validation"
    -        },
    -        {
    -          "$TermNamespace": "org.example.display",
    -          "$Qualifier": "Tablet"
    -        },
    -        {
    -          "$TermNamespace": "org.example.hcm",
    -          "$TargetNamespace": "com.example.Sales"
    -        },
    -        {
    -          "$TermNamespace": "org.example.hcm",
    -          "$Qualifier": "Tablet",
    -          "$TargetNamespace": "com.example.Person"
    -        }
    -      ]
    -    }
    -  },
    -  ...
    -}
    +

    Example 10: reference documents that contain annotations

    +
    {
    +  ...
    +  "$Reference": {
    +    "http://odata.org/ann/b": {
    +      "$IncludeAnnotations": [
    +        {
    +          "$TermNamespace": "org.example.validation"
    +        },
    +        {
    +          "$TermNamespace": "org.example.display",
    +          "$Qualifier": "Tablet"
    +        },
    +        {
    +          "$TermNamespace": "org.example.hcm",
    +          "$TargetNamespace": "com.example.Sales"
    +        },
    +        {
    +          "$TermNamespace": "org.example.hcm",
    +          "$Qualifier": "Tablet",
    +          "$TargetNamespace": "com.example.Person"
    +        }
    +      ]
    +    }
    +  },
    +  ...
    +}

    The following annotations from http://odata.org/ann/b are included:

    @@ -862,16 +958,16 @@

    $Alias

    The value of $Alias is a string containing the alias for the schema.

    -

    Example 6: document defining a schema org.example with an alias and a description for the schema

    -
    {
    -  ...
    -  "org.example": {
    -    "$Alias": "self",
    -    "@Core.Description": "Example schema",
    -    ...
    -  },
    -  ...
    -}
    +

    Example 11: document defining a schema org.example with an alias and a description for the schema

    +
    {
    +  ...
    +  "org.example": {
    +    "$Alias": "self",
    +    "@Core.Description": "Example schema",
    +    ...
    +  },
    +  ...
    +}

    5.2 Annotations with External Targeting

    @@ -879,16 +975,16 @@

    $AnnotationsThe value of $Annotations is an object with one member per annotation target. The member name is a path identifying the annotation target, the member value is an object containing annotations for that target.

    -

    Example 7: annotations targeting the Person type with qualifier Tablet

    -
    "org.example": {
    -  "$Alias": "self",
    -  "$Annotations": {
    -    "self.Person": {
    -      "@Core.Description#Tablet": "Dummy",
    -      ...
    -    }
    -  }
    -}
    +

    Example 12: annotations targeting the Person type with qualifier Tablet

    +
    "org.example": {
    +  "$Alias": "self",
    +  "$Annotations": {
    +    "self.Person": {
    +      "@Core.Description#Tablet": "Dummy",
    +      ...
    +    }
    +  }
    +}

    6 Entity Type

    @@ -904,21 +1000,21 @@

    Entity Type ObjectIt also MAY contain members representing structural properties and navigation properties as well as annotations.

    -

    Example 8: a simple entity type

    -
    "Employee": {
    -  "$Kind": "EntityType",
    -  "$Key": [
    -    "ID"
    -  ],
    -  "ID": {},
    -  "FirstName": {},
    -  "LastName": {},
    -  "Manager": {
    -    "$Kind": "NavigationProperty",
    -    "$Nullable": true,
    -    "$Type": "self.Manager"
    -  }
    -}
    +

    Example 13: a simple entity type

    +
    "Employee": {
    +  "$Kind": "EntityType",
    +  "$Key": [
    +    "ID"
    +  ],
    +  "ID": {},
    +  "FirstName": {},
    +  "LastName": {},
    +  "Manager": {
    +    "$Kind": "NavigationProperty",
    +    "$Nullable": true,
    +    "$Type": "self.Manager"
    +  }
    +}

    6.1 Derived Entity Type

    An entity type can inherit from another entity type by specifying it as its base type.

    @@ -929,21 +1025,21 @@

    $BaseType

    The value of $BaseType is the qualified name of the base type.

    -

    Example 9: a derived entity type based on the previous example

    -
    "Manager": {
    -  "$Kind": "EntityType",
    -  "$BaseType": "self.Employee",
    -  "AnnualBudget": {
    -    "$Nullable": true,
    -    "$Type": "Edm.Decimal",
    -    "$Scale": 0
    -  },
    -  "Employees": {
    -    "$Kind": "NavigationProperty",
    -    "$Collection": true,
    -    "$Type": "self.Employee"
    -  }
    -}
    +

    Example 14: a derived entity type based on the previous example

    +
    "Manager": {
    +  "$Kind": "EntityType",
    +  "$BaseType": "self.Employee",
    +  "AnnualBudget": {
    +    "$Nullable": true,
    +    "$Type": "Edm.Decimal",
    +    "$Scale": 0
    +  },
    +  "Employees": {
    +    "$Kind": "NavigationProperty",
    +    "$Collection": true,
    +    "$Type": "self.Employee"
    +  }
    +}

    Note: the derived type has the same name as one of the properties of its base type.

    @@ -1007,70 +1103,70 @@

    $Key

    Key properties with a key alias are represented as objects with one member whose name is the key alias and whose value is a string containing the path to the property.

    -

    Example 10: entity type with a simple key

    -
    "Category": {
    -  "$Kind": "EntityType",
    -  "$Key": [
    -    "ID"
    -  ],
    -  "ID": {
    -    "$Type": "Edm.Int32"
    -  },
    -  "Name": {
    -    "$Nullable": true,
    -    "@Core.IsLanguageDependent": true
    -  }
    -}
    -
    -
    -

    Example 11: entity type with a simple key referencing a property of a complex type

    -
    "Category": {
    -  "$Kind": "EntityType",
    -  "$Key": [
    -    {
    -      "EntityInfoID": "Info/ID"
    -    }
    -  ],
    -  "Info": {
    -    "$Type": "self.EntityInfo"
    -  },
    -  "Name": {
    -    "$Nullable": true
    -  }
    -},
    -"EntityInfo": {
    -  "$Kind": "ComplexType",
    -  "ID": {
    -    "$Type": "Edm.Int32"
    -  },
    -  "Created": {
    -    "$Type": "Edm.DateTimeOffset",
    -    "$Precision": 0
    -  }
    -}
    -
    -
    -

    Example 12: entity type with a composite key

    -
    "OrderLine": {
    -  "$Kind": "EntityType",
    -  "$Key": [
    -    "OrderID",
    -    "LineNumber"
    -  ],
    -  "OrderID": {
    -    "$Type": "Edm.Int32"
    -  },
    -  "LineNumber": {
    -    "$Type": "Edm.Int32"
    -  }
    -}
    +

    Example 15: entity type with a simple key

    +
    "Category": {
    +  "$Kind": "EntityType",
    +  "$Key": [
    +    "ID"
    +  ],
    +  "ID": {
    +    "$Type": "Edm.Int32"
    +  },
    +  "Name": {
    +    "$Nullable": true,
    +    "@Core.IsLanguageDependent": true
    +  }
    +}
    +
    +
    +

    Example 16: entity type with a simple key referencing a property of a complex type

    +
    "Category": {
    +  "$Kind": "EntityType",
    +  "$Key": [
    +    {
    +      "EntityInfoID": "Info/ID"
    +    }
    +  ],
    +  "Info": {
    +    "$Type": "self.EntityInfo"
    +  },
    +  "Name": {
    +    "$Nullable": true
    +  }
    +},
    +"EntityInfo": {
    +  "$Kind": "ComplexType",
    +  "ID": {
    +    "$Type": "Edm.Int32"
    +  },
    +  "Created": {
    +    "$Type": "Edm.DateTimeOffset",
    +    "$Precision": 0
    +  }
    +}
    +
    +
    +

    Example 17: entity type with a composite key

    +
    "OrderLine": {
    +  "$Kind": "EntityType",
    +  "$Key": [
    +    "OrderID",
    +    "LineNumber"
    +  ],
    +  "OrderID": {
    +    "$Type": "Edm.Int32"
    +  },
    +  "LineNumber": {
    +    "$Type": "Edm.Int32"
    +  }
    +}
    -

    Example 13 (based on example 11): requests to an entity set Categories of type Category must use the alias

    +

    Example 18 (based on example 16): requests to an entity set Categories of type Category must use the alias

    GET http://host/service/Categories(EntityInfoID=1)
    -

    Example 14 (based on example 11): in a query part the value assigned to the name attribute must be used

    +

    Example 19 (based on example 16): in a query part the value assigned to the name attribute must be used

    GET http://example.org/OData.svc/Categories?$filter=Info/ID le 100

    @@ -1093,19 +1189,19 @@

    Property Object

    It also MAY contain annotations.

    -

    Example 15: complex type with two properties Dimension and Length

    -
    "Measurement": {
    -  "$Kind": "ComplexType",
    -  "Dimension": {
    -    "$MaxLength": 50,
    -    "$DefaultValue": "Unspecified"
    -  },
    -  "Length": {
    -    "$Type": "Edm.Decimal",
    -    "$Precision": 18,
    -    "$Scale": 2
    -  }
    -}
    +

    Example 20: complex type with two properties Dimension and Length

    +
    "Measurement": {
    +  "$Kind": "ComplexType",
    +  "Dimension": {
    +    "$MaxLength": 50,
    +    "$DefaultValue": "Unspecified"
    +  },
    +  "Length": {
    +    "$Type": "Edm.Decimal",
    +    "$Precision": 18,
    +    "$Scale": 2
    +  }
    +}

    7.1 Type

    The property's type MUST be a primitive type, complex type, or enumeration type in scope, or a collection of one of these types.

    @@ -1118,120 +1214,24 @@

    $Type and -

    Example 16: property Units that can have zero or more strings as its value

    -
    "Units": {
    -  "$Collection": true
    -}
    +

    Example 21: property Units that can have zero or more strings as its value

    +
    "Units": {
    +  "$Collection": true
    +}

    -

    7.2 Type Facets

    -

    Facets modify or constrain the acceptable values for a model element of a given type.

    -

    For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

    -

    7.2.1 Nullable

    +

    7.2 Nullable

    A Boolean value specifying whether the property can have the value null.

    $Nullable

    The value of $Nullable is one of the Boolean literals true or false. Absence of the member means false.

    For single-valued properties the value true means that the property allows the null value.

    -

    For collection-valued properties the property value will always be a collection that MAY be empty. In this case $Nullable applies to items of the collection and specifies whether the collection MAY contain null values.

    -
    -

    7.2.2 MaxLength

    -

    A positive integer value specifying the maximum length of a binary, stream or string value. For binary or stream values this is the octet length of the binary data, for string values it is the character length (number of code points for Unicode).

    -

    If no maximum length is specified, clients SHOULD expect arbitrary length.

    -
    -

    $MaxLength

    -

    The value of $MaxLength is a positive integer.

    -

    Note: OData-CSDL-XML defines a symbolic value max that is only allowed in OData 4.0 responses. This symbolic value is not allowed in CDSL JSON documents at all. Services MAY instead specify the concrete maximum length supported for the type by the service or omit the member entirely.

    -
    -

    7.2.3 Precision

    -

    For a decimal value: the maximum number of significant decimal digits of the property's value; it MUST be a positive integer.

    -

    For a temporal value (datetime-with-timezone-offset, duration, or time-of-day): the number of decimal places allowed in the seconds portion of the value; it MUST be a non-negative integer between zero and twelve.

    -

    Note: service authors SHOULD be aware that some clients are unable to support a precision greater than 28 for decimal properties and 7 for temporal properties. Client developers MUST be aware of the potential for data loss when round-tripping values of greater precision. Updating via PATCH and exclusively specifying modified properties will reduce the risk for unintended data loss.

    -

    Note: duration properties supporting a granularity less than seconds (e.g. minutes, hours, days) can be annotated with term Measures.DurationGranularity, see OData-VocMeasures.

    -
    -

    $Precision

    -

    The value of $Precision is a number.

    -

    Absence of $Precision means arbitrary precision.

    +

    For collection-valued properties the value will always be a collection that MAY be empty. In this case $Nullable applies to items of the collection and specifies whether the collection MAY contain null values.

    -
    -

    Example 17: Precision facet applied to the DateTimeOffset type

    -
    "SuggestedTimes": {
    -  "$Type": "Edm.DateTimeOffset",
    -  "$Collection": true,
    -  "$Precision": 6
    -}
    -
    -

    7.2.4 Scale

    -

    A non-negative integer value specifying the maximum number of digits allowed to the right of the decimal point, or one of the symbolic values floating or variable.

    -

    The value floating means that the decimal property represents a decimal floating-point number whose number of significant digits is the value of the Precision facet. OData 4.0 responses MUST NOT specify the value floating.

    -

    The value variable means that the number of digits to the right of the decimal point can vary from zero to the value of the Precision facet.

    -

    An integer value means that the number of digits to the right of the decimal point may vary from zero to the value of the Scale facet, and the number of digits to the left of the decimal point may vary from one to the value of the Precision facet minus the value of the Scale facet. If Precision is equal to Scale, a single zero MUST precede the decimal point.

    -

    The value of Scale MUST be less than or equal to the value of Precision.

    -

    Note: if the underlying data store allows negative scale, services may use a Precision with the absolute value of the negative scale added to the actual number of significant decimal digits, and client-provided values may have to be rounded before being stored.

    -
    -

    $Scale

    -

    The value of $Scale is a number or a string with one of the symbolic values floating or variable.

    -

    Services SHOULD use lower-case values; clients SHOULD accept values in a case-insensitive manner.

    -

    Absence of $Scale means variable.

    -
    -
    -

    Example 18: Precision=3 and Scale=2.
    -Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3

    -
    "Amount32": {
    -  "$Nullable": true,
    -  "$Type": "Edm.Decimal",
    -  "$Precision": 3,
    -  "$Scale": 2
    -}
    -
    -
    -

    Example 19: Precision=2 equals Scale.
    -Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2

    -
    "Amount22": {
    -  "$Nullable": true,
    -  "$Type": "Edm.Decimal",
    -  "$Precision": 2,
    -  "$Scale": 2
    -}
    -
    -
    -

    Example 20: Precision=3 and a variable Scale.
    -Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed values: 12.34, 1234 and 123.4 due to the limited precision.

    -
    "Amount3v": {
    -  "$Nullable": true,
    -  "$Type": "Edm.Decimal",
    -  "$Precision": 3
    -}
    -
    -
    -

    Example 21: Precision=7 and a floating Scale.
    -Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: 1e-102 and 1e97 due to the limited precision.

    -
    "Amount7f": {
    -  "$Nullable": true,
    -  "$Type": "Edm.Decimal",
    -  "$Precision": 7,
    -  "$Scale": "floating"
    -}
    -
    -

    7.2.5 Unicode

    -

    For a string property the Unicode facet indicates whether the property might contain and accept string values with Unicode characters (code points) beyond the ASCII character set. The value false indicates that the property will only contain and accept string values with characters limited to the ASCII character set.

    -

    If no value is specified, the Unicode facet defaults to true.

    -
    -

    $Unicode

    -

    The value of $Unicode is one of the Boolean literals true or false. Absence of the member means true.

    -
    -

    7.2.6 SRID

    -

    For a geometry or geography property the SRID facet identifies which spatial reference system is applied to values of the property on type instances.

    -

    The value of the SRID facet MUST be a non-negative integer or the special value variable. If no value is specified, the facet defaults to 0 for Geometry types or 4326 for Geography types.

    -

    The valid values of the SRID facet and their meanings are as defined by the European Petroleum Survey Group EPSG.

    -
    -

    $SRID

    -

    The value of $SRID is a string containing a number or the symbolic value variable.

    -
    -

    7.2.7 Default Value

    -

    A primitive or enumeration property MAY define a default value that is used if the property is not explicitly represented in an annotation or the body of a request or response.

    +

    7.3 Default Value

    +

    A primitive- or enumeration-typed model element MAY define a default value that is used if it is not explicitly represented in an annotation or the body of a request or response.

    If no value is specified, the client SHOULD NOT assume a default value.

    -

    $DefaultValue

    +

    $DefaultValue

    The value of $DefaultValue is the type-specific JSON representation of the default value of the property, see OData-JSON. For properties of type Edm.Decimal and Edm.Int64 the representation depends on the media type parameter IEEE754Compatible.


    @@ -1642,7 +1642,7 @@

    Functio

    12.5 Bound or Unbound Action or Function Overloads

    An action or function overload MAY indicate that it is bound. If not explicitly indicated, it is unbound.

    -

    Bound actions or functions are invoked on resources matching the type of the binding parameter. The binding parameter can be of any type, and it MAY be nullable.

    +

    Bound actions or functions are invoked on resources matching the type of the binding parameter. The binding parameter can be of any type, and it MAY be nullable.

    Unbound actions are invoked from the entity container through an action import.

    Unbound functions are invoked as static functions within a common expression (see OData-URL, section 5.1.1), or from the entity container through a function import.

    @@ -1667,7 +1667,7 @@

    $IsComposable

    12.8 Return Type

    The return type of an action or function overload MAY be any type in scope, or a collection of any type in scope.

    -

    The facets Nullable, MaxLength, Precision, Scale, and SRID can be used as appropriate to specify value restrictions of the return type, as well as the Unicode facet for 4.01 and greater payloads.

    +

    The facets MaxLength, Precision, Scale, and SRID can be used as appropriate to specify value restrictions of the return type, as well as the Unicode facet for 4.01 and greater payloads.

    For a single-valued return type the facets apply to the returned value. For a collection-valued return type the facets apply to the items in the returned collection.

    $ReturnType

    @@ -2011,13 +2011,17 @@

    14.1 Term

    Term Object

    A term is represented as a member of the schema object whose name is the unqualified name of the term and whose value is an object.

    The term object MUST contain the member $Kind with a string value of Term.

    -

    It MAY contain the members $Type, $Collection, $AppliesTo, $Nullable, $MaxLength, $Precision, $Scale, $SRID, and $DefaultValue, as well as $Unicode for 4.01 and greater payloads.

    +

    It MAY contain the members $Type, $Collection, $Nullable, $DefaultValue, $BaseTerm, $AppliesTo, $MaxLength, $Precision, $Scale, and $SRID, as well as $Unicode for 4.01 and greater payloads.

    It MAY contain annotations.

    $Type and $Collection

    For single-valued terms the value of $Type is the qualified name of the term's type.

    For collection-valued terms the value of $Type is the qualified name of the term's item type, and the member $Collection MUST be present with the literal value true.

    Absence of the $Type member means the type is Edm.String.

    -

    $DefaultValue

    +

    $Nullable

    +

    The value of $Nullable is one of the Boolean literals true or false. Absence of the member means false.

    +

    For single-valued terms the value true means that annotations may have the null value.

    +

    For collection-valued terms the annotation value will always be a collection that MAY be empty. In this case $Nullable applies to items of the collection and specifies whether the collection MAY contain null values.

    +

    $DefaultValue

    The value of $DefaultValue is the type-specific JSON representation of the default value of the term, see OData-JSON.

    Note: the $DefaultValue member is purely for documentation and isomorphy to OData-CSDLXML. Annotations in CSDL JSON documents MUST always specify an explicit value.

    @@ -2025,7 +2029,7 @@

    A term MAY specialize another term in scope by specifying it as its base term.

    When applying a specialized term, the base term MUST also be applied with the same qualifier, and so on until a term without a base term is reached.

    -

    $BaseTerm

    +

    $BaseTerm

    The value of $BaseTerm is the qualified name of the base term.

    14.1.2 Applicability

    @@ -2173,7 +2177,7 @@

    14.1.2
    -

    $AppliesTo

    +

    $AppliesTo

    The value of $AppliesTo is an array whose items are strings containing symbolic values from the table above that identify model elements the term is intended to be applied to.

    @@ -3113,7 +3117,7 @@

    14.4.12 Record

    It MAY contain annotations for itself and its members. Annotations for record members are prefixed with the member name.

    -

    Example 86: this annotation "morphs" the entity type from example 8 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

    +

    Example 86: this annotation "morphs" the entity type from example 13 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

    "@person.Employee": {
       "@type": "https://example.org/vocabs/person#org.example.person.Manager",
       "@Core.Description": "Annotation on record",
    @@ -3600,12 +3604,7 @@ 

    $Type
  • $Collection
  • $Nullable
  • -
  • $MaxLength
  • -
  • $Precision
  • -
  • $Scale
  • -
  • $Unicode
  • -
  • $SRID
  • -
  • $DefaultValue
  • +
  • $DefaultValue
  • Navigation Property Object
  • Annotation Member
      diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 2d8a40438..833a49dbb 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -113,9 +113,15 @@ For complete copyright information please see the full Notices section in an App - [3.1 Nominal Types](#NominalTypes) - [3.2 Structured Types](#StructuredTypes) - [3.3 Primitive Types](#PrimitiveTypes) - - [3.4 Built-In Abstract Types](#BuiltInAbstractTypes) - - [3.5 Built-In Types for defining Vocabulary Terms](#BuiltInTypesfordefiningVocabularyTerms) - - [3.6 Annotations](#Annotations) + - [3.4 Type Facets](#TypeFacets) + - [3.4.1 MaxLength](#MaxLength) + - [3.4.2 Precision](#Precision) + - [3.4.3 Scale](#Scale) + - [3.4.4 Unicode](#Unicode) + - [3.4.5 SRID](#SRID) + - [3.5 Built-In Abstract Types](#BuiltInAbstractTypes) + - [3.6 Built-In Types for defining Vocabulary Terms](#BuiltInTypesfordefiningVocabularyTerms) + - [3.7 Annotations](#Annotations) - [4 CSDL JSON Document](#CSDLJSONDocument) - [4.1 Reference](#Reference) - [4.2 Included Schema](#IncludedSchema) @@ -131,14 +137,8 @@ For complete copyright information please see the full Notices section in an App - [6.5 Key](#Key) - [7 Structural Property](#StructuralProperty) - [7.1 Type](#Type) - - [7.2 Type Facets](#TypeFacets) - - [7.2.1 Nullable](#Nullable) - - [7.2.2 MaxLength](#MaxLength) - - [7.2.3 Precision](#Precision) - - [7.2.4 Scale](#Scale) - - [7.2.5 Unicode](#Unicode) - - [7.2.6 SRID](#SRID) - - [7.2.7 Default Value](#DefaultValue) + - [7.2 Nullable](#Nullable) + - [7.3 Default Value](#DefaultValue) - [8 Navigation Property](#NavigationProperty) - [8.1 Navigation Property Type](#NavigationPropertyType) - [8.2 Nullable Navigation Property](#NullableNavigationProperty) @@ -614,7 +614,221 @@ representation of primitive type values in URLs and [OData-JSON](#ODataJSON) for the representation in requests and responses. -## 3.4 Built-In Abstract Types +## 3.4 Type Facets + +Facets modify or constrain the acceptable values for a model element of a given primitive type, +for example a [structural property](#StructuralProperty), +action or function [parameter](#Parameter), action or function [return type](#ReturnType), or [term](#Term). + +For single-valued model elements the facets apply to the value of the +model element. For collection-valued model elements the facets apply to the items +in the collection. + +### 3.4.1 MaxLength + +A positive integer value specifying the maximum length of a binary, +stream or string value. For binary or stream values this is the octet +length of the binary data, for string values it is the character length +(number of code points for Unicode). + +If no maximum length is specified, clients SHOULD expect arbitrary +length. + +::: {.varjson .rep} +### `$MaxLength` + +The value of `$MaxLength` is a positive integer. + +Note: [OData-CSDL-XML](#ODataCSDL) defines a symbolic +value `max` that is only allowed in OData 4.0 responses. This symbolic +value is not allowed in CDSL JSON documents at all. Services MAY instead +specify the concrete maximum length supported for the type by the +service or omit the member entirely. +::: + + +### 3.4.2 Precision + +For a decimal value: the maximum number of significant decimal digits of +the model element's value; it MUST be a positive integer. + +For a temporal value (datetime-with-timezone-offset, duration, or +time-of-day): the number of decimal places allowed in the seconds +portion of the value; it MUST be a non-negative integer between zero and +twelve. + +Note: service authors SHOULD be aware that some clients are unable to +support a precision greater than 28 for decimal values and 7 for +temporal values. Client developers MUST be aware of the potential +for data loss when round-tripping values of greater precision. Updating +via `PATCH` and exclusively specifying modified values will reduce +the risk for unintended data loss. + +Note: model elements with duration values and a granularity less than seconds +(e.g. minutes, hours, days) can be annotated with term +[`Measures.DurationGranularity`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Measures.V1.md#DurationGranularity), +see [OData-VocMeasures](#ODataVocMeasures). + +::: {.varjson .rep} +### `$Precision` + +The value of `$Precision` is a number. + +Absence of `$Precision` means arbitrary precision. +::: + +::: {.varjson .example} +Example 2: `Precision` facet applied to the `DateTimeOffset` type +```json +"SuggestedTimes": { + "$Type": "Edm.DateTimeOffset", + "$Collection": true, + "$Precision": 6 +} +``` +::: + + + +### 3.4.3 Scale + +A non-negative integer value specifying the maximum number of digits +allowed to the right of the decimal point, or one of the symbolic values +`floating` or `variable`. + +The value `floating` means that the decimal value represents a +decimal floating-point number whose number of significant digits is the +value of the [`Precision`](#Precision) facet. OData 4.0 responses MUST +NOT specify the value `floating`. + +The value `variable` means that the number of digits to the right of the +decimal point can vary from zero to the value of the +[`Precision`](#Precision) facet. + +An integer value means that the number of digits to the right of the +decimal point may vary from zero to the value of the `Scale` facet, and +the number of digits to the left of the decimal point may vary from one +to the value of the `Precision` facet minus the value of the `Scale` +facet. If `Precision` is equal to `Scale`, a single zero MUST precede +the decimal point. + +The value of `Scale` MUST be less than or equal to the value of +[`Precision`](#Precision). + +Note: if the underlying data store allows negative scale, services may +use a [`Precision`](#Precision) with the absolute value of the negative +scale added to the actual number of significant decimal digits, and +client-provided values may have to be rounded before being stored. + +::: {.varjson .rep} +### `$Scale` + +The value of `$Scale` is a number or a string with one of the symbolic +values `floating` or `variable`. + +Services SHOULD use lower-case values; clients SHOULD accept values in a +case-insensitive manner. + +Absence of `$Scale` means `variable`. +::: + +::: {.varjson .example} +Example 3: [`Precision`](#Precision)`=3` and `Scale=2`. +Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 +```json +"Amount32": { + "$Nullable": true, + "$Type": "Edm.Decimal", + "$Precision": 3, + "$Scale": 2 +} +``` +::: + +::: {.varjson .example} +Example 4: `Precision=2` equals `Scale`. +Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2 +```json +"Amount22": { + "$Nullable": true, + "$Type": "Edm.Decimal", + "$Precision": 2, + "$Scale": 2 +} +``` +::: + +::: {.varjson .example} +Example 5: `Precision=3` and a variable `Scale`. +Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed +values: 12.34, 1234 and 123.4 due to the limited precision. +```json +"Amount3v": { + "$Nullable": true, + "$Type": "Edm.Decimal", + "$Precision": 3 +} +``` +::: + +::: {.varjson .example} +Example 6: `Precision=7` and a floating `Scale`. +Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: +1e-102 and 1e97 due to the limited precision. +```json +"Amount7f": { + "$Nullable": true, + "$Type": "Edm.Decimal", + "$Precision": 7, + "$Scale": "floating" +} +``` +::: + + + + + + +### 3.4.4 Unicode + +For a string-typed model element the `Unicode` facet indicates whether the it +might contain and accept string values with Unicode characters (code +points) beyond the ASCII character set. The value `false` indicates that +the it will only contain and accept string values with characters +limited to the ASCII character set. + +If no value is specified, the `Unicode` facet defaults to `true`. + +::: {.varjson .rep} +### `$Unicode` + +The value of `$Unicode` is one of the Boolean literals `true` or +`false`. Absence of the member means `true`. +::: + + +### 3.4.5 SRID + +For a geometry- or geography-typed model element the `SRID` facet identifies which +spatial reference system is applied to its values. + +The value of the `SRID` facet MUST be a non-negative integer or the +special value `variable`. If no value is specified, the facet defaults +to `0` for `Geometry` types or `4326` for `Geography` types. + +The valid values of the `SRID` facet and their meanings are as defined +by the European Petroleum Survey Group [EPSG](#_EPSG). + +::: {.varjson .rep} +### `$SRID` + +The value of `$SRID` is a string containing a number or the symbolic +value `variable`. +::: + + +## 3.5 Built-In Abstract Types The following built-in abstract types can be used within a model: - `Edm.PrimitiveType` @@ -660,7 +874,7 @@ be used anywhere a corresponding concrete type can be used, except: of `4.0`. Services should treat untyped properties as dynamic properties in `4.0` payloads. -## 3.5 Built-In Types for defining Vocabulary Terms +## 3.6 Built-In Types for defining Vocabulary Terms [Vocabulary terms](#VocabularyandAnnotation) can, in addition, use - `Edm.AnnotationPath` @@ -675,7 +889,7 @@ as the type of a primitive term, or the type of a property of a complex type (recursively) that is exclusively used as the type of a term. See section "[Path Expressions](#PathExpressions)" for details. -## 3.6 Annotations +## 3.7 Annotations Many parts of the model can be decorated with additional information using [annotations](#Annotation). Annotations are identified by their @@ -712,7 +926,7 @@ The value of `$EntityContainer` is the namespace-qualified name of the entity co ::: ::: {.varjson .example} -Example 2: +Example 7: ```json { "$Version": "4.01", @@ -767,7 +981,7 @@ The reference object MAY contain the members ::: ::: {.varjson .example} -Example 3: references to other CSDL documents +Example 8: references to other CSDL documents ```json { ... @@ -844,7 +1058,7 @@ schema. ::: ::: {.varjson .example} -Example 4: references to entity models containing definitions of +Example 9: references to entity models containing definitions of vocabulary terms ```json { @@ -942,7 +1156,7 @@ The value of `$TargetNamespace` is a namespace. ::: ::: {.varjson .example} -Example 5: reference documents that contain annotations +Example 10: reference documents that contain annotations ```json { ... @@ -1061,7 +1275,7 @@ The value of `$Alias` is a string containing the alias for the schema. ::: ::: {.varjson .example} -Example 6: document defining a schema `org.example` with an alias and a +Example 11: document defining a schema `org.example` with an alias and a description for the schema ```json { @@ -1090,7 +1304,7 @@ target](#Target), the member value is an object containing ::: ::: {.varjson .example} -Example 7: annotations targeting the `Person` type with qualifier +Example 12: annotations targeting the `Person` type with qualifier `Tablet` ```json "org.example": { @@ -1151,7 +1365,7 @@ properties](#NavigationProperty) as well as [annotations](#Annotation). ::: ::: {.varjson .example} -Example 8: a simple entity type +Example 13: a simple entity type ```json "Employee": { "$Kind": "EntityType", @@ -1190,7 +1404,7 @@ The value of `$BaseType` is the qualified name of the base type. ::: ::: {.varjson .example} -Example 9: a derived entity type based on the previous example +Example 14: a derived entity type based on the previous example ```json "Manager": { "$Kind": "EntityType", @@ -1379,7 +1593,7 @@ containing the path to the property. ::: ::: {.varjson .example} -Example 10: entity type with a simple key +Example 15: entity type with a simple key ```json "Category": { "$Kind": "EntityType", @@ -1398,7 +1612,7 @@ Example 10: entity type with a simple key ::: ::: {.varjson .example} -Example 11: entity type with a simple key referencing a property of a +Example 16: entity type with a simple key referencing a property of a [complex type](#ComplexType) ```json "Category": { @@ -1429,7 +1643,7 @@ Example 11: entity type with a simpl ::: ::: {.varjson .example} -Example 12: entity type with a composite key +Example 17: entity type with a composite key ```json "OrderLine": { "$Kind": "EntityType", @@ -1452,7 +1666,7 @@ Example 12: entity type with a composite key ::: example -Example 13 (based on [example 11](#complexkey)): requests to an entity set `Categories` +Example 18 (based on [example 16](#complexkey)): requests to an entity set `Categories` of type `Category` must use the alias ``` GET http://host/service/Categories(EntityInfoID=1) @@ -1460,7 +1674,7 @@ GET http://host/service/Categories(EntityInfoID=1) ::: ::: example -Example 14 (based on [example 11](#complexkey)): in a query part the value assigned to +Example 19 (based on [example 16](#complexkey)): in a query part the value assigned to the name attribute must be used ``` GET http://example.org/OData.svc/Categories?$filter=Info/ID le 100 @@ -1516,7 +1730,7 @@ It also MAY contain [annotations](#Annotation). ::: ::: {.varjson .example} -Example 15: complex type with two properties `Dimension` and `Length` +Example 20: complex type with two properties `Dimension` and `Length` ```json "Measurement": { "$Kind": "ComplexType", @@ -1567,7 +1781,7 @@ member SHOULD be omitted for string properties to reduce document size. ::: ::: {.varjson .example} -Example 16: property `Units` that can have zero or more strings as its +Example 21: property `Units` that can have zero or more strings as its value ```json "Units": { @@ -1578,15 +1792,7 @@ value -## 7.2 Type Facets - -Facets modify or constrain the acceptable values for a model element of a given type. - -For single-valued model elements the facets apply to the value of the -model element. For collection-valued model elements the facets apply to the items -in the collection. - -### 7.2.1 Nullable +## 7.2 Nullable A Boolean value specifying whether the property can have the value `null`. @@ -1600,228 +1806,23 @@ The value of `$Nullable` is one of the Boolean literals `true` or For single-valued properties the value `true` means that the property allows the `null` value. -For collection-valued properties the property value will always be a +For collection-valued properties the value will always be a collection that MAY be empty. In this case `$Nullable` applies to items of the collection and specifies whether the collection MAY contain `null` values. ::: -### 7.2.2 MaxLength - -A positive integer value specifying the maximum length of a binary, -stream or string value. For binary or stream values this is the octet -length of the binary data, for string values it is the character length -(number of code points for Unicode). - -If no maximum length is specified, clients SHOULD expect arbitrary -length. - -::: {.varjson .rep} -### `$MaxLength` - -The value of `$MaxLength` is a positive integer. - -Note: [OData-CSDL-XML](#ODataCSDL) defines a symbolic -value `max` that is only allowed in OData 4.0 responses. This symbolic -value is not allowed in CDSL JSON documents at all. Services MAY instead -specify the concrete maximum length supported for the type by the -service or omit the member entirely. -::: - - -### 7.2.3 Precision - -For a decimal value: the maximum number of significant decimal digits of -the property's value; it MUST be a positive integer. - -For a temporal value (datetime-with-timezone-offset, duration, or -time-of-day): the number of decimal places allowed in the seconds -portion of the value; it MUST be a non-negative integer between zero and -twelve. - -Note: service authors SHOULD be aware that some clients are unable to -support a precision greater than 28 for decimal properties and 7 for -temporal properties. Client developers MUST be aware of the potential -for data loss when round-tripping values of greater precision. Updating -via `PATCH` and exclusively specifying modified properties will reduce -the risk for unintended data loss. - -Note: duration properties supporting a granularity less than seconds -(e.g. minutes, hours, days) can be annotated with term -[`Measures.DurationGranularity`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Measures.V1.md#DurationGranularity), -see [OData-VocMeasures](#ODataVocMeasures). - -::: {.varjson .rep} -### `$Precision` - -The value of `$Precision` is a number. - -Absence of `$Precision` means arbitrary precision. -::: - -::: {.varjson .example} -Example 17: `Precision` facet applied to the `DateTimeOffset` type -```json -"SuggestedTimes": { - "$Type": "Edm.DateTimeOffset", - "$Collection": true, - "$Precision": 6 -} -``` -::: - - - -### 7.2.4 Scale - -A non-negative integer value specifying the maximum number of digits -allowed to the right of the decimal point, or one of the symbolic values -`floating` or `variable`. - -The value `floating` means that the decimal property represents a -decimal floating-point number whose number of significant digits is the -value of the [`Precision`](#Precision) facet. OData 4.0 responses MUST -NOT specify the value `floating`. - -The value `variable` means that the number of digits to the right of the -decimal point can vary from zero to the value of the -[`Precision`](#Precision) facet. - -An integer value means that the number of digits to the right of the -decimal point may vary from zero to the value of the `Scale` facet, and -the number of digits to the left of the decimal point may vary from one -to the value of the `Precision` facet minus the value of the `Scale` -facet. If `Precision` is equal to `Scale`, a single zero MUST precede -the decimal point. - -The value of `Scale` MUST be less than or equal to the value of -[`Precision`](#Precision). - -Note: if the underlying data store allows negative scale, services may -use a [`Precision`](#Precision) with the absolute value of the negative -scale added to the actual number of significant decimal digits, and -client-provided values may have to be rounded before being stored. - -::: {.varjson .rep} -### `$Scale` - -The value of `$Scale` is a number or a string with one of the symbolic -values `floating` or `variable`. - -Services SHOULD use lower-case values; clients SHOULD accept values in a -case-insensitive manner. - -Absence of `$Scale` means `variable`. -::: - -::: {.varjson .example} -Example 18: [`Precision`](#Precision)`=3` and `Scale=2`. -Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 -```json -"Amount32": { - "$Nullable": true, - "$Type": "Edm.Decimal", - "$Precision": 3, - "$Scale": 2 -} -``` -::: - -::: {.varjson .example} -Example 19: `Precision=2` equals `Scale`. -Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2 -```json -"Amount22": { - "$Nullable": true, - "$Type": "Edm.Decimal", - "$Precision": 2, - "$Scale": 2 -} -``` -::: - -::: {.varjson .example} -Example 20: `Precision=3` and a variable `Scale`. -Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed -values: 12.34, 1234 and 123.4 due to the limited precision. -```json -"Amount3v": { - "$Nullable": true, - "$Type": "Edm.Decimal", - "$Precision": 3 -} -``` -::: +## 7.3 Default Value -::: {.varjson .example} -Example 21: `Precision=7` and a floating `Scale`. -Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: -1e-102 and 1e97 due to the limited precision. -```json -"Amount7f": { - "$Nullable": true, - "$Type": "Edm.Decimal", - "$Precision": 7, - "$Scale": "floating" -} -``` -::: - - - - - - -### 7.2.5 Unicode - -For a string property the `Unicode` facet indicates whether the property -might contain and accept string values with Unicode characters (code -points) beyond the ASCII character set. The value `false` indicates that -the property will only contain and accept string values with characters -limited to the ASCII character set. - -If no value is specified, the `Unicode` facet defaults to `true`. - -::: {.varjson .rep} -### `$Unicode` - -The value of `$Unicode` is one of the Boolean literals `true` or -`false`. Absence of the member means `true`. -::: - - -### 7.2.6 SRID - -For a geometry or geography property the `SRID` facet identifies which -spatial reference system is applied to values of the property on type -instances. - -The value of the `SRID` facet MUST be a non-negative integer or the -special value `variable`. If no value is specified, the facet defaults -to `0` for `Geometry` types or `4326` for `Geography` types. - -The valid values of the `SRID` facet and their meanings are as defined -by the European Petroleum Survey Group [EPSG](#_EPSG). - -::: {.varjson .rep} -### `$SRID` - -The value of `$SRID` is a string containing a number or the symbolic -value `variable`. -::: - - -### 7.2.7 Default Value - -A primitive or enumeration property MAY define a default value that is -used if the property is not explicitly represented in an annotation or +A primitive- or enumeration-typed model element MAY define a default value that is +used if it is not explicitly represented in an annotation or the body of a request or response. If no value is specified, the client SHOULD NOT assume a default value. ::: {.varjson .rep} -### `$DefaultValue` +### `$DefaultValue` The value of `$DefaultValue` is the type-specific JSON representation of the default value of the property, see @@ -2746,7 +2747,7 @@ explicitly indicated, it is unbound. Bound actions or functions are invoked on resources matching the type of the binding parameter. The binding parameter can be of any type, and it -MAY be [nullable](#Nullable). +MAY be nullable. Unbound actions are invoked from the entity container through an [action import](#ActionImport). @@ -2813,7 +2814,7 @@ The value of `$IsComposable` is one of the Boolean literals `true` or The return type of an action or function overload MAY be any type in scope, or a collection of any type in scope. -The facets [`Nullable`](#Nullable), [`MaxLength`](#MaxLength), +The facets [`MaxLength`](#MaxLength), [`Precision`](#Precision), [`Scale`](#Scale), and [`SRID`](#SRID) can be used as appropriate to specify value restrictions of the return type, as well as the [`Unicode`](#Unicode) facet for 4.01 and greater payloads. @@ -3572,10 +3573,11 @@ unqualified name of the term and whose value is an object. The term object MUST contain the member `$Kind` with a string value of `Term`. -It MAY contain the members `$Type`, `$Collection`, -[`$AppliesTo`](#Applicability), [`$Nullable`](#Nullable), +It MAY contain the members `$Type`, `$Collection`, `$Nullable`, `$DefaultValue`, +[`$BaseTerm`](#SpecializedTerm), +[`$AppliesTo`](#Applicability), [`$MaxLength`](#MaxLength), [`$Precision`](#Precision), -[`$Scale`](#Scale), [`$SRID`](#SRID), and `$DefaultValue`, as well as +[`$Scale`](#Scale), and [`$SRID`](#SRID), as well as [`$Unicode`](#Unicode) for 4.01 and greater payloads. It MAY contain [annotations](#Annotation). @@ -3591,7 +3593,20 @@ with the literal value `true`. Absence of the `$Type` member means the type is `Edm.String`. -### `$DefaultValue` +### `$Nullable` + +The value of `$Nullable` is one of the Boolean literals `true` or +`false`. Absence of the member means `false`. + +For single-valued terms the value `true` means that annotations may have +the `null` value. + +For collection-valued terms the annotation value will always be a +collection that MAY be empty. In this case `$Nullable` applies to items +of the collection and specifies whether the collection MAY contain +`null` values. + +### `$DefaultValue` The value of `$DefaultValue` is the type-specific JSON representation of the default value of the term, see @@ -3613,7 +3628,7 @@ with the same qualifier, and so on until a term without a base term is reached. ::: {.varjson .rep} -### `$BaseTerm` +### `$BaseTerm` The value of `$BaseTerm` is the qualified name of the base term. ::: @@ -3666,7 +3681,7 @@ Symbolic Value|Model Element `UrlRef` |UrlRef annotation expression ::: {.varjson .rep} -### `$AppliesTo` +### `$AppliesTo` The value of `$AppliesTo` is an array whose items are strings containing symbolic values from the table above that identify model elements the @@ -5254,7 +5269,7 @@ Annotations for record members are prefixed with the member name. ::: ::: {.varjson .example} -Example 86: this annotation "morphs" the entity type from [example 8](#entitytype) into +Example 86: this annotation "morphs" the entity type from [example 13](#entitytype) into a structured type with two structural properties `GivenName` and `Surname` and two navigation properties `DirectSupervisor` and `CostCenter`. The first three properties simply rename properties of the @@ -5865,12 +5880,7 @@ https://openui5.hana.ondemand.com/1.40.10/#docs/guide/87aac894a40640f89920d7b2a4 - [`$Type`](#Type5.1) - [`$Collection`](#Collection5.2) - [`$Nullable`](#Nullable5.3) - - [`$MaxLength`](#MaxLength5.4) - - [`$Precision`](#Precision5.5) - - [`$Scale`](#Scale5.6) - - [`$Unicode`](#Unicode5.7) - - [`$SRID`](#SRID5.8) - - [`$DefaultValue`](#DefaultValue5.9) + - [`$DefaultValue`](#DefaultValue5.4) - [Navigation Property Object](#NavigationPropertyObject6) - [`$Type`](#Type6.1) - [`$Collection`](#Collection6.2) @@ -5924,9 +5934,10 @@ https://openui5.hana.ondemand.com/1.40.10/#docs/guide/87aac894a40640f89920d7b2a4 - [Term Object](#TermObject19) - [`$Type`](#Type19.1) - [`$Collection`](#Collection19.2) - - [`$DefaultValue`](#DefaultValue19.3) - - [`$BaseTerm`](#BaseTerm19.4) - - [`$AppliesTo`](#AppliesTo19.5) + - [`$Nullable`](#Nullable19.3) + - [`$DefaultValue`](#DefaultValue19.4) + - [`$BaseTerm`](#BaseTerm19.5) + - [`$AppliesTo`](#AppliesTo19.6) - [Annotation Member](#AnnotationMember20) - [`$Path`](#Path20.1) - [`$And`](#And20.2) diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 00d7b1ce2..c27d9b789 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -187,9 +187,17 @@

      Table of Contents

    • 3.1 Nominal Types
    • 3.2 Structured Types
    • 3.3 Primitive Types
    • -
    • 3.4 Built-In Abstract Types
    • -
    • 3.5 Built-In Types for defining Vocabulary Terms
    • -
    • 3.6 Annotations
    • +
    • 3.4 Type Facets +
    • +
    • 3.5 Built-In Abstract Types
    • +
    • 3.6 Built-In Types for defining Vocabulary Terms
    • +
    • 3.7 Annotations
  • 4 CSDL XML Document
      @@ -213,16 +221,8 @@

      Table of Contents

    • 7 Structural Property
    • 8 Navigation Property
        @@ -614,7 +614,78 @@

        3.3

        Edm.Stream is a primitive type that can be used as a property of an entity type or complex type, the underlying type for a type definition, or the binding parameter or return type of an action or function. Edm.Stream, or a type definition whose underlying type is Edm.Stream, cannot be used in collections or for non-binding parameters to functions or actions.

        Some of these types allow facets, defined in section "Type Facets".

        See rule primitiveLiteral in OData-ABNF for the representation of primitive type values in URLs and OData-JSON for the representation in requests and responses.

        -

        3.4 Built-In Abstract Types

        +

        3.4 Type Facets

        +

        Facets modify or constrain the acceptable values for a model element of a given primitive type, for example a structural property, action or function parameter, action or function return type, or term.

        +

        For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

        +

        3.4.1 MaxLength

        +

        A positive integer value specifying the maximum length of a binary, stream or string value. For binary or stream values this is the octet length of the binary data, for string values it is the character length (number of code points for Unicode).

        +

        If no maximum length is specified, clients SHOULD expect arbitrary length.

        +
        +

        Attribute MaxLength

        +

        The value of MaxLength is a positive integer or the symbolic value max as a shorthand for the maximum length supported for the type by the service.

        +

        Note: the symbolic value max is only allowed in OData 4.0 responses; it is deprecated in OData 4.01. While clients MUST be prepared for this symbolic value, OData 4.01 and greater services MUST NOT return the symbolic value max and MAY instead specify the concrete maximum length supported for the type by the service or omit the attribute entirely.

        +
        +

        3.4.2 Precision

        +

        For a decimal value: the maximum number of significant decimal digits of the model element's value; it MUST be a positive integer.

        +

        For a temporal value (datetime-with-timezone-offset, duration, or time-of-day): the number of decimal places allowed in the seconds portion of the value; it MUST be a non-negative integer between zero and twelve.

        +

        Note: service authors SHOULD be aware that some clients are unable to support a precision greater than 28 for decimal values and 7 for temporal values. Client developers MUST be aware of the potential for data loss when round-tripping values of greater precision. Updating via PATCH and exclusively specifying modified values will reduce the risk for unintended data loss.

        +

        Note: model elements with duration values and a granularity less than seconds (e.g. minutes, hours, days) can be annotated with term Measures.DurationGranularity, see OData-VocMeasures.

        +
        +

        Attribute Precision

        +

        The value of Precision is a number.

        +

        If not specified for a decimal value, the decimal value has arbitrary precision.

        +

        If not specified for a temporal value, the temporal value has a precision of zero.

        +
        +
        +

        Example 2: Precision facet applied to the DateTimeOffset type

        +
        <Property Name="SuggestedTimes" Type="Collection(Edm.DateTimeOffset)"
        +          Precision="6" />
        +
        +

        3.4.3 Scale

        +

        A non-negative integer value specifying the maximum number of digits allowed to the right of the decimal point, or one of the symbolic values floating or variable.

        +

        The value floating means that the decimal value represents a decimal floating-point number whose number of significant digits is the value of the Precision facet. OData 4.0 responses MUST NOT specify the value floating.

        +

        The value variable means that the number of digits to the right of the decimal point can vary from zero to the value of the Precision facet.

        +

        An integer value means that the number of digits to the right of the decimal point may vary from zero to the value of the Scale facet, and the number of digits to the left of the decimal point may vary from one to the value of the Precision facet minus the value of the Scale facet. If Precision is equal to Scale, a single zero MUST precede the decimal point.

        +

        The value of Scale MUST be less than or equal to the value of Precision.

        +

        Note: if the underlying data store allows negative scale, services may use a Precision with the absolute value of the negative scale added to the actual number of significant decimal digits, and client-provided values may have to be rounded before being stored.

        +
        +

        Attribute Scale

        +

        The value of Scale is a number or one of the symbolic values floating or variable.

        +

        Services SHOULD use lower-case values; clients SHOULD accept values in a case-insensitive manner.

        +

        If not specified, the Scale facet defaults to zero.

        +
        +
        +

        Example 3: Precision=3 and Scale=2. Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3

        +
        <Property Name="Amount32" Type="Edm.Decimal" Precision="3" Scale="2" />
        +
        +
        +

        Example 4: Precision=2 equals Scale. Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2

        +
        <Property Name="Amount22" Type="Edm.Decimal" Precision="2" Scale="2" />
        +
        +
        +

        Example 5: Precision=3 and a variable Scale. Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed values: 12.34, 1234 and 123.4 due to the limited precision.

        +
        <Property Name="Amount3v" Type="Edm.Decimal" Precision="3" Scale="variable" />
        +
        +
        +

        Example 6: Precision=7 and a floating Scale. Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: 1e-102 and 1e97 due to the limited precision.

        +
        <Property Name="Amount7f" Type="Edm.Decimal" Precision="7" Scale="floating" />
        +
        +

        3.4.4 Unicode

        +

        For a string-typed model element the Unicode facet indicates whether the it might contain and accept string values with Unicode characters (code points) beyond the ASCII character set. The value false indicates that the it will only contain and accept string values with characters limited to the ASCII character set.

        +

        If no value is specified, the Unicode facet defaults to true.

        +
        +

        Attribute Unicode

        +

        The value of Unicode is one of the Boolean literals true or false. Absence of the attribute means true.

        +
        +

        3.4.5 SRID

        +

        For a geometry- or geography-typed model element the SRID facet identifies which spatial reference system is applied to its values.

        +

        The value of the SRID facet MUST be a non-negative integer or the special value variable. If no value is specified, the facet defaults to 0 for Geometry types or 4326 for Geography types.

        +

        The valid values of the SRID facet and their meanings are as defined by the European Petroleum Survey Group EPSG.

        +
        +

        Attribute SRID

        +

        The value of SRID is a number or the symbolic value variable.

        +
        +

        3.5 Built-In Abstract Types

        The following built-in abstract types can be used within a model:

  • -

    Example 2:

    -
    <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    -           Version="4.01">
    -  <edmx:DataServices>
    -    ...
    -  </edmx:DataServices>
    -</edmx:Edmx>
    +

    Example 7:

    +
    <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    +           Version="4.01">
    +  <edmx:DataServices>
    +    ...
    +  </edmx:DataServices>
    +</edmx:Edmx>

    4.1 Reference

    A reference to an external CSDL document allows to bring part of the referenced document's content into the scope of the referencing document.

    @@ -708,21 +779,21 @@

    Attri

    The value of Uri is an absolute or relative URI; relative URIs are relative to the xml:base attribute, see XML-Base.

    -

    Example 3: references to other CSDL documents

    -
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    -<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    -           Version="4.0">
    -  <edmx:Reference Uri="http://vocabs.odata.org/capabilities/v1">
    -   ...
    -  </edmx:Reference>
    -  <edmx:Reference Uri="http://vocabs.odata.org/core/v1">
    -    ...
    -  </edmx:Reference>
    -  <edmx:Reference Uri="http://example.org/display/v1">
    -    ...
    -  </edmx:Reference>
    -  <edmx:DataServices>...</edmx:DataServices>
    -</edmx:Edmx>
    +

    Example 8: references to other CSDL documents

    +
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    +<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    +           Version="4.0">
    +  <edmx:Reference Uri="http://vocabs.odata.org/capabilities/v1">
    +   ...
    +  </edmx:Reference>
    +  <edmx:Reference Uri="http://vocabs.odata.org/core/v1">
    +    ...
    +  </edmx:Reference>
    +  <edmx:Reference Uri="http://example.org/display/v1">
    +    ...
    +  </edmx:Reference>
    +  <edmx:DataServices>...</edmx:DataServices>
    +</edmx:Edmx>

    4.2 Included Schema

    A reference MAY include zero or more schemas from the referenced document.

    @@ -744,23 +815,23 @@

    The value of Alias is a simple identifier that can be used in qualified names instead of the namespace.

    -

    Example 4: references to entity models containing definitions of vocabulary terms

    -
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    -<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    -           Version="4.0">
    -  <edmx:Reference Uri="http://vocabs.odata.org/capabilities/v1">
    -    <edmx:Include Namespace="Org.OData.Capabilities.V1" />
    -  </edmx:Reference>
    -  <edmx:Reference Uri="http://vocabs.odata.org/core/v1">
    -    <edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
    -      <Annotation Term="Core.DefaultNamespace" />
    -    </edmx:Include>
    -  </edmx:Reference>
    -  <edmx:Reference Uri="http://example.org/display/v1">
    -    <edmx:Include Alias="UI" Namespace="org.example.display" />
    -  </edmx:Reference>
    -  <edmx:DataServices>...</edmx:DataServices>
    -</edmx:Edmx>
    +

    Example 9: references to entity models containing definitions of vocabulary terms

    +
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    +<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    +           Version="4.0">
    +  <edmx:Reference Uri="http://vocabs.odata.org/capabilities/v1">
    +    <edmx:Include Namespace="Org.OData.Capabilities.V1" />
    +  </edmx:Reference>
    +  <edmx:Reference Uri="http://vocabs.odata.org/core/v1">
    +    <edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
    +      <Annotation Term="Core.DefaultNamespace" />
    +    </edmx:Include>
    +  </edmx:Reference>
    +  <edmx:Reference Uri="http://example.org/display/v1">
    +    <edmx:Include Alias="UI" Namespace="org.example.display" />
    +  </edmx:Reference>
    +  <edmx:DataServices>...</edmx:DataServices>
    +</edmx:Edmx>

    4.3 Included Annotations

    In addition to including whole schemas with all model constructs defined within that schema, a reference may include annotations.

    @@ -781,22 +852,22 @@

    -

    Example 5: reference documents that contain annotations

    -
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    -<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    -           Version="4.0">
    -  <edmx:Reference Uri="http://odata.org/ann/b">
    -    <edmx:IncludeAnnotations TermNamespace="org.example.validation" />
    -    <edmx:IncludeAnnotations TermNamespace="org.example.display"
    -                             Qualifier="Tablet" />
    -    <edmx:IncludeAnnotations TermNamespace="org.example.hcm"
    -                             TargetNamespace="com.example.Sales" />
    -    <edmx:IncludeAnnotations TermNamespace="org.example.hcm"
    -                             Qualifier="Tablet"
    -                             TargetNamespace="com.example.Person" />
    -  </edmx:Reference>
    -  <edmx:DataServices>...</edmx:DataServices>
    -</edmx:Edmx>
    +

    Example 10: reference documents that contain annotations

    +
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    +<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    +           Version="4.0">
    +  <edmx:Reference Uri="http://odata.org/ann/b">
    +    <edmx:IncludeAnnotations TermNamespace="org.example.validation" />
    +    <edmx:IncludeAnnotations TermNamespace="org.example.display"
    +                             Qualifier="Tablet" />
    +    <edmx:IncludeAnnotations TermNamespace="org.example.hcm"
    +                             TargetNamespace="com.example.Sales" />
    +    <edmx:IncludeAnnotations TermNamespace="org.example.hcm"
    +                             Qualifier="Tablet"
    +                             TargetNamespace="com.example.Person" />
    +  </edmx:Reference>
    +  <edmx:DataServices>...</edmx:DataServices>
    +</edmx:Edmx>

    The following annotations from http://odata.org/ann/b are included:

    @@ -831,11 +902,11 @@

    Attribute Alias

    The value of Alias is a simple identifier.

    -

    Example 6: schema org.example with an alias and a description for the schema

    -
    <Schema Namespace="org.example" Alias="self">
    -  <Annotation Term="Core.Description" String="Example schema" />
    -  ...
    -</Schema>
    +

    Example 11: schema org.example with an alias and a description for the schema

    +
    <Schema Namespace="org.example" Alias="self">
    +  <Annotation Term="Core.Description" String="Example schema" />
    +  ...
    +</Schema>

    5.2 Annotations with External Targeting

    @@ -848,11 +919,11 @@

    simple identifier.

    -

    Example 7: annotations should only be applied to tablet devices

    -
    <Annotations Target="org.example.Person" Qualifier="Tablet">
    -  <Annotation Term="Core.Description" String="Dummy" />
    -  ...
    -</Annotations>
    +

    Example 12: annotations should only be applied to tablet devices

    +
    <Annotations Target="org.example.Person" Qualifier="Tablet">
    +  <Annotation Term="Core.Description" String="Dummy" />
    +  ...
    +</Annotations>

    6 Entity Type

    @@ -870,16 +941,16 @@

    At

    The value of Name is the entity type's name.

    -

    Example 8: a simple entity type

    -
    <EntityType Name="Employee">
    -  <Key>
    -    <PropertyRef Name="ID" />
    -  </Key>
    -  <Property Name="ID" Type="Edm.String" Nullable="false" />
    -  <Property Name="FirstName" Type="Edm.String" Nullable="false" />
    -  <Property Name="LastName" Type="Edm.String" Nullable="false" />
    -  <NavigationProperty Name="Manager" Type="self.Manager" />
    -</EntityType>
    +

    Example 13: a simple entity type

    +
    <EntityType Name="Employee">
    +  <Key>
    +    <PropertyRef Name="ID" />
    +  </Key>
    +  <Property Name="ID" Type="Edm.String" Nullable="false" />
    +  <Property Name="FirstName" Type="Edm.String" Nullable="false" />
    +  <Property Name="LastName" Type="Edm.String" Nullable="false" />
    +  <NavigationProperty Name="Manager" Type="self.Manager" />
    +</EntityType>

    6.1 Derived Entity Type

    An entity type can inherit from another entity type by specifying it as its base type.

    @@ -890,11 +961,11 @@

    Attribute The value of BaseType is the qualified name of the base type.

    -

    Example 9: a derived entity type based on the previous example

    -
    <EntityType Name="Manager" BaseType="self.Employee">
    -  <Property Name="AnnualBudget" Type="Edm.Decimal" />
    -  <NavigationProperty Name="Employees" Type="Collection(self.Employee)" />
    -</EntityType>
    +

    Example 14: a derived entity type based on the previous example

    +
    <EntityType Name="Manager" BaseType="self.Employee">
    +  <Property Name="AnnualBudget" Type="Edm.Decimal" />
    +  <NavigationProperty Name="Employees" Type="Collection(self.Employee)" />
    +</EntityType>

    Note: the derived type has the same name as one of the properties of its base type.

    @@ -962,47 +1033,47 @@

    simple identifier.

    -

    Example 10: entity type with a simple key

    -
    <EntityType Name="Category">
    -  <Key>
    -    <PropertyRef Name="ID" />
    -  </Key>
    -  <Property Name="ID" Type="Edm.Int32" Nullable="false" />
    -  <Property Name="Name" Type="Edm.String" />
    -</EntityType>
    -
    -
    -

    Example 11: entity type with a simple key referencing a property of a complex type

    -
    <EntityType Name="Category">
    -  <Key>
    -    <PropertyRef Name="Info/ID" Alias="EntityInfoID" />
    -  </Key>
    -  <Property Name="Info" Type="Sales.EntityInfo" Nullable="false" />
    -  <Property Name="Name" Type="Edm.String" />
    -</EntityType>
    -
    -<ComplexType Name="EntityInfo">
    -  <Property Name="ID" Type="Edm.Int32" Nullable="false" />
    -  <Property Name="Created" Type="Edm.DateTimeOffset" />
    -</ComplexType>
    -
    -
    -

    Example 12: entity type with a composite key

    -
    <EntityType Name="OrderLine">
    -  <Key>
    -    <PropertyRef Name="OrderID" />
    -    <PropertyRef Name="LineNumber" />
    -  </Key>
    -  <Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
    -  <Property Name="LineNumber" Type="Edm.Int32" Nullable="false" />
    -</EntityType>
    +

    Example 15: entity type with a simple key

    +
    <EntityType Name="Category">
    +  <Key>
    +    <PropertyRef Name="ID" />
    +  </Key>
    +  <Property Name="ID" Type="Edm.Int32" Nullable="false" />
    +  <Property Name="Name" Type="Edm.String" />
    +</EntityType>
    +
    +
    +

    Example 16: entity type with a simple key referencing a property of a complex type

    +
    <EntityType Name="Category">
    +  <Key>
    +    <PropertyRef Name="Info/ID" Alias="EntityInfoID" />
    +  </Key>
    +  <Property Name="Info" Type="Sales.EntityInfo" Nullable="false" />
    +  <Property Name="Name" Type="Edm.String" />
    +</EntityType>
    +
    +<ComplexType Name="EntityInfo">
    +  <Property Name="ID" Type="Edm.Int32" Nullable="false" />
    +  <Property Name="Created" Type="Edm.DateTimeOffset" />
    +</ComplexType>
    +
    +
    +

    Example 17: entity type with a composite key

    +
    <EntityType Name="OrderLine">
    +  <Key>
    +    <PropertyRef Name="OrderID" />
    +    <PropertyRef Name="LineNumber" />
    +  </Key>
    +  <Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
    +  <Property Name="LineNumber" Type="Edm.Int32" Nullable="false" />
    +</EntityType>
    -

    Example 13 (based on example 11): requests to an entity set Categories of type Category must use the alias

    +

    Example 18 (based on example 16): requests to an entity set Categories of type Category must use the alias

    GET http://host/service/Categories(EntityInfoID=1)
    -

    Example 14 (based on example 11): in a query part the value assigned to the name attribute must be used

    +

    Example 19 (based on example 16): in a query part the value assigned to the name attribute must be used

    GET http://example.org/OData.svc/Categories?$filter=Info/ID le 100

    @@ -1025,13 +1096,13 @@

    The value of Name is the property's name.

    -

    Example 15: complex type with two properties

    -
    <ComplexType Name="Measurement">
    -  <Property Name="Dimension" Type="Edm.String" Nullable="false" MaxLength="50"
    -            DefaultValue="Unspecified" />
    -  <Property Name="Length" Type="Edm.Decimal" Nullable="false" Precision="18"
    -            Scale="2" />
    -</ComplexType>
    +

    Example 20: complex type with two properties

    +
    <ComplexType Name="Measurement">
    +  <Property Name="Dimension" Type="Edm.String" Nullable="false" MaxLength="50"
    +            DefaultValue="Unspecified" />
    +  <Property Name="Length" Type="Edm.Decimal" Nullable="false" Precision="18"
    +            Scale="2" />
    +</ComplexType>

    7.1 Type

    The property's type MUST be a primitive type, complex type, or enumeration type in scope, or a collection of one of these types.

    @@ -1043,96 +1114,25 @@

    Attribute Type<

    For collection-valued properties the value of Type is the character sequence Collection( followed by the qualified name of the property's item type, followed by a closing parenthesis ).

    -

    Example 16: property Units that can have zero or more strings as its value

    -
    <Property Name="Units" Type="Collection(Edm.String)" />
    +

    Example 21: property Units that can have zero or more strings as its value

    +
    <Property Name="Units" Type="Collection(Edm.String)" />
    -

    7.2 Type Facets

    -

    Facets modify or constrain the acceptable values for a model element of a given type.

    -

    For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

    -

    7.2.1 Nullable

    +

    7.2 Nullable

    A Boolean value specifying whether the property can have the value null.

    -

    Attribute Nullable

    +

    Attribute Nullable

    The value of Nullable is one of the Boolean literals true or false.

    For single-valued properties the value true means that the property allows the null value.

    -

    For collection-valued properties the property value will always be a collection that MAY be empty. In this case the Nullable attribute applies to items of the collection and specifies whether the collection MAY contain null values.

    +

    For collection-valued properties the value will always be a collection that MAY be empty. In this case the Nullable attribute applies to items of the collection and specifies whether the collection MAY contain null values.

    If no value is specified for a single-valued property, the Nullable attribute defaults to true.

    In OData 4.01 responses a collection-valued property MUST specify a value for the Nullable attribute.

    If no value is specified for a collection-valued property, the client cannot assume any default value. Clients SHOULD be prepared for this situation even in OData 4.01 responses.

    -

    7.2.2 MaxLength

    -

    A positive integer value specifying the maximum length of a binary, stream or string value. For binary or stream values this is the octet length of the binary data, for string values it is the character length (number of code points for Unicode).

    -

    If no maximum length is specified, clients SHOULD expect arbitrary length.

    -
    -

    Attribute MaxLength

    -

    The value of MaxLength is a positive integer or the symbolic value max as a shorthand for the maximum length supported for the type by the service.

    -

    Note: the symbolic value max is only allowed in OData 4.0 responses; it is deprecated in OData 4.01. While clients MUST be prepared for this symbolic value, OData 4.01 and greater services MUST NOT return the symbolic value max and MAY instead specify the concrete maximum length supported for the type by the service or omit the attribute entirely.

    -
    -

    7.2.3 Precision

    -

    For a decimal value: the maximum number of significant decimal digits of the property's value; it MUST be a positive integer.

    -

    For a temporal value (datetime-with-timezone-offset, duration, or time-of-day): the number of decimal places allowed in the seconds portion of the value; it MUST be a non-negative integer between zero and twelve.

    -

    Note: service authors SHOULD be aware that some clients are unable to support a precision greater than 28 for decimal properties and 7 for temporal properties. Client developers MUST be aware of the potential for data loss when round-tripping values of greater precision. Updating via PATCH and exclusively specifying modified properties will reduce the risk for unintended data loss.

    -

    Note: duration properties supporting a granularity less than seconds (e.g. minutes, hours, days) can be annotated with term Measures.DurationGranularity, see OData-VocMeasures.

    -
    -

    Attribute Precision

    -

    The value of Precision is a number.

    -

    If not specified for a decimal property, the decimal property has arbitrary precision.

    -

    If not specified for a temporal property, the temporal property has a precision of zero.

    -
    -
    -

    Example 17: Precision facet applied to the DateTimeOffset type

    -
    <Property Name="SuggestedTimes" Type="Collection(Edm.DateTimeOffset)"
    -          Precision="6" />
    -
    -

    7.2.4 Scale

    -

    A non-negative integer value specifying the maximum number of digits allowed to the right of the decimal point, or one of the symbolic values floating or variable.

    -

    The value floating means that the decimal property represents a decimal floating-point number whose number of significant digits is the value of the Precision facet. OData 4.0 responses MUST NOT specify the value floating.

    -

    The value variable means that the number of digits to the right of the decimal point can vary from zero to the value of the Precision facet.

    -

    An integer value means that the number of digits to the right of the decimal point may vary from zero to the value of the Scale facet, and the number of digits to the left of the decimal point may vary from one to the value of the Precision facet minus the value of the Scale facet. If Precision is equal to Scale, a single zero MUST precede the decimal point.

    -

    The value of Scale MUST be less than or equal to the value of Precision.

    -

    Note: if the underlying data store allows negative scale, services may use a Precision with the absolute value of the negative scale added to the actual number of significant decimal digits, and client-provided values may have to be rounded before being stored.

    -
    -

    Attribute Scale

    -

    The value of Scale is a number or one of the symbolic values floating or variable.

    -

    Services SHOULD use lower-case values; clients SHOULD accept values in a case-insensitive manner.

    -

    If not specified, the Scale facet defaults to zero.

    -
    -
    -

    Example 18: Precision=3 and Scale=2. Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3

    -
    <Property Name="Amount32" Type="Edm.Decimal" Precision="3" Scale="2" />
    -
    -
    -

    Example 19: Precision=2 equals Scale. Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2

    -
    <Property Name="Amount22" Type="Edm.Decimal" Precision="2" Scale="2" />
    -
    -
    -

    Example 20: Precision=3 and a variable Scale. Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed values: 12.34, 1234 and 123.4 due to the limited precision.

    -
    <Property Name="Amount3v" Type="Edm.Decimal" Precision="3" Scale="variable" />
    -
    -
    -

    Example 21: Precision=7 and a floating Scale. Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: 1e-102 and 1e97 due to the limited precision.

    -
    <Property Name="Amount7f" Type="Edm.Decimal" Precision="7" Scale="floating" />
    -
    -

    7.2.5 Unicode

    -

    For a string property the Unicode facet indicates whether the property might contain and accept string values with Unicode characters (code points) beyond the ASCII character set. The value false indicates that the property will only contain and accept string values with characters limited to the ASCII character set.

    -

    If no value is specified, the Unicode facet defaults to true.

    -
    -

    Attribute Unicode

    -

    The value of Unicode is one of the Boolean literals true or false. Absence of the attribute means true.

    -
    -

    7.2.6 SRID

    -

    For a geometry or geography property the SRID facet identifies which spatial reference system is applied to values of the property on type instances.

    -

    The value of the SRID facet MUST be a non-negative integer or the special value variable. If no value is specified, the facet defaults to 0 for Geometry types or 4326 for Geography types.

    -

    The valid values of the SRID facet and their meanings are as defined by the European Petroleum Survey Group EPSG.

    -
    -

    Attribute SRID

    -

    The value of SRID is a number or the symbolic value variable.

    -
    -

    7.2.7 Default Value

    -

    A primitive or enumeration property MAY define a default value that is used if the property is not explicitly represented in an annotation or the body of a request or response.

    +

    7.3 Default Value

    +

    A primitive- or enumeration-typed model element MAY define a default value that is used if it is not explicitly represented in an annotation or the body of a request or response.

    If no value is specified, the client SHOULD NOT assume a default value.

    -

    Attribute DefaultValue

    +

    Attribute DefaultValue

    Default values of type Edm.String MUST be represented according to the XML escaping rules for character data in attribute values. Values of other primitive types MUST be represented according to the appropriate alternative in the primitiveValue rule defined in OData-ABNF, i.e. Edm.Binary as binaryValue, Edm.Boolean as booleanValue etc.


    @@ -1512,7 +1512,7 @@

    12.5 Bound or Unbound Action or Function Overloads

    An action or function overload MAY indicate that it is bound. If not explicitly indicated, it is unbound.

    -

    Bound actions or functions are invoked on resources matching the type of the binding parameter. The binding parameter can be of any type, and it MAY be nullable.

    +

    Bound actions or functions are invoked on resources matching the type of the binding parameter. The binding parameter can be of any type, and it MAY be nullable.

    Unbound actions are invoked from the entity container through an action import.

    Unbound functions are invoked as static functions within a common expression (see OData-URL, section 5.1.1), or from the entity container through a function import.

    @@ -1537,7 +1537,7 @@

    Attri

    12.8 Return Type

    The return type of an action or function overload MAY be any type in scope, or a collection of any type in scope.

    -

    The facets Nullable, MaxLength, Precision, Scale, and SRID can be used as appropriate to specify value restrictions of the return type, as well as the Unicode facet for 4.01 and greater payloads.

    +

    The facets MaxLength, Precision, Scale, and SRID can be used as appropriate to specify value restrictions of the return type, as well as the Unicode facet for 4.01 and greater payloads.

    For a single-valued return type the facets apply to the returned value. For a collection-valued return type the facets apply to the items in the returned collection.

    Element edm:ReturnType

    @@ -1806,16 +1806,23 @@

    14.1 Term

    The term's type MUST be a type in scope, or a collection of a type in scope.

    Element edm:Term

    -

    The edm:Term element MUST contain the attributes Name and Type. It MAY contain the attributes BaseTerm and AppliesTo.

    -

    It MAY specify values for the Nullable, [ ]{.apple-converted-space}MaxLength, Precision, Scale, or SRID facet attributes, as well as the Unicode facet attribute for 4.01 and greater payloads. These facets and their implications are described in section 7.2.

    +

    The edm:Term element MUST contain the attributes Name and Type. It MAY contain the attributes Nullable, DefaultValue, BaseTerm and AppliesTo.

    +

    The facets MaxLength, Precision, Scale, and SRID can be used as appropriate, as well as the Unicode facet attribute for 4.01 and greater payloads.

    A edm:Term element whose Type attribute specifies a primitive or enumeration type MAY define a value for the DefaultValue attribute.

    It MAY contain edm:Annotation elements.

    Attribute Name

    The value of Name is the term's name.

    Attribute Type

    -

    For single-valued properties the value of Type is the qualified name of the property's type.

    +

    For single-valued terms the value of Type is the qualified name of the term's type.

    For collection-valued properties the value of Type is the character sequence Collection( followed by the qualified name of the property's item type, followed by a closing parenthesis ).

    -

    Attribute DefaultValue

    +

    Attribute Nullable

    +

    The value of Nullable is one of the Boolean literals true or false.

    +

    For single-valued terms the value true means that annotations may have the null value.

    +

    For collection-valued terms the annotation value will always be a collection that MAY be empty. In this case the Nullable attribute applies to items of the collection and specifies whether the collection MAY contain null values.

    +

    If no value is specified for a single-valued term, the Nullable attribute defaults to true.

    +

    In OData 4.01 responses a collection-valued term MUST specify a value for the Nullable attribute.

    +

    If no value is specified for a collection-valued term, the client cannot assume any default value. Clients SHOULD be prepared for this situation even in OData 4.01 responses.

    +

    Attribute DefaultValue

    The value of this attribute determines the value of the term when applied in an edm:Annotation without providing an expression.

    Default values of type Edm.String MUST be represented according to the XML escaping rules for character data in attribute values. Values of other primitive types MUST be represented according to the appropriate alternative in the primitiveValue rule defined in OData-ABNF, i.e. Edm.Binary as binaryValue, Edm.Boolean as booleanValue etc.

    If no value is specified, the DefaultValue attribute defaults to null.

    @@ -1824,7 +1831,7 @@

    A term MAY specialize another term in scope by specifying it as its base term.

    When applying a specialized term, the base term MUST also be applied with the same qualifier, and so on until a term without a base term is reached.

    -

    Attribute BaseTerm

    +

    Attribute BaseTerm

    The value of BaseTerm is the qualified name of the base term.

    14.1.2 Applicability

    @@ -1972,7 +1979,7 @@

    14.1.2
    -

    Attribute AppliesTo

    +

    Attribute AppliesTo

    The value of AppliesTo is a whitespace-separated list of symbolic values from the table above that identify model elements the term is intended to be applied to.

    @@ -2903,7 +2910,7 @@

    -

    Example 86: this annotation "morphs" the entity type from example 8 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

    +

    Example 86: this annotation "morphs" the entity type from example 13 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

    <Annotation Term="org.example.person.Employee">
       <Record>
         <Annotation Term="Core.Description" String="Annotation on record" />
    @@ -3280,12 +3287,7 @@ 

    Attribute Name
  • Attribute Type
  • Attribute Nullable
  • -
  • Attribute MaxLength
  • -
  • Attribute Precision
  • -
  • Attribute Scale
  • -
  • Attribute Unicode
  • -
  • Attribute SRID
  • -
  • Attribute DefaultValue
  • +
  • Attribute DefaultValue
  • Element edm:NavigationProperty
  • Element edm:Annotation
      diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 0b031ff7a..7575ab650 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -111,9 +111,15 @@ For complete copyright information please see the full Notices section in an App - [3.1 Nominal Types](#NominalTypes) - [3.2 Structured Types](#StructuredTypes) - [3.3 Primitive Types](#PrimitiveTypes) - - [3.4 Built-In Abstract Types](#BuiltInAbstractTypes) - - [3.5 Built-In Types for defining Vocabulary Terms](#BuiltInTypesfordefiningVocabularyTerms) - - [3.6 Annotations](#Annotations) + - [3.4 Type Facets](#TypeFacets) + - [3.4.1 MaxLength](#MaxLength) + - [3.4.2 Precision](#Precision) + - [3.4.3 Scale](#Scale) + - [3.4.4 Unicode](#Unicode) + - [3.4.5 SRID](#SRID) + - [3.5 Built-In Abstract Types](#BuiltInAbstractTypes) + - [3.6 Built-In Types for defining Vocabulary Terms](#BuiltInTypesfordefiningVocabularyTerms) + - [3.7 Annotations](#Annotations) - [4 CSDL XML Document](#CSDLXMLDocument) - [4.1 Reference](#Reference) - [4.2 Included Schema](#IncludedSchema) @@ -129,14 +135,8 @@ For complete copyright information please see the full Notices section in an App - [6.5 Key](#Key) - [7 Structural Property](#StructuralProperty) - [7.1 Type](#Type) - - [7.2 Type Facets](#TypeFacets) - - [7.2.1 Nullable](#Nullable) - - [7.2.2 MaxLength](#MaxLength) - - [7.2.3 Precision](#Precision) - - [7.2.4 Scale](#Scale) - - [7.2.5 Unicode](#Unicode) - - [7.2.6 SRID](#SRID) - - [7.2.7 Default Value](#DefaultValue) + - [7.2 Nullable](#Nullable) + - [7.3 Default Value](#DefaultValue) - [8 Navigation Property](#NavigationProperty) - [8.1 Navigation Property Type](#NavigationPropertyType) - [8.2 Nullable Navigation Property](#NullableNavigationProperty) @@ -554,7 +554,205 @@ representation of primitive type values in URLs and [OData-JSON](#ODataJSON) for the representation in requests and responses. -## 3.4 Built-In Abstract Types +## 3.4 Type Facets + +Facets modify or constrain the acceptable values for a model element of a given primitive type, +for example a [structural property](#StructuralProperty), +action or function [parameter](#Parameter), action or function [return type](#ReturnType), or [term](#Term). + +For single-valued model elements the facets apply to the value of the +model element. For collection-valued model elements the facets apply to the items +in the collection. + +### 3.4.1 MaxLength + +A positive integer value specifying the maximum length of a binary, +stream or string value. For binary or stream values this is the octet +length of the binary data, for string values it is the character length +(number of code points for Unicode). + +If no maximum length is specified, clients SHOULD expect arbitrary +length. + + +::: {.varxml .rep} +### Attribute `MaxLength` + +The value of `MaxLength` is a positive integer or the symbolic value +`max` as a shorthand for the maximum length supported for the type by +the service. + +Note: the symbolic value `max` is only allowed in OData 4.0 responses; +it is deprecated in OData 4.01. While clients MUST be prepared for this +symbolic value, OData 4.01 and greater services MUST NOT return the +symbolic value `max` and MAY instead specify the concrete maximum length +supported for the type by the service or omit the attribute entirely. +::: + +### 3.4.2 Precision + +For a decimal value: the maximum number of significant decimal digits of +the model element's value; it MUST be a positive integer. + +For a temporal value (datetime-with-timezone-offset, duration, or +time-of-day): the number of decimal places allowed in the seconds +portion of the value; it MUST be a non-negative integer between zero and +twelve. + +Note: service authors SHOULD be aware that some clients are unable to +support a precision greater than 28 for decimal values and 7 for +temporal values. Client developers MUST be aware of the potential +for data loss when round-tripping values of greater precision. Updating +via `PATCH` and exclusively specifying modified values will reduce +the risk for unintended data loss. + +Note: model elements with duration values and a granularity less than seconds +(e.g. minutes, hours, days) can be annotated with term +[`Measures.DurationGranularity`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Measures.V1.md#DurationGranularity), +see [OData-VocMeasures](#ODataVocMeasures). + + + +::: {.varxml .rep} +### Attribute `Precision` + +The value of `Precision` is a number. + +If not specified for a decimal value, the decimal value has +arbitrary precision. + +If not specified for a temporal value, the temporal value has a +precision of zero. +::: + +::: {.varxml .example} +Example 2: [`Precision`](#Precision) facet applied to the +`DateTimeOffset` type +```xml + +``` +::: + +### 3.4.3 Scale + +A non-negative integer value specifying the maximum number of digits +allowed to the right of the decimal point, or one of the symbolic values +`floating` or `variable`. + +The value `floating` means that the decimal value represents a +decimal floating-point number whose number of significant digits is the +value of the [`Precision`](#Precision) facet. OData 4.0 responses MUST +NOT specify the value `floating`. + +The value `variable` means that the number of digits to the right of the +decimal point can vary from zero to the value of the +[`Precision`](#Precision) facet. + +An integer value means that the number of digits to the right of the +decimal point may vary from zero to the value of the `Scale` facet, and +the number of digits to the left of the decimal point may vary from one +to the value of the `Precision` facet minus the value of the `Scale` +facet. If `Precision` is equal to `Scale`, a single zero MUST precede +the decimal point. + +The value of `Scale` MUST be less than or equal to the value of +[`Precision`](#Precision). + +Note: if the underlying data store allows negative scale, services may +use a [`Precision`](#Precision) with the absolute value of the negative +scale added to the actual number of significant decimal digits, and +client-provided values may have to be rounded before being stored. + + + + + + +::: {.varxml .rep} +### Attribute `Scale` + +The value of `Scale` is a number or one of the symbolic values +`floating` or `variable`. + +Services SHOULD use lower-case values; clients SHOULD accept values in a +case-insensitive manner. + +If not specified, the `Scale` facet defaults to zero. +::: + +::: {.varxml .example} +Example 3: [`Precision`](#Precision)`=3` and `Scale=2`. +Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 +```xml + +``` +::: + +::: {.varxml .example} +Example 4: `Precision=2` equals `Scale`. +Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2 +```xml + +``` +::: + +::: {.varxml .example} +Example 5: `Precision=3` and a variable `Scale`. +Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed +values: 12.34, 1234 and 123.4 due to the limited precision. +```xml + +``` +::: + +::: {.varxml .example} +Example 6: `Precision=7` and a floating `Scale`. +Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: +1e-102 and 1e97 due to the limited precision. +```xml + +``` +::: + +### 3.4.4 Unicode + +For a string-typed model element the `Unicode` facet indicates whether the it +might contain and accept string values with Unicode characters (code +points) beyond the ASCII character set. The value `false` indicates that +the it will only contain and accept string values with characters +limited to the ASCII character set. + +If no value is specified, the `Unicode` facet defaults to `true`. + + +::: {.varxml .rep} +### Attribute `Unicode` + +The value of `Unicode` is one of the Boolean literals `true` or `false`. +Absence of the attribute means `true`. +::: + +### 3.4.5 SRID + +For a geometry- or geography-typed model element the `SRID` facet identifies which +spatial reference system is applied to its values. + +The value of the `SRID` facet MUST be a non-negative integer or the +special value `variable`. If no value is specified, the facet defaults +to `0` for `Geometry` types or `4326` for `Geography` types. + +The valid values of the `SRID` facet and their meanings are as defined +by the European Petroleum Survey Group [EPSG](#_EPSG). + + +::: {.varxml .rep} +### Attribute `SRID` + +The value of `SRID` is a number or the symbolic value `variable`. +::: + +## 3.5 Built-In Abstract Types The following built-in abstract types can be used within a model: - `Edm.PrimitiveType` @@ -600,7 +798,7 @@ be used anywhere a corresponding concrete type can be used, except: of `4.0`. Services should treat untyped properties as dynamic properties in `4.0` payloads. -## 3.5 Built-In Types for defining Vocabulary Terms +## 3.6 Built-In Types for defining Vocabulary Terms [Vocabulary terms](#VocabularyandAnnotation) can, in addition, use - `Edm.AnnotationPath` @@ -615,7 +813,7 @@ as the type of a primitive term, or the type of a property of a complex type (recursively) that is exclusively used as the type of a term. See section "[Path Expressions](#PathExpressions)" for details. -## 3.6 Annotations +## 3.7 Annotations Many parts of the model can be decorated with additional information using [annotations](#Annotation). Annotations are identified by their @@ -660,7 +858,7 @@ OData service. ::: ::: {.varxml .example} -Example 2: +Example 7: ```xml @@ -722,7 +920,7 @@ relative to the `xml:base` attribute, see ::: ::: {.varxml .example} -Example 3: references to other CSDL documents +Example 8: references to other CSDL documents ```xml @@ -890,7 +1088,7 @@ The value of `TargetNamespace` is a namespace. ::: ::: {.varxml .example} -Example 5: reference documents that contain annotations +Example 10: reference documents that contain annotations ```xml @@ -1036,7 +1234,7 @@ The value of `Qualifier` is a [simple identifier](#SimpleIdentifier). ::: ::: {.varxml .example} -Example 7: annotations should only be applied to tablet devices +Example 12: annotations should only be applied to tablet devices ```xml @@ -1093,7 +1291,7 @@ The value of `Name` is the entity type's name. ::: ::: {.varxml .example} -Example 8: a simple entity type +Example 13: a simple entity type ```xml @@ -1127,7 +1325,7 @@ The value of `BaseType` is the qualified name of the base type. ::: ::: {.varxml .example} -Example 9: a derived entity type based on the previous example +Example 14: a derived entity type based on the previous example ```xml @@ -1317,7 +1515,7 @@ The value of `Alias` is a [simple identifier](#SimpleIdentifier). ::: ::: {.varxml .example} -Example 10: entity type with a simple key +Example 15: entity type with a simple key ```xml @@ -1330,7 +1528,7 @@ Example 10: entity type with a simple key ::: ::: {.varxml .example} -Example 11: entity type with a simple key referencing a property of a +Example 16: entity type with a simple key referencing a property of a [complex type](#ComplexType) ```xml @@ -1349,7 +1547,7 @@ Example 11: entity type with a simpl ::: ::: {.varxml .example} -Example 12: entity type with a composite key +Example 17: entity type with a composite key ```xml @@ -1363,7 +1561,7 @@ Example 12: entity type with a composite key ::: ::: example -Example 13 (based on [example 11](#complexkey)): requests to an entity set `Categories` +Example 18 (based on [example 16](#complexkey)): requests to an entity set `Categories` of type `Category` must use the alias ``` GET http://host/service/Categories(EntityInfoID=1) @@ -1371,7 +1569,7 @@ GET http://host/service/Categories(EntityInfoID=1) ::: ::: example -Example 14 (based on [example 11](#complexkey)): in a query part the value assigned to +Example 19 (based on [example 16](#complexkey)): in a query part the value assigned to the name attribute must be used ``` GET http://example.org/OData.svc/Categories?$filter=Info/ID le 100 @@ -1427,7 +1625,7 @@ The value of `Name` is the property's name. ::: ::: {.varxml .example} -Example 15: complex type with two properties +Example 20: complex type with two properties ```xml ``` ::: -## 7.2 Type Facets - -Facets modify or constrain the acceptable values for a model element of a given type. - -For single-valued model elements the facets apply to the value of the -model element. For collection-valued model elements the facets apply to the items -in the collection. - -### 7.2.1 Nullable +## 7.2 Nullable A Boolean value specifying whether the property can have the value `null`. ::: {.varxml .rep} -### Attribute `Nullable` +## Attribute `Nullable` The value of `Nullable` is one of the Boolean literals `true` or `false`. @@ -1499,7 +1689,7 @@ The value of `Nullable` is one of the Boolean literals `true` or For single-valued properties the value `true` means that the property allows the `null` value. -For collection-valued properties the property value will always be a +For collection-valued properties the value will always be a collection that MAY be empty. In this case the `Nullable` attribute applies to items of the collection and specifies whether the collection MAY contain `null` values. @@ -1515,206 +1705,17 @@ cannot assume any default value. Clients SHOULD be prepared for this situation even in OData 4.01 responses. ::: -### 7.2.2 MaxLength - -A positive integer value specifying the maximum length of a binary, -stream or string value. For binary or stream values this is the octet -length of the binary data, for string values it is the character length -(number of code points for Unicode). - -If no maximum length is specified, clients SHOULD expect arbitrary -length. - - -::: {.varxml .rep} -### Attribute `MaxLength` - -The value of `MaxLength` is a positive integer or the symbolic value -`max` as a shorthand for the maximum length supported for the type by -the service. - -Note: the symbolic value `max` is only allowed in OData 4.0 responses; -it is deprecated in OData 4.01. While clients MUST be prepared for this -symbolic value, OData 4.01 and greater services MUST NOT return the -symbolic value `max` and MAY instead specify the concrete maximum length -supported for the type by the service or omit the attribute entirely. -::: - -### 7.2.3 Precision - -For a decimal value: the maximum number of significant decimal digits of -the property's value; it MUST be a positive integer. - -For a temporal value (datetime-with-timezone-offset, duration, or -time-of-day): the number of decimal places allowed in the seconds -portion of the value; it MUST be a non-negative integer between zero and -twelve. - -Note: service authors SHOULD be aware that some clients are unable to -support a precision greater than 28 for decimal properties and 7 for -temporal properties. Client developers MUST be aware of the potential -for data loss when round-tripping values of greater precision. Updating -via `PATCH` and exclusively specifying modified properties will reduce -the risk for unintended data loss. - -Note: duration properties supporting a granularity less than seconds -(e.g. minutes, hours, days) can be annotated with term -[`Measures.DurationGranularity`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Measures.V1.md#DurationGranularity), -see [OData-VocMeasures](#ODataVocMeasures). - - - -::: {.varxml .rep} -### Attribute `Precision` - -The value of `Precision` is a number. - -If not specified for a decimal property, the decimal property has -arbitrary precision. - -If not specified for a temporal property, the temporal property has a -precision of zero. -::: +## 7.3 Default Value -::: {.varxml .example} -Example 17: [`Precision`](#Precision) facet applied to the -`DateTimeOffset` type -```xml - -``` -::: - -### 7.2.4 Scale - -A non-negative integer value specifying the maximum number of digits -allowed to the right of the decimal point, or one of the symbolic values -`floating` or `variable`. - -The value `floating` means that the decimal property represents a -decimal floating-point number whose number of significant digits is the -value of the [`Precision`](#Precision) facet. OData 4.0 responses MUST -NOT specify the value `floating`. - -The value `variable` means that the number of digits to the right of the -decimal point can vary from zero to the value of the -[`Precision`](#Precision) facet. - -An integer value means that the number of digits to the right of the -decimal point may vary from zero to the value of the `Scale` facet, and -the number of digits to the left of the decimal point may vary from one -to the value of the `Precision` facet minus the value of the `Scale` -facet. If `Precision` is equal to `Scale`, a single zero MUST precede -the decimal point. - -The value of `Scale` MUST be less than or equal to the value of -[`Precision`](#Precision). - -Note: if the underlying data store allows negative scale, services may -use a [`Precision`](#Precision) with the absolute value of the negative -scale added to the actual number of significant decimal digits, and -client-provided values may have to be rounded before being stored. - - - - - - -::: {.varxml .rep} -### Attribute `Scale` - -The value of `Scale` is a number or one of the symbolic values -`floating` or `variable`. - -Services SHOULD use lower-case values; clients SHOULD accept values in a -case-insensitive manner. - -If not specified, the `Scale` facet defaults to zero. -::: - -::: {.varxml .example} -Example 18: [`Precision`](#Precision)`=3` and `Scale=2`. -Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 -```xml - -``` -::: - -::: {.varxml .example} -Example 19: `Precision=2` equals `Scale`. -Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2 -```xml - -``` -::: - -::: {.varxml .example} -Example 20: `Precision=3` and a variable `Scale`. -Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed -values: 12.34, 1234 and 123.4 due to the limited precision. -```xml - -``` -::: - -::: {.varxml .example} -Example 21: `Precision=7` and a floating `Scale`. -Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: -1e-102 and 1e97 due to the limited precision. -```xml - -``` -::: - -### 7.2.5 Unicode - -For a string property the `Unicode` facet indicates whether the property -might contain and accept string values with Unicode characters (code -points) beyond the ASCII character set. The value `false` indicates that -the property will only contain and accept string values with characters -limited to the ASCII character set. - -If no value is specified, the `Unicode` facet defaults to `true`. - - -::: {.varxml .rep} -### Attribute `Unicode` - -The value of `Unicode` is one of the Boolean literals `true` or `false`. -Absence of the attribute means `true`. -::: - -### 7.2.6 SRID - -For a geometry or geography property the `SRID` facet identifies which -spatial reference system is applied to values of the property on type -instances. - -The value of the `SRID` facet MUST be a non-negative integer or the -special value `variable`. If no value is specified, the facet defaults -to `0` for `Geometry` types or `4326` for `Geography` types. - -The valid values of the `SRID` facet and their meanings are as defined -by the European Petroleum Survey Group [EPSG](#_EPSG). - - -::: {.varxml .rep} -### Attribute `SRID` - -The value of `SRID` is a number or the symbolic value `variable`. -::: - -### 7.2.7 Default Value - -A primitive or enumeration property MAY define a default value that is -used if the property is not explicitly represented in an annotation or +A primitive- or enumeration-typed model element MAY define a default value that is +used if it is not explicitly represented in an annotation or the body of a request or response. If no value is specified, the client SHOULD NOT assume a default value. ::: {.varxml .rep} -### Attribute `DefaultValue` +### Attribute `DefaultValue` Default values of type `Edm.String` MUST be represented according to the XML escaping rules for character data in attribute values. Values of @@ -2616,7 +2617,7 @@ explicitly indicated, it is unbound. Bound actions or functions are invoked on resources matching the type of the binding parameter. The binding parameter can be of any type, and it -MAY be [nullable](#Nullable). +MAY be nullable. Unbound actions are invoked from the entity container through an [action import](#ActionImport). @@ -2682,7 +2683,7 @@ The value of `IsComposable` is one of the Boolean literals `true` or The return type of an action or function overload MAY be any type in scope, or a collection of any type in scope. -The facets [`Nullable`](#Nullable), [`MaxLength`](#MaxLength), +The facets [`MaxLength`](#MaxLength), [`Precision`](#Precision), [`Scale`](#Scale), and [`SRID`](#SRID) can be used as appropriate to specify value restrictions of the return type, as well as the [`Unicode`](#Unicode) facet for 4.01 and greater payloads. @@ -3350,14 +3351,12 @@ scope. ### Element `edm:Term` The `edm:Term` element MUST contain the attributes `Name` and `Type`. It -MAY contain the attributes `BaseTerm` and `AppliesTo`. +MAY contain the attributes `Nullable`, `DefaultValue`, [`BaseTerm`](#SpecializedTerm) and [`AppliesTo`](#Applicability). -It MAY specify values for the [`Nullable`](#Nullable), -[ ]{.apple-converted-space}[`MaxLength`](#MaxLength), -[`Precision`](#Precision), [`Scale`](#Scale), or [`SRID`](#SRID) facet -attributes, as well as the [`Unicode`](#Unicode) facet attribute for -4.01 and greater payloads. These facets and their implications are -described in section 7.2. +The facets [`MaxLength`](#MaxLength), +[`Precision`](#Precision), [`Scale`](#Scale), and [`SRID`](#SRID) can be +used as appropriate, as well as the [`Unicode`](#Unicode) facet attribute for +4.01 and greater payloads. A `edm:Term` element whose `Type` attribute specifies a primitive or enumeration type MAY define a value for the `DefaultValue` attribute. @@ -3370,14 +3369,36 @@ The value of `Name` is the term's name. ### Attribute `Type` -For single-valued properties the value of `Type` is the qualified name -of the property's type. +For single-valued terms the value of `Type` is the qualified name +of the term's type. For collection-valued properties the value of `Type` is the character sequence `Collection(` followed by the qualified name of the property's item type, followed by a closing parenthesis `)`. -### Attribute `DefaultValue` +### Attribute `Nullable` + +The value of `Nullable` is one of the Boolean literals `true` or +`false`. + +For single-valued terms the value `true` means that annotations may have the `null` value. + +For collection-valued terms the annotation value will always be a +collection that MAY be empty. In this case the `Nullable` attribute +applies to items of the collection and specifies whether the collection +MAY contain `null` values. + +If no value is specified for a single-valued term, the `Nullable` +attribute defaults to `true`. + +In OData 4.01 responses a collection-valued term MUST specify a +value for the `Nullable` attribute. + +If no value is specified for a collection-valued term, the client +cannot assume any default value. Clients SHOULD be prepared for this +situation even in OData 4.01 responses. + +### Attribute `DefaultValue` The value of this attribute determines the value of the term when applied in an [`edm:Annotation`](#Annotation) without providing an @@ -3405,7 +3426,7 @@ reached. ::: {.varxml .rep} -### Attribute `BaseTerm` +### Attribute `BaseTerm` The value of `BaseTerm` is the qualified name of the base term. ::: @@ -3459,7 +3480,7 @@ Symbolic Value|Model Element ::: {.varxml .rep} -### Attribute `AppliesTo` +### Attribute `AppliesTo` The value of `AppliesTo` is a whitespace-separated list of symbolic values from the table above that identify model elements the term is @@ -5091,7 +5112,7 @@ enclosing `edm:Record` expression. ::: ::: {.varxml .example} -Example 86: this annotation "morphs" the entity type from [example 8](#entitytype) into +Example 86: this annotation "morphs" the entity type from [example 13](#entitytype) into a structured type with two structural properties `GivenName` and `Surname` and two navigation properties `DirectSupervisor` and `CostCenter`. The first three properties simply rename properties of the @@ -5588,12 +5609,7 @@ https://openui5.hana.ondemand.com/1.40.10/#docs/guide/87aac894a40640f89920d7b2a4 - [Attribute `Name`](#AttributeName11.1) - [Attribute `Type`](#AttributeType11.2) - [Attribute `Nullable`](#AttributeNullable11.3) - - [Attribute `MaxLength`](#AttributeMaxLength11.4) - - [Attribute `Precision`](#AttributePrecision11.5) - - [Attribute `Scale`](#AttributeScale11.6) - - [Attribute `Unicode`](#AttributeUnicode11.7) - - [Attribute `SRID`](#AttributeSRID11.8) - - [Attribute `DefaultValue`](#AttributeDefaultValue11.9) + - [Attribute `DefaultValue`](#AttributeDefaultValue11.4) - [Element `edm:NavigationProperty`](#ElementedmNavigationProperty12) - [Attribute `Name`](#AttributeName12.1) - [Attribute `Type`](#AttributeType12.2) @@ -5660,9 +5676,10 @@ https://openui5.hana.ondemand.com/1.40.10/#docs/guide/87aac894a40640f89920d7b2a4 - [Element `edm:Term`](#ElementedmTerm29) - [Attribute `Name`](#AttributeName29.1) - [Attribute `Type`](#AttributeType29.2) - - [Attribute `DefaultValue`](#AttributeDefaultValue29.3) - - [Attribute `BaseTerm`](#AttributeBaseTerm29.4) - - [Attribute `AppliesTo`](#AttributeAppliesTo29.5) + - [Attribute `Nullable`](#AttributeNullable29.3) + - [Attribute `DefaultValue`](#AttributeDefaultValue29.4) + - [Attribute `BaseTerm`](#AttributeBaseTerm29.5) + - [Attribute `AppliesTo`](#AttributeAppliesTo29.6) - [Element `edm:Annotation`](#ElementedmAnnotation30) - [Attribute `Term`](#AttributeTerm30.1) - [Attribute `Qualifier`](#AttributeQualifier30.2) diff --git a/odata-csdl/1 Introduction.md b/odata-csdl/1 Introduction.md index 54ba31c12..4e6132f01 100644 --- a/odata-csdl/1 Introduction.md +++ b/odata-csdl/1 Introduction.md @@ -488,6 +488,306 @@ representation of primitive type values in URLs and [OData-JSON](#ODataJSON) for the representation in requests and responses. +## ##subsec Type Facets + +Facets modify or constrain the acceptable values for a model element of a given primitive type, +for example a [structural property](#StructuralProperty), +action or function [parameter](#Parameter), +action or function [return type](#ReturnType), or +[term](#Term). + +For single-valued model elements the facets apply to the value of the +model element. For collection-valued model elements the facets apply to the items +in the collection. + +### ##subsubsec MaxLength + +A positive integer value specifying the maximum length of a binary, +stream or string value. For binary or stream values this is the octet +length of the binary data, for string values it is the character length +(number of code points for Unicode). + +If no maximum length is specified, clients SHOULD expect arbitrary +length. + +::: {.varjson .rep} +### ##subisec `$MaxLength` + +The value of `$MaxLength` is a positive integer. + +Note: [OData-CSDL-XML](#ODataCSDL) defines a symbolic +value `max` that is only allowed in OData 4.0 responses. This symbolic +value is not allowed in CDSL JSON documents at all. Services MAY instead +specify the concrete maximum length supported for the type by the +service or omit the member entirely. +::: + +::: {.varxml .rep} +### ##subisec Attribute `MaxLength` + +The value of `MaxLength` is a positive integer or the symbolic value +`max` as a shorthand for the maximum length supported for the type by +the service. + +Note: the symbolic value `max` is only allowed in OData 4.0 responses; +it is deprecated in OData 4.01. While clients MUST be prepared for this +symbolic value, OData 4.01 and greater services MUST NOT return the +symbolic value `max` and MAY instead specify the concrete maximum length +supported for the type by the service or omit the attribute entirely. +::: + +### ##subsubsec Precision + +For a decimal value: the maximum number of significant decimal digits of +the model element's value; it MUST be a positive integer. + +For a temporal value (datetime-with-timezone-offset, duration, or +time-of-day): the number of decimal places allowed in the seconds +portion of the value; it MUST be a non-negative integer between zero and +twelve. + +Note: service authors SHOULD be aware that some clients are unable to +support a precision greater than 28 for decimal values and 7 for +temporal values. Client developers MUST be aware of the potential +for data loss when round-tripping values of greater precision. Updating +via `PATCH` and exclusively specifying modified values will reduce +the risk for unintended data loss. + +Note: model elements with duration values and a granularity less than seconds +(e.g. minutes, hours, days) can be annotated with term +[`Measures.DurationGranularity`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Measures.V1.md#DurationGranularity), +see [OData-VocMeasures](#ODataVocMeasures). + +::: {.varjson .rep} +### ##subisec `$Precision` + +The value of `$Precision` is a number. + +Absence of `$Precision` means arbitrary precision. +::: + +::: {.varjson .example} +Example ##ex: `Precision` facet applied to the `DateTimeOffset` type +```json +"SuggestedTimes": { + "$Type": "Edm.DateTimeOffset", + "$Collection": true, + "$Precision": 6 +} +``` +::: + +::: {.varxml .rep} +### ##subisec Attribute `Precision` + +The value of `Precision` is a number. + +If not specified for a decimal value, the decimal value has +arbitrary precision. + +If not specified for a temporal value, the temporal value has a +precision of zero. +::: + +::: {.varxml .example} +Example ##ex: [`Precision`](#Precision) facet applied to the +`DateTimeOffset` type +```xml + +``` +::: + +### ##subsubsec Scale + +A non-negative integer value specifying the maximum number of digits +allowed to the right of the decimal point, or one of the symbolic values +`floating` or `variable`. + +The value `floating` means that the decimal value represents a +decimal floating-point number whose number of significant digits is the +value of the [`Precision`](#Precision) facet. OData 4.0 responses MUST +NOT specify the value `floating`. + +The value `variable` means that the number of digits to the right of the +decimal point can vary from zero to the value of the +[`Precision`](#Precision) facet. + +An integer value means that the number of digits to the right of the +decimal point may vary from zero to the value of the `Scale` facet, and +the number of digits to the left of the decimal point may vary from one +to the value of the `Precision` facet minus the value of the `Scale` +facet. If `Precision` is equal to `Scale`, a single zero MUST precede +the decimal point. + +The value of `Scale` MUST be less than or equal to the value of +[`Precision`](#Precision). + +Note: if the underlying data store allows negative scale, services may +use a [`Precision`](#Precision) with the absolute value of the negative +scale added to the actual number of significant decimal digits, and +client-provided values may have to be rounded before being stored. + +::: {.varjson .rep} +### ##subisec `$Scale` + +The value of `$Scale` is a number or a string with one of the symbolic +values `floating` or `variable`. + +Services SHOULD use lower-case values; clients SHOULD accept values in a +case-insensitive manner. + +Absence of `$Scale` means `variable`. +::: + +::: {.varjson .example} +Example ##ex: [`Precision`](#Precision)`=3` and `Scale=2`. +Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 +```json +"Amount32": { + "$Nullable": true, + "$Type": "Edm.Decimal", + "$Precision": 3, + "$Scale": 2 +} +``` +::: + +::: {.varjson .example} +Example ##ex: `Precision=2` equals `Scale`. +Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2 +```json +"Amount22": { + "$Nullable": true, + "$Type": "Edm.Decimal", + "$Precision": 2, + "$Scale": 2 +} +``` +::: + +::: {.varjson .example} +Example ##ex: `Precision=3` and a variable `Scale`. +Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed +values: 12.34, 1234 and 123.4 due to the limited precision. +```json +"Amount3v": { + "$Nullable": true, + "$Type": "Edm.Decimal", + "$Precision": 3 +} +``` +::: + +::: {.varjson .example} +Example ##ex: `Precision=7` and a floating `Scale`. +Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: +1e-102 and 1e97 due to the limited precision. +```json +"Amount7f": { + "$Nullable": true, + "$Type": "Edm.Decimal", + "$Precision": 7, + "$Scale": "floating" +} +``` +::: + +::: {.varxml .rep} +### ##subisec Attribute `Scale` + +The value of `Scale` is a number or one of the symbolic values +`floating` or `variable`. + +Services SHOULD use lower-case values; clients SHOULD accept values in a +case-insensitive manner. + +If not specified, the `Scale` facet defaults to zero. +::: + +::: {.varxml .example} +Example ##ex: [`Precision`](#Precision)`=3` and `Scale=2`. +Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 +```xml + +``` +::: + +::: {.varxml .example} +Example ##ex: `Precision=2` equals `Scale`. +Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2 +```xml + +``` +::: + +::: {.varxml .example} +Example ##ex: `Precision=3` and a variable `Scale`. +Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed +values: 12.34, 1234 and 123.4 due to the limited precision. +```xml + +``` +::: + +::: {.varxml .example} +Example ##ex: `Precision=7` and a floating `Scale`. +Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: +1e-102 and 1e97 due to the limited precision. +```xml + +``` +::: + +### ##subsubsec Unicode + +For a string-typed model element the `Unicode` facet indicates whether the it +might contain and accept string values with Unicode characters (code +points) beyond the ASCII character set. The value `false` indicates that +the it will only contain and accept string values with characters +limited to the ASCII character set. + +If no value is specified, the `Unicode` facet defaults to `true`. + +::: {.varjson .rep} +### ##subisec `$Unicode` + +The value of `$Unicode` is one of the Boolean literals `true` or +`false`. Absence of the member means `true`. +::: + +::: {.varxml .rep} +### ##subisec Attribute `Unicode` + +The value of `Unicode` is one of the Boolean literals `true` or `false`. +Absence of the attribute means `true`. +::: + +### ##subsubsec SRID + +For a geometry- or geography-typed model element the `SRID` facet identifies which +spatial reference system is applied to its values. + +The value of the `SRID` facet MUST be a non-negative integer or the +special value `variable`. If no value is specified, the facet defaults +to `0` for `Geometry` types or `4326` for `Geography` types. + +The valid values of the `SRID` facet and their meanings are as defined +by the European Petroleum Survey Group [EPSG](#_EPSG). + +::: {.varjson .rep} +### ##subisec `$SRID` + +The value of `$SRID` is a string containing a number or the symbolic +value `variable`. +::: + +::: {.varxml .rep} +### ##subisec Attribute `SRID` + +The value of `SRID` is a number or the symbolic value `variable`. +::: + ## ##subsec Built-In Abstract Types The following built-in abstract types can be used within a model: diff --git a/odata-csdl/12 Action and Function.md b/odata-csdl/12 Action and Function.md index b75ca57e9..ec8e594e6 100644 --- a/odata-csdl/12 Action and Function.md +++ b/odata-csdl/12 Action and Function.md @@ -156,7 +156,7 @@ explicitly indicated, it is unbound. Bound actions or functions are invoked on resources matching the type of the binding parameter. The binding parameter can be of any type, and it -MAY be [nullable](#Nullable). +MAY be nullable. Unbound actions are invoked from the entity container through an [action import](#ActionImport). @@ -240,7 +240,7 @@ The value of `IsComposable` is one of the Boolean literals `true` or The return type of an action or function overload MAY be any type in scope, or a collection of any type in scope. -The facets [`Nullable`](#Nullable), [`MaxLength`](#MaxLength), +The facets [`MaxLength`](#MaxLength), [`Precision`](#Precision), [`Scale`](#Scale), and [`SRID`](#SRID) can be used as appropriate to specify value restrictions of the return type, as well as the [`Unicode`](#Unicode) facet for 4.01 and greater payloads. diff --git a/odata-csdl/14 Vocabulary and Annotation.md b/odata-csdl/14 Vocabulary and Annotation.md index 8933056ed..e80c5e662 100644 --- a/odata-csdl/14 Vocabulary and Annotation.md +++ b/odata-csdl/14 Vocabulary and Annotation.md @@ -148,10 +148,11 @@ unqualified name of the term and whose value is an object. The term object MUST contain the member `$Kind` with a string value of `Term`. -It MAY contain the members `$Type`, `$Collection`, -[`$AppliesTo`](#Applicability), [`$Nullable`](#Nullable), +It MAY contain the members `$Type`, `$Collection`, `$Nullable`, `$DefaultValue`, +[`$BaseTerm`](#SpecializedTerm), +[`$AppliesTo`](#Applicability), [`$MaxLength`](#MaxLength), [`$Precision`](#Precision), -[`$Scale`](#Scale), [`$SRID`](#SRID), and `$DefaultValue`, as well as +[`$Scale`](#Scale), and [`$SRID`](#SRID), as well as [`$Unicode`](#Unicode) for 4.01 and greater payloads. It MAY contain [annotations](#Annotation). @@ -168,6 +169,19 @@ with the literal value `true`. Absence of the `$Type` member means the type is `Edm.String`. +### ##subisec `$Nullable` + +The value of `$Nullable` is one of the Boolean literals `true` or +`false`. Absence of the member means `false`. + +For single-valued terms the value `true` means that annotations may have +the `null` value. + +For collection-valued terms the annotation value will always be a +collection that MAY be empty. In this case `$Nullable` applies to items +of the collection and specifies whether the collection MAY contain +`null` values. + ### ##subisec `$DefaultValue` The value of `$DefaultValue` is the type-specific JSON representation of @@ -183,14 +197,12 @@ CSDL JSON documents MUST always specify an explicit value. ### ##isec Element `edm:Term` The `edm:Term` element MUST contain the attributes `Name` and `Type`. It -MAY contain the attributes `BaseTerm` and `AppliesTo`. +MAY contain the attributes `Nullable`, `DefaultValue`, [`BaseTerm`](#SpecializedTerm) and [`AppliesTo`](#Applicability). -It MAY specify values for the [`Nullable`](#Nullable), -[ ]{.apple-converted-space}[`MaxLength`](#MaxLength), -[`Precision`](#Precision), [`Scale`](#Scale), or [`SRID`](#SRID) facet -attributes, as well as the [`Unicode`](#Unicode) facet attribute for -4.01 and greater payloads. These facets and their implications are -described in section 7.2. +The facets [`MaxLength`](#MaxLength), +[`Precision`](#Precision), [`Scale`](#Scale), and [`SRID`](#SRID) can be +used as appropriate, as well as the [`Unicode`](#Unicode) facet attribute for +4.01 and greater payloads. A `edm:Term` element whose `Type` attribute specifies a primitive or enumeration type MAY define a value for the `DefaultValue` attribute. @@ -203,13 +215,35 @@ The value of `Name` is the term's name. ### ##subisec Attribute `Type` -For single-valued properties the value of `Type` is the qualified name -of the property's type. +For single-valued terms the value of `Type` is the qualified name +of the term's type. For collection-valued properties the value of `Type` is the character sequence `Collection(` followed by the qualified name of the property's item type, followed by a closing parenthesis `)`. +### ##subisec Attribute `Nullable` + +The value of `Nullable` is one of the Boolean literals `true` or +`false`. + +For single-valued terms the value `true` means that annotations may have the `null` value. + +For collection-valued terms the annotation value will always be a +collection that MAY be empty. In this case the `Nullable` attribute +applies to items of the collection and specifies whether the collection +MAY contain `null` values. + +If no value is specified for a single-valued term, the `Nullable` +attribute defaults to `true`. + +In OData 4.01 responses a collection-valued term MUST specify a +value for the `Nullable` attribute. + +If no value is specified for a collection-valued term, the client +cannot assume any default value. Clients SHOULD be prepared for this +situation even in OData 4.01 responses. + ### ##subisec Attribute `DefaultValue` The value of this attribute determines the value of the term when diff --git a/odata-csdl/7 Structural Property.md b/odata-csdl/7 Structural Property.md index 02f06b6d1..4cc572393 100644 --- a/odata-csdl/7 Structural Property.md +++ b/odata-csdl/7 Structural Property.md @@ -153,15 +153,7 @@ value ``` ::: -## ##subsec Type Facets - -Facets modify or constrain the acceptable values for a model element of a given type. - -For single-valued model elements the facets apply to the value of the -model element. For collection-valued model elements the facets apply to the items -in the collection. - -### ##subsubsec Nullable +## ##subsec Nullable A Boolean value specifying whether the property can have the value `null`. @@ -175,14 +167,14 @@ The value of `$Nullable` is one of the Boolean literals `true` or For single-valued properties the value `true` means that the property allows the `null` value. -For collection-valued properties the property value will always be a +For collection-valued properties the value will always be a collection that MAY be empty. In this case `$Nullable` applies to items of the collection and specifies whether the collection MAY contain `null` values. ::: ::: {.varxml .rep} -### ##subisec Attribute `Nullable` +## ##subisec Attribute `Nullable` The value of `Nullable` is one of the Boolean literals `true` or `false`. @@ -190,7 +182,7 @@ The value of `Nullable` is one of the Boolean literals `true` or For single-valued properties the value `true` means that the property allows the `null` value. -For collection-valued properties the property value will always be a +For collection-valued properties the value will always be a collection that MAY be empty. In this case the `Nullable` attribute applies to items of the collection and specifies whether the collection MAY contain `null` values. @@ -206,299 +198,10 @@ cannot assume any default value. Clients SHOULD be prepared for this situation even in OData 4.01 responses. ::: -### ##subsubsec MaxLength - -A positive integer value specifying the maximum length of a binary, -stream or string value. For binary or stream values this is the octet -length of the binary data, for string values it is the character length -(number of code points for Unicode). - -If no maximum length is specified, clients SHOULD expect arbitrary -length. - -::: {.varjson .rep} -### ##subisec `$MaxLength` - -The value of `$MaxLength` is a positive integer. - -Note: [OData-CSDL-XML](#ODataCSDL) defines a symbolic -value `max` that is only allowed in OData 4.0 responses. This symbolic -value is not allowed in CDSL JSON documents at all. Services MAY instead -specify the concrete maximum length supported for the type by the -service or omit the member entirely. -::: - -::: {.varxml .rep} -### ##subisec Attribute `MaxLength` - -The value of `MaxLength` is a positive integer or the symbolic value -`max` as a shorthand for the maximum length supported for the type by -the service. - -Note: the symbolic value `max` is only allowed in OData 4.0 responses; -it is deprecated in OData 4.01. While clients MUST be prepared for this -symbolic value, OData 4.01 and greater services MUST NOT return the -symbolic value `max` and MAY instead specify the concrete maximum length -supported for the type by the service or omit the attribute entirely. -::: - -### ##subsubsec Precision - -For a decimal value: the maximum number of significant decimal digits of -the property's value; it MUST be a positive integer. - -For a temporal value (datetime-with-timezone-offset, duration, or -time-of-day): the number of decimal places allowed in the seconds -portion of the value; it MUST be a non-negative integer between zero and -twelve. - -Note: service authors SHOULD be aware that some clients are unable to -support a precision greater than 28 for decimal properties and 7 for -temporal properties. Client developers MUST be aware of the potential -for data loss when round-tripping values of greater precision. Updating -via `PATCH` and exclusively specifying modified properties will reduce -the risk for unintended data loss. - -Note: duration properties supporting a granularity less than seconds -(e.g. minutes, hours, days) can be annotated with term -[`Measures.DurationGranularity`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Measures.V1.md#DurationGranularity), -see [OData-VocMeasures](#ODataVocMeasures). - -::: {.varjson .rep} -### ##subisec `$Precision` - -The value of `$Precision` is a number. - -Absence of `$Precision` means arbitrary precision. -::: - -::: {.varjson .example} -Example ##ex: `Precision` facet applied to the `DateTimeOffset` type -```json -"SuggestedTimes": { - "$Type": "Edm.DateTimeOffset", - "$Collection": true, - "$Precision": 6 -} -``` -::: - -::: {.varxml .rep} -### ##subisec Attribute `Precision` - -The value of `Precision` is a number. - -If not specified for a decimal property, the decimal property has -arbitrary precision. - -If not specified for a temporal property, the temporal property has a -precision of zero. -::: - -::: {.varxml .example} -Example ##ex: [`Precision`](#Precision) facet applied to the -`DateTimeOffset` type -```xml - -``` -::: - -### ##subsubsec Scale - -A non-negative integer value specifying the maximum number of digits -allowed to the right of the decimal point, or one of the symbolic values -`floating` or `variable`. - -The value `floating` means that the decimal property represents a -decimal floating-point number whose number of significant digits is the -value of the [`Precision`](#Precision) facet. OData 4.0 responses MUST -NOT specify the value `floating`. - -The value `variable` means that the number of digits to the right of the -decimal point can vary from zero to the value of the -[`Precision`](#Precision) facet. - -An integer value means that the number of digits to the right of the -decimal point may vary from zero to the value of the `Scale` facet, and -the number of digits to the left of the decimal point may vary from one -to the value of the `Precision` facet minus the value of the `Scale` -facet. If `Precision` is equal to `Scale`, a single zero MUST precede -the decimal point. - -The value of `Scale` MUST be less than or equal to the value of -[`Precision`](#Precision). - -Note: if the underlying data store allows negative scale, services may -use a [`Precision`](#Precision) with the absolute value of the negative -scale added to the actual number of significant decimal digits, and -client-provided values may have to be rounded before being stored. - -::: {.varjson .rep} -### ##subisec `$Scale` - -The value of `$Scale` is a number or a string with one of the symbolic -values `floating` or `variable`. - -Services SHOULD use lower-case values; clients SHOULD accept values in a -case-insensitive manner. - -Absence of `$Scale` means `variable`. -::: - -::: {.varjson .example} -Example ##ex: [`Precision`](#Precision)`=3` and `Scale=2`. -Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 -```json -"Amount32": { - "$Nullable": true, - "$Type": "Edm.Decimal", - "$Precision": 3, - "$Scale": 2 -} -``` -::: - -::: {.varjson .example} -Example ##ex: `Precision=2` equals `Scale`. -Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2 -```json -"Amount22": { - "$Nullable": true, - "$Type": "Edm.Decimal", - "$Precision": 2, - "$Scale": 2 -} -``` -::: - -::: {.varjson .example} -Example ##ex: `Precision=3` and a variable `Scale`. -Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed -values: 12.34, 1234 and 123.4 due to the limited precision. -```json -"Amount3v": { - "$Nullable": true, - "$Type": "Edm.Decimal", - "$Precision": 3 -} -``` -::: - -::: {.varjson .example} -Example ##ex: `Precision=7` and a floating `Scale`. -Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: -1e-102 and 1e97 due to the limited precision. -```json -"Amount7f": { - "$Nullable": true, - "$Type": "Edm.Decimal", - "$Precision": 7, - "$Scale": "floating" -} -``` -::: - -::: {.varxml .rep} -### ##subisec Attribute `Scale` - -The value of `Scale` is a number or one of the symbolic values -`floating` or `variable`. - -Services SHOULD use lower-case values; clients SHOULD accept values in a -case-insensitive manner. - -If not specified, the `Scale` facet defaults to zero. -::: - -::: {.varxml .example} -Example ##ex: [`Precision`](#Precision)`=3` and `Scale=2`. -Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 -```xml - -``` -::: - -::: {.varxml .example} -Example ##ex: `Precision=2` equals `Scale`. -Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2 -```xml - -``` -::: - -::: {.varxml .example} -Example ##ex: `Precision=3` and a variable `Scale`. -Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed -values: 12.34, 1234 and 123.4 due to the limited precision. -```xml - -``` -::: - -::: {.varxml .example} -Example ##ex: `Precision=7` and a floating `Scale`. -Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: -1e-102 and 1e97 due to the limited precision. -```xml - -``` -::: - -### ##subsubsec Unicode - -For a string property the `Unicode` facet indicates whether the property -might contain and accept string values with Unicode characters (code -points) beyond the ASCII character set. The value `false` indicates that -the property will only contain and accept string values with characters -limited to the ASCII character set. - -If no value is specified, the `Unicode` facet defaults to `true`. - -::: {.varjson .rep} -### ##subisec `$Unicode` - -The value of `$Unicode` is one of the Boolean literals `true` or -`false`. Absence of the member means `true`. -::: - -::: {.varxml .rep} -### ##subisec Attribute `Unicode` - -The value of `Unicode` is one of the Boolean literals `true` or `false`. -Absence of the attribute means `true`. -::: - -### ##subsubsec SRID - -For a geometry or geography property the `SRID` facet identifies which -spatial reference system is applied to values of the property on type -instances. - -The value of the `SRID` facet MUST be a non-negative integer or the -special value `variable`. If no value is specified, the facet defaults -to `0` for `Geometry` types or `4326` for `Geography` types. - -The valid values of the `SRID` facet and their meanings are as defined -by the European Petroleum Survey Group [EPSG](#_EPSG). - -::: {.varjson .rep} -### ##subisec `$SRID` - -The value of `$SRID` is a string containing a number or the symbolic -value `variable`. -::: - -::: {.varxml .rep} -### ##subisec Attribute `SRID` - -The value of `SRID` is a number or the symbolic value `variable`. -::: - -### ##subsubsec Default Value +## ##subsec Default Value -A primitive or enumeration property MAY define a default value that is -used if the property is not explicitly represented in an annotation or +A primitive- or enumeration-typed model element MAY define a default value that is +used if it is not explicitly represented in an annotation or the body of a request or response. If no value is specified, the client SHOULD NOT assume a default value. From 08523f32e927e99cd6aecdb400de28e14f65e65b Mon Sep 17 00:00:00 2001 From: D024504 Date: Thu, 19 Oct 2023 11:43:33 +0200 Subject: [PATCH 36/74] slight rewording --- docs/odata-csdl-json/odata-csdl-json.html | 2 +- docs/odata-csdl-json/odata-csdl-json.md | 2 +- docs/odata-csdl-xml/odata-csdl-xml.html | 2 +- docs/odata-csdl-xml/odata-csdl-xml.md | 2 +- odata-csdl/7 Structural Property.md | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index 899e0a430..1245a461f 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -1185,7 +1185,7 @@

      Property Object

      Structural properties are represented as members of the object representing a structured type. The member name is the property name, the member value is an object.

      The property object MAY contain the member $Kind with a string value of Property. This member SHOULD be omitted to reduce document size.

      -

      It MAY contain the member $Type, $Collection, $Nullable, $MaxLength, $Unicode, $Precision, $Scale, $SRID, and $DefaultValue.

      +

      It MAY contain the members $Type, $Collection, $Nullable, $MaxLength, $Unicode, $Precision, $Scale, $SRID, and $DefaultValue.

      It also MAY contain annotations.

      diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 833a49dbb..71c61813f 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -1721,7 +1721,7 @@ the member value is an object. The property object MAY contain the member `$Kind` with a string value of `Property`. This member SHOULD be omitted to reduce document size. -It MAY contain the member [`$Type`](#Type), [`$Collection`](#Type), +It MAY contain the members [`$Type`](#Type), [`$Collection`](#Type), [`$Nullable`](#Nullable), [`$MaxLength`](#MaxLength), [`$Unicode`](#Unicode), [`$Precision`](#Precision), [`$Scale`](#Scale), [`$SRID`](#SRID), and [`$DefaultValue`](#DefaultValue). diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index c27d9b789..a8f6eafec 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -1090,7 +1090,7 @@

      Element edm:Property

      -

      The edm:Property element MUST contain the Name and the Type attribute, and it MAY contain the facet attributes Nullable, MaxLength, Unicode, Precision, Scale, SRID, and DefaultValue.

      +

      The edm:Property element MUST contain the Name and the Type attribute, and it MAY contain the attributes Nullable, MaxLength, Unicode, Precision, Scale, SRID, and DefaultValue.

      It MAY contain edm:Annotation elements.

      Attribute Name

      The value of Name is the property's name.

      diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 7575ab650..14461ae87 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -1612,7 +1612,7 @@ that differ only in case. ### Element `edm:Property` The `edm:Property` element MUST contain the `Name` and the `Type` -attribute, and it MAY contain the facet attributes +attribute, and it MAY contain the attributes [`Nullable`](#Nullable), [`MaxLength`](#MaxLength), [`Unicode`](#Unicode), [`Precision`](#Precision), [`Scale`](#Scale), [`SRID`](#SRID), and [`DefaultValue`](#DefaultValue). diff --git a/odata-csdl/7 Structural Property.md b/odata-csdl/7 Structural Property.md index 4cc572393..75e9c7c5c 100644 --- a/odata-csdl/7 Structural Property.md +++ b/odata-csdl/7 Structural Property.md @@ -38,7 +38,7 @@ the member value is an object. The property object MAY contain the member `$Kind` with a string value of `Property`. This member SHOULD be omitted to reduce document size. -It MAY contain the member [`$Type`](#Type), [`$Collection`](#Type), +It MAY contain the members [`$Type`](#Type), [`$Collection`](#Type), [`$Nullable`](#Nullable), [`$MaxLength`](#MaxLength), [`$Unicode`](#Unicode), [`$Precision`](#Precision), [`$Scale`](#Scale), [`$SRID`](#SRID), and [`$DefaultValue`](#DefaultValue). @@ -68,7 +68,7 @@ Example ##ex: complex type with two properties `Dimension` and `Length` ### ##isec Element `edm:Property` The `edm:Property` element MUST contain the `Name` and the `Type` -attribute, and it MAY contain the facet attributes +attribute, and it MAY contain the attributes [`Nullable`](#Nullable), [`MaxLength`](#MaxLength), [`Unicode`](#Unicode), [`Precision`](#Precision), [`Scale`](#Scale), [`SRID`](#SRID), and [`DefaultValue`](#DefaultValue). From 57535b30d431a6a592858628263190e95ad26ba8 Mon Sep 17 00:00:00 2001 From: D024504 Date: Thu, 19 Oct 2023 13:08:23 +0200 Subject: [PATCH 37/74] Make type facets appear in Appendix B --- docs/odata-csdl-json/odata-csdl-json.html | 435 ++++++++-------- docs/odata-csdl-json/odata-csdl-json.md | 417 +++++++-------- docs/odata-csdl-xml/odata-csdl-xml.html | 595 +++++++++++----------- docs/odata-csdl-xml/odata-csdl-xml.md | 589 ++++++++++----------- odata-csdl/1 Introduction.md | 2 + 5 files changed, 1036 insertions(+), 1002 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index 1245a461f..d6f693ed4 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -627,18 +627,19 @@

      3.4 Type Facets<

      3.4.1 MaxLength

      A positive integer value specifying the maximum length of a binary, stream or string value. For binary or stream values this is the octet length of the binary data, for string values it is the character length (number of code points for Unicode).

      If no maximum length is specified, clients SHOULD expect arbitrary length.

      -
      -

      $MaxLength

      +
      +

      Type Facets

      +

      $MaxLength

      The value of $MaxLength is a positive integer.

      Note: OData-CSDL-XML defines a symbolic value max that is only allowed in OData 4.0 responses. This symbolic value is not allowed in CDSL JSON documents at all. Services MAY instead specify the concrete maximum length supported for the type by the service or omit the member entirely.

      -
      +

      3.4.2 Precision

      For a decimal value: the maximum number of significant decimal digits of the model element's value; it MUST be a positive integer.

      For a temporal value (datetime-with-timezone-offset, duration, or time-of-day): the number of decimal places allowed in the seconds portion of the value; it MUST be a non-negative integer between zero and twelve.

      Note: service authors SHOULD be aware that some clients are unable to support a precision greater than 28 for decimal values and 7 for temporal values. Client developers MUST be aware of the potential for data loss when round-tripping values of greater precision. Updating via PATCH and exclusively specifying modified values will reduce the risk for unintended data loss.

      Note: model elements with duration values and a granularity less than seconds (e.g. minutes, hours, days) can be annotated with term Measures.DurationGranularity, see OData-VocMeasures.

      -

      $Precision

      +

      $Precision

      The value of $Precision is a number.

      Absence of $Precision means arbitrary precision.

      @@ -658,7 +659,7 @@

      3.4.3 Scale

      The value of Scale MUST be less than or equal to the value of Precision.

      Note: if the underlying data store allows negative scale, services may use a Precision with the absolute value of the negative scale added to the actual number of significant decimal digits, and client-provided values may have to be rounded before being stored.

      -

      $Scale

      +

      $Scale

      The value of $Scale is a number or a string with one of the symbolic values floating or variable.

      Services SHOULD use lower-case values; clients SHOULD accept values in a case-insensitive manner.

      Absence of $Scale means variable.

      @@ -706,7 +707,7 @@

      3.4.4 Unicode

      For a string-typed model element the Unicode facet indicates whether the it might contain and accept string values with Unicode characters (code points) beyond the ASCII character set. The value false indicates that the it will only contain and accept string values with characters limited to the ASCII character set.

      If no value is specified, the Unicode facet defaults to true.

      -

      $Unicode

      +

      $Unicode

      The value of $Unicode is one of the Boolean literals true or false. Absence of the member means true.

      3.4.5 SRID

      @@ -714,7 +715,7 @@

      3.4.5 SRID

      The value of the SRID facet MUST be a non-negative integer or the special value variable. If no value is specified, the facet defaults to 0 for Geometry types or 4326 for Geography types.

      The valid values of the SRID facet and their meanings are as defined by the European Petroleum Survey Group EPSG.

      -

      $SRID

      +

      $SRID

      The value of $SRID is a string containing a number or the symbolic value variable.

      3.5 Built-In Abstract Types

      @@ -778,14 +779,14 @@

      -

      Document Object

      +

      Document Object

      A CSDL JSON document consists of a single JSON object. This document object MUST contain the member $Version.

      The document object MAY contain the member $Reference to reference other CSDL documents.

      It also MAY contain members for schemas.

      If the CSDL JSON document is the metadata document of an OData service, the document object MUST contain the member $EntityContainer.

      -

      $Version

      +

      $Version

      The value of $Version is a string containing either 4.0 or 4.01.

      -

      $EntityContainer

      +

      $EntityContainer

      The value of $EntityContainer is the namespace-qualified name of the entity container of that service. This is the only place where a model element MUST be referenced with its namespace-qualified name and use of the alias-qualified name is not allowed.

  • @@ -804,9 +805,9 @@

    4.1 ReferenceA reference MAY be annotated.

    The Core.SchemaVersion annotation, defined in OData-VocCore, MAY be used to indicate a particular version of the referenced document. If the Core.SchemaVersion annotation is present, the $schemaversion system query option, defined OData-Protocol, SHOULD be used when retrieving the referenced schema document.

    -

    $Reference

    +

    $Reference

    The value of $Reference is an object that contains one member per referenced CSDL document. The name of the pair is a URI for the referenced document. The URI MAY be relative to the document containing the $Reference. The value of each member is a reference object.

    -

    Reference Object

    +

    Reference Object

    The reference object MAY contain the members $Include and $IncludeAnnotations as well as annotations.

    @@ -838,12 +839,12 @@

    4.2

    The alias MUST NOT be one of the reserved values Edm, odata, System, or Transient.

    An alias is only valid within the document in which it is declared; a referencing document may define its own aliases for included schemas.

    -

    $Include

    +

    $Include

    The value of $Include is an array. Array items are objects that MUST contain the member $Namespace and MAY contain the member $Alias.

    The item objects MAY contain annotations.

    -

    $Namespace

    +

    $Namespace

    The value of $Namespace is a string containing the namespace of the included schema.

    -

    $Alias

    +

    $Alias

    The value of $Alias is a string containing the alias for the included schema.

    @@ -888,13 +889,13 @@

    target MAY be specified. If a target namespace is specified, only those annotations which apply a term form the specified term namespace to a model element of the target namespace (with the specified qualifier, if present) SHOULD be included. If no target namespace is specified, all annotations within the referenced document from the specified term namespace (taking into account the qualifier, if present) SHOULD be included.

    The target namespace also provides consumers insight about what namespaces are present in the referenced document. If the consumer is not interested in that particular target namespace, the consumer can opt not to inspect the referenced document.

    -

    $IncludeAnnotations

    +

    $IncludeAnnotations

    The value of $IncludeAnnotations is an array. Array items are objects that MUST contain the member $TermNamespace and MAY contain the members $Qualifier and $TargetNamespace.

    -

    $TermNamespace

    +

    $TermNamespace

    The value of $TermNamespace is a namespace.

    -

    $Qualifier

    +

    $Qualifier

    The value of $Qualifier is a simple identifier.

    -

    $TargetNamespace

    +

    $TargetNamespace

    The value of $TargetNamespace is a namespace.

    @@ -943,7 +944,7 @@

    5 Schema

    Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

    The namespace MUST NOT be one of the reserved values Edm, odata, System, or Transient.

    -

    Schema Object

    +

    Schema Object

    A schema is represented as a member of the document object whose name is the schema namespace. Its value is an object that MAY contain the members $Alias and $Annotations.

    The schema object MAY contain members representing entity types, complex types, enumeration types, type definitions, actions, functions, terms, and an entity container.

    The schema object MAY also contain annotations that apply to the schema itself.

    @@ -954,7 +955,7 @@

    5.1 Alias

    Aliases are document-global, so all schemas defined within or included into a document MUST have different aliases, and aliases MUST differ from the namespaces of all schemas defined within or included into a document. Aliases defined by a schema can be used throughout the containing document and are not restricted to the schema that defines them.

    The alias MUST NOT be one of the reserved values Edm, odata, System, or Transient.

    -

    $Alias

    +

    $Alias

    The value of $Alias is a string containing the alias for the schema.

    @@ -971,7 +972,7 @@

    $Alias

    5.2 Annotations with External Targeting

    -

    $Annotations

    +

    $Annotations

    The value of $Annotations is an object with one member per annotation target. The member name is a path identifying the annotation target, the member value is an object containing annotations for that target.

    @@ -993,7 +994,7 @@

    6 Entity Type

    An entity type can define two types of properties. A structural property is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A navigation property is a named reference to another entity type or collection of entity types.

    All properties MUST have a unique name within an entity type. Properties MUST NOT have the same name as the declaring entity type. They MAY have the same name as one of the direct or indirect base types or derived types.

    -

    Entity Type Object

    +

    Entity Type Object

    An entity type is represented as a member of the schema object whose name is the unqualified name of the entity type and whose value is an object.

    The entity type object MUST contain the member $Kind with a string value of EntityType.

    It MAY contain the members $BaseType, $Abstract, $OpenType, $HasStream, and $Key.

    @@ -1021,7 +1022,7 @@

    key as well as structural and navigation properties of its base type.

    An entity type MUST NOT introduce an inheritance cycle by specifying a base type.

    -

    $BaseType

    +

    $BaseType

    The value of $BaseType is the qualified name of the base type.

    @@ -1049,7 +1050,7 @@

    key or derive from a base type with a defined key.

    An abstract entity type MUST NOT inherit from a non-abstract entity type.

    -

    $Abstract

    +

    $Abstract

    The value of $Abstract is one of the Boolean literals true or false. Absence of the member means false.

    6.3 Open Entity Type

    @@ -1057,7 +1058,7 @@

    6.3

    An entity type derived from an open entity type MUST indicate that it is also open.

    Note: structural and navigation properties MAY be returned by the service on instances of any structured type, whether or not the type is marked as open. Clients MUST always be prepared to deal with additional properties on instances of any structured type, see OData-Protocol.

    -

    $OpenType

    +

    $OpenType

    The value of $OpenType is one of the Boolean literals true or false. Absence of the member means false.

    6.4 Media Entity Type

    @@ -1065,7 +1066,7 @@

    An entity type derived from a media entity type MUST indicate that it is also a media entity type.

    Media entity types MAY specify a list of acceptable media types using an annotation with term Core.AcceptableMediaTypes, see OData-VocCore.

    -

    $HasStream

    +

    $HasStream

    The value of $HasStream is one of the Boolean literals true or false. Absence of the member means false.

    6.5 Key

    @@ -1097,7 +1098,7 @@

    6.5 Key

    An alias MUST NOT be defined if the key property is a primitive property of the entity type itself.

    For key properties that are a property of a complex or navigation property, the alias MUST be used in the key predicate of URLs instead of the path to the property because the required percent-encoding of the forward slash separating segments of the path to the property would make URL construction and parsing rather complicated. The alias MUST NOT be used in the query part of URLs, where paths to properties don't require special encoding and are a standard constituent of expressions anyway.

    -

    $Key

    +

    $Key

    The value of $Key is an array with one item per key property.

    Key properties without a key alias are represented as strings containing the property name.

    Key properties with a key alias are represented as objects with one member whose name is the key alias and whose value is a string containing the path to the property.

    @@ -1182,7 +1183,7 @@

    simple identifier. It is used when referencing, serializing or deserializing the property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any navigation property in any of its base types. If a structural property with the same name is defined in any of this type's base types, then the property's type MUST be a type derived from the type specified for the property of the base type and constrains this property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type's base types for OData 4.0 responses.

    Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

    -

    Property Object

    +

    Property Object

    Structural properties are represented as members of the object representing a structured type. The member name is the property name, the member value is an object.

    The property object MAY contain the member $Kind with a string value of Property. This member SHOULD be omitted to reduce document size.

    It MAY contain the members $Type, $Collection, $Nullable, $MaxLength, $Unicode, $Precision, $Scale, $SRID, and $DefaultValue.

    @@ -1208,7 +1209,7 @@

    7.1 Type

    A collection-valued property MAY be annotated with the Core.Ordered term, defined in OData-VocCore, to specify that it supports a stable ordering.

    A collection-valued property MAY be annotated with the Core.PositionalInsert term, defined in OData-VocCore, to specify that it supports inserting items into a specific ordinal position.

    -

    $Type and $Collection

    +

    $Type and $Collection

    For single-valued properties the value of $Type is the qualified name of the property's type.

    For collection-valued properties the value of $Type is the qualified name of the property's item type, and the member $Collection MUST be present with the literal value true.

    Absence of the $Type member means the type is Edm.String. This member SHOULD be omitted for string properties to reduce document size.

    @@ -1222,7 +1223,7 @@

    $Type and 7.2 Nullable

    A Boolean value specifying whether the property can have the value null.

    -

    $Nullable

    +

    $Nullable

    The value of $Nullable is one of the Boolean literals true or false. Absence of the member means false.

    For single-valued properties the value true means that the property allows the null value.

    For collection-valued properties the value will always be a collection that MAY be empty. In this case $Nullable applies to items of the collection and specifies whether the collection MAY contain null values.

    @@ -1231,7 +1232,7 @@

    7.3 Defaul

    A primitive- or enumeration-typed model element MAY define a default value that is used if it is not explicitly represented in an annotation or the body of a request or response.

    If no value is specified, the client SHOULD NOT assume a default value.

    -

    $DefaultValue

    +

    $DefaultValue

    The value of $DefaultValue is the type-specific JSON representation of the default value of the property, see OData-JSON. For properties of type Edm.Decimal and Edm.Int64 the representation depends on the media type parameter IEEE754Compatible.


    @@ -1240,7 +1241,7 @@

    simple identifier. It is used when referencing, serializing or deserializing the navigation property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any structural property in any of its base types. If a navigation property with the same name is defined in any of this type's base types, then the navigation property's type MUST be a type derived from the type specified for the navigation property of the base type, and constrains this navigation property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type's base types for OData 4.0 responses.

    Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

    -

    Navigation Property Object

    +

    Navigation Property Object

    Navigation properties are represented as members of the object representing a structured type. The member name is the property name, the member value is an object.

    The navigation property object MUST contain the member $Kind with a string value of NavigationProperty.

    It MUST contain the member $Type, and it MAY contain the members $Collection, $Nullable, $Partner, $ContainsTarget, $ReferentialConstraint, and $OnDelete.

    @@ -1285,7 +1286,7 @@

    Core.Ordered term, defined in OData-VocCore, to specify that it supports a stable ordering.

    A collection-valued navigation property MAY be annotated with the Core.PositionalInsert term, defined in OData-VocCore, to specify that it supports inserting items into a specific ordinal position.

    -

    $Type and $Collection

    +

    $Type and $Collection

    For single-valued navigation properties the value of $Type is the qualified name of the navigation property's type.

    For collection-valued navigation properties the value of $Type is the qualified name of the navigation property's item type, and the member $Collection MUST be present with the literal value true.

    @@ -1293,7 +1294,7 @@

    A Boolean value specifying whether the declaring type MAY have no related entity. If false, instances of the declaring structured type MUST always have a related entity.

    Nullable MUST NOT be specified for a collection-valued navigation property, a collection is allowed to have zero items.

    -

    $Nullable

    +

    $Nullable

    The value of $Nullable is one of the Boolean literals true or false. Absence of the member means false.

    8.3 Partner Navigation Property

    @@ -1303,7 +1304,7 @@

    If no partner navigation property is specified, no assumptions can be made as to whether one of the navigation properties on the target type will lead back to the source entity.

    If a partner navigation property is specified, this partner navigation property MUST either specify the current navigation property as its partner to define a bi-directional relationship or it MUST NOT specify a partner navigation property. The latter can occur if the partner navigation property is defined on a complex type, or if the current navigation property is defined on a type derived from the type of the partner navigation property.

    -

    $Partner

    +

    $Partner

    The value of $Partner is a string containing the path to the partner navigation property.

    8.4 Containment Navigation Property

    @@ -1320,7 +1321,7 @@

    -

    $ContainsTarget

    +

    $ContainsTarget

    The value of $ContainsTarget is one of the Boolean literals true or false. Absence of the member means false.

    8.5 Referential Constraint

    @@ -1330,7 +1331,7 @@

    -

    $ReferentialConstraint

    +

    $ReferentialConstraint

    The value of $ReferentialConstraint is an object with one member per referential constraint. The member name is the path to the dependent property, this path is relative to the structured type declaring the navigation property. The member value is a string containing the path to the principal property, this path is relative to the entity type that is the target of the navigation property.

    It also MAY contain annotations. These are prefixed with the path of the dependent property of the annotated referential constraint.

    @@ -1375,7 +1376,7 @@

    8.6

    If no on-delete action is specified, the action taken by the service is not predictable by the client and could vary per entity.

    -

    $OnDelete

    +

    $OnDelete

    The value of $OnDelete is a string with one of the values Cascade, None, SetNull, or SetDefault.

    Annotations for $OnDelete are prefixed with $OnDelete.

    @@ -1401,7 +1402,7 @@

    9 Complex Type

    A complex type can define two types of properties. A structural property is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A navigation property is a named reference to an entity type or a collection of entity types.

    All properties MUST have a unique name within a complex type. Properties MUST NOT have the same name as the declaring complex type. They MAY have the same name as one of the direct or indirect base types or derived types.

    -

    Complex Type Object

    +

    Complex Type Object

    A complex type is represented as a member of the schema object whose name is the unqualified name of the complex type and whose value is an object.

    The complex type object MUST contain the member $Kind with a string value of ComplexType. It MAY contain the members $BaseType, $Abstract, and $OpenType. It also MAY contain members representing structural properties and navigation properties as well as annotations.

    @@ -1447,13 +1448,13 @@

    section 14.2.

    -

    $BaseType

    +

    $BaseType

    The value of $BaseType is the qualified name of the base type.

    9.2 Abstract Complex Type

    A complex type MAY indicate that it is abstract and cannot have instances.

    -

    $Abstract

    +

    $Abstract

    The value of $Abstract is one of the Boolean literals true or false. Absence of the member means false.

    9.3 Open Complex Type

    @@ -1461,7 +1462,7 @@

    A complex type derived from an open complex type MUST indicate that it is also open.

    Note: structural and navigation properties MAY be returned by the service on instances of any structured type, whether or not the type is marked as open. Clients MUST always be prepared to deal with additional properties on instances of any structured type, see OData‑Protocol.

    -

    $OpenType

    +

    $OpenType

    The value of $OpenType is one of the Boolean literals true or false. Absence of the member means false.


    @@ -1471,7 +1472,7 @@

    1

    Although enumeration types have an underlying numeric value, the preferred representation for an enumeration value is the member name. Discrete sets of numeric values should be represented as numeric values annotated with the AllowedValues annotation defined in OData-VocCore.

    Enumeration types marked as flags allow values that consist of more than one enumeration member at a time.

    -

    Enumeration Type Object

    +

    Enumeration Type Object

    An enumeration type is represented as a member of the schema object whose name is the unqualified name of the enumeration type and whose value is an object.

    The enumeration type object MUST contain the member $Kind with a string value of EnumType.

    It MAY contain the members $UnderlyingType and $IsFlags.

    @@ -1494,14 +1495,14 @@

    -

    $UnderlyingType

    +

    $UnderlyingType

    The value of $UnderlyingType is the qualified name of the underlying type.

    10.2 Flags Enumeration Type

    An enumeration type MAY indicate that the enumeration type allows multiple members to be selected simultaneously.

    If not explicitly specified, only one enumeration type member MAY be selected simultaneously.

    -

    $IsFlags

    +

    $IsFlags

    The value of $IsFlags is one of the Boolean literals true or false. Absence of the member means false.

    @@ -1532,7 +1533,7 @@

    -

    Enumeration Member Object

    +

    Enumeration Member Object

    Enumeration type members are represented as JSON object members, where the object member name is the enumeration member name and the object member value is the enumeration member value.

    For members of flags enumeration types a combined enumeration member value is equivalent to the bitwise OR of the discrete values.

    Annotations for enumeration members are prefixed with the enumeration member name.

    @@ -1557,7 +1558,7 @@

    11 T

    Type definitions can be used wherever a primitive type is used (other than as the underlying type in a new type definition) and are type-comparable with their underlying types and any type definitions defined using the same underlying type.

    It is up to the definition of a term to specify whether and how annotations with this term propagate to places where the annotated type definition is used, and whether they can be overridden.

    -

    Type Definition Object

    +

    Type Definition Object

    A type definition is represented as a member of the schema object whose name is the unqualified name of the type definition and whose value is an object.

    The type definition object MUST contain the member $Kind with a string value of TypeDefinition and the member $UnderlyingType. It MAY contain the members $MaxLength, $Unicode, $Precision, $Scale, and $SRID, and it MAY contain annotations.

    @@ -1588,7 +1589,7 @@

    Type Defini

    11.1 Underlying Primitive Type

    The underlying type of a type definition MUST be a primitive type that MUST NOT be another type definition.

    -

    $UnderlyingType

    +

    $UnderlyingType

    The value of $UnderlyingType is the qualified name of the underlying type.

    The type definition MAY specify facets applicable to the underlying type. Possible facets are: $MaxLength, $Unicode, $Precision, $Scale, or $SRID.

    @@ -1608,7 +1609,7 @@

    Unbound actions do not support overloads. The names of all unbound actions MUST be unique within a schema.

    An unbound action MAY have the same name as a bound action.

    -

    Action Overload Object

    +

    Action Overload Object

    An action is represented as a member of the schema object whose name is the unqualified name of the action and whose value is an array. The array contains one object per action overload.

    The action overload object MUST contain the member $Kind with a string value of Action.

    It MAY contain the members $IsBound, $EntitySetPath, $Parameter, and $ReturnType, and it MAY contain annotations.

    @@ -1635,7 +1636,7 @@

    type definitions can be used to disambiguate overloads for both bound and unbound functions, even if they specify the same underlying type.

    -

    Function Overload Object

    +

    Function Overload Object

    A function is represented as a member of the schema object whose name is the unqualified name of the function and whose value is an array. The array contains one object per function overload.

    The function overload object MUST contain the member $Kind with a string value of Function.

    It MUST contain the member $ReturnType, and it MAY contain the members $IsBound, $EntitySetPath, and $Parameter, and it MAY contain annotations.

    @@ -1646,7 +1647,7 @@

    action import.

    Unbound functions are invoked as static functions within a common expression (see OData-URL, section 5.1.1), or from the entity container through a function import.

    -

    $IsBound

    +

    $IsBound

    The value of $IsBound is one of the Boolean literals true or false. Absence of the member means false.

    12.6 Entity Set Path

    @@ -1655,14 +1656,14 @@

    12.6

    The first segment of the entity set path MUST be the name of the binding parameter. The remaining segments of the entity set path MUST represent navigation segments or type casts.

    A navigation segment names the simple identifier of the navigation property to be traversed. A type-cast segment names the qualified name of the entity type that should be returned from the type cast.

    -

    $EntitySetPath

    +

    $EntitySetPath

    The value of $EntitySetPath is a string containing the entity set path.

    12.7 Composable Function

    A function MAY indicate that it is composable. If not explicitly indicated, it is not composable.

    A composable function can be invoked with additional path segments or key predicates appended to the resource path that identifies the composable function, and with system query options as appropriate for the type returned by the composable function.

    -

    $IsComposable

    +

    $IsComposable

    The value of $IsComposable is one of the Boolean literals true or false. Absence of the member means false.

    12.8 Return Type

    @@ -1670,14 +1671,14 @@

    12.8 Return Typ

    The facets MaxLength, Precision, Scale, and SRID can be used as appropriate to specify value restrictions of the return type, as well as the Unicode facet for 4.01 and greater payloads.

    For a single-valued return type the facets apply to the returned value. For a collection-valued return type the facets apply to the items in the returned collection.

    -

    $ReturnType

    +

    $ReturnType

    The value of $ReturnType is an object. It MAY contain the members $Type, $Collection, $Nullable, $MaxLength, $Unicode, $Precision, $Scale, and $SRID.

    It also MAY contain annotations.

    -

    $Type and $Collection

    +

    $Type and $Collection

    For single-valued return types the value of $Type is the qualified name of the returned type.

    For collection-valued return types the value of $Type is the qualified name of the returned item type, and the member $Collection MUST be present with the literal value true.

    Absence of the $Type member means the type is Edm.String.

    -

    $Nullable

    +

    $Nullable

    The value of $Nullable is one of the Boolean literals true or false. Absence of the member means false.

    If the return type is a collection of entity types, the $Nullable member has no meaning and MUST NOT be specified.

    For other collection-valued return types the result will always be a collection that MAY be empty. In this case $Nullable applies to items of the collection and specifies whether the collection MAY contain null values.

    @@ -1691,18 +1692,18 @@

    12.9 Parameter<

    The facets MaxLength, Precision, Scale, or SRID can be used as appropriate to specify value restrictions of the parameter, as well as the Unicode facet for 4.01 and greater payloads.

    For single-valued parameters the facets apply to the parameter value. If the parameter value is a collection, the facets apply to the items in the collection.

    -

    $Parameter

    +

    $Parameter

    The value of $Parameter is an array. The array contains one object per parameter.

    -

    Parameter Object

    +

    Parameter Object

    A parameter object MUST contain the member $Name, and it MAY contain the members $Type, $Collection, $Nullable, $MaxLength, $Unicode, $Precision, $Scale, and $SRID.

    Parameter objects MAY also contain annotations.

    -

    $Name

    +

    $Name

    The value of $Name is a string containing the parameter name.

    -

    $Type and $Collection

    +

    $Type and $Collection

    For single-valued parameters the value of $Type is the qualified name of the accepted type.

    For collection-valued parameters the value of $Type is the qualified name of the accepted item type, and the member $Collection MUST be present with the literal value true.

    Absence of the $Type member means the type is Edm.String.

    -

    $Nullable

    +

    $Nullable

    The value of $Nullable is one of the Boolean literals true or false. Absence of the member means false.

    For single-valued parameters the value true means that the parameter accepts a null value.

    For collection-valued parameters the parameter value will always be a collection that MAY be empty. In this case $Nullable applies to items of the collection and specifies whether the collection MAY contain null values.

    @@ -1773,7 +1774,7 @@

    1

    A singleton allows addressing a single entity directly from the entity container without having to know its key, and without requiring an entity set.

    A function import or an action import is used to expose a function or action defined in an entity model as a top level resource.

    -

    Entity Container Object

    +

    Entity Container Object

    An entity container is represented as a member of the schema object whose name is the unqualified name of the entity container and whose value is an object.

    The entity container object MUST contain the member $Kind with a string value of EntityContainer.

    The entity container object MAY contain the member $Extends, members representing entity sets, singletons, action imports, and function imports, as well as annotations.

    @@ -1823,7 +1824,7 @@

    If the "extending" entity container defines an entity set with the same name as defined in any of its "base" containers, then the entity set's type MUST specify an entity type derived from the entity type specified for the identically named entity set in the "base" container. The same holds for singletons. Action imports and function imports cannot be redefined, nor can the "extending" container define a child with the same name as a child of a different kind in a "base" container.

    Note: services should not introduce cycles by extending entity containers. Clients should be prepared to process cycles introduced by extending entity containers.

    -

    $Extends

    +

    $Extends

    The value of $Extends is the qualified name of the entity container to be extended.

    @@ -1842,15 +1843,15 @@

    13.2 Entity SetAn entity set MAY indicate whether it is included in the service document. If not explicitly indicated, it is included.

    Entity sets that cannot be queried without specifying additional query options SHOULD NOT be included in the service document.

    -

    Entity Set Object

    +

    Entity Set Object

    An entity set is represented as a member of the entity container object whose name is the name of the entity set and whose value is an object.

    The entity set object MUST contain the members $Collection and $Type.

    It MAY contain the members $IncludeInServiceDocument and $NavigationPropertyBinding as well as annotations.

    -

    $Collection

    +

    $Collection

    The value of $Collection is the Booelan value true.

    -

    $Type

    +

    $Type

    The value of $Type is the qualified name of an entity type.

    -

    $IncludeInServiceDocument

    +

    $IncludeInServiceDocument

    The value of $IncludeInServiceDocument is one of the Boolean literals true or false. Absence of the member means true.

    13.3 Singleton

    @@ -1859,13 +1860,13 @@

    13.3 Singleton<

    A singleton MUST specify a type that MUST be an entity type in scope.

    A singleton MUST reference an instance its entity type.

    -

    Singleton Object

    +

    Singleton Object

    A singleton is represented as a member of the entity container object whose name is the name of the singleton and whose value is an object.

    The singleton object MUST contain the member $Type and it MAY contain the member $Nullable.

    It MAY contain the member $NavigationPropertyBinding as well as annotations.

    -

    $Type

    +

    $Type

    The value of $Type is the qualified name of an entity type.

    -

    $Nullable

    +

    $Nullable

    The value of $Nullable is one of the Boolean literals true or false. Absence of the member means false.In OData 4.0 responses this member MUST NOT be specified.

    13.4 Navigation Property Binding

    @@ -1884,7 +1885,7 @@

    13.4.

    If the target is a simple identifier, it MUST resolve to an entity set or singleton defined in the same entity container.

    If the target is a target path, it MUST resolve to an entity set, singleton, or direct or indirect containment navigation property of a singleton in scope. The path can traverse single-valued containment navigation properties or single-valued complex properties before ending in a containment navigation property, and there MUST NOT be any non-containment navigation properties prior to the final segment.

    -

    $NavigationPropertyBinding

    +

    $NavigationPropertyBinding

    The value of $NavigationPropertyBinding is an object. It consists of members whose name is the navigation property binding path and whose value is a string containing the navigation property binding target. If the target is in the same entity container, the target MUST NOT be prefixed with the qualified entity container name.

    @@ -1923,14 +1924,14 @@

    13.5 Acti

    An action import MUST specify the name of an unbound action in scope.

    If the imported action returns an entity or a collection of entities, a simple identifier or target path value MAY be specified to identify the entity set that contains the returned entities. If a simple identifier is specified, it MUST resolve to an entity set defined in the same entity container. If a target path is specified, it MUST resolve to an entity set in scope.

    -

    Action Import Object

    +

    Action Import Object

    An action import is represented as a member of the entity container object whose name is the name of the action import and whose value is an object.

    The action import object MUST contain the member $Action.

    It MAY contain the member $EntitySet.

    It MAY also contain annotations.

    -

    $Action

    +

    $Action

    The value of $Action is a string containing the qualified name of an unbound action.

    -

    $EntitySet

    +

    $EntitySet

    The value of $EntitySet is a string containing either the unqualified name of an entity set in the same entity container or a path to an entity set in a different entity container.

    13.6 Function Import

    @@ -1940,16 +1941,16 @@

    13.

    If the imported function returns an entity or a collection of entities, a simple identifier or target path value MAY be specified to identify the entity set that contains the returned entities. If a simple identifier is specified, it MUST resolve to an entity set defined in the same entity container. If a target path is specified, it MUST resolve to an entity set in scope.

    A function import for a parameterless function MAY indicate whether it is included in the service document. If not explicitly indicated, it is not included.

    -

    Function Import Object

    +

    Function Import Object

    A function import is represented as a member of the entity container object whose name is the name of the function import and whose value is an object.

    The function import object MUST contain the member $Function.

    It MAY contain the members $EntitySet and $IncludeInServiceDocument.

    It MAY also contain annotations.

    -

    $Function

    +

    $Function

    The value of $Function is a string containing the qualified name of an unbound function.

    -

    $EntitySet

    +

    $EntitySet

    The value of $EntitySet is a string containing either the unqualified name of an entity set in the same entity container or a path to an entity set in a different entity container.

    -

    $IncludeInServiceDocument

    +

    $IncludeInServiceDocument

    The value of $IncludeInServiceDocument is one of the Boolean literals true or false. Absence of the member means false.


    @@ -2008,20 +2009,20 @@

    14.1 Term

    The term's name is a simple identifier that MUST be unique within its schema.

    The term's type MUST be a type in scope, or a collection of a type in scope.

    -

    Term Object

    +

    Term Object

    A term is represented as a member of the schema object whose name is the unqualified name of the term and whose value is an object.

    The term object MUST contain the member $Kind with a string value of Term.

    It MAY contain the members $Type, $Collection, $Nullable, $DefaultValue, $BaseTerm, $AppliesTo, $MaxLength, $Precision, $Scale, and $SRID, as well as $Unicode for 4.01 and greater payloads.

    It MAY contain annotations.

    -

    $Type and $Collection

    +

    $Type and $Collection

    For single-valued terms the value of $Type is the qualified name of the term's type.

    For collection-valued terms the value of $Type is the qualified name of the term's item type, and the member $Collection MUST be present with the literal value true.

    Absence of the $Type member means the type is Edm.String.

    -

    $Nullable

    +

    $Nullable

    The value of $Nullable is one of the Boolean literals true or false. Absence of the member means false.

    For single-valued terms the value true means that annotations may have the null value.

    For collection-valued terms the annotation value will always be a collection that MAY be empty. In this case $Nullable applies to items of the collection and specifies whether the collection MAY contain null values.

    -

    $DefaultValue

    +

    $DefaultValue

    The value of $DefaultValue is the type-specific JSON representation of the default value of the term, see OData-JSON.

    Note: the $DefaultValue member is purely for documentation and isomorphy to OData-CSDLXML. Annotations in CSDL JSON documents MUST always specify an explicit value.

    @@ -2029,7 +2030,7 @@

    A term MAY specialize another term in scope by specifying it as its base term.

    When applying a specialized term, the base term MUST also be applied with the same qualifier, and so on until a term without a base term is reached.

    -

    $BaseTerm

    +

    $BaseTerm

    The value of $BaseTerm is the qualified name of the base term.

    14.1.2 Applicability

    @@ -2177,7 +2178,7 @@

    14.1.2
    -

    $AppliesTo

    +

    $AppliesTo

    The value of $AppliesTo is an array whose items are strings containing symbolic values from the table above that identify model elements the term is intended to be applied to.

    @@ -2198,7 +2199,7 @@

    14.2 Annotation<

    An annotation applies a term to a model element and defines how to calculate a value for the term application. Both term and model element MUST be in scope. Section 14.1.2 specifies which model elements MAY be annotated with a term.

    The value of an annotation is specified as an annotation expression, which is either a constant expression representing a constant value, or a dynamic expression. The most common construct for assigning an annotation value is a path expression that refers to a property of the same or a related structured type.

    -

    Annotation Member

    +

    Annotation Member

    An annotation is represented as a member whose name consists of an at (@) character, followed by the qualified name of a term, optionally followed by a hash (#) and a qualifier.

    The value of the annotation MUST be a constant expression or dynamic expression.

    The annotation can be a member of the object representing the model element it annotates, or a second-level member of the $Annotations member of a schema object.

    @@ -2637,7 +2638,7 @@

    14.4.1.7 Value P

    The value path expression allows assigning a value by traversing an object graph. It can be used in annotations that target entity containers, entity sets, entity types, complex types, navigation properties of structured types, and structural properties of structured types. Its argument is an instance path.

    The value of the path expression is the instance or collection of instances identified by the path.

    -

    $Path

    +

    $Path

    Path expressions are represented as an object with a single member $Path whose value is a string containing a path.

    @@ -2672,13 +2673,13 @@

    OData-URL.

    The other comparison operators require two operand expressions that evaluate to comparable values.

    -

    $And and $Or

    +

    $And and $Or

    The And and Or logical expressions are represented as an object with a single member whose value is an array with two annotation expressions. The member name is one of $And, or $Or.

    It MAY contain annotations.

    -

    $Not

    +

    $Not

    Negation expressions are represented as an object with a single member $Not whose value is an annotation expression.

    It MAY contain annotations.

    -

    $Eq, $Ne, $Gt, $Ge, $Lt, $Le, $Has, and $In

    +

    $Eq, $Ne, $Gt, $Ge, $Lt, $Le, $Has, and $In

    All comparison expressions are represented as an object with a single member whose value is an array with two annotation expressions. The member name is one of $Eq, $Ne, $Gt, $Ge, $Lt, $Le, $Has, or $In.

    They MAY contain annotations.

    @@ -2819,10 +2820,10 @@

    -

    $Neg

    +

    $Neg

    Negation expressions are represented as an object with a single member $Neg whose value is an annotation expression.

    It MAY contain annotations.

    -

    $Add, $Sub, $Mul, $Div, $DivBy, and $Mod

    +

    $Add, $Sub, $Mul, $Div, $DivBy, and $Mod

    These arithmetic expressions are represented as an object with as single member whose value is an array with two annotation expressions. The member name is one of $Add, $Sub, $Neg, $Mul, $Div, $DivBy, or $Mod.

    They MAY contain annotations.

    @@ -2897,7 +2898,7 @@

    14.4.4 Apply Client-Side Functions

    The apply expression enables a value to be obtained by applying a client-side function. The apply expression MAY have operand expressions. The operand expressions are used as parameters to the client-side function.

    -

    $Apply

    +

    $Apply

    Apply expressions are represented as an object with a member $Apply whose value is an array of annotation expressions, and a member $Function whose value is a string containing the qualified name of the client-side function to be applied.

    It MAY contain annotations.

    @@ -2990,7 +2991,7 @@

    14.4.5 Cast

    The cast expression casts the value obtained from its single child expression to the specified type. The cast expression follows the same rules as the cast canonical function defined in OData-URL.

    -

    $Cast

    +

    $Cast

    Cast expressions are represented as an object with a member $Cast whose value is an annotation expression, a member $Type whose value is a string containing the qualified type name, and optionally a member $Collection with a value of true.

    It MAY contain annotations.

    If the specified type is a primitive type or a collection of primitive types, the facet members $MaxLength, $Unicode, $Precision, $Scale, and $SRID MAY be specified if applicable to the specified primitive type. If the facet members are not specified, their values are considered unspecified.

    @@ -3023,7 +3024,7 @@

    14.4.7 If-The

    The second and third child expressions are evaluated conditionally. The result MUST be type compatible with the type expected by the surrounding expression.

    If the first expression evaluates to true, the second expression MUST be evaluated and its value MUST be returned as the result of the if-then-else expression. If the first expression evaluates to false and a third child element is present, it MUST be evaluated and its value MUST be returned as the result of the if-then-else expression. If no third expression is present, nothing is added to the surrounding collection.

    -

    $If

    +

    $If

    Conditional expressions are represented as an object with a member $If whose value is an array of two or three annotation expressions.

    It MAY contain annotations.

    @@ -3042,7 +3043,7 @@

    $If

    14.4.8 Is-Of

    The is-of expression checks whether the value obtained from its single child expression is compatible with the specified type. It returns true if the child expression returns a type that is compatible with the specified type, and false otherwise.

    -

    $IsOf

    +

    $IsOf

    Is-of expressions are represented as an object with a member $IsOf whose value is an annotation expression, a member $Type whose value is a string containing an qualified type name, and optionally a member $Collection with a value of true.

    It MAY contain annotations.

    If the specified type is a primitive type or a collection of primitive types, the facet members $MaxLength, $Unicode, $Precision, $Scale, and $SRID MAY be specified if applicable to the specified primitive type. If the facet members are not specified, their values are considered unspecified.

    @@ -3061,7 +3062,7 @@

    14

    A labeled element expression MUST contain exactly one child expression. The value of the child expression is also the value of the labeled element expression.

    A labeled element expression MUST provide a simple identifier value as its name that MUST be unique within the schema containing the expression.

    -

    $LabeledElement

    +

    $LabeledElement

    Labeled element expressions are represented as an object with a member $LabeledElement whose value is an annotation expression, and a member $Name whose value is a string containing the labeled element's name.

    It MAY contain annotations.

    @@ -3077,7 +3078,7 @@

    $LabeledEle

    14.4.10 Labeled Element Reference

    The labeled element reference expression MUST specify the qualified name of a labeled element expression in scope and returns the value of the identified labeled element expression as its value.

    -

    $LabeledElementReference

    +

    $LabeledElementReference

    Labeled element reference expressions are represented as an object with a member $LabeledElementReference whose value is a string containing an qualified name.

    @@ -3096,7 +3097,7 @@

    14.4.11 Null

    "@UI.DisplayName": null,
    -

    $Null

    +

    $Null

    Null expression containing annotations are represented as an object with a member $Null whose value is the literal null.

    @@ -3152,7 +3153,7 @@

    14.4.13

    The URL reference expression MUST contain exactly one expression of type Edm.String. Its value is treated as a URL that MAY be relative or absolute; relative URLs are relative to the URL of the document containing the URL reference expression, or relative to a base URL specified in a format-specific way.

    The response body of the GET request MUST be returned as the result of the URL reference expression. The result of the URL reference expression MUST be type compatible with the type expected by the surrounding expression.

    -

    $UrlRef

    +

    $UrlRef

    URL reference expressions are represented as an object with a single member $UrlRef whose value is an annotation expression.

    It MAY contain annotations.

    @@ -3570,152 +3571,160 @@

    [OpenUI5]

    Appendix B. Table of JSON Objects and Members

    diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 71c61813f..2163947e2 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -635,7 +635,8 @@ If no maximum length is specified, clients SHOULD expect arbitrary length. ::: {.varjson .rep} -### `$MaxLength` +### Type Facets +### `$MaxLength` The value of `$MaxLength` is a positive integer. @@ -670,7 +671,7 @@ Note: model elements with duration values and a granularity less than seconds see [OData-VocMeasures](#ODataVocMeasures). ::: {.varjson .rep} -### `$Precision` +### `$Precision` The value of `$Precision` is a number. @@ -721,7 +722,7 @@ scale added to the actual number of significant decimal digits, and client-provided values may have to be rounded before being stored. ::: {.varjson .rep} -### `$Scale` +### `$Scale` The value of `$Scale` is a number or a string with one of the symbolic values `floating` or `variable`. @@ -801,7 +802,7 @@ limited to the ASCII character set. If no value is specified, the `Unicode` facet defaults to `true`. ::: {.varjson .rep} -### `$Unicode` +### `$Unicode` The value of `$Unicode` is one of the Boolean literals `true` or `false`. Absence of the member means `true`. @@ -821,7 +822,7 @@ The valid values of the `SRID` facet and their meanings are as defined by the European Petroleum Survey Group [EPSG](#_EPSG). ::: {.varjson .rep} -### `$SRID` +### `$SRID` The value of `$SRID` is a string containing a number or the symbolic value `variable`. @@ -906,7 +907,7 @@ combination of term and qualifier. ::: {.varjson .rep} -### Document Object +### Document Object A CSDL JSON document consists of a single JSON object. This document object MUST contain the member `$Version`. @@ -916,11 +917,11 @@ It also MAY contain members for schemas. If the CSDL JSON document is the metadata document of an OData service, the document object MUST contain the member `$EntityContainer`. -### `$Version` +### `$Version` The value of `$Version` is a string containing either `4.0` or `4.01`. -### `$EntityContainer` +### `$EntityContainer` The value of `$EntityContainer` is the namespace-qualified name of the entity container of that service. This is the only place where a model element MUST be referenced with its namespace-qualified name and use of the alias-qualified name is not allowed. ::: @@ -965,14 +966,14 @@ annotation is present, the `$schemaversion` system query option, defined referenced schema document. ::: {.varjson .rep} -### `$Reference` +### `$Reference` The value of `$Reference` is an object that contains one member per referenced CSDL document. The name of the pair is a URI for the referenced document. The URI MAY be relative to the document containing the `$Reference`. The value of each member is a reference object. -### Reference Object +### Reference Object The reference object MAY contain the members [`$Include`](#IncludedSchema) and @@ -1039,19 +1040,19 @@ An alias is only valid within the document in which it is declared; a referencing document may define its own aliases for included schemas. ::: {.varjson .rep} -### `$Include` +### `$Include` The value of `$Include` is an array. Array items are objects that MUST contain the member `$Namespace` and MAY contain the member `$Alias`. The item objects MAY contain [annotations](#Annotation). -### `$Namespace` +### `$Namespace` The value of `$Namespace` is a string containing the namespace of the included schema. -### `$Alias` +### `$Alias` The value of `$Alias` is a string containing the alias for the included schema. @@ -1136,21 +1137,21 @@ not interested in that particular target namespace, the consumer can opt not to inspect the referenced document. ::: {.varjson .rep} -### `$IncludeAnnotations` +### `$IncludeAnnotations` The value of `$IncludeAnnotations` is an array. Array items are objects that MUST contain the member `$TermNamespace` and MAY contain the members `$Qualifier` and `$TargetNamespace`. -### `$TermNamespace` +### `$TermNamespace` The value of `$TermNamespace` is a namespace. -### `$Qualifier` +### `$Qualifier` The value of `$Qualifier` is a simple identifier. -### `$TargetNamespace` +### `$TargetNamespace` The value of `$TargetNamespace` is a namespace. ::: @@ -1229,7 +1230,7 @@ The namespace MUST NOT be one of the reserved values `Edm`, `odata`, `System`, or `Transient`. ::: {.varjson .rep} -### Schema Object +### Schema Object A schema is represented as a member of the document object whose name is the schema namespace. Its value is an object that MAY contain the @@ -1269,7 +1270,7 @@ The alias MUST NOT be one of the reserved values `Edm`, `odata`, `System`, or `Transient`. ::: {.varjson .rep} -### `$Alias` +### `$Alias` The value of `$Alias` is a string containing the alias for the schema. ::: @@ -1295,7 +1296,7 @@ description for the schema ## 5.2 Annotations with External Targeting ::: {.varjson .rep} -### `$Annotations` +### `$Annotations` The value of `$Annotations` is an object with one member per [annotation target](#Target). The member name is a path identifying the [annotation @@ -1346,7 +1347,7 @@ the same name as one of the direct or indirect base types or derived types. ::: {.varjson .rep} -### Entity Type Object +### Entity Type Object An entity type is represented as a member of the schema object whose name is the unqualified name of the entity type and whose value is an @@ -1398,7 +1399,7 @@ An entity type MUST NOT introduce an inheritance cycle by specifying a base type. ::: {.varjson .rep} -### `$BaseType` +### `$BaseType` The value of `$BaseType` is the qualified name of the base type. ::: @@ -1443,7 +1444,7 @@ An abstract entity type MUST NOT inherit from a non-abstract entity type. ::: {.varjson .rep} -### `$Abstract` +### `$Abstract` The value of `$Abstract` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -1467,7 +1468,7 @@ properties on instances of any structured type, see [OData-Protocol](#ODataProtocol). ::: {.varjson .rep} -### `$OpenType` +### `$OpenType` The value of `$OpenType` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -1496,7 +1497,7 @@ annotation with term see [OData-VocCore](#ODataVocCore). ::: {.varjson .rep} -### `$HasStream` +### `$HasStream` The value of `$HasStream `is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -1580,7 +1581,7 @@ used in the query part of URLs, where paths to properties don't require special encoding and are a standard constituent of expressions anyway. ::: {.varjson .rep} -### `$Key` +### `$Key` The value of `$Key` is an array with one item per key property. @@ -1712,7 +1713,7 @@ Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case. ::: {.varjson .rep} -### Property Object +### Property Object Structural properties are represented as members of the object representing a structured type. The member name is the property name, @@ -1767,7 +1768,7 @@ term, defined in [OData-VocCore](#ODataVocCore), to specify that it supports inserting items into a specific ordinal position. ::: {.varjson .rep} -### `$Type` and `$Collection` +### `$Type` and `$Collection` For single-valued properties the value of `$Type` is the qualified name of the property's type. @@ -1798,7 +1799,7 @@ A Boolean value specifying whether the property can have the value `null`. ::: {.varjson .rep} -### `$Nullable` +### `$Nullable` The value of `$Nullable` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -1822,7 +1823,7 @@ the body of a request or response. If no value is specified, the client SHOULD NOT assume a default value. ::: {.varjson .rep} -### `$DefaultValue` +### `$DefaultValue` The value of `$DefaultValue` is the type-specific JSON representation of the default value of the property, see @@ -1858,7 +1859,7 @@ Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case. ::: {.varjson .rep} -### Navigation Property Object +### Navigation Property Object Navigation properties are represented as members of the object representing a structured type. The member name is the property name, @@ -1941,7 +1942,7 @@ term, defined in [OData-VocCore](#ODataVocCore), to specify that it supports inserting items into a specific ordinal position. ::: {.varjson .rep} -### `$Type` and `$Collection` +### `$Type` and `$Collection` For single-valued navigation properties the value of `$Type` is the qualified name of the navigation property's type. @@ -1962,7 +1963,7 @@ Nullable MUST NOT be specified for a collection-valued navigation property, a collection is allowed to have zero items. ::: {.varjson .rep} -### `$Nullable` +### `$Nullable` The value of `$Nullable` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -2002,7 +2003,7 @@ navigation property is defined on a type derived from the type of the partner navigation property. ::: {.varjson .rep} -### `$Partner` +### `$Partner` The value of `$Partner` is a string containing the path to the partner navigation property. @@ -2077,7 +2078,7 @@ entity. This may lead to problems for clients if the contained entity can also be reached via a non-containment navigation path. ::: {.varjson .rep} -### `$ContainsTarget` +### `$ContainsTarget` The value of `$ContainsTarget` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -2110,7 +2111,7 @@ property and the principal property are not nullable, then the dependent property MUST NOT be nullable. ::: {.varjson .rep} -### `$ReferentialConstraint` +### `$ReferentialConstraint` The value of `$ReferentialConstraint` is an object with one member per referential constraint. The member name is the path to the dependent @@ -2187,7 +2188,7 @@ If no on-delete action is specified, the action taken by the service is not predictable by the client and could vary per entity. ::: {.varjson .rep} -### `$OnDelete` +### `$OnDelete` The value of `$OnDelete` is a string with one of the values `Cascade`, `None`, `SetNull`, or `SetDefault`. @@ -2243,7 +2244,7 @@ the same name as one of the direct or indirect base types or derived types. ::: {.varjson .rep} -### Complex Type Object +### Complex Type Object A complex type is represented as a member of the schema object whose name is the unqualified name of the complex type and whose value is an @@ -2314,7 +2315,7 @@ The rules for annotations of derived complex types are described in [section 14.2](#Annotation). ::: {.varjson .rep} -### `$BaseType` +### `$BaseType` The value of `$BaseType` is the qualified name of the base type. ::: @@ -2326,7 +2327,7 @@ A complex type MAY indicate that it is abstract and cannot have instances. ::: {.varjson .rep} -### `$Abstract` +### `$Abstract` The value of `$Abstract` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -2350,7 +2351,7 @@ properties on instances of any structured type, see [OData‑Protocol](#ODataProtocol). ::: {.varjson .rep} -### `$OpenType` +### `$OpenType` The value of `$OpenType` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -2378,7 +2379,7 @@ Enumeration types marked as flags allow values that consist of more than one enumeration member at a time. ::: {.varjson .rep} -### Enumeration Type Object +### Enumeration Type Object An enumeration type is represented as a member of the schema object whose name is the unqualified name of the enumeration type and whose @@ -2421,7 +2422,7 @@ An enumeration type MAY specify one of `Edm.Byte`, `Edm.SByte`, If not explicitly specified, `Edm.Int32` is used as the underlying type. ::: {.varjson .rep} -### `$UnderlyingType` +### `$UnderlyingType` The value of `$UnderlyingType` is the qualified name of the underlying type. @@ -2437,7 +2438,7 @@ If not explicitly specified, only one enumeration type member MAY be selected simultaneously. ::: {.varjson .rep} -### `$IsFlags` +### `$IsFlags` The value of `$IsFlags` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -2492,7 +2493,7 @@ selected members is the bitwise OR of the discrete numeric member values. ::: {.varjson .rep} -### Enumeration Member Object +### Enumeration Member Object Enumeration type members are represented as JSON object members, where the object member name is the enumeration member name and the object @@ -2546,7 +2547,7 @@ annotations with this term propagate to places where the annotated type definition is used, and whether they can be overridden. ::: {.varjson .rep} -### Type Definition Object +### Type Definition Object A type definition is represented as a member of the schema object whose name is the unqualified name of the type definition and whose value is @@ -2595,7 +2596,7 @@ The underlying type of a type definition MUST be a primitive type that MUST NOT be another type definition. ::: {.varjson .rep} -### `$UnderlyingType` +### `$UnderlyingType` The value of `$UnderlyingType` is the qualified name of the underlying type. @@ -2658,7 +2659,7 @@ schema. An unbound action MAY have the same name as a bound action. ::: {.varjson .rep} -### Action Overload Object +### Action Overload Object An action is represented as a member of the schema object whose name is the unqualified name of the action and whose value is an array. The @@ -2724,7 +2725,7 @@ disambiguate overloads for both bound and unbound functions, even if they specify the same underlying type. ::: {.varjson .rep} -### Function Overload Object +### Function Overload Object A function is represented as a member of the schema object whose name is the unqualified name of the function and whose value is an array. The @@ -2757,7 +2758,7 @@ Unbound functions are invoked as static functions within a common expression or from the entity container through a [function import](#FunctionImport). ::: {.varjson .rep} -### `$IsBound` +### `$IsBound` The value of `$IsBound` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -2784,7 +2785,7 @@ type-cast segment names the [qualified name](#QualifiedName) of the entity type that should be returned from the type cast. ::: {.varjson .rep} -### `$EntitySetPath` +### `$EntitySetPath` The value of `$EntitySetPath` is a string containing the entity set path. @@ -2802,7 +2803,7 @@ composable function, and with system query options as appropriate for the type returned by the composable function. ::: {.varjson .rep} -### `$IsComposable` +### `$IsComposable` The value of `$IsComposable` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -2824,7 +2825,7 @@ For a collection-valued return type the facets apply to the items in the returned collection. ::: {.varjson .rep} -### `$ReturnType` +### `$ReturnType` The value of `$ReturnType` is an object. It MAY contain the members `$Type`, `$Collection`, `$Nullable`, [`$MaxLength`](#MaxLength), @@ -2833,7 +2834,7 @@ and [`$SRID`](#SRID). It also MAY contain [annotations](#Annotation). -### `$Type` and `$Collection` +### `$Type` and `$Collection` For single-valued return types the value of `$Type` is the qualified name of the returned type. @@ -2844,7 +2845,7 @@ present with the literal value `true`. Absence of the `$Type` member means the type is `Edm.String`. -### `$Nullable` +### `$Nullable` The value of `$Nullable` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -2889,12 +2890,12 @@ the parameter value is a collection, the facets apply to the items in the collection. ::: {.varjson .rep} -### `$Parameter` +### `$Parameter` The value of `$Parameter` is an array. The array contains one object per parameter. -### Parameter Object +### Parameter Object A parameter object MUST contain the member `$Name`, and it MAY contain the members `$Type`, `$Collection`, `$Nullable`, @@ -2903,11 +2904,11 @@ the members `$Type`, `$Collection`, `$Nullable`, Parameter objects MAY also contain [annotations](#Annotation). -### `$Name` +### `$Name` The value of `$Name` is a string containing the parameter name. -### `$Type` and `$Collection` +### `$Type` and `$Collection` For single-valued parameters the value of `$Type` is the qualified name of the accepted type. @@ -2918,7 +2919,7 @@ present with the literal value `true`. Absence of the `$Type` member means the type is `Edm.String`. -### `$Nullable` +### `$Nullable` The value of `$Nullable` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -3042,7 +3043,7 @@ import*](#ActionImport) is used to expose a function or action defined in an entity model as a top level resource. ::: {.varjson .rep} -### Entity Container Object +### Entity Container Object An entity container is represented as a member of the schema object whose name is the unqualified name of the entity container and whose @@ -3123,7 +3124,7 @@ containers. Clients should be prepared to process cycles introduced by extending entity containers. ::: {.varjson .rep} -### `$Extends` +### `$Extends` The value of `$Extends` is the qualified name of the entity container to be extended. @@ -3165,7 +3166,7 @@ Entity sets that cannot be queried without specifying additional query options SHOULD NOT be included in the service document. ::: {.varjson .rep} -### Entity Set Object +### Entity Set Object An entity set is represented as a member of the entity container object whose name is the name of the entity set and whose value is an object. @@ -3177,15 +3178,15 @@ It MAY contain the members `$IncludeInServiceDocument` and [`$NavigationPropertyBinding`](#NavigationPropertyBinding) as well as [annotations](#Annotation). -### `$Collection` +### `$Collection` The value of `$Collection` is the Booelan value `true`. -### `$Type` +### `$Type` The value of `$Type` is the qualified name of an entity type. -### `$IncludeInServiceDocument` +### `$IncludeInServiceDocument` The value of `$IncludeInServiceDocument` is one of the Boolean literals `true` or `false`. Absence of the member means `true`. @@ -3205,7 +3206,7 @@ A singleton MUST specify a type that MUST be an entity type in scope. A singleton MUST reference an instance its entity type. ::: {.varjson .rep} -### Singleton Object +### Singleton Object A singleton is represented as a member of the entity container object whose name is the name of the singleton and whose value is an object. @@ -3217,11 +3218,11 @@ It MAY contain the member [`$NavigationPropertyBinding`](#NavigationPropertyBinding) as well as [annotations](#Annotation). -### `$Type` +### `$Type` The value of `$Type` is the qualified name of an entity type. -### `$Nullable` +### `$Nullable` The value of `$Nullable` is one of the Boolean literals `true` or `false`. Absence of the member means `false`.In OData 4.0 responses this @@ -3301,7 +3302,7 @@ before ending in a containment navigation property, and there MUST NOT be any non-containment navigation properties prior to the final segment. ::: {.varjson .rep} -### `$NavigationPropertyBinding` +### `$NavigationPropertyBinding` The value of `$NavigationPropertyBinding` is an object. It consists of members whose name is the navigation property binding path and whose @@ -3375,7 +3376,7 @@ container. If a [target path](#TargetPath) is specified, it MUST resolve to an entity set in scope. ::: {.varjson .rep} -### Action Import Object +### Action Import Object An action import is represented as a member of the entity container object whose name is the name of the action import and whose value is an @@ -3387,12 +3388,12 @@ It MAY contain the member `$EntitySet`. It MAY also contain [annotations](#Annotation). -### `$Action` +### `$Action` The value of `$Action` is a string containing the qualified name of an unbound action. -### `$EntitySet` +### `$EntitySet` The value of `$EntitySet` is a string containing either the unqualified name of an entity set in the same entity container or a path to an @@ -3425,7 +3426,7 @@ is included in the service document. If not explicitly indicated, it is not included. ::: {.varjson .rep} -### Function Import Object +### Function Import Object A function import is represented as a member of the entity container object whose name is the name of the function import and whose value is @@ -3437,18 +3438,18 @@ It MAY contain the members `$EntitySet` and `$IncludeInServiceDocument`. It MAY also contain [annotations](#Annotation). -### `$Function` +### `$Function` The value of `$Function` is a string containing the qualified name of an unbound function. -### `$EntitySet` +### `$EntitySet` The value of `$EntitySet` is a string containing either the unqualified name of an entity set in the same entity container or a path to an entity set in a different entity container. -### `$IncludeInServiceDocument` +### `$IncludeInServiceDocument` The value of `$IncludeInServiceDocument` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -3565,7 +3566,7 @@ The term's type MUST be a type in scope, or a collection of a type in scope. ::: {.varjson .rep} -### Term Object +### Term Object A term is represented as a member of the schema object whose name is the unqualified name of the term and whose value is an object. @@ -3582,7 +3583,7 @@ It MAY contain the members `$Type`, `$Collection`, `$Nullable`, `$DefaultValue`, It MAY contain [annotations](#Annotation). -### `$Type` and `$Collection` +### `$Type` and `$Collection` For single-valued terms the value of `$Type` is the qualified name of the term's type. @@ -3593,7 +3594,7 @@ with the literal value `true`. Absence of the `$Type` member means the type is `Edm.String`. -### `$Nullable` +### `$Nullable` The value of `$Nullable` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. @@ -3606,7 +3607,7 @@ collection that MAY be empty. In this case `$Nullable` applies to items of the collection and specifies whether the collection MAY contain `null` values. -### `$DefaultValue` +### `$DefaultValue` The value of `$DefaultValue` is the type-specific JSON representation of the default value of the term, see @@ -3628,7 +3629,7 @@ with the same qualifier, and so on until a term without a base term is reached. ::: {.varjson .rep} -### `$BaseTerm` +### `$BaseTerm` The value of `$BaseTerm` is the qualified name of the base term. ::: @@ -3681,7 +3682,7 @@ Symbolic Value|Model Element `UrlRef` |UrlRef annotation expression ::: {.varjson .rep} -### `$AppliesTo` +### `$AppliesTo` The value of `$AppliesTo` is an array whose items are strings containing symbolic values from the table above that identify model elements the @@ -3724,7 +3725,7 @@ an annotation value is a [path expression](#ValuePath) that refers to a property of the same or a related structured type. ::: {.varjson .rep} -### Annotation Member +### Annotation Member An annotation is represented as a member whose name consists of an at (`@`) character, followed by the qualified name of a term, optionally @@ -4504,7 +4505,7 @@ The value of the path expression is the instance or collection of instances identified by the path. ::: {.varjson .rep} -### `$Path` +### `$Path` Path expressions are represented as an object with a single member `$Path` whose value is a string containing a path. @@ -4557,7 +4558,7 @@ The other comparison operators require two operand expressions that evaluate to comparable values. ::: {.varjson .rep} -### `$And` and `$Or` +### `$And` and `$Or` The `And` and `Or` logical expressions are represented as an object with a single member whose value is an array with two annotation expressions. @@ -4565,14 +4566,14 @@ The member name is one of `$And`, or `$Or`. It MAY contain [annotations](#Annotation). -### `$Not` +### `$Not` Negation expressions are represented as an object with a single member `$Not` whose value is an annotation expression. It MAY contain [annotations](#Annotation). -### `$Eq`, `$Ne`, `$Gt`, `$Ge`, `$Lt`, `$Le`, `$Has`, and `$In` +### `$Eq`, `$Ne`, `$Gt`, `$Ge`, `$Lt`, `$Le`, `$Has`, and `$In` All comparison expressions are represented as an object with a single member whose value is an array with two annotation expressions. The @@ -4705,14 +4706,14 @@ to a numeric value. The other arithmetic operators require two operand expressions that evaluate to numeric values. ::: {.varjson .rep} -### `$Neg` +### `$Neg` Negation expressions are represented as an object with a single member `$Neg` whose value is an annotation expression. It MAY contain [annotations](#Annotation). -### `$Add`, `$Sub`, `$Mul`, `$Div`, `$DivBy`, and `$Mod` +### `$Add`, `$Sub`, `$Mul`, `$Div`, `$DivBy`, and `$Mod` These arithmetic expressions are represented as an object with as single member whose value is an array with two annotation expressions. The @@ -4803,7 +4804,7 @@ The operand expressions are used as parameters to the client-side function. ::: {.varjson .rep} -### `$Apply` +### `$Apply` Apply expressions are represented as an object with a member `$Apply` whose value is an array of annotation expressions, and a member @@ -4983,7 +4984,7 @@ rules as the `cast` canonical function defined in [OData-URL](#ODataURL). ::: {.varjson .rep} -### `$Cast` +### `$Cast` Cast expressions are represented as an object with a member `$Cast` whose value is an annotation expression, a member `$Type` whose value is @@ -5066,7 +5067,7 @@ third expression is present, nothing is added to the surrounding collection. ::: {.varjson .rep} -### `$If` +### `$If` Conditional expressions are represented as an object with a member `$If` whose value is an array of two or three annotation expressions. @@ -5101,7 +5102,7 @@ child expression is compatible with the specified type. It returns the specified type, and `false` otherwise. ::: {.varjson .rep} -### `$IsOf` +### `$IsOf` Is-of expressions are represented as an object with a member `$IsOf` whose value is an annotation expression, a member `$Type` whose value is @@ -5148,7 +5149,7 @@ identifier](#SimpleIdentifier) value as its name that MUST be unique within the schema containing the expression. ::: {.varjson .rep} -### `$LabeledElement` +### `$LabeledElement` Labeled element expressions are represented as an object with a member `$LabeledElement` whose value is an annotation expression, and a member @@ -5179,7 +5180,7 @@ in scope and returns the value of the identified labeled element expression as its value. ::: {.varjson .rep} -### `$LabeledElementReference` +### `$LabeledElementReference` Labeled element reference expressions are represented as an object with a member `$LabeledElementReference` whose value is a string containing @@ -5215,7 +5216,7 @@ Example 84: ::: ::: {.varjson .rep} -### `$Null` +### `$Null` Null expression containing [annotations](#Annotations) are represented as an object with a member `$Null` whose value is the literal `null`. @@ -5326,7 +5327,7 @@ expression MUST be type compatible with the type expected by the surrounding expression. ::: {.varjson .rep} -### `$UrlRef` +### `$UrlRef` URL reference expressions are represented as an object with a single member `$UrlRef` whose value is an annotation expression. @@ -5855,117 +5856,123 @@ https://openui5.hana.ondemand.com/1.40.10/#docs/guide/87aac894a40640f89920d7b2a4 # Appendix B. Table of JSON Objects and Members ::: toc -- [Document Object](#DocumentObject1) - - [`$Version`](#Version1.1) - - [`$EntityContainer`](#EntityContainer1.2) - - [`$Reference`](#Reference1.3) -- [Reference Object](#ReferenceObject2) - - [`$Include`](#Include2.1) - - [`$Namespace`](#Namespace2.2) - - [`$Alias`](#Alias2.3) - - [`$IncludeAnnotations`](#IncludeAnnotations2.4) - - [`$TermNamespace`](#TermNamespace2.5) - - [`$Qualifier`](#Qualifier2.6) - - [`$TargetNamespace`](#TargetNamespace2.7) -- [Schema Object](#SchemaObject3) - - [`$Alias`](#Alias3.1) - - [`$Annotations`](#Annotations3.2) -- [Entity Type Object](#EntityTypeObject4) - - [`$BaseType`](#BaseType4.1) - - [`$Abstract`](#Abstract4.2) - - [`$OpenType`](#OpenType4.3) - - [`$HasStream`](#HasStream4.4) - - [`$Key`](#Key4.5) -- [Property Object](#PropertyObject5) - - [`$Type`](#Type5.1) - - [`$Collection`](#Collection5.2) - - [`$Nullable`](#Nullable5.3) - - [`$DefaultValue`](#DefaultValue5.4) -- [Navigation Property Object](#NavigationPropertyObject6) +- [Type Facets](#TypeFacets1) + - [`$MaxLength`](#MaxLength1.1) + - [`$Precision`](#Precision1.2) + - [`$Scale`](#Scale1.3) + - [`$Unicode`](#Unicode1.4) + - [`$SRID`](#SRID1.5) +- [Document Object](#DocumentObject2) + - [`$Version`](#Version2.1) + - [`$EntityContainer`](#EntityContainer2.2) + - [`$Reference`](#Reference2.3) +- [Reference Object](#ReferenceObject3) + - [`$Include`](#Include3.1) + - [`$Namespace`](#Namespace3.2) + - [`$Alias`](#Alias3.3) + - [`$IncludeAnnotations`](#IncludeAnnotations3.4) + - [`$TermNamespace`](#TermNamespace3.5) + - [`$Qualifier`](#Qualifier3.6) + - [`$TargetNamespace`](#TargetNamespace3.7) +- [Schema Object](#SchemaObject4) + - [`$Alias`](#Alias4.1) + - [`$Annotations`](#Annotations4.2) +- [Entity Type Object](#EntityTypeObject5) + - [`$BaseType`](#BaseType5.1) + - [`$Abstract`](#Abstract5.2) + - [`$OpenType`](#OpenType5.3) + - [`$HasStream`](#HasStream5.4) + - [`$Key`](#Key5.5) +- [Property Object](#PropertyObject6) - [`$Type`](#Type6.1) - [`$Collection`](#Collection6.2) - [`$Nullable`](#Nullable6.3) - - [`$Partner`](#Partner6.4) - - [`$ContainsTarget`](#ContainsTarget6.5) - - [`$ReferentialConstraint`](#ReferentialConstraint6.6) - - [`$OnDelete`](#OnDelete6.7) -- [Complex Type Object](#ComplexTypeObject7) - - [`$BaseType`](#BaseType7.1) - - [`$Abstract`](#Abstract7.2) - - [`$OpenType`](#OpenType7.3) -- [Enumeration Type Object](#EnumerationTypeObject8) - - [`$UnderlyingType`](#UnderlyingType8.1) - - [`$IsFlags`](#IsFlags8.2) -- [Enumeration Member Object](#EnumerationMemberObject9) -- [Type Definition Object](#TypeDefinitionObject10) - - [`$UnderlyingType`](#UnderlyingType10.1) -- [Action Overload Object](#ActionOverloadObject11) -- [Function Overload Object](#FunctionOverloadObject12) - - [`$IsBound`](#IsBound12.1) - - [`$EntitySetPath`](#EntitySetPath12.2) - - [`$IsComposable`](#IsComposable12.3) - - [`$ReturnType`](#ReturnType12.4) - - [`$Type`](#Type12.5) - - [`$Collection`](#Collection12.6) - - [`$Nullable`](#Nullable12.7) - - [`$Parameter`](#Parameter12.8) -- [Parameter Object](#ParameterObject13) - - [`$Name`](#Name13.1) - - [`$Type`](#Type13.2) - - [`$Collection`](#Collection13.3) - - [`$Nullable`](#Nullable13.4) -- [Entity Container Object](#EntityContainerObject14) - - [`$Extends`](#Extends14.1) -- [Entity Set Object](#EntitySetObject15) - - [`$Collection`](#Collection15.1) - - [`$Type`](#Type15.2) - - [`$IncludeInServiceDocument`](#IncludeInServiceDocument15.3) -- [Singleton Object](#SingletonObject16) - - [`$Type`](#Type16.1) - - [`$Nullable`](#Nullable16.2) - - [`$NavigationPropertyBinding`](#NavigationPropertyBinding16.3) -- [Action Import Object](#ActionImportObject17) - - [`$Action`](#Action17.1) - - [`$EntitySet`](#EntitySet17.2) -- [Function Import Object](#FunctionImportObject18) - - [`$Function`](#Function18.1) + - [`$DefaultValue`](#DefaultValue6.4) +- [Navigation Property Object](#NavigationPropertyObject7) + - [`$Type`](#Type7.1) + - [`$Collection`](#Collection7.2) + - [`$Nullable`](#Nullable7.3) + - [`$Partner`](#Partner7.4) + - [`$ContainsTarget`](#ContainsTarget7.5) + - [`$ReferentialConstraint`](#ReferentialConstraint7.6) + - [`$OnDelete`](#OnDelete7.7) +- [Complex Type Object](#ComplexTypeObject8) + - [`$BaseType`](#BaseType8.1) + - [`$Abstract`](#Abstract8.2) + - [`$OpenType`](#OpenType8.3) +- [Enumeration Type Object](#EnumerationTypeObject9) + - [`$UnderlyingType`](#UnderlyingType9.1) + - [`$IsFlags`](#IsFlags9.2) +- [Enumeration Member Object](#EnumerationMemberObject10) +- [Type Definition Object](#TypeDefinitionObject11) + - [`$UnderlyingType`](#UnderlyingType11.1) +- [Action Overload Object](#ActionOverloadObject12) +- [Function Overload Object](#FunctionOverloadObject13) + - [`$IsBound`](#IsBound13.1) + - [`$EntitySetPath`](#EntitySetPath13.2) + - [`$IsComposable`](#IsComposable13.3) + - [`$ReturnType`](#ReturnType13.4) + - [`$Type`](#Type13.5) + - [`$Collection`](#Collection13.6) + - [`$Nullable`](#Nullable13.7) + - [`$Parameter`](#Parameter13.8) +- [Parameter Object](#ParameterObject14) + - [`$Name`](#Name14.1) + - [`$Type`](#Type14.2) + - [`$Collection`](#Collection14.3) + - [`$Nullable`](#Nullable14.4) +- [Entity Container Object](#EntityContainerObject15) + - [`$Extends`](#Extends15.1) +- [Entity Set Object](#EntitySetObject16) + - [`$Collection`](#Collection16.1) + - [`$Type`](#Type16.2) + - [`$IncludeInServiceDocument`](#IncludeInServiceDocument16.3) +- [Singleton Object](#SingletonObject17) + - [`$Type`](#Type17.1) + - [`$Nullable`](#Nullable17.2) + - [`$NavigationPropertyBinding`](#NavigationPropertyBinding17.3) +- [Action Import Object](#ActionImportObject18) + - [`$Action`](#Action18.1) - [`$EntitySet`](#EntitySet18.2) - - [`$IncludeInServiceDocument`](#IncludeInServiceDocument18.3) -- [Term Object](#TermObject19) - - [`$Type`](#Type19.1) - - [`$Collection`](#Collection19.2) - - [`$Nullable`](#Nullable19.3) - - [`$DefaultValue`](#DefaultValue19.4) - - [`$BaseTerm`](#BaseTerm19.5) - - [`$AppliesTo`](#AppliesTo19.6) -- [Annotation Member](#AnnotationMember20) - - [`$Path`](#Path20.1) - - [`$And`](#And20.2) - - [`$Or`](#Or20.3) - - [`$Not`](#Not20.4) - - [`$Eq`](#Eq20.5) - - [`$Ne`](#Ne20.6) - - [`$Gt`](#Gt20.7) - - [`$Ge`](#Ge20.8) - - [`$Lt`](#Lt20.9) - - [`$Le`](#Le20.10) - - [`$Has`](#Has20.11) - - [`$In`](#In20.12) - - [`$Neg`](#Neg20.13) - - [`$Add`](#Add20.14) - - [`$Sub`](#Sub20.15) - - [`$Mul`](#Mul20.16) - - [`$Div`](#Div20.17) - - [`$DivBy`](#DivBy20.18) - - [`$Mod`](#Mod20.19) - - [`$Apply`](#Apply20.20) - - [`$Cast`](#Cast20.21) - - [`$If`](#If20.22) - - [`$IsOf`](#IsOf20.23) - - [`$LabeledElement`](#LabeledElement20.24) - - [`$LabeledElementReference`](#LabeledElementReference20.25) - - [`$Null`](#Null20.26) - - [`$UrlRef`](#UrlRef20.27) +- [Function Import Object](#FunctionImportObject19) + - [`$Function`](#Function19.1) + - [`$EntitySet`](#EntitySet19.2) + - [`$IncludeInServiceDocument`](#IncludeInServiceDocument19.3) +- [Term Object](#TermObject20) + - [`$Type`](#Type20.1) + - [`$Collection`](#Collection20.2) + - [`$Nullable`](#Nullable20.3) + - [`$DefaultValue`](#DefaultValue20.4) + - [`$BaseTerm`](#BaseTerm20.5) + - [`$AppliesTo`](#AppliesTo20.6) +- [Annotation Member](#AnnotationMember21) + - [`$Path`](#Path21.1) + - [`$And`](#And21.2) + - [`$Or`](#Or21.3) + - [`$Not`](#Not21.4) + - [`$Eq`](#Eq21.5) + - [`$Ne`](#Ne21.6) + - [`$Gt`](#Gt21.7) + - [`$Ge`](#Ge21.8) + - [`$Lt`](#Lt21.9) + - [`$Le`](#Le21.10) + - [`$Has`](#Has21.11) + - [`$In`](#In21.12) + - [`$Neg`](#Neg21.13) + - [`$Add`](#Add21.14) + - [`$Sub`](#Sub21.15) + - [`$Mul`](#Mul21.16) + - [`$Div`](#Div21.17) + - [`$DivBy`](#DivBy21.18) + - [`$Mod`](#Mod21.19) + - [`$Apply`](#Apply21.20) + - [`$Cast`](#Cast21.21) + - [`$If`](#If21.22) + - [`$IsOf`](#IsOf21.23) + - [`$LabeledElement`](#LabeledElement21.24) + - [`$LabeledElementReference`](#LabeledElementReference21.25) + - [`$Null`](#Null21.26) + - [`$UrlRef`](#UrlRef21.27) ::: ------- diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index a8f6eafec..013deae81 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -620,18 +620,19 @@

    3.4 Type Facets<

    3.4.1 MaxLength

    A positive integer value specifying the maximum length of a binary, stream or string value. For binary or stream values this is the octet length of the binary data, for string values it is the character length (number of code points for Unicode).

    If no maximum length is specified, clients SHOULD expect arbitrary length.

    -
    -

    Attribute MaxLength

    +
    +

    Type Facet Attributes

    +

    Attribute MaxLength

    The value of MaxLength is a positive integer or the symbolic value max as a shorthand for the maximum length supported for the type by the service.

    Note: the symbolic value max is only allowed in OData 4.0 responses; it is deprecated in OData 4.01. While clients MUST be prepared for this symbolic value, OData 4.01 and greater services MUST NOT return the symbolic value max and MAY instead specify the concrete maximum length supported for the type by the service or omit the attribute entirely.

    -
    +

    3.4.2 Precision

    For a decimal value: the maximum number of significant decimal digits of the model element's value; it MUST be a positive integer.

    For a temporal value (datetime-with-timezone-offset, duration, or time-of-day): the number of decimal places allowed in the seconds portion of the value; it MUST be a non-negative integer between zero and twelve.

    Note: service authors SHOULD be aware that some clients are unable to support a precision greater than 28 for decimal values and 7 for temporal values. Client developers MUST be aware of the potential for data loss when round-tripping values of greater precision. Updating via PATCH and exclusively specifying modified values will reduce the risk for unintended data loss.

    Note: model elements with duration values and a granularity less than seconds (e.g. minutes, hours, days) can be annotated with term Measures.DurationGranularity, see OData-VocMeasures.

    -

    Attribute Precision

    +

    Attribute Precision

    The value of Precision is a number.

    If not specified for a decimal value, the decimal value has arbitrary precision.

    If not specified for a temporal value, the temporal value has a precision of zero.

    @@ -649,7 +650,7 @@

    3.4.3 Scale

    The value of Scale MUST be less than or equal to the value of Precision.

    Note: if the underlying data store allows negative scale, services may use a Precision with the absolute value of the negative scale added to the actual number of significant decimal digits, and client-provided values may have to be rounded before being stored.

    -

    Attribute Scale

    +

    Attribute Scale

    The value of Scale is a number or one of the symbolic values floating or variable.

    Services SHOULD use lower-case values; clients SHOULD accept values in a case-insensitive manner.

    If not specified, the Scale facet defaults to zero.

    @@ -674,7 +675,7 @@

    3.4.4 Unicode

    For a string-typed model element the Unicode facet indicates whether the it might contain and accept string values with Unicode characters (code points) beyond the ASCII character set. The value false indicates that the it will only contain and accept string values with characters limited to the ASCII character set.

    If no value is specified, the Unicode facet defaults to true.

    -

    Attribute Unicode

    +

    Attribute Unicode

    The value of Unicode is one of the Boolean literals true or false. Absence of the attribute means true.

    3.4.5 SRID

    @@ -682,7 +683,7 @@

    3.4.5 SRID

    The value of the SRID facet MUST be a non-negative integer or the special value variable. If no value is specified, the facet defaults to 0 for Geometry types or 4326 for Geography types.

    The valid values of the SRID facet and their meanings are as defined by the European Petroleum Survey Group EPSG.

    -

    Attribute SRID

    +

    Attribute SRID

    The value of SRID is a number or the symbolic value variable.

    3.5 Built-In Abstract Types

    @@ -748,12 +749,12 @@

    4
    -

    Element edmx:Edmx

    +

    Element edmx:Edmx

    The edmx:Edmx element is the root element of a CSDL XML document. It MUST contain the Version attribute and it MUST contain exactly one edmx:DataServices element.

    It MAY contain edmx:Reference elements to reference other CSDL documents.

    -

    Attribute Version

    +

    Attribute Version

    The Version attribute specifies the OData protocol version of the service. For OData 4.0 responses the value of this attribute MUST be 4.0. For OData 4.01 responses the value of this attribute MUST be 4.01. Services MUST return an OData 4.0 response if the request was made with an OData-MaxVersion header with a value of 4.0.

    -

    Element edmx:DataServices

    +

    Element edmx:DataServices

    The edmx:DataServices element MUST contain one or more edm:Schema elements which define the schemas exposed by the OData service.

    @@ -771,11 +772,11 @@

    4.1 ReferenceA reference MAY be annotated.

    The Core.SchemaVersion annotation, defined in OData-VocCore, MAY be used to indicate a particular version of the referenced document. If the Core.SchemaVersion annotation is present, the $schemaversion system query option, defined OData-Protocol, SHOULD be used when retrieving the referenced schema document.

    -

    Element edmx:Reference

    +

    Element edmx:Reference

    The edmx:Reference element specifies external CSDL documents referenced by the referencing document. The child elements edmx:Include and edmx:IncludeAnnotations specify which parts of the referenced document are available for use in the referencing document.

    The edmx:Reference element MUST contain the Uri attribute, and it MUST contain at least one edmx:Include or edmx:IncludeAnnotations child element.

    It MAY contain edm:Annotation elements.

    -

    Attribute Uri

    +

    Attribute Uri

    The value of Uri is an absolute or relative URI; relative URIs are relative to the xml:base attribute, see XML-Base.

    @@ -806,12 +807,12 @@

    4.2

    The alias MUST NOT be one of the reserved values Edm, odata, System, or Transient.

    An alias is only valid within the document in which it is declared; a referencing document may define its own aliases for included schemas.

    -

    Element edmx:Include

    +

    Element edmx:Include

    The edmx:Include element specifies a schema to include from the referenced CSDL document. It MUST provide the Namespace attribute and it MAY provide the Alias attribute.

    It MAY contain edm:Annotation elements.

    -

    Attribute Namespace

    +

    Attribute Namespace

    The value of Namespace is the namespace of a schema defined in the referenced CSDL document.

    -

    Attribute Alias

    +

    Attribute Alias

    The value of Alias is a simple identifier that can be used in qualified names instead of the namespace.

    @@ -841,14 +842,14 @@

    target MAY be specified. If a target namespace is specified, only those annotations which apply a term form the specified term namespace to a model element of the target namespace (with the specified qualifier, if present) SHOULD be included. If no target namespace is specified, all annotations within the referenced document from the specified term namespace (taking into account the qualifier, if present) SHOULD be included.

    The target namespace also provides consumers insight about what namespaces are present in the referenced document. If the consumer is not interested in that particular target namespace, the consumer can opt not to inspect the referenced document.

    -

    Element edmx:IncludeAnnotations

    +

    Element edmx:IncludeAnnotations

    The edmx:IncludeAnnotations element specifies the annotations to include from the referenced CSDL document. If no edmx:IncludeAnnotations element is specified, a client MAY ignore all annotations in the referenced document that are not explicitly used in an edm:Path expression of the referencing document.

    The edmx:IncludeAnnotations element MUST provide the TermNamespace attribute, and it MAY provide the Qualifier and TargetNamespace attribute.

    -

    Attribute TermNamespace

    +

    Attribute TermNamespace

    The value of TermNamespace is a namespace.

    -

    Attribute Qualifier

    +

    Attribute Qualifier

    The value of Qualifier is a simple identifier.

    -

    Attribute TargetNamespace

    +

    Attribute TargetNamespace

    The value of TargetNamespace is a namespace.

    @@ -886,10 +887,10 @@

    5 Schema

    Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

    The namespace MUST NOT be one of the reserved values Edm, odata, System, or Transient.

    -

    Element edm:Schema

    +

    Element edm:Schema

    The edm:Schema element defines a schema. It MUST contain the Namespace attribute and it MAY contain the Alias attribute.

    It MAY contain elements edm:Action, edm:Annotations, edm:Annotation, edm:ComplexType, edm:EntityContainer, edm:EntityType, edm:EnumType, edm:Function, edm:Term, or edm:TypeDefinition.

    -

    Attribute Namespace

    +

    Attribute Namespace

    The value of Namespace is the namespace of the schema

    5.1 Alias

    @@ -898,7 +899,7 @@

    5.1 Alias

    Aliases are document-global, so all schemas defined within or included into a document MUST have different aliases, and aliases MUST differ from the namespaces of all schemas defined within or included into a document. Aliases defined by a schema can be used throughout the containing document and are not restricted to the schema that defines them.

    The alias MUST NOT be one of the reserved values Edm, odata, System, or Transient.

    -

    Attribute Alias

    +

    Attribute Alias

    The value of Alias is a simple identifier.

    @@ -910,12 +911,12 @@

    Attribute Alias

    5.2 Annotations with External Targeting

    -

    Element edm:Annotations

    +

    Element edm:Annotations

    The edm:Annotations element is used to apply a group of annotations to a single model element. It MUST contain the Target attribute and it MAY contain the Qualifier attribute.

    It MUST contain at least one edm:Annotation element.

    -

    Attribute Target

    +

    Attribute Target

    The value of Target is a path expression identifying the annotation target. It MUST resolve to a model element in scope.

    -

    Attribute Qualifier

    +

    Attribute Qualifier

    The value of Qualifier is a simple identifier.

    @@ -932,12 +933,12 @@

    6 Entity Type

    An entity type can define two types of properties. A structural property is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A navigation property is a named reference to another entity type or collection of entity types.

    All properties MUST have a unique name within an entity type. Properties MUST NOT have the same name as the declaring entity type. They MAY have the same name as one of the direct or indirect base types or derived types.

    -

    Element edm:EntityType

    +

    Element edm:EntityType

    The edm:EntityType element MUST contain the Name attribute, and it MAY contain the BaseType, Abstract, OpenType, and HasStream attributes.

    It MAY contain edm:Property and edm:NavigationProperty elements describing the properties of the entity type.

    It MAY contain one edm:Key element.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the entity type's name.

    @@ -957,7 +958,7 @@

    key as well as structural and navigation properties of its base type.

    An entity type MUST NOT introduce an inheritance cycle by specifying a base type.

    -

    Attribute BaseType

    +

    Attribute BaseType

    The value of BaseType is the qualified name of the base type.

    @@ -975,7 +976,7 @@

    key or derive from a base type with a defined key.

    An abstract entity type MUST NOT inherit from a non-abstract entity type.

    -

    Attribute Abstract

    +

    Attribute Abstract

    The value of Abstract is one of the Boolean literals true or false. Absence of the attribute means false.

    6.3 Open Entity Type

    @@ -983,7 +984,7 @@

    6.3

    An entity type derived from an open entity type MUST indicate that it is also open.

    Note: structural and navigation properties MAY be returned by the service on instances of any structured type, whether or not the type is marked as open. Clients MUST always be prepared to deal with additional properties on instances of any structured type, see OData-Protocol.

    -

    Attribute OpenType

    +

    Attribute OpenType

    The value of OpenType is one of the Boolean literals true or false. Absence of the attribute means false.

    6.4 Media Entity Type

    @@ -991,7 +992,7 @@

    An entity type derived from a media entity type MUST indicate that it is also a media entity type.

    Media entity types MAY specify a list of acceptable media types using an annotation with term Core.AcceptableMediaTypes, see OData-VocCore.

    -

    Attribute HasStream

    +

    Attribute HasStream

    The value of HasStream is one of the Boolean literals true or false. Absence of the attribute means false.

    6.5 Key

    @@ -1023,13 +1024,13 @@

    6.5 Key

    An alias MUST NOT be defined if the key property is a primitive property of the entity type itself.

    For key properties that are a property of a complex or navigation property, the alias MUST be used in the key predicate of URLs instead of the path to the property because the required percent-encoding of the forward slash separating segments of the path to the property would make URL construction and parsing rather complicated. The alias MUST NOT be used in the query part of URLs, where paths to properties don't require special encoding and are a standard constituent of expressions anyway.

    -

    Element edm:Key

    +

    Element edm:Key

    The edm:Key element MUST contain at least one edm:PropertyRef element.

    -

    Element edm:PropertyRef

    +

    Element edm:PropertyRef

    The edm:PropertyRef element MUST contain the Name attribute and MAY contain the Alias attribute.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is a path expression leading to a primitive property. The names of the properties in the path are joined together by forward slashes.

    -

    Attribute Alias

    +

    Attribute Alias

    The value of Alias is a simple identifier.

    @@ -1089,10 +1090,10 @@

    simple identifier. It is used when referencing, serializing or deserializing the property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any navigation property in any of its base types. If a structural property with the same name is defined in any of this type's base types, then the property's type MUST be a type derived from the type specified for the property of the base type and constrains this property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type's base types for OData 4.0 responses.

    Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

    -

    Element edm:Property

    +

    Element edm:Property

    The edm:Property element MUST contain the Name and the Type attribute, and it MAY contain the attributes Nullable, MaxLength, Unicode, Precision, Scale, SRID, and DefaultValue.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the property's name.

    @@ -1109,7 +1110,7 @@

    7.1 Type

    A collection-valued property MAY be annotated with the Core.Ordered term, defined in OData-VocCore, to specify that it supports a stable ordering.

    A collection-valued property MAY be annotated with the Core.PositionalInsert term, defined in OData-VocCore, to specify that it supports inserting items into a specific ordinal position.

    -

    Attribute Type

    +

    Attribute Type

    For single-valued properties the value of Type is the qualified name of the property's type.

    For collection-valued properties the value of Type is the character sequence Collection( followed by the qualified name of the property's item type, followed by a closing parenthesis ).

    @@ -1120,7 +1121,7 @@

    Attribute Type<

    7.2 Nullable

    A Boolean value specifying whether the property can have the value null.

    -

    Attribute Nullable

    +

    Attribute Nullable

    The value of Nullable is one of the Boolean literals true or false.

    For single-valued properties the value true means that the property allows the null value.

    For collection-valued properties the value will always be a collection that MAY be empty. In this case the Nullable attribute applies to items of the collection and specifies whether the collection MAY contain null values.

    @@ -1132,7 +1133,7 @@

    7.3 Defaul

    A primitive- or enumeration-typed model element MAY define a default value that is used if it is not explicitly represented in an annotation or the body of a request or response.

    If no value is specified, the client SHOULD NOT assume a default value.

    -

    Attribute DefaultValue

    +

    Attribute DefaultValue

    Default values of type Edm.String MUST be represented according to the XML escaping rules for character data in attribute values. Values of other primitive types MUST be represented according to the appropriate alternative in the primitiveValue rule defined in OData-ABNF, i.e. Edm.Binary as binaryValue, Edm.Boolean as booleanValue etc.


    @@ -1141,11 +1142,11 @@

    simple identifier. It is used when referencing, serializing or deserializing the navigation property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any structural property in any of its base types. If a navigation property with the same name is defined in any of this type's base types, then the navigation property's type MUST be a type derived from the type specified for the navigation property of the base type, and constrains this navigation property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type's base types for OData 4.0 responses.

    Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

    -

    Element edm:NavigationProperty

    +

    Element edm:NavigationProperty

    The edm:NavigationProperty element MUST contain the Name and Type attributes, and it MAY contain the attributes Nullable, Partner, and ContainsTarget.

    It MAY contain child elements edm:ReferentialConstraint and at most one child element edm:OnDelete.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the navigation property's name.

    @@ -1171,7 +1172,7 @@

    Core.Ordered term, defined in OData-VocCore, to specify that it supports a stable ordering.

    A collection-valued navigation property MAY be annotated with the Core.PositionalInsert term, defined in OData-VocCore, to specify that it supports inserting items into a specific ordinal position.

    -

    Attribute Type

    +

    Attribute Type

    For single-valued navigation properties the value of Type is the qualified name of the navigation property's type.

    For collection-valued navigation properties the value of Type is the character sequence Collection( followed by the qualified name of the navigation property's item type, followed by a closing parenthesis ).

    @@ -1179,7 +1180,7 @@

    A Boolean value specifying whether the declaring type MAY have no related entity. If false, instances of the declaring structured type MUST always have a related entity.

    Nullable MUST NOT be specified for a collection-valued navigation property, a collection is allowed to have zero items.

    -

    Attribute Nullable

    +

    Attribute Nullable

    The value of Nullable is one of the Boolean literals true or false. Absence of the attribute means true.

    8.3 Partner Navigation Property

    @@ -1189,7 +1190,7 @@

    If no partner navigation property is specified, no assumptions can be made as to whether one of the navigation properties on the target type will lead back to the source entity.

    If a partner navigation property is specified, this partner navigation property MUST either specify the current navigation property as its partner to define a bi-directional relationship or it MUST NOT specify a partner navigation property. The latter can occur if the partner navigation property is defined on a complex type, or if the current navigation property is defined on a type derived from the type of the partner navigation property.

    -

    Attribute Partner

    +

    Attribute Partner

    The value of Partner is the path to the of the partner navigation property.

    8.4 Containment Navigation Property

    @@ -1206,7 +1207,7 @@

    -

    Attribute ContainsTarget

    +

    Attribute ContainsTarget

    The value of ContainsTarget is one of the Boolean literals true or false. Absence of the attribute means false.

    8.5 Referential Constraint

    @@ -1216,12 +1217,12 @@

    -

    Element edm:ReferentialConstraint

    +

    Element edm:ReferentialConstraint

    The edm:ReferentialConstraint element MUST contain the attributes Property and ReferencedProperty.

    It MAY contain edm:Annotation elements.

    -

    Attribute Property

    +

    Attribute Property

    The Property attribute specifies the property that takes part in the referential constraint on the dependent structured type. Its value MUST be a path expression resolving to a property of the dependent structured type itself or to a property of a complex property (recursively) of the dependent structured type. The names of the properties in the path are joined together by forward slashes. The path is relative to the dependent structured type declaring the navigation property.

    -

    Attribute ReferencedProperty

    +

    Attribute ReferencedProperty

    The ReferencedProperty attribute specifies the corresponding property of the principal entity type. Its value MUST be a path expression resolving to a property of the principal entity type itself or to a property of a complex property (recursively) of the principal entity type that MUST have the same type as the property of the dependent entity type. The path is relative to the entity type that is the target of the navigation property.

    @@ -1259,10 +1260,10 @@

    8.6

    If no on-delete action is specified, the action taken by the service is not predictable by the client and could vary per entity.

    -

    Element edm:OnDelete

    +

    Element edm:OnDelete

    The edm:OnDelete element MUST contain the Action attribute.

    It MAY contain edm:Annotation elements.

    -

    Attribute Action

    +

    Attribute Action

    The value of Action is one of the values Cascade, None, SetNull, or SetDefault.

    @@ -1284,11 +1285,11 @@

    9 Complex Type

    A complex type can define two types of properties. A structural property is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A navigation property is a named reference to an entity type or a collection of entity types.

    All properties MUST have a unique name within a complex type. Properties MUST NOT have the same name as the declaring complex type. They MAY have the same name as one of the direct or indirect base types or derived types.

    -

    Element edm:ComplexType

    +

    Element edm:ComplexType

    The edm:ComplexType element MUST contain the Name attribute, and it MAY contain the BaseType, Abstract, and OpenType attributes.

    It MAY contain edm:Property and edm:NavigationProperty elements describing the properties of the complex type.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the complex type's name.

    @@ -1316,13 +1317,13 @@

    section 14.2.

    -

    Attribute BaseType

    +

    Attribute BaseType

    The value of BaseType is the qualified name of the base type.

    9.2 Abstract Complex Type

    A complex type MAY indicate that it is abstract and cannot have instances.

    -

    Attribute Abstract

    +

    Attribute Abstract

    The value of Abstract is one of the Boolean literals true or false. Absence of the attribute means false.

    9.3 Open Complex Type

    @@ -1330,7 +1331,7 @@

    A complex type derived from an open complex type MUST indicate that it is also open.

    Note: structural and navigation properties MAY be returned by the service on instances of any structured type, whether or not the type is marked as open. Clients MUST always be prepared to deal with additional properties on instances of any structured type, see OData‑Protocol.

    -

    Attribute OpenType

    +

    Attribute OpenType

    The value of OpenType is one of the Boolean literals true or false. Absence of the attribute means false.


    @@ -1340,11 +1341,11 @@

    1

    Although enumeration types have an underlying numeric value, the preferred representation for an enumeration value is the member name. Discrete sets of numeric values should be represented as numeric values annotated with the AllowedValues annotation defined in OData-VocCore.

    Enumeration types marked as flags allow values that consist of more than one enumeration member at a time.

    -

    Element edm:EnumType

    +

    Element edm:EnumType

    The edm:EnumType element MUST contain the Name attribute, and it MAY contain the UnderlyingType and IsFlags attributes.

    It MUST contain one or more edm:Member elements defining the members of the enumeration type.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the enumeration type's name.

    @@ -1360,14 +1361,14 @@

    -

    Attribute UnderlyingType

    +

    Attribute UnderlyingType

    The value of UnderlyingType is the qualified name of the underlying type.

    10.2 Flags Enumeration Type

    An enumeration type MAY indicate that the enumeration type allows multiple members to be selected simultaneously.

    If not explicitly specified, only one enumeration type member MAY be selected simultaneously.

    -

    Attribute IsFlags

    +

    Attribute IsFlags

    The value of IsFlags is one of the Boolean literals true or false. Absence of the attribute means false.

    @@ -1395,12 +1396,12 @@

    -

    Element edm:Member

    +

    Element edm:Member

    The edm:Member element MUST contain the Name attribute and it MAY contain the Value attribute.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the enumeration member's name.

    -

    Attribute Value

    +

    Attribute Value

    If the IsFlags attribute has a value of false, either all members MUST specify an integer value for the Value attribute, or all members MUST NOT specify a value for the Value attribute. If no values are specified, the members are assigned consecutive integer values in the order of their appearance, starting with zero for the first member. Client libraries MUST preserve elements in document order.

    If the IsFlags attribute has a value of true, a non-negative integer value MUST be specified for the Value attribute. A combined value is equivalent to the bitwise OR of the discrete values.

    @@ -1428,10 +1429,10 @@

    11 T

    Type definitions can be used wherever a primitive type is used (other than as the underlying type in a new type definition) and are type-comparable with their underlying types and any type definitions defined using the same underlying type.

    It is up to the definition of a term to specify whether and how annotations with this term propagate to places where the annotated type definition is used, and whether they can be overridden.

    -

    Element edm:TypeDefinition

    +

    Element edm:TypeDefinition

    The edm:TypeDefinition element MUST contain the Name and UnderlyingType attributes.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the type definition's name.

    @@ -1454,7 +1455,7 @@

    11.1 Underlying Primitive Type

    The underlying type of a type definition MUST be a primitive type that MUST NOT be another type definition.

    -

    Attribute UnderlyingType

    +

    Attribute UnderlyingType

    The value of UnderlyingType is the qualified name of the underlying type.

    The type definition MAY specify facets applicable to the underlying type. Possible facets are: MaxLength, Unicode, Precision, Scale, or SRID.

    @@ -1474,11 +1475,11 @@

    Unbound actions do not support overloads. The names of all unbound actions MUST be unique within a schema.

    An unbound action MAY have the same name as a bound action.

    -

    Element edm:Action

    +

    Element edm:Action

    The edm:Action element MUST contain the Name attribute and it MAY contain the IsBound and EntitySetPath attributes.

    It MAY contain at most one edm:ReturnType element and MAY contain edm:Parameter elements.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the action's name.

    12.3 Function

    @@ -1503,11 +1504,11 @@

    type definitions can be used to disambiguate overloads for both bound and unbound functions, even if they specify the same underlying type.

    -

    Element edm:Function

    +

    Element edm:Function

    The edm:Function element MUST contain the Name attribute and it MAY contain the IsBound and EntitySetPath attributes.

    It MUST contain one edm:ReturnType element, and it MAY contain edm:Parameter elements.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the action's name.

    12.5 Bound or Unbound Action or Function Overloads

    @@ -1516,7 +1517,7 @@

    action import.

    Unbound functions are invoked as static functions within a common expression (see OData-URL, section 5.1.1), or from the entity container through a function import.

    -

    Attribute IsBound

    +

    Attribute IsBound

    The value of IsBound is one of the Boolean literals true or false. Absence of the attribute means false.

    12.6 Entity Set Path

    @@ -1525,14 +1526,14 @@

    12.6

    The first segment of the entity set path MUST be the name of the binding parameter. The remaining segments of the entity set path MUST represent navigation segments or type casts.

    A navigation segment names the simple identifier of the navigation property to be traversed. A type-cast segment names the qualified name of the entity type that should be returned from the type cast.

    -

    Attribute EntitySetPath

    +

    Attribute EntitySetPath

    The value of EntitySetPath is the entity set path.

    12.7 Composable Function

    A function MAY indicate that it is composable. If not explicitly indicated, it is not composable.

    A composable function can be invoked with additional path segments or key predicates appended to the resource path that identifies the composable function, and with system query options as appropriate for the type returned by the composable function.

    -

    Attribute IsComposable

    +

    Attribute IsComposable

    The value of IsComposable is one of the Boolean literals true or false. Absence of the attribute means false.

    12.8 Return Type

    @@ -1540,13 +1541,13 @@

    12.8 Return Typ

    The facets MaxLength, Precision, Scale, and SRID can be used as appropriate to specify value restrictions of the return type, as well as the Unicode facet for 4.01 and greater payloads.

    For a single-valued return type the facets apply to the returned value. For a collection-valued return type the facets apply to the items in the returned collection.

    -

    Element edm:ReturnType

    +

    Element edm:ReturnType

    The edm:ReturnType element MUST contain the Type attribute, and it MAY contain the attributes Nullable, MaxLength, Unicode, Precision, Scale, and SRID.

    It MAY contain edm:Annotation elements.

    -

    Attribute Type

    +

    Attribute Type

    For single-valued return types the value of Type is the qualified name of the return type.

    For collection-valued return types the value of Type is the character sequence Collection( followed by the qualified name of the return item type, followed by a closing parenthesis ).

    -

    Attribute Nullable

    +

    Attribute Nullable

    The value of Nullable is one of the Boolean literals true or false. Absence of the attribute means true.

    If the return type is a collection of entity types, the Nullable attribute has no meaning and MUST NOT be specified.

    For other collection-valued return types the result will always be a collection that MAY be empty. In this case the Nullable attribute applies to items of the collection and specifies whether the collection MAY contain null values.

    @@ -1560,15 +1561,15 @@

    12.9 Parameter<

    The facets MaxLength, Precision, Scale, or SRID can be used as appropriate to specify value restrictions of the parameter, as well as the Unicode facet for 4.01 and greater payloads.

    For single-valued parameters the facets apply to the parameter value. If the parameter value is a collection, the facets apply to the items in the collection.

    -

    Element edm:Parameter

    +

    Element edm:Parameter

    The edm:Parameter element MUST contain the Name and the Type attribute, and it MAY contain the attributes Nullable, MaxLength, Unicode, Precision, Scale, and SRID.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the parameter's name.

    -

    Attribute Type

    +

    Attribute Type

    For single-valued parameters the value of Type is the qualified name of the parameter.

    For collection-valued parameters the value of Type is the character sequence Collection( followed by the qualified name of the parameter's type, followed by a closing parenthesis ).

    -

    Attribute Nullable

    +

    Attribute Nullable

    The value of Nullable is one of the Boolean literals true or false. Absence of the attribute means true.

    The value true means that the parameter accepts a null value.

    @@ -1607,10 +1608,10 @@

    1

    A singleton allows addressing a single entity directly from the entity container without having to know its key, and without requiring an entity set.

    A function import or an action import is used to expose a function or action defined in an entity model as a top level resource.

    -

    Element edm:EntityContainer

    +

    Element edm:EntityContainer

    The edm:EntityContainer MUST contain one or more edm:EntitySet, edm:Singleton, edm:ActionImport, or edm:FunctionImport elements.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the entity container's name.

    @@ -1637,7 +1638,7 @@

    If the "extending" entity container defines an entity set with the same name as defined in any of its "base" containers, then the entity set's type MUST specify an entity type derived from the entity type specified for the identically named entity set in the "base" container. The same holds for singletons. Action imports and function imports cannot be redefined, nor can the "extending" container define a child with the same name as a child of a different kind in a "base" container.

    Note: services should not introduce cycles by extending entity containers. Clients should be prepared to process cycles introduced by extending entity containers.

    -

    Attribute Extends

    +

    Attribute Extends

    The value of Extends is the qualified name of the entity container to be extended.

    @@ -1654,15 +1655,15 @@

    13.2 Entity SetAn entity set MAY indicate whether it is included in the service document. If not explicitly indicated, it is included.

    Entity sets that cannot be queried without specifying additional query options SHOULD NOT be included in the service document.

    -

    Element edm:EntitySet

    +

    Element edm:EntitySet

    The edm:EntitySet element MUST contain the attributes Name and EntityType, and it MAY contain the IncludeInServiceDocument attribute.

    It MAY contain edm:NavigationPropertyBinding elements.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the entity set's name.

    -

    Attribute EntityType

    +

    Attribute EntityType

    The value of EntityType is the qualified name of an entity type in scope.

    -

    Attribute IncludeInServiceDocument

    +

    Attribute IncludeInServiceDocument

    The value of IncludeInServiceDocument is one of the Boolean literals true or false. Absence of the attribute means true.

    13.3 Singleton

    @@ -1671,15 +1672,15 @@

    13.3 Singleton<

    A singleton MUST specify a type that MUST be an entity type in scope.

    A singleton MUST reference an instance its entity type.

    -

    Element edm:Singleton

    +

    Element edm:Singleton

    The edm:Singleton element MUST include the attributes Name and Type, and it MAY contain the Nullable attribute.

    It MAY contain edm:NavigationPropertyBinding elements.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the singleton's name.

    -

    Attribute Type

    +

    Attribute Type

    The value of Type is whose value is the qualified name of an entity type in scope.

    -

    Attribute Nullable

    +

    Attribute Nullable

    The value of Nullable is one of the Boolean literals true or false.

    If no value is specified, the Nullable attribute defaults to false.

    In OData 4.0 responses this attribute MUST NOT be specified.

    @@ -1700,11 +1701,11 @@

    13.4.

    If the target is a simple identifier, it MUST resolve to an entity set or singleton defined in the same entity container.

    If the target is a target path, it MUST resolve to an entity set, singleton, or direct or indirect containment navigation property of a singleton in scope. The path can traverse single-valued containment navigation properties or single-valued complex properties before ending in a containment navigation property, and there MUST NOT be any non-containment navigation properties prior to the final segment.

    -

    Element edm:NavigationPropertyBinding

    +

    Element edm:NavigationPropertyBinding

    The edm:NavigationPropertyBinding element MUST contain the attributes Path and Target.

    -

    Attribute Path

    +

    Attribute Path

    The value of Path is a path expression.

    -

    Attribute Target

    +

    Attribute Target

    The value of Target is a target path.

    @@ -1734,14 +1735,14 @@

    13.5 Acti

    An action import MUST specify the name of an unbound action in scope.

    If the imported action returns an entity or a collection of entities, a simple identifier or target path value MAY be specified to identify the entity set that contains the returned entities. If a simple identifier is specified, it MUST resolve to an entity set defined in the same entity container. If a target path is specified, it MUST resolve to an entity set in scope.

    -

    Element edm:ActionImport

    +

    Element edm:ActionImport

    The edm:ActionImport element MUST contain the attributes Name and Action, and it MAY contain the EntitySet attribute.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the action import's name.

    -

    Attribute Action

    +

    Attribute Action

    The value of Action is the qualified name of an unbound action.

    -

    Attribute EntitySet

    +

    Attribute EntitySet

    The value of EntitySet is either the unqualified name of an entity set in the same entity container or a path to an entity set in a different entity container.

    13.6 Function Import

    @@ -1751,15 +1752,15 @@

    13.

    If the imported function returns an entity or a collection of entities, a simple identifier or target path value MAY be specified to identify the entity set that contains the returned entities. If a simple identifier is specified, it MUST resolve to an entity set defined in the same entity container. If a target path is specified, it MUST resolve to an entity set in scope.

    A function import for a parameterless function MAY indicate whether it is included in the service document. If not explicitly indicated, it is not included.

    -

    Element edm:FunctionImport

    +

    Element edm:FunctionImport

    The edm:FunctionImport element MUST contain the attributes Name and Function, and it MAY contain the attributes EntitySet and IncludeInServiceDocument.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the function import's name.

    -

    Attribute Function

    +

    Attribute Function

    The value of Function is the qualified name of an unbound function.

    -

    Attribute EntitySet

    +

    Attribute EntitySet

    The value of EntitySet is either the unqualified name of an entity set in the same entity container or a path to an entity set in a different entity container.

    -

    Attribute IncludeInServiceDocument

    +

    Attribute IncludeInServiceDocument

    The value of IncludeInServiceDocument is one of the Boolean literals true or false. Absence of the attribute means false.


    @@ -1805,24 +1806,24 @@

    14.1 Term

    The term's name is a simple identifier that MUST be unique within its schema.

    The term's type MUST be a type in scope, or a collection of a type in scope.

    -

    Element edm:Term

    +

    Element edm:Term

    The edm:Term element MUST contain the attributes Name and Type. It MAY contain the attributes Nullable, DefaultValue, BaseTerm and AppliesTo.

    The facets MaxLength, Precision, Scale, and SRID can be used as appropriate, as well as the Unicode facet attribute for 4.01 and greater payloads.

    A edm:Term element whose Type attribute specifies a primitive or enumeration type MAY define a value for the DefaultValue attribute.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the term's name.

    -

    Attribute Type

    +

    Attribute Type

    For single-valued terms the value of Type is the qualified name of the term's type.

    For collection-valued properties the value of Type is the character sequence Collection( followed by the qualified name of the property's item type, followed by a closing parenthesis ).

    -

    Attribute Nullable

    +

    Attribute Nullable

    The value of Nullable is one of the Boolean literals true or false.

    For single-valued terms the value true means that annotations may have the null value.

    For collection-valued terms the annotation value will always be a collection that MAY be empty. In this case the Nullable attribute applies to items of the collection and specifies whether the collection MAY contain null values.

    If no value is specified for a single-valued term, the Nullable attribute defaults to true.

    In OData 4.01 responses a collection-valued term MUST specify a value for the Nullable attribute.

    If no value is specified for a collection-valued term, the client cannot assume any default value. Clients SHOULD be prepared for this situation even in OData 4.01 responses.

    -

    Attribute DefaultValue

    +

    Attribute DefaultValue

    The value of this attribute determines the value of the term when applied in an edm:Annotation without providing an expression.

    Default values of type Edm.String MUST be represented according to the XML escaping rules for character data in attribute values. Values of other primitive types MUST be represented according to the appropriate alternative in the primitiveValue rule defined in OData-ABNF, i.e. Edm.Binary as binaryValue, Edm.Boolean as booleanValue etc.

    If no value is specified, the DefaultValue attribute defaults to null.

    @@ -1831,7 +1832,7 @@

    A term MAY specialize another term in scope by specifying it as its base term.

    When applying a specialized term, the base term MUST also be applied with the same qualifier, and so on until a term without a base term is reached.

    -

    Attribute BaseTerm

    +

    Attribute BaseTerm

    The value of BaseTerm is the qualified name of the base term.

    14.1.2 Applicability

    @@ -1979,7 +1980,7 @@

    14.1.2
    -

    Attribute AppliesTo

    +

    Attribute AppliesTo

    The value of AppliesTo is a whitespace-separated list of symbolic values from the table above that identify model elements the term is intended to be applied to.

    @@ -1998,13 +1999,13 @@

    14.2 Annotation<

    An annotation applies a term to a model element and defines how to calculate a value for the term application. Both term and model element MUST be in scope. Section 14.1.2 specifies which model elements MAY be annotated with a term.

    The value of an annotation is specified as an annotation expression, which is either a constant expression representing a constant value, or a dynamic expression. The most common construct for assigning an annotation value is a path expression that refers to a property of the same or a related structured type.

    -

    Element edm:Annotation

    +

    Element edm:Annotation

    The edm:Annotation element MUST contain the attribute Term, and it MAY contain the attribute Qualifier.

    The value of the annotation MAY be a constant expression or dynamic expression.

    If no expression is specified for a term with a primitive type, the annotation evaluates to the default value of the term definition. If no expression is specified for a term with a complex type, the annotation evaluates to a complex instance with default values for its properties. If no expression is specified for a collection-valued term, the annotation evaluates to an empty collection.

    An edm:Annotation element can be used as a child of the model element it annotates, or as the child of an edm:Annotations element that targets the model element to be annotated.

    An edm:Annotation element MAY contain edm:Annotation elements that annotate the annotation.

    -

    Attribute Term

    +

    Attribute Term

    The value of Term is the qualified name of a term in scope.

    @@ -2027,7 +2028,7 @@

    14.2.1 QualifierA term can be applied multiple times to the same model element by providing a qualifier to distinguish the annotations. The qualifier is a simple identifier.

    The combination of target model element, term, and qualifier uniquely identifies an annotation.

    -

    Attribute Qualifier

    +

    Attribute Qualifier

    Annotation elements that are children of an edm:Annotations element MUST NOT provide a value for the qualifier attribute if the parent edm:Annotations element provides a value for the qualifier attribute.

    @@ -2178,7 +2179,7 @@

    14.3.1 Binary

    -

    Expression edm:Binary

    +

    Expression edm:Binary

    The edm:Binary expression evaluates to a primitive binary value. A binary expression MUST be assigned a value conforming to the rule binaryValue in OData-ABNF.

    The binary expression MAY be provided using element notation or attribute notation.

    @@ -2192,7 +2193,7 @@

    Expression

    14.3.2 Boolean

    -

    Expression edm:Bool

    +

    Expression edm:Bool

    The edm:Bool expression evaluates to a primitive Boolean value. A Boolean expression MUST be assigned a Boolean value.

    The Boolean expression MAY be provided using element notation or attribute notation.

    @@ -2206,7 +2207,7 @@

    Expression

    14.3.3 Date

    -

    Expression edm:Date

    +

    Expression edm:Date

    The edm:Date expression evaluates to a primitive date value. A date expression MUST be assigned a value of type xs:date, see XML-Schema-2, section 3.3.9. The value MUST also conform to rule dateValue in OData-ABNF, i.e. it MUST NOT contain a time-zone offset.

    The date expression MAY be provided using element notation or attribute notation.

    @@ -2220,7 +2221,7 @@

    Expression

    14.3.4 DateTimeOffset

    -

    Expression edm:DateTimeOffset

    +

    Expression edm:DateTimeOffset

    The edm:DateTimeOffset expression evaluates to a primitive datetimestamp value with a time-zone offset. A datetimestamp expression MUST be assigned a value of type xs:dateTimeStamp, see XML-Schema-2, section 3.4.28. The value MUST also conform to rule dateTimeOffsetValue in OData-ABNF, i.e. it MUST NOT contain an end-of-day fragment (24:00:00).

    The datetimestamp expression MAY be provided using element notation or attribute notation.

    @@ -2236,7 +2237,7 @@

    14.3.5 Decimal

    -

    Expression edm:Decimal

    +

    Expression edm:Decimal

    The edm:Decimal expression evaluates to a primitive decimal value. A decimal expression MUST be assigned a value conforming to the rule decimalValue in OData-ABNF.

    The decimal expression MAY be provided using element notation or attribute notation.

    @@ -2252,7 +2253,7 @@

    Expression

    14.3.6 Duration

    -

    Expression edm:Duration

    +

    Expression edm:Duration

    The edm:Duration expression evaluates to a primitive duration value. A duration expression MUST be assigned a value of type xs:dayTimeDuration, see XML-Schema-2, section 3.4.27.

    The duration expression MAY be provided using element notation or attribute notation.

    @@ -2266,7 +2267,7 @@

    Expressio

    14.3.7 Enumeration Member

    -

    Expression edm:EnumMember

    +

    Expression edm:EnumMember

    The edm:EnumMember expression references a member of an enumeration type. An enumeration member expression MUST be assigned a value that consists of the qualified name of the enumeration type, followed by a forward slash and the name of the enumeration member. If the enumeration type specifies an IsFlags attribute with value true, the expression MAY also be assigned a whitespace-separated list of values. Each of these values MUST resolve to the name of a member of the enumeration type of the specified term.

    The enumeration member expression MAY be provided using element notation or attribute notation.

    @@ -2290,7 +2291,7 @@

    Expre

    14.3.8 Floating-Point Number

    -

    Expression edm:Float

    +

    Expression edm:Float

    The edm:Float expression evaluates to a primitive floating point (or double) value. A float expression MUST be assigned a value conforming to the rule doubleValue in OData-ABNF.

    The float expression MAY be provided using element notation or attribute notation.

    @@ -2304,7 +2305,7 @@

    Expression

    14.3.9 Guid

    -

    Expression edm:Guid

    +

    Expression edm:Guid

    The edm:Guid expression evaluates to a primitive guid value. A guid expression MUST be assigned a value conforming to the rule guidValue in OData-ABNF.

    The guid expression MAY be provided using element notation or attribute notation.

    @@ -2319,7 +2320,7 @@

    Expression

    14.3.10 Integer

    -

    Expression edm:Int

    +

    Expression edm:Int

    The edm:Int expression evaluates to a primitive integer value. An integer MUST be assigned a value conforming to the rule int64Value in OData-ABNF.

    The integer expression MAY be provided using element notation or attribute notation.

    @@ -2335,7 +2336,7 @@

    Expression ed

    14.3.11 String

    -

    Expression edm:String

    +

    Expression edm:String

    The edm:String expression evaluates to a primitive string value. A string expression MUST be assigned a value of the type xs:string, see XML-Schema-2, section 3.3.1.

    The string expression MAY be provided using element notation or attribute notation.

    @@ -2349,7 +2350,7 @@

    Expression

    14.3.12 Time of Day

    -

    Expression edm:TimeOfDay

    +

    Expression edm:TimeOfDay

    The edm:TimeOfDay expression evaluates to a primitive time value. A time-of-day expression MUST be assigned a value conforming to the rule timeOfDayValue in OData-ABNF.

    The time-of-day expression MAY be provided using element notation or attribute notation.

    @@ -2444,7 +2445,7 @@

    1

    A term or term property of type Edm.AnnotationPath can be annotated with term Validation.AllowedTerms (see OData-VocValidation) if its intended value is an annotation path that ends in a term cast with one of the listed terms.

    The value of the annotation path expression is the path itself, not the value of the annotation identified by the path. This is useful for terms that reuse or refer to other terms.

    -

    Expression edm:AnnotationPath

    +

    Expression edm:AnnotationPath

    The edm:AnnotationPath expression MAY be provided using element notation or attribute notation.

    @@ -2463,7 +2464,7 @@

    built-in type Edm.ModelElementPath. Its argument is a model path.

    The value of the model element path expression is the path itself, not the instance(s) identified by the path.

    -

    Expression edm:ModelElementPath

    +

    Expression edm:ModelElementPath

    The edm:ModelElementPath expression MAY be provided using element notation or attribute notation.

    @@ -2482,7 +2483,7 @@

    -

    Expression edm:NavigationPropertyPath

    +

    Expression edm:NavigationPropertyPath

    The edm:NavigationPropertyPath expression MAY be provided using element notation or attribute notation.

    @@ -2507,7 +2508,7 @@

    14.4.1.

    The value of the property path expression is the path itself, not the value of the structural property or the value of the term cast identified by the path.

    -

    Expression edm:PropertyPath

    +

    Expression edm:PropertyPath

    The edm:PropertyPath MAY be provided using either element notation or attribute notation.

    @@ -2529,7 +2530,7 @@

    14.4.1.7 Value P

    The value path expression allows assigning a value by traversing an object graph. It can be used in annotations that target entity containers, entity sets, entity types, complex types, navigation properties of structured types, and structural properties of structured types. Its argument is an instance path.

    The value of the path expression is the instance or collection of instances identified by the path.

    -

    Expression edm:Path

    +

    Expression edm:Path

    The edm:Path expression MAY be provided using element notation or attribute notation.

    @@ -2562,13 +2563,13 @@

    OData-URL.

    The other comparison operators require two operand expressions that evaluate to comparable values.

    -

    Expressions edm:And and edm:Or

    +

    Expressions edm:And and edm:Or

    The And and Or logical expressions are represented as elements edm:And and edm:Or that MUST contain two annotation expressions.

    It MAY contain edm:Annotation elements.

    -

    Expression edm:Not

    +

    Expression edm:Not

    Negation expressions are represented as an element edm:Not that MUST contain a single annotation expression.

    It MAY contain edm:Annotation elements.

    -

    Expressions edm:Eq, edm:Ne, edm:Gt, edm:Ge, edm:Lt, edm:Le, edm:Has, and edm:In

    +

    Expressions edm:Eq, edm:Ne, edm:Gt, edm:Ge, edm:Lt, edm:Le, edm:Has, and edm:In

    All comparison expressions are represented as an element that MUST contain two annotation expressions.

    They MAY contain edm:Annotation elements.

    @@ -2663,10 +2664,10 @@

    -

    Expression edm:Neg

    +

    Expression edm:Neg

    Negation expressions are represented as an element edm:Neg that MUST contain a single annotation expression.

    It MAY contain edm:Annotation elements.

    -

    Expressions edm:Add, edm:Sub, edm:Mul, edm:Div, edm:DivBy, and edm:Mod

    +

    Expressions edm:Add, edm:Sub, edm:Mul, edm:Div, edm:DivBy, and edm:Mod

    These arithmetic expressions are represented as an element that MUST contain two annotation expressions.

    They MAY contain edm:Annotation elements.

    @@ -2703,10 +2704,10 @@

    14.4.4 Apply Client-Side Functions

    The apply expression enables a value to be obtained by applying a client-side function. The apply expression MAY have operand expressions. The operand expressions are used as parameters to the client-side function.

    -

    Expression edm:Apply

    +

    Expression edm:Apply

    The edm:Apply element MUST contain the Function attribute and MAY contain annotation expressions as operands for the applied function.

    It MAY contain more edm:Annotation elements.

    -

    Attribute Function

    +

    Attribute Function

    The value of Function is the qualified name of the client-side function to apply.

    OData defines the following functions. Services MAY support additional functions that MUST be qualified with a namespace other than odata. Function names qualified with odata are reserved for this specification and its future versions.

    @@ -2769,10 +2770,10 @@

    14.4.5 Cast

    The cast expression casts the value obtained from its single child expression to the specified type. The cast expression follows the same rules as the cast canonical function defined in OData-URL.

    -

    Expression edm:Cast

    +

    Expression edm:Cast

    The edm:Cast element MUST contain the Type attribute and MUST contain exactly one expression.

    It MAY contain edm:Annotation elements.

    -

    Attribute Type

    +

    Attribute Type

    The value of Type is a qualified type name in scope, or the character sequence Collection( followed by the qualified name of a type in scope, followed by a closing parenthesis ).

    If the specified type is a primitive type or a collection of a primitive type, the facet attributes MaxLength, Unicode, Precision, Scale, and SRID MAY be specified if applicable to the specified primitive type. If the facet attributes are not specified, their values are considered unspecified.

    @@ -2787,7 +2788,7 @@

    14.4.6 Collection

    The collection expression enables a value to be obtained from zero or more item expressions. The value calculated by the collection expression is the collection of the values calculated by each of the item expressions. The values of the child expressions MUST all be type compatible.

    -

    Expression edm:Collection

    +

    Expression edm:Collection

    The edm:Collection element contains zero or more child expressions.

    @@ -2806,7 +2807,7 @@

    14.4.7 If-The

    The second and third child expressions are evaluated conditionally. The result MUST be type compatible with the type expected by the surrounding expression.

    If the first expression evaluates to true, the second expression MUST be evaluated and its value MUST be returned as the result of the if-then-else expression. If the first expression evaluates to false and a third child element is present, it MUST be evaluated and its value MUST be returned as the result of the if-then-else expression. If no third expression is present, nothing is added to the surrounding collection.

    -

    Expression edm:If

    +

    Expression edm:If

    The edm:If element MUST contain two or three child expressions that MUST use element notation.

    It MAY contain edm:Annotation elements.

    @@ -2823,7 +2824,7 @@

    Expression edm:

    14.4.8 Is-Of

    The is-of expression checks whether the value obtained from its single child expression is compatible with the specified type. It returns true if the child expression returns a type that is compatible with the specified type, and false otherwise.

    -

    Expression edm:UrlRef

    +

    Expression edm:UrlRef

    The edm:UrlRef expression MAY be provided using element notation or attribute notation.

    Relative URLs are relative to the xml:base attribute, see XML-Base.

    In element notation it MAY contain edm:Annotation elements.

    @@ -2841,11 +2842,11 @@

    14

    A labeled element expression MUST contain exactly one child expression. The value of the child expression is also the value of the labeled element expression.

    A labeled element expression MUST provide a simple identifier value as its name that MUST be unique within the schema containing the expression.

    -

    Expression edm:LabeledElement

    +

    Expression edm:LabeledElement

    The edm:LabeledElement element MUST contain the Name attribute.

    It MUST contain a child expression written either in attribute notation or element notation.

    It MAY contain edm:Annotation elements.

    -

    Attribute Name

    +

    Attribute Name

    The value of Name is the labeled element's name.

    @@ -2863,7 +2864,7 @@

    14.4.10 Labeled Element Reference

    The labeled element reference expression MUST specify the qualified name of a labeled element expression in scope and returns the value of the identified labeled element expression as its value.

    -

    Expression edm:LabeledElementReference

    +

    Expression edm:LabeledElementReference

    The edm:LabeledElementReference element MUST contain the qualified name of a labeled element expression in its body.

    @@ -2875,7 +2876,7 @@

    14.4.11 Null

    The null expression indicates the absence of a value. The null expression MAY be annotated.

    -

    Expression edm:Null

    +

    Expression edm:Null

    The edm:Null element MAY contain edm:Annotation elements.

    @@ -2898,15 +2899,15 @@

    14.4.12 Record

    A record expression contains zero or more property value expressions. For each single-valued structural or navigation property of the record expression's type that is neither nullable nor specifies a default value a property value expression MUST be provided. The only exception is if the record expression is the value of an annotation for a term that has a base term whose type is structured and directly or indirectly inherits from the type of its base term. In this case, property values that already have been specified in the annotation for the base term or its base term etc. need not be specified again.

    For collection-valued properties the absence of a property value expression is equivalent to specifying an empty collection as its value.

    -

    Expression edm:Record

    +

    Expression edm:Record

    The edm:Record element MAY contain the Type attribute and MAY contain edm:PropertyValue elements.

    It MAY contain edm:Annotation elements.

    -

    Attribute Type

    +

    Attribute Type

    The value of Type is the qualified name of a structured type in scope.

    -

    Element edm:PropertyValue

    +

    Element edm:PropertyValue

    The edm:PropertyValue element MUST contain the Property attribute, and it MUST contain exactly one expression that MAY be provided using either element notation or attribute notation.

    It MAY contain edm:Annotation elements.

    -

    Attribute Property

    +

    Attribute Property

    The value of Property is the name of a property of the type of the enclosing edm:Record expression.

    @@ -2936,7 +2937,7 @@

    14.4.13

    The URL reference expression MUST contain exactly one expression of type Edm.String. Its value is treated as a URL that MAY be relative or absolute; relative URLs are relative to the URL of the document containing the URL reference expression, or relative to a base URL specified in a format-specific way.

    The response body of the GET request MUST be returned as the result of the URL reference expression. The result of the URL reference expression MUST be type compatible with the type expected by the surrounding expression.

    -

    Expression edm:UrlRef

    +

    Expression edm:UrlRef

    The edm:UrlRef expression MAY be provided using element notation or attribute notation.

    Relative URLs are relative to the xml:base attribute, see XML-Base.

    In element notation it MAY contain edm:Annotation elements.

    @@ -3238,235 +3239,243 @@
    [OpenUI5]

    Appendix B. Table of XML Elements and Attributes


    diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 14461ae87..eef145bbf 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -576,7 +576,8 @@ length. ::: {.varxml .rep} -### Attribute `MaxLength` +### Type Facet Attributes +### Attribute `MaxLength` The value of `MaxLength` is a positive integer or the symbolic value `max` as a shorthand for the maximum length supported for the type by @@ -614,7 +615,7 @@ see [OData-VocMeasures](#ODataVocMeasures). ::: {.varxml .rep} -### Attribute `Precision` +### Attribute `Precision` The value of `Precision` is a number. @@ -670,7 +671,7 @@ client-provided values may have to be rounded before being stored. ::: {.varxml .rep} -### Attribute `Scale` +### Attribute `Scale` The value of `Scale` is a number or one of the symbolic values `floating` or `variable`. @@ -727,7 +728,7 @@ If no value is specified, the `Unicode` facet defaults to `true`. ::: {.varxml .rep} -### Attribute `Unicode` +### Attribute `Unicode` The value of `Unicode` is one of the Boolean literals `true` or `false`. Absence of the attribute means `true`. @@ -747,7 +748,7 @@ by the European Petroleum Survey Group [EPSG](#_EPSG). ::: {.varxml .rep} -### Attribute `SRID` +### Attribute `SRID` The value of `SRID` is a number or the symbolic value `variable`. ::: @@ -833,7 +834,7 @@ combination of term and qualifier. ::: {.varxml .rep} -### Element `edmx:Edmx` +### Element `edmx:Edmx` The `edmx:Edmx` element is the root element of a CSDL XML document. It MUST contain the `Version` attribute and it MUST contain exactly one @@ -842,7 +843,7 @@ MUST contain the `Version` attribute and it MUST contain exactly one It MAY contain [`edmx:Reference`](#Reference) elements to reference other CSDL documents. -### Attribute `Version` +### Attribute `Version` The `Version` attribute specifies the OData protocol version of the service. For OData 4.0 responses the value of this attribute MUST be @@ -850,7 +851,7 @@ service. For OData 4.0 responses the value of this attribute MUST be `4.01.` Services MUST return an OData 4.0 response if the request was made with an `OData-MaxVersion `header with a value of `4.0`. -### Element `edmx:DataServices` +### Element `edmx:DataServices` The `edmx:DataServices` element MUST contain one or more [`edm:Schema`](#Schema) elements which define the schemas exposed by the @@ -897,7 +898,7 @@ referenced schema document. ::: {.varxml .rep} -### Element `edmx:Reference` +### Element `edmx:Reference` The `edmx:Reference` element specifies external CSDL documents referenced by the referencing document. The child elements @@ -912,7 +913,7 @@ MUST contain at least one [`edmx:Include`](#IncludedSchema) or It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Uri` +### Attribute `Uri` The value of `Uri` is an absolute or relative URI; relative URIs are relative to the `xml:base` attribute, see @@ -979,7 +980,7 @@ referencing document may define its own aliases for included schemas. ::: {.varxml .rep} -### Element `edmx:Include` +### Element `edmx:Include` The `edmx:Include` element specifies a schema to include from the referenced CSDL document. It MUST provide the `Namespace` attribute and @@ -987,12 +988,12 @@ it MAY provide the `Alias` attribute. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Namespace` +### Attribute `Namespace` The value of `Namespace` is the namespace of a schema defined in the referenced CSDL document. -### Attribute `Alias` +### Attribute `Alias` The value of `Alias` is a [simple identifier](#SimpleIdentifier) that can be used in qualified names instead of the namespace. @@ -1062,7 +1063,7 @@ not to inspect the referenced document. ::: {.varxml .rep} -### Element `edmx:IncludeAnnotations` +### Element `edmx:IncludeAnnotations` The `edmx:IncludeAnnotations` element specifies the annotations to include from the referenced CSDL document. If no @@ -1074,15 +1075,15 @@ The `edmx:IncludeAnnotations` element MUST provide the `TermNamespace` attribute, and it MAY provide the `Qualifier` and `TargetNamespace` attribute. -### Attribute `TermNamespace` +### Attribute `TermNamespace` The value of `TermNamespace` is a namespace. -### Attribute `Qualifier` +### Attribute `Qualifier` The value of `Qualifier` is a [simple identifier](#SimpleIdentifier). -### Attribute `TargetNamespace` +### Attribute `TargetNamespace` The value of `TargetNamespace` is a namespace. ::: @@ -1149,7 +1150,7 @@ The namespace MUST NOT be one of the reserved values `Edm`, `odata`, ::: {.varxml .rep} -### Element `edm:Schema` +### Element `edm:Schema` The `edm:Schema` element defines a schema. It MUST contain the `Namespace` attribute and it MAY @@ -1163,7 +1164,7 @@ It MAY contain elements [`edm:Action`](#Action), [`edm:Function`](#Function), [`edm:Term`](#Term), or [`edm:TypeDefinition`](#TypeDefinition). -### Attribute `Namespace` +### Attribute `Namespace` The value of `Namespace` is the namespace of the schema ::: @@ -1194,7 +1195,7 @@ The alias MUST NOT be one of the reserved values `Edm`, `odata`, ::: {.varxml .rep} -### Attribute `Alias` +### Attribute `Alias` The value of `Alias` is a [simple identifier](#SimpleIdentifier). ::: @@ -1215,7 +1216,7 @@ schema ::: {.varxml .rep} -### Element `edm:Annotations` +### Element `edm:Annotations` The `edm:Annotations` element is used to apply a group of annotations to a single model element. It MUST contain the `Target` attribute and it @@ -1223,12 +1224,12 @@ MAY contain the `Qualifier` attribute. It MUST contain at least one [`edm:Annotation`](#Annotation) element. -### Attribute `Target` +### Attribute `Target` The value of `Target` is a path expression identifying the [annotation target](#Target). It MUST resolve to a model element in scope. -### Attribute `Qualifier` +### Attribute `Qualifier` The value of `Qualifier` is a [simple identifier](#SimpleIdentifier). ::: @@ -1270,7 +1271,7 @@ types. ::: {.varxml .rep} -### Element `edm:EntityType` +### Element `edm:EntityType` The `edm:EntityType` element MUST contain the `Name` attribute, and it MAY contain the [`BaseType`](#DerivedEntityType), @@ -1285,7 +1286,7 @@ It MAY contain one [`edm:Key`](#Key) element. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the entity type's name. ::: @@ -1319,7 +1320,7 @@ base type. ::: {.varxml .rep} -### Attribute `BaseType` +### Attribute `BaseType` The value of `BaseType` is the qualified name of the base type. ::: @@ -1353,7 +1354,7 @@ type. ::: {.varxml .rep} -### Attribute `Abstract` +### Attribute `Abstract` The value of `Abstract` is one of the Boolean literals `true` or `false`. Absence of the attribute means `false`. @@ -1377,7 +1378,7 @@ properties on instances of any structured type, see ::: {.varxml .rep} -### Attribute `OpenType` +### Attribute `OpenType` The value of `OpenType` is one of the Boolean literals `true` or `false`. Absence of the attribute means `false`. @@ -1406,7 +1407,7 @@ see [OData-VocCore](#ODataVocCore). ::: {.varxml .rep} -### Attribute `HasStream` +### Attribute `HasStream` The value of `HasStream` is one of the Boolean literals `true` or `false`. Absence of the attribute means `false`. @@ -1493,23 +1494,23 @@ special encoding and are a standard constituent of expressions anyway. ::: {.varxml .rep} -### Element `edm:Key` +### Element `edm:Key` The `edm:Key` element MUST contain at least one `edm:PropertyRef` element. -### Element `edm:PropertyRef` +### Element `edm:PropertyRef` The `edm:PropertyRef` element MUST contain the `Name` attribute and MAY contain the `Alias` attribute. -### Attribute `Name` +### Attribute `Name` The value of `Name` is a path expression leading to a primitive property. The names of the properties in the path are joined together by forward slashes. -### Attribute `Alias` +### Attribute `Alias` The value of `Alias` is a [simple identifier](#SimpleIdentifier). ::: @@ -1609,7 +1610,7 @@ that differ only in case. ::: {.varxml .rep} -### Element `edm:Property` +### Element `edm:Property` The `edm:Property` element MUST contain the `Name` and the `Type` attribute, and it MAY contain the attributes @@ -1619,7 +1620,7 @@ attribute, and it MAY contain the attributes It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the property's name. ::: @@ -1656,7 +1657,7 @@ supports inserting items into a specific ordinal position. ::: {.varxml .rep} -### Attribute `Type` +### Attribute `Type` For single-valued properties the value of `Type` is the qualified name of the property's type. @@ -1681,7 +1682,7 @@ A Boolean value specifying whether the property can have the value ::: {.varxml .rep} -## Attribute `Nullable` +## Attribute `Nullable` The value of `Nullable` is one of the Boolean literals `true` or `false`. @@ -1715,7 +1716,7 @@ If no value is specified, the client SHOULD NOT assume a default value. ::: {.varxml .rep} -### Attribute `DefaultValue` +### Attribute `DefaultValue` Default values of type `Edm.String` MUST be represented according to the XML escaping rules for character data in attribute values. Values of @@ -1752,7 +1753,7 @@ that differ only in case. ::: {.varxml .rep} -### Element `edm:NavigationProperty` +### Element `edm:NavigationProperty` The `edm:NavigationProperty` element MUST contain the `Name` and `Type` attributes, and it MAY contain the attributes @@ -1766,7 +1767,7 @@ child element [`edm:OnDelete`](#OnDeleteAction). It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the navigation property's name. ::: @@ -1817,7 +1818,7 @@ supports inserting items into a specific ordinal position. ::: {.varxml .rep} -### Attribute `Type` +### Attribute `Type` For single-valued navigation properties the value of `Type` is the qualified name of the navigation property's type. @@ -1838,7 +1839,7 @@ property, a collection is allowed to have zero items. ::: {.varxml .rep} -### Attribute `Nullable` +### Attribute `Nullable` The value of `Nullable` is one of the Boolean literals `true` or `false`. Absence of the attribute means `true`. @@ -1878,7 +1879,7 @@ partner navigation property. ::: {.varxml .rep} -### Attribute `Partner` +### Attribute `Partner` The value of `Partner` is the path to the of the partner navigation property. @@ -1953,7 +1954,7 @@ can also be reached via a non-containment navigation path. ::: {.varxml .rep} -### Attribute `ContainsTarget` +### Attribute `ContainsTarget` The value of `ContainsTarget` is one of the Boolean literals `true` or `false`. Absence of the attribute means `false`. @@ -1987,14 +1988,14 @@ property MUST NOT be nullable. ::: {.varxml .rep} -### Element `edm:ReferentialConstraint` +### Element `edm:ReferentialConstraint` The `edm:ReferentialConstraint` element MUST contain the attributes `Property` and `ReferencedProperty`. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Property` +### Attribute `Property` The `Property` attribute specifies the property that takes part in the referential constraint on the dependent structured type. Its value MUST @@ -2004,7 +2005,7 @@ dependent structured type. The names of the properties in the path are joined together by forward slashes. The path is relative to the dependent structured type declaring the navigation property. -### Attribute `ReferencedProperty` +### Attribute `ReferencedProperty` The `ReferencedProperty` attribute specifies the corresponding property of the principal entity type. Its value MUST be a path expression @@ -2072,13 +2073,13 @@ not predictable by the client and could vary per entity. ::: {.varxml .rep} -### Element `edm:OnDelete` +### Element `edm:OnDelete` The `edm:OnDelete` element MUST contain the `Action` attribute. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Action` +### Attribute `Action` The value of `Action` is one of the values `Cascade`, `None`, `SetNull`, or `SetDefault`. @@ -2128,7 +2129,7 @@ types. ::: {.varxml .rep} -### Element `edm:ComplexType` +### Element `edm:ComplexType` The `edm:ComplexType` element MUST contain the `Name` attribute, and it MAY contain the [`BaseType`](#DerivedComplexType), @@ -2141,7 +2142,7 @@ properties of the complex type. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the complex type's name. ::: @@ -2184,7 +2185,7 @@ The rules for annotations of derived complex types are described in ::: {.varxml .rep} -### Attribute `BaseType` +### Attribute `BaseType` The value of `BaseType` is the qualified name of the base type. ::: @@ -2196,7 +2197,7 @@ instances. ::: {.varxml .rep} -### Attribute `Abstract` +### Attribute `Abstract` The value of `Abstract` is one of the Boolean literals `true` or `false`. Absence of the attribute means `false`. @@ -2220,7 +2221,7 @@ properties on instances of any structured type, see ::: {.varxml .rep} -### Attribute `OpenType` +### Attribute `OpenType` The value of `OpenType` is one of the Boolean literals `true` or `false`. Absence of the attribute means `false`. @@ -2249,7 +2250,7 @@ one enumeration member at a time. ::: {.varxml .rep} -### Element `edm:EnumType` +### Element `edm:EnumType` The `edm:EnumType` element MUST contain the Name attribute, and it MAY contain the [`UnderlyingType`](#UnderlyingIntegerType) and @@ -2260,7 +2261,7 @@ elements defining the members of the enumeration type. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the enumeration type's name. ::: @@ -2286,7 +2287,7 @@ If not explicitly specified, `Edm.Int32` is used as the underlying type. ::: {.varxml .rep} -### Attribute `UnderlyingType` +### Attribute `UnderlyingType` The value of `UnderlyingType` is the qualified name of the underlying type. @@ -2303,7 +2304,7 @@ selected simultaneously. ::: {.varxml .rep} -### Attribute `IsFlags` +### Attribute `IsFlags` The value of `IsFlags` is one of the Boolean literals `true` or `false`. Absence of the attribute means `false`. @@ -2355,18 +2356,18 @@ values. ::: {.varxml .rep} -### Element `edm:Member` +### Element `edm:Member` The `edm:Member` element MUST contain the `Name` attribute and it MAY contain the `Value` attribute. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the enumeration member's name. -### Attribute `Value` +### Attribute `Value` If the [`IsFlags`](#FlagsEnumerationType) attribute has a value of `false`, either all members MUST specify an integer value for the @@ -2426,14 +2427,14 @@ definition is used, and whether they can be overridden. ::: {.varxml .rep} -### Element `edm:TypeDefinition` +### Element `edm:TypeDefinition` The `edm:TypeDefinition` element MUST contain the `Name` and [`UnderlyingType`](#UnderlyingPrimitiveType) attributes. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the type definition's name. ::: @@ -2466,7 +2467,7 @@ MUST NOT be another type definition. ::: {.varxml .rep} -### Attribute `UnderlyingType` +### Attribute `UnderlyingType` The value of `UnderlyingType` is the qualified name of the underlying type. @@ -2528,7 +2529,7 @@ An unbound action MAY have the same name as a bound action. ::: {.varxml .rep} -### Element `edm:Action` +### Element `edm:Action` The `edm:Action` element MUST contain the `Name` attribute and it MAY contain the [`IsBound`](#BoundorUnboundActionorFunctionOverloads) and @@ -2539,7 +2540,7 @@ MAY contain [`edm:Parameter`](#Parameter) elements. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the action's name. ::: @@ -2594,7 +2595,7 @@ they specify the same underlying type. ::: {.varxml .rep} -### Element `edm:Function` +### Element `edm:Function` The `edm:Function` element MUST contain the `Name` attribute and it MAY contain the [`IsBound`](#BoundorUnboundActionorFunctionOverloads) and @@ -2605,7 +2606,7 @@ contain [`edm:Parameter`](#Parameter) elements. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the action's name. ::: @@ -2628,7 +2629,7 @@ or from the entity container through a [function import](#FunctionImport). ::: {.varxml .rep} -### Attribute `IsBound` +### Attribute `IsBound` The value of `IsBound` is one of the Boolean literals `true` or `false`. Absence of the attribute means `false`. @@ -2655,7 +2656,7 @@ entity type that should be returned from the type cast. ::: {.varxml .rep} -### Attribute `EntitySetPath` +### Attribute `EntitySetPath` The value of `EntitySetPath` is the entity set path. ::: @@ -2672,7 +2673,7 @@ the type returned by the composable function. ::: {.varxml .rep} -### Attribute `IsComposable` +### Attribute `IsComposable` The value of `IsComposable` is one of the Boolean literals `true` or `false`. Absence of the attribute means `false`. @@ -2694,7 +2695,7 @@ returned collection. ::: {.varxml .rep} -### Element `edm:ReturnType` +### Element `edm:ReturnType` The `edm:ReturnType` element MUST contain the `Type` attribute, and it MAY contain the attributes `Nullable`, [`MaxLength`](#MaxLength), @@ -2703,7 +2704,7 @@ MAY contain the attributes `Nullable`, [`MaxLength`](#MaxLength), It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Type` +### Attribute `Type` For single-valued return types the value of `Type` is the qualified name of the return type. @@ -2712,7 +2713,7 @@ For collection-valued return types the value of `Type` is the character sequence `Collection(` followed by the qualified name of the return item type, followed by a closing parenthesis `)`. -### Attribute `Nullable` +### Attribute `Nullable` The value of `Nullable` is one of the Boolean literals `true` or `false`. Absence of the attribute means `true`. @@ -2758,7 +2759,7 @@ the collection. ::: {.varxml .rep} -### Element `edm:Parameter` +### Element `edm:Parameter` The `edm:Parameter` element MUST contain the `Name` and the `Type` attribute, and it MAY contain the attributes `Nullable`, @@ -2767,11 +2768,11 @@ attribute, and it MAY contain the attributes `Nullable`, It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the parameter's name. -### Attribute `Type` +### Attribute `Type` For single-valued parameters the value of `Type` is the qualified name of the parameter. @@ -2780,7 +2781,7 @@ For collection-valued parameters the value of `Type` is the character sequence `Collection(` followed by the qualified name of the parameter's type, followed by a closing parenthesis `)`. -### Attribute `Nullable` +### Attribute `Nullable` The value of `Nullable` is one of the Boolean literals `true` or `false`. Absence of the attribute means `true`. @@ -2867,7 +2868,7 @@ in an entity model as a top level resource. ::: {.varxml .rep} -### Element `edm:EntityContainer` +### Element `edm:EntityContainer` The `edm:EntityContainer` MUST contain one or more [`edm:EntitySet`](#EntitySet), [`edm:Singleton`](#Singleton), @@ -2876,7 +2877,7 @@ The `edm:EntityContainer` MUST contain one or more It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the entity container's name. ::: @@ -2925,7 +2926,7 @@ extending entity containers. ::: {.varxml .rep} -### Attribute `Extends` +### Attribute `Extends` The value of `Extends` is the qualified name of the entity container to be extended. @@ -2964,7 +2965,7 @@ options SHOULD NOT be included in the service document. ::: {.varxml .rep} -### Element `edm:EntitySet` +### Element `edm:EntitySet` The `edm:EntitySet` element MUST contain the attributes `Name` and `EntityType`, and it MAY contain the `IncludeInServiceDocument` @@ -2975,16 +2976,16 @@ It MAY contain It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the entity set's name. -### Attribute `EntityType` +### Attribute `EntityType` The value of `EntityType` is the qualified name of an entity type in scope. -### Attribute `IncludeInServiceDocument` +### Attribute `IncludeInServiceDocument` The value of `IncludeInServiceDocument` is one of the Boolean literals `true` or `false`. Absence of the attribute means `true`. @@ -3004,7 +3005,7 @@ A singleton MUST reference an instance its entity type. ::: {.varxml .rep} -### Element `edm:Singleton` +### Element `edm:Singleton` The `edm:Singleton` element MUST include the attributes `Name` and `Type`, and it MAY contain the `Nullable` attribute. @@ -3014,16 +3015,16 @@ It MAY contain It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the singleton's name. -### Attribute `Type` +### Attribute `Type` The value of `Type` is whose value is the [qualified name](#QualifiedName) of an entity type in scope. -### Attribute `Nullable` +### Attribute `Nullable` The value of `Nullable` is one of the Boolean literals `true` or `false`. @@ -3109,16 +3110,16 @@ be any non-containment navigation properties prior to the final segment. ::: {.varxml .rep} -### Element `edm:NavigationPropertyBinding` +### Element `edm:NavigationPropertyBinding` The `edm:NavigationPropertyBinding` element MUST contain the attributes `Path` and `Target`. -### Attribute `Path` +### Attribute `Path` The value of `Path` is a path expression. -### Attribute `Target` +### Attribute `Target` The value of `Target` is a [target path](#TargetPath). ::: @@ -3176,22 +3177,22 @@ to an entity set in scope. ::: {.varxml .rep} -### Element `edm:ActionImport` +### Element `edm:ActionImport` The `edm:ActionImport` element MUST contain the attributes `Name` and `Action`, and it MAY contain the `EntitySet` attribute. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the action import's name. -### Attribute `Action` +### Attribute `Action` The value of `Action` is the qualified name of an unbound action. -### Attribute `EntitySet` +### Attribute `EntitySet` The value of `EntitySet` is either the unqualified name of an entity set in the same entity container or a path to an entity set in a different @@ -3224,27 +3225,27 @@ not included. ::: {.varxml .rep} -### Element `edm:FunctionImport` +### Element `edm:FunctionImport` The `edm:FunctionImport` element MUST contain the attributes `Name` and `Function`, and it MAY contain the attributes `EntitySet` and `IncludeInServiceDocument`. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the function import's name. -### Attribute `Function` +### Attribute `Function` The value of `Function` is the qualified name of an unbound function. -### Attribute `EntitySet` +### Attribute `EntitySet` The value of `EntitySet` is either the unqualified name of an entity set in the same entity container or a path to an entity set in a different entity container. -### Attribute `IncludeInServiceDocument` +### Attribute `IncludeInServiceDocument` The value of `IncludeInServiceDocument` is one of the Boolean literals `true` or `false`. Absence of the attribute means `false`. @@ -3348,7 +3349,7 @@ scope. ::: {.varxml .rep} -### Element `edm:Term` +### Element `edm:Term` The `edm:Term` element MUST contain the attributes `Name` and `Type`. It MAY contain the attributes `Nullable`, `DefaultValue`, [`BaseTerm`](#SpecializedTerm) and [`AppliesTo`](#Applicability). @@ -3363,11 +3364,11 @@ enumeration type MAY define a value for the `DefaultValue` attribute. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the term's name. -### Attribute `Type` +### Attribute `Type` For single-valued terms the value of `Type` is the qualified name of the term's type. @@ -3376,7 +3377,7 @@ For collection-valued properties the value of `Type` is the character sequence `Collection(` followed by the qualified name of the property's item type, followed by a closing parenthesis `)`. -### Attribute `Nullable` +### Attribute `Nullable` The value of `Nullable` is one of the Boolean literals `true` or `false`. @@ -3398,7 +3399,7 @@ If no value is specified for a collection-valued term, the client cannot assume any default value. Clients SHOULD be prepared for this situation even in OData 4.01 responses. -### Attribute `DefaultValue` +### Attribute `DefaultValue` The value of this attribute determines the value of the term when applied in an [`edm:Annotation`](#Annotation) without providing an @@ -3426,7 +3427,7 @@ reached. ::: {.varxml .rep} -### Attribute `BaseTerm` +### Attribute `BaseTerm` The value of `BaseTerm` is the qualified name of the base term. ::: @@ -3480,7 +3481,7 @@ Symbolic Value|Model Element ::: {.varxml .rep} -### Attribute `AppliesTo` +### Attribute `AppliesTo` The value of `AppliesTo` is a whitespace-separated list of symbolic values from the table above that identify model elements the term is @@ -3521,7 +3522,7 @@ property of the same or a related structured type. ::: {.varxml .rep} -### Element `edm:Annotation` +### Element `edm:Annotation` The `edm:Annotation` element MUST contain the attribute `Term`, and it MAY contain the attribute [`Qualifier`](#Qualifier). @@ -3545,7 +3546,7 @@ targets the model element to be annotated. An `edm:Annotation` element MAY contain [`edm:Annotation`](#Annotation) elements that annotate the annotation. -### Attribute `Term` +### Attribute `Term` The value of `Term` is the qualified name of a [term](#Term) in scope. ::: @@ -3600,7 +3601,7 @@ identifies an annotation. ::: {.varxml .rep} -### Attribute `Qualifier` +### Attribute `Qualifier` Annotation elements that are children of an [`edm:Annotations`](#AnnotationswithExternalTargeting) element MUST NOT @@ -3681,7 +3682,7 @@ term. ::: {.varxml .rep} -### Expression `edm:Binary` +### Expression `edm:Binary` The `edm:Binary` expression evaluates to a primitive binary value. A binary expression MUST be assigned a value conforming to the rule @@ -3707,7 +3708,7 @@ Example 43: base64url-encoded binary value (OData) ::: {.varxml .rep} -### Expression `edm:Bool` +### Expression `edm:Bool` The `edm:Bool` expression evaluates to a primitive Boolean value. A Boolean expression MUST be assigned a Boolean value. @@ -3732,7 +3733,7 @@ Example 44: ::: {.varxml .rep} -### Expression `edm:Date` +### Expression `edm:Date` The `edm:Date` expression evaluates to a primitive date value. A date expression MUST be assigned a value of type `xs:date`, see @@ -3761,7 +3762,7 @@ Example 45: ::: {.varxml .rep} -### Expression `edm:DateTimeOffset` +### Expression `edm:DateTimeOffset` The `edm:DateTimeOffset` expression evaluates to a primitive datetimestamp value with a time-zone offset. A datetimestamp expression @@ -3795,7 +3796,7 @@ Example 46: ::: {.varxml .rep} -### Expression `edm:Decimal` +### Expression `edm:Decimal` The `edm:Decimal` expression evaluates to a primitive decimal value. A decimal expression MUST be assigned a value conforming to the rule @@ -3826,7 +3827,7 @@ Example 48: element notation ::: {.varxml .rep} -### Expression `edm:Duration` +### Expression `edm:Duration` The `edm:Duration` expression evaluates to a primitive duration value. A duration expression MUST be assigned a value of type @@ -3854,7 +3855,7 @@ Example 49: ::: {.varxml .rep} -### Expression `edm:EnumMember` +### Expression `edm:EnumMember` The `edm:EnumMember` expression references a [member](#EnumerationTypeMember) of an [enumeration @@ -3899,7 +3900,7 @@ Example 51: combined value for `IsFlags` enumeration type ::: {.varxml .rep} -### Expression `edm:Float` +### Expression `edm:Float` The `edm:Float` expression evaluates to a primitive floating point (or double) value. A float expression MUST be assigned a value conforming to @@ -3925,7 +3926,7 @@ Example 52: ::: {.varxml .rep} -### Expression `edm:Guid` +### Expression `edm:Guid` The `edm:Guid` expression evaluates to a primitive guid value. A guid expression MUST be assigned a value conforming to the rule `guidValue` @@ -3953,7 +3954,7 @@ Example 53: ::: {.varxml .rep} -### Expression `edm:Int` +### Expression `edm:Int` The `edm:Int` expression evaluates to a primitive integer value. An integer MUST be assigned a value conforming to the rule `int64Value` in @@ -3984,7 +3985,7 @@ Example 55: element notation ::: {.varxml .rep} -### Expression `edm:String` +### Expression `edm:String` The `edm:String` expression evaluates to a primitive string value. A string expression MUST be assigned a value of the type `xs:string`, see @@ -4011,7 +4012,7 @@ Example 56: ::: {.varxml .rep} -### Expression `edm:TimeOfDay` +### Expression `edm:TimeOfDay` The `edm:TimeOfDay` expression evaluates to a primitive time value. A time-of-day expression MUST be assigned a value conforming to the rule @@ -4294,7 +4295,7 @@ that reuse or refer to other terms. ::: {.varxml .rep} -### Expression `edm:AnnotationPath` +### Expression `edm:AnnotationPath` The `edm:AnnotationPath` expression MAY be provided using element notation or attribute notation. @@ -4328,7 +4329,7 @@ the instance(s) identified by the path. ::: {.varxml .rep} -### Expression `edm:ModelElementPath` +### Expression `edm:ModelElementPath` The `edm:ModelElementPath` expression MAY be provided using element notation or attribute notation. @@ -4364,7 +4365,7 @@ not the entitiy or collection of entities identified by the path. ::: {.varxml .rep} -### Expression `edm:NavigationPropertyPath` +### Expression `edm:NavigationPropertyPath` The `edm:NavigationPropertyPath` expression MAY be provided using element notation or attribute notation. @@ -4407,7 +4408,7 @@ identified by the path. ::: {.varxml .rep} -### Expression `edm:PropertyPath` +### Expression `edm:PropertyPath` The `edm:PropertyPath` MAY be provided using either element notation or attribute notation. @@ -4445,7 +4446,7 @@ instances identified by the path. ::: {.varxml .rep} -### Expression `edm:Path` +### Expression `edm:Path` The `edm:Path` expression MAY be provided using element notation or attribute notation. @@ -4496,21 +4497,21 @@ evaluate to comparable values. ::: {.varxml .rep} -### Expressions `edm:And` and `edm:Or` +### Expressions `edm:And` and `edm:Or` The `And` and `Or` logical expressions are represented as elements `edm:And` and `edm:Or` that MUST contain two annotation expressions. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Expression `edm:Not` +### Expression `edm:Not` Negation expressions are represented as an element `edm:Not` that MUST contain a single annotation expression. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Expressions `edm:Eq`, `edm:Ne`, `edm:Gt`, `edm:Ge`, `edm:Lt`, `edm:Le`, `edm:Has`, and `edm:In` +### Expressions `edm:Eq`, `edm:Ne`, `edm:Gt`, `edm:Ge`, `edm:Lt`, `edm:Le`, `edm:Has`, and `edm:In` All comparison expressions are represented as an element that MUST contain two annotation expressions. @@ -4596,14 +4597,14 @@ expressions that evaluate to numeric values. ::: {.varxml .rep} -### Expression `edm:Neg` +### Expression `edm:Neg` Negation expressions are represented as an element `edm:Neg` that MUST contain a single annotation expression. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Expressions `edm:Add`, `edm:Sub`, `edm:Mul`, `edm:Div`, `edm:DivBy`, and `edm:Mod` +### Expressions `edm:Add`, `edm:Sub`, `edm:Mul`, `edm:Div`, `edm:DivBy`, and `edm:Mod` These arithmetic expressions are represented as an element that MUST contain two annotation expressions. @@ -4653,14 +4654,14 @@ function. ::: {.varxml .rep} -### Expression `edm:Apply` +### Expression `edm:Apply` The `edm:Apply` element MUST contain the `Function` attribute and MAY contain annotation expressions as operands for the applied function. It MAY contain more [`edm:Annotation`](#Annotation) elements. -### Attribute `Function` +### Attribute `Function` The value of `Function` is the [qualified name](#QualifiedName) of the client-side function to apply. @@ -4808,14 +4809,14 @@ rules as the `cast` canonical function defined in ::: {.varxml .rep} -### Expression `edm:Cast` +### Expression `edm:Cast` The `edm:Cast` element MUST contain the `Type` attribute and MUST contain exactly one expression. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Type` +### Attribute `Type` The value of `Type` is a qualified type name in scope, or the character sequence `Collection(` followed by the qualified name of a type in @@ -4851,7 +4852,7 @@ compatible. ::: {.varxml .rep} -### Expression `edm:Collection` +### Expression `edm:Collection` The `edm:Collection` element contains zero or more child expressions. ::: @@ -4897,7 +4898,7 @@ collection. ::: {.varxml .rep} -### Expression `edm:If` +### Expression `edm:If` The `edm:If` element MUST contain two or three child expressions that MUST use element notation. @@ -4930,7 +4931,7 @@ the specified type, and `false` otherwise. ::: {.varxml .rep} -### Expression `edm:UrlRef` +### Expression `edm:UrlRef` The `edm:UrlRef` expression MAY be provided using element notation or attribute notation. @@ -4971,7 +4972,7 @@ within the schema containing the expression. ::: {.varxml .rep} -### Expression `edm:LabeledElement` +### Expression `edm:LabeledElement` The `edm:LabeledElement` element MUST contain the Name attribute. @@ -4980,7 +4981,7 @@ or element notation. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Name` +### Attribute `Name` The value of `Name` is the labeled element's name. ::: @@ -5010,7 +5011,7 @@ expression as its value. ::: {.varxml .rep} -### Expression `edm:LabeledElementReference` +### Expression `edm:LabeledElementReference` The `edm:LabeledElementReference` element MUST contain the qualified name of a labeled element expression in its body. @@ -5035,7 +5036,7 @@ expression MAY be annotated. ::: {.varxml .rep} -### Expression `edm:Null` +### Expression `edm:Null` The `edm:Null` element MAY contain [`edm:Annotation`](#Annotation) elements. @@ -5086,18 +5087,18 @@ expression is equivalent to specifying an empty collection as its value. ::: {.varxml .rep} -### Expression `edm:Record` +### Expression `edm:Record` The `edm:Record` element MAY contain the `Type` attribute and MAY contain `edm:PropertyValue` elements. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Type` +### Attribute `Type` The value of `Type` is the qualified name of a structured type in scope. -### Element `edm:PropertyValue` +### Element `edm:PropertyValue` The `edm:PropertyValue` element MUST contain the `Property` attribute, and it MUST contain exactly one expression that MAY be provided using @@ -5105,7 +5106,7 @@ either element notation or attribute notation. It MAY contain [`edm:Annotation`](#Annotation) elements. -### Attribute `Property` +### Attribute `Property` The value of `Property` is the name of a property of the type of the enclosing `edm:Record` expression. @@ -5160,7 +5161,7 @@ surrounding expression. ::: {.varxml .rep} -### Expression `edm:UrlRef` +### Expression `edm:UrlRef` The `edm:UrlRef` expression MAY be provided using element notation or attribute notation. @@ -5577,163 +5578,169 @@ https://openui5.hana.ondemand.com/1.40.10/#docs/guide/87aac894a40640f89920d7b2a4 # Appendix B. Table of XML Elements and Attributes ::: toc -- [Element `edmx:Edmx`](#ElementedmxEdmx1) - - [Attribute `Version`](#AttributeVersion1.1) -- [Element `edmx:DataServices`](#ElementedmxDataServices2) -- [Element `edmx:Reference`](#ElementedmxReference3) - - [Attribute `Uri`](#AttributeUri3.1) -- [Element `edmx:Include`](#ElementedmxInclude4) - - [Attribute `Namespace`](#AttributeNamespace4.1) - - [Attribute `Alias`](#AttributeAlias4.2) -- [Element `edmx:IncludeAnnotations`](#ElementedmxIncludeAnnotations5) - - [Attribute `TermNamespace`](#AttributeTermNamespace5.1) - - [Attribute `Qualifier`](#AttributeQualifier5.2) - - [Attribute `TargetNamespace`](#AttributeTargetNamespace5.3) -- [Element `edm:Schema`](#ElementedmSchema6) - - [Attribute `Namespace`](#AttributeNamespace6.1) - - [Attribute `Alias`](#AttributeAlias6.2) -- [Element `edm:Annotations`](#ElementedmAnnotations7) - - [Attribute `Target`](#AttributeTarget7.1) - - [Attribute `Qualifier`](#AttributeQualifier7.2) -- [Element `edm:EntityType`](#ElementedmEntityType8) - - [Attribute `Name`](#AttributeName8.1) - - [Attribute `BaseType`](#AttributeBaseType8.2) - - [Attribute `Abstract`](#AttributeAbstract8.3) - - [Attribute `OpenType`](#AttributeOpenType8.4) - - [Attribute `HasStream`](#AttributeHasStream8.5) -- [Element `edm:Key`](#ElementedmKey9) -- [Element `edm:PropertyRef`](#ElementedmPropertyRef10) - - [Attribute `Name`](#AttributeName10.1) - - [Attribute `Alias`](#AttributeAlias10.2) -- [Element `edm:Property`](#ElementedmProperty11) +- [Type Facet Attributes](#TypeFacetAttributes1) + - [Attribute `MaxLength`](#AttributeMaxLength1.1) + - [Attribute `Precision`](#AttributePrecision1.2) + - [Attribute `Scale`](#AttributeScale1.3) + - [Attribute `Unicode`](#AttributeUnicode1.4) + - [Attribute `SRID`](#AttributeSRID1.5) +- [Element `edmx:Edmx`](#ElementedmxEdmx2) + - [Attribute `Version`](#AttributeVersion2.1) +- [Element `edmx:DataServices`](#ElementedmxDataServices3) +- [Element `edmx:Reference`](#ElementedmxReference4) + - [Attribute `Uri`](#AttributeUri4.1) +- [Element `edmx:Include`](#ElementedmxInclude5) + - [Attribute `Namespace`](#AttributeNamespace5.1) + - [Attribute `Alias`](#AttributeAlias5.2) +- [Element `edmx:IncludeAnnotations`](#ElementedmxIncludeAnnotations6) + - [Attribute `TermNamespace`](#AttributeTermNamespace6.1) + - [Attribute `Qualifier`](#AttributeQualifier6.2) + - [Attribute `TargetNamespace`](#AttributeTargetNamespace6.3) +- [Element `edm:Schema`](#ElementedmSchema7) + - [Attribute `Namespace`](#AttributeNamespace7.1) + - [Attribute `Alias`](#AttributeAlias7.2) +- [Element `edm:Annotations`](#ElementedmAnnotations8) + - [Attribute `Target`](#AttributeTarget8.1) + - [Attribute `Qualifier`](#AttributeQualifier8.2) +- [Element `edm:EntityType`](#ElementedmEntityType9) + - [Attribute `Name`](#AttributeName9.1) + - [Attribute `BaseType`](#AttributeBaseType9.2) + - [Attribute `Abstract`](#AttributeAbstract9.3) + - [Attribute `OpenType`](#AttributeOpenType9.4) + - [Attribute `HasStream`](#AttributeHasStream9.5) +- [Element `edm:Key`](#ElementedmKey10) +- [Element `edm:PropertyRef`](#ElementedmPropertyRef11) - [Attribute `Name`](#AttributeName11.1) - - [Attribute `Type`](#AttributeType11.2) - - [Attribute `Nullable`](#AttributeNullable11.3) - - [Attribute `DefaultValue`](#AttributeDefaultValue11.4) -- [Element `edm:NavigationProperty`](#ElementedmNavigationProperty12) + - [Attribute `Alias`](#AttributeAlias11.2) +- [Element `edm:Property`](#ElementedmProperty12) - [Attribute `Name`](#AttributeName12.1) - [Attribute `Type`](#AttributeType12.2) - [Attribute `Nullable`](#AttributeNullable12.3) - - [Attribute `Partner`](#AttributePartner12.4) - - [Attribute `ContainsTarget`](#AttributeContainsTarget12.5) -- [Element `edm:ReferentialConstraint`](#ElementedmReferentialConstraint13) - - [Attribute `Property`](#AttributeProperty13.1) - - [Attribute `ReferencedProperty`](#AttributeReferencedProperty13.2) -- [Element `edm:OnDelete`](#ElementedmOnDelete14) - - [Attribute `Action`](#AttributeAction14.1) -- [Element `edm:ComplexType`](#ElementedmComplexType15) - - [Attribute `Name`](#AttributeName15.1) - - [Attribute `BaseType`](#AttributeBaseType15.2) - - [Attribute `Abstract`](#AttributeAbstract15.3) - - [Attribute `OpenType`](#AttributeOpenType15.4) -- [Element `edm:EnumType`](#ElementedmEnumType16) + - [Attribute `DefaultValue`](#AttributeDefaultValue12.4) +- [Element `edm:NavigationProperty`](#ElementedmNavigationProperty13) + - [Attribute `Name`](#AttributeName13.1) + - [Attribute `Type`](#AttributeType13.2) + - [Attribute `Nullable`](#AttributeNullable13.3) + - [Attribute `Partner`](#AttributePartner13.4) + - [Attribute `ContainsTarget`](#AttributeContainsTarget13.5) +- [Element `edm:ReferentialConstraint`](#ElementedmReferentialConstraint14) + - [Attribute `Property`](#AttributeProperty14.1) + - [Attribute `ReferencedProperty`](#AttributeReferencedProperty14.2) +- [Element `edm:OnDelete`](#ElementedmOnDelete15) + - [Attribute `Action`](#AttributeAction15.1) +- [Element `edm:ComplexType`](#ElementedmComplexType16) - [Attribute `Name`](#AttributeName16.1) - - [Attribute `UnderlyingType`](#AttributeUnderlyingType16.2) - - [Attribute `IsFlags`](#AttributeIsFlags16.3) -- [Element `edm:Member`](#ElementedmMember17) + - [Attribute `BaseType`](#AttributeBaseType16.2) + - [Attribute `Abstract`](#AttributeAbstract16.3) + - [Attribute `OpenType`](#AttributeOpenType16.4) +- [Element `edm:EnumType`](#ElementedmEnumType17) - [Attribute `Name`](#AttributeName17.1) - - [Attribute `Value`](#AttributeValue17.2) -- [Element `edm:TypeDefinition`](#ElementedmTypeDefinition18) + - [Attribute `UnderlyingType`](#AttributeUnderlyingType17.2) + - [Attribute `IsFlags`](#AttributeIsFlags17.3) +- [Element `edm:Member`](#ElementedmMember18) - [Attribute `Name`](#AttributeName18.1) - - [Attribute `UnderlyingType`](#AttributeUnderlyingType18.2) -- [Element `edm:Action`](#ElementedmAction19) + - [Attribute `Value`](#AttributeValue18.2) +- [Element `edm:TypeDefinition`](#ElementedmTypeDefinition19) - [Attribute `Name`](#AttributeName19.1) -- [Element `edm:Function`](#ElementedmFunction20) + - [Attribute `UnderlyingType`](#AttributeUnderlyingType19.2) +- [Element `edm:Action`](#ElementedmAction20) - [Attribute `Name`](#AttributeName20.1) - - [Attribute `IsBound`](#AttributeIsBound20.2) - - [Attribute `EntitySetPath`](#AttributeEntitySetPath20.3) - - [Attribute `IsComposable`](#AttributeIsComposable20.4) -- [Element `edm:ReturnType`](#ElementedmReturnType21) - - [Attribute `Type`](#AttributeType21.1) - - [Attribute `Nullable`](#AttributeNullable21.2) -- [Element `edm:Parameter`](#ElementedmParameter22) - - [Attribute `Name`](#AttributeName22.1) - - [Attribute `Type`](#AttributeType22.2) - - [Attribute `Nullable`](#AttributeNullable22.3) -- [Element `edm:EntityContainer`](#ElementedmEntityContainer23) +- [Element `edm:Function`](#ElementedmFunction21) + - [Attribute `Name`](#AttributeName21.1) + - [Attribute `IsBound`](#AttributeIsBound21.2) + - [Attribute `EntitySetPath`](#AttributeEntitySetPath21.3) + - [Attribute `IsComposable`](#AttributeIsComposable21.4) +- [Element `edm:ReturnType`](#ElementedmReturnType22) + - [Attribute `Type`](#AttributeType22.1) + - [Attribute `Nullable`](#AttributeNullable22.2) +- [Element `edm:Parameter`](#ElementedmParameter23) - [Attribute `Name`](#AttributeName23.1) - - [Attribute `Extends`](#AttributeExtends23.2) -- [Element `edm:EntitySet`](#ElementedmEntitySet24) + - [Attribute `Type`](#AttributeType23.2) + - [Attribute `Nullable`](#AttributeNullable23.3) +- [Element `edm:EntityContainer`](#ElementedmEntityContainer24) - [Attribute `Name`](#AttributeName24.1) - - [Attribute `EntityType`](#AttributeEntityType24.2) - - [Attribute `IncludeInServiceDocument`](#AttributeIncludeInServiceDocument24.3) -- [Element `edm:Singleton`](#ElementedmSingleton25) + - [Attribute `Extends`](#AttributeExtends24.2) +- [Element `edm:EntitySet`](#ElementedmEntitySet25) - [Attribute `Name`](#AttributeName25.1) - - [Attribute `Type`](#AttributeType25.2) - - [Attribute `Nullable`](#AttributeNullable25.3) -- [Element `edm:NavigationPropertyBinding`](#ElementedmNavigationPropertyBinding26) - - [Attribute `Path`](#AttributePath26.1) - - [Attribute `Target`](#AttributeTarget26.2) -- [Element `edm:ActionImport`](#ElementedmActionImport27) - - [Attribute `Name`](#AttributeName27.1) - - [Attribute `Action`](#AttributeAction27.2) - - [Attribute `EntitySet`](#AttributeEntitySet27.3) -- [Element `edm:FunctionImport`](#ElementedmFunctionImport28) + - [Attribute `EntityType`](#AttributeEntityType25.2) + - [Attribute `IncludeInServiceDocument`](#AttributeIncludeInServiceDocument25.3) +- [Element `edm:Singleton`](#ElementedmSingleton26) + - [Attribute `Name`](#AttributeName26.1) + - [Attribute `Type`](#AttributeType26.2) + - [Attribute `Nullable`](#AttributeNullable26.3) +- [Element `edm:NavigationPropertyBinding`](#ElementedmNavigationPropertyBinding27) + - [Attribute `Path`](#AttributePath27.1) + - [Attribute `Target`](#AttributeTarget27.2) +- [Element `edm:ActionImport`](#ElementedmActionImport28) - [Attribute `Name`](#AttributeName28.1) - - [Attribute `Function`](#AttributeFunction28.2) + - [Attribute `Action`](#AttributeAction28.2) - [Attribute `EntitySet`](#AttributeEntitySet28.3) - - [Attribute `IncludeInServiceDocument`](#AttributeIncludeInServiceDocument28.4) -- [Element `edm:Term`](#ElementedmTerm29) +- [Element `edm:FunctionImport`](#ElementedmFunctionImport29) - [Attribute `Name`](#AttributeName29.1) - - [Attribute `Type`](#AttributeType29.2) - - [Attribute `Nullable`](#AttributeNullable29.3) - - [Attribute `DefaultValue`](#AttributeDefaultValue29.4) - - [Attribute `BaseTerm`](#AttributeBaseTerm29.5) - - [Attribute `AppliesTo`](#AttributeAppliesTo29.6) -- [Element `edm:Annotation`](#ElementedmAnnotation30) - - [Attribute `Term`](#AttributeTerm30.1) - - [Attribute `Qualifier`](#AttributeQualifier30.2) -- [Expression `edm:Binary`](#ExpressionedmBinary31) -- [Expression `edm:Bool`](#ExpressionedmBool32) -- [Expression `edm:Date`](#ExpressionedmDate33) -- [Expression `edm:DateTimeOffset`](#ExpressionedmDateTimeOffset34) -- [Expression `edm:Decimal`](#ExpressionedmDecimal35) -- [Expression `edm:Duration`](#ExpressionedmDuration36) -- [Expression `edm:EnumMember`](#ExpressionedmEnumMember37) -- [Expression `edm:Float`](#ExpressionedmFloat38) -- [Expression `edm:Guid`](#ExpressionedmGuid39) -- [Expression `edm:Int`](#ExpressionedmInt40) -- [Expression `edm:String`](#ExpressionedmString41) -- [Expression `edm:TimeOfDay`](#ExpressionedmTimeOfDay42) -- [Expression `edm:AnnotationPath`](#ExpressionedmAnnotationPath43) -- [Expression `edm:ModelElementPath`](#ExpressionedmModelElementPath44) -- [Expression `edm:NavigationPropertyPath`](#ExpressionedmNavigationPropertyPath45) -- [Expression `edm:PropertyPath`](#ExpressionedmPropertyPath46) -- [Expression `edm:Path`](#ExpressionedmPath47) -- [Expressions `edm:And`](#ExpressionsedmAnd48) - - [`edm:Or`](#edmOr48.1) -- [Expression `edm:Not`](#ExpressionedmNot49) -- [Expressions `edm:Eq`](#ExpressionsedmEq50) - - [`edm:Ne`](#edmNe50.1) - - [`edm:Gt`](#edmGt50.2) - - [`edm:Ge`](#edmGe50.3) - - [`edm:Lt`](#edmLt50.4) - - [`edm:Le`](#edmLe50.5) - - [`edm:Has`](#edmHas50.6) - - [`edm:In`](#edmIn50.7) -- [Expression `edm:Neg`](#ExpressionedmNeg51) -- [Expressions `edm:Add`](#ExpressionsedmAdd52) - - [`edm:Sub`](#edmSub52.1) - - [`edm:Mul`](#edmMul52.2) - - [`edm:Div`](#edmDiv52.3) - - [`edm:DivBy`](#edmDivBy52.4) - - [`edm:Mod`](#edmMod52.5) -- [Expression `edm:Apply`](#ExpressionedmApply53) - - [Attribute `Function`](#AttributeFunction53.1) -- [Expression `edm:Cast`](#ExpressionedmCast54) - - [Attribute `Type`](#AttributeType54.1) -- [Expression `edm:Collection`](#ExpressionedmCollection55) -- [Expression `edm:If`](#ExpressionedmIf56) -- [Expression `edm:UrlRef`](#ExpressionedmUrlRef57) -- [Expression `edm:LabeledElement`](#ExpressionedmLabeledElement58) - - [Attribute `Name`](#AttributeName58.1) -- [Expression `edm:LabeledElementReference`](#ExpressionedmLabeledElementReference59) -- [Expression `edm:Null`](#ExpressionedmNull60) -- [Expression `edm:Record`](#ExpressionedmRecord61) - - [Attribute `Type`](#AttributeType61.1) -- [Element `edm:PropertyValue`](#ElementedmPropertyValue62) - - [Attribute `Property`](#AttributeProperty62.1) -- [Expression `edm:UrlRef`](#ExpressionedmUrlRef63) + - [Attribute `Function`](#AttributeFunction29.2) + - [Attribute `EntitySet`](#AttributeEntitySet29.3) + - [Attribute `IncludeInServiceDocument`](#AttributeIncludeInServiceDocument29.4) +- [Element `edm:Term`](#ElementedmTerm30) + - [Attribute `Name`](#AttributeName30.1) + - [Attribute `Type`](#AttributeType30.2) + - [Attribute `Nullable`](#AttributeNullable30.3) + - [Attribute `DefaultValue`](#AttributeDefaultValue30.4) + - [Attribute `BaseTerm`](#AttributeBaseTerm30.5) + - [Attribute `AppliesTo`](#AttributeAppliesTo30.6) +- [Element `edm:Annotation`](#ElementedmAnnotation31) + - [Attribute `Term`](#AttributeTerm31.1) + - [Attribute `Qualifier`](#AttributeQualifier31.2) +- [Expression `edm:Binary`](#ExpressionedmBinary32) +- [Expression `edm:Bool`](#ExpressionedmBool33) +- [Expression `edm:Date`](#ExpressionedmDate34) +- [Expression `edm:DateTimeOffset`](#ExpressionedmDateTimeOffset35) +- [Expression `edm:Decimal`](#ExpressionedmDecimal36) +- [Expression `edm:Duration`](#ExpressionedmDuration37) +- [Expression `edm:EnumMember`](#ExpressionedmEnumMember38) +- [Expression `edm:Float`](#ExpressionedmFloat39) +- [Expression `edm:Guid`](#ExpressionedmGuid40) +- [Expression `edm:Int`](#ExpressionedmInt41) +- [Expression `edm:String`](#ExpressionedmString42) +- [Expression `edm:TimeOfDay`](#ExpressionedmTimeOfDay43) +- [Expression `edm:AnnotationPath`](#ExpressionedmAnnotationPath44) +- [Expression `edm:ModelElementPath`](#ExpressionedmModelElementPath45) +- [Expression `edm:NavigationPropertyPath`](#ExpressionedmNavigationPropertyPath46) +- [Expression `edm:PropertyPath`](#ExpressionedmPropertyPath47) +- [Expression `edm:Path`](#ExpressionedmPath48) +- [Expressions `edm:And`](#ExpressionsedmAnd49) + - [`edm:Or`](#edmOr49.1) +- [Expression `edm:Not`](#ExpressionedmNot50) +- [Expressions `edm:Eq`](#ExpressionsedmEq51) + - [`edm:Ne`](#edmNe51.1) + - [`edm:Gt`](#edmGt51.2) + - [`edm:Ge`](#edmGe51.3) + - [`edm:Lt`](#edmLt51.4) + - [`edm:Le`](#edmLe51.5) + - [`edm:Has`](#edmHas51.6) + - [`edm:In`](#edmIn51.7) +- [Expression `edm:Neg`](#ExpressionedmNeg52) +- [Expressions `edm:Add`](#ExpressionsedmAdd53) + - [`edm:Sub`](#edmSub53.1) + - [`edm:Mul`](#edmMul53.2) + - [`edm:Div`](#edmDiv53.3) + - [`edm:DivBy`](#edmDivBy53.4) + - [`edm:Mod`](#edmMod53.5) +- [Expression `edm:Apply`](#ExpressionedmApply54) + - [Attribute `Function`](#AttributeFunction54.1) +- [Expression `edm:Cast`](#ExpressionedmCast55) + - [Attribute `Type`](#AttributeType55.1) +- [Expression `edm:Collection`](#ExpressionedmCollection56) +- [Expression `edm:If`](#ExpressionedmIf57) +- [Expression `edm:UrlRef`](#ExpressionedmUrlRef58) +- [Expression `edm:LabeledElement`](#ExpressionedmLabeledElement59) + - [Attribute `Name`](#AttributeName59.1) +- [Expression `edm:LabeledElementReference`](#ExpressionedmLabeledElementReference60) +- [Expression `edm:Null`](#ExpressionedmNull61) +- [Expression `edm:Record`](#ExpressionedmRecord62) + - [Attribute `Type`](#AttributeType62.1) +- [Element `edm:PropertyValue`](#ElementedmPropertyValue63) + - [Attribute `Property`](#AttributeProperty63.1) +- [Expression `edm:UrlRef`](#ExpressionedmUrlRef64) ::: ------- diff --git a/odata-csdl/1 Introduction.md b/odata-csdl/1 Introduction.md index 4e6132f01..a17df76f6 100644 --- a/odata-csdl/1 Introduction.md +++ b/odata-csdl/1 Introduction.md @@ -511,6 +511,7 @@ If no maximum length is specified, clients SHOULD expect arbitrary length. ::: {.varjson .rep} +### ##isec Type Facets ### ##subisec `$MaxLength` The value of `$MaxLength` is a positive integer. @@ -523,6 +524,7 @@ service or omit the member entirely. ::: ::: {.varxml .rep} +### ##isec Type Facet Attributes ### ##subisec Attribute `MaxLength` The value of `MaxLength` is a positive integer or the symbolic value From 1fe929f77f4557437beb144fc1db2bd2e60cf10d Mon Sep 17 00:00:00 2001 From: D024504 Date: Thu, 19 Oct 2023 13:26:04 +0200 Subject: [PATCH 38/74] Make web server more robust --- lib/number.js | 218 +++++++++++++++++++++++++++----------------------- 1 file changed, 118 insertions(+), 100 deletions(-) diff --git a/lib/number.js b/lib/number.js index 2d8efa6fa..7a9caa2bd 100644 --- a/lib/number.js +++ b/lib/number.js @@ -15,7 +15,7 @@ class Number { this.meta = meta || yaml.load( - fs.readFileSync(dir + "/" + (this.variant || "meta") + ".yaml") + fs.readFileSync(dir + "/" + (this.variant || "meta") + ".yaml"), ); } @@ -51,6 +51,7 @@ class Number { function (resolve, reject) { this.fence = undefined; this.skipping = undefined; + var lineno = 0; createInterface({ input: fs.createReadStream(this.dir + "/" + file), crlfDelay: Infinity, @@ -58,64 +59,73 @@ class Number { .on( "line", function (line) { + lineno++; if (this.skip(line)) return; - for (var m, regex = //g; (m = regex.exec(line)); ) - this.refs[m[1]] = true; - m = line.match(/ ##([A-Za-z0-9.]+)(_([A-Za-z0-9]+))?/); - if (m && line[m.index + m[0].length] !== "]") { - if ( - !m[1].startsWith("sub") && - m[1].endsWith("isec") && - !this.toc[m[1]] + try { + for ( + var m, regex = //g; + (m = regex.exec(line)); + ) - this.toc[m[1]] = { sub: [] }; - if (m[1].endsWith("sec")) { - m = line.match( - / ##([A-Za-z0-9.]+)(?:_[A-Za-z0-9]+)?\s+(.+)$/ - ); - m[3] = m[2].replace(/[^A-Za-z0-9]/g, ""); - } - this.counter[m[1]] = (this.counter[m[1]] || 0) + 1; - for (var subc in this.counter) - if (subc.endsWith("sub" + m[1])) this.counter[subc] = 0; - this.number[this.match] = this.secno(m[1]); - for (var supc = m[1]; supc.startsWith("sub"); ) - this.number[this.match] = - this.secno((supc = supc.substring(3))) + - "." + - this.number[this.match]; - if (m[1].endsWith("isec")) { - m[3] += this.number[this.match]; - this.number[this.match] = "i" + this.number[this.match]; - } - if (m[1].endsWith("sec")) { - var s = this.number[this.match]; - this.toc[s] = { - number: s, - name: m[2], - href: m[3], - sub: [], - }; - var p = s.substring(0, s.lastIndexOf(".")); - if (p === "" && m[1].endsWith("isec")) p = m[1]; - this.toc[p]?.sub.push(this.toc[s]); - } - if (m[2]) { - this.refs[m[3]] = this.number[this.match]; - this.number[this.match] = `${ - this.number[this.match].startsWith("i") - ? "" - : this.number[this.match] - }${m[1] === "asec" ? "." : ""}`; + this.refs[m[1]] = true; + m = line.match(/ ##([A-Za-z0-9.]+)(_([A-Za-z0-9]+))?/); + if (m && line[m.index + m[0].length] !== "]") { + if ( + !m[1].startsWith("sub") && + m[1].endsWith("isec") && + !this.toc[m[1]] + ) + this.toc[m[1]] = { sub: [] }; + if (m[1].endsWith("sec")) { + m = line.match( + / ##([A-Za-z0-9.]+)(?:_[A-Za-z0-9]+)?\s+(.+)$/, + ); + m[3] = m[2].replace(/[^A-Za-z0-9]/g, ""); + } + this.counter[m[1]] = (this.counter[m[1]] || 0) + 1; + for (var subc in this.counter) + if (subc.endsWith("sub" + m[1])) this.counter[subc] = 0; + this.number[this.match] = this.secno(m[1]); + for (var supc = m[1]; supc.startsWith("sub"); ) + this.number[this.match] = + this.secno((supc = supc.substring(3))) + + "." + + this.number[this.match]; + if (m[1].endsWith("isec")) { + m[3] += this.number[this.match]; + this.number[this.match] = "i" + this.number[this.match]; + } + if (m[1].endsWith("sec")) { + var s = this.number[this.match]; + this.toc[s] = { + number: s, + name: m[2], + href: m[3], + sub: [], + }; + var p = s.substring(0, s.lastIndexOf(".")); + if (p === "" && m[1].endsWith("isec")) p = m[1]; + this.toc[p]?.sub.push(this.toc[s]); + } + if (m[2]) { + this.refs[m[3]] = this.number[this.match]; + this.number[this.match] = `${ + this.number[this.match].startsWith("i") + ? "" + : this.number[this.match] + }${m[1] === "asec" ? "." : ""}`; + } + this.match++; } - this.match++; + } catch (e) { + this.errors.push(`${file}#${lineno}: ${e.toString()}`); } - }.bind(this) + }.bind(this), ) .on("close", resolve); - }.bind(this) + }.bind(this), ); } @@ -134,56 +144,64 @@ class Number { function (line) { lineno++; if (this.skip(line)) return; - var m1 = line.match(/^\$\$\$(.*?isec)\$\$\$$/); - if (m1) this.tableofcontents(this.toc[m1[1]]?.sub || [], out, ""); - else { - line = line.replace( - /\$\$\$(.*?)\$\$\$/g, - function (m, p) { - return this.meta[p] || m; - }.bind(this) - ); - for (var m, regex = /\]\(#(.*?)\)/g; (m = regex.exec(line)); ) - if (!this.refs[m[1]]) - this.errors.push( - `${this.dir}/${file}(${lineno}): Undefined link #${m[1]}` - ); - m = line.match(/ ##([A-Za-z0-9.]+)(_([A-Za-z0-9]+))?/); - var outline = line; - if (m && line[m.index + m[0].length] !== "]") { - var prefix = line.substring(0, m.index) + " "; - var suffix = line.substring(m.index + m[0].length); - if (m[1].endsWith("sec")) - outline = ( - prefix + - this.number[this.match].replace(/<\/a>$/, suffix + "") - ) - .replace(/(Appendix )()/, "$2$1") - .replace(/(,? )(<\/a>)$/, "$2$1"); - else outline = prefix + this.number[this.match] + suffix; - this.match++; - } - out.write( - outline.replace( - /##([A-Za-z0-9.]+)\]/g, + try { + var m1 = line.match(/^\$\$\$(.*?isec)\$\$\$$/); + if (m1) + this.tableofcontents(this.toc[m1[1]]?.sub || [], out, ""); + else { + line = line.replace( + /\$\$\$(.*?)\$\$\$/g, function (m, p) { - var r = this.refs[p]; - if (r) return `${r}](#${p})`; - else { - this.errors.push( - `${this.dir}/${file}(${lineno}): Undefined link ##${p}` - ); - return `~~${p}~~]`; - } - }.bind(this) - ) - ); - if (!/\S\s$/.test(line)) out.write("\n"); + return this.meta[p] || m; + }.bind(this), + ); + for (var m, regex = /\]\(#(.*?)\)/g; (m = regex.exec(line)); ) + if (!this.refs[m[1]]) + this.errors.push( + `${this.dir}/${file}(${lineno}): Undefined link #${m[1]}`, + ); + m = line.match(/ ##([A-Za-z0-9.]+)(_([A-Za-z0-9]+))?/); + var outline = line; + if (m && line[m.index + m[0].length] !== "]") { + var prefix = line.substring(0, m.index) + " "; + var suffix = line.substring(m.index + m[0].length); + if (m[1].endsWith("sec")) + outline = ( + prefix + + this.number[this.match].replace( + /<\/a>$/, + suffix + "", + ) + ) + .replace(/(Appendix )()/, "$2$1") + .replace(/(,? )(<\/a>)$/, "$2$1"); + else outline = prefix + this.number[this.match] + suffix; + this.match++; + } + out.write( + outline.replace( + /##([A-Za-z0-9.]+)\]/g, + function (m, p) { + var r = this.refs[p]; + if (r) return `${r}](#${p})`; + else { + this.errors.push( + `${this.dir}/${file}(${lineno}): Undefined link ##${p}`, + ); + return `~~${p}~~]`; + } + }.bind(this), + ), + ); + if (!/\S\s$/.test(line)) out.write("\n"); + } + } catch (e) { + this.errors.push(`${file}#${lineno}: ${e.toString()}`); } - }.bind(this) + }.bind(this), ) .on("close", resolve); - }.bind(this) + }.bind(this), ); } @@ -192,7 +210,7 @@ class Number { out.write( `${indent}- [${ s.number.startsWith("i") ? "" : s.number + " " - }${s.name.replace(/,? $/, "")}](#${s.href})\n` + }${s.name.replace(/,? $/, "")}](#${s.href})\n`, ); this.tableofcontents(s.sub, out, indent + " "); } From ccbdb9b08136e8f3f3a333f6f1c36dc847533ae6 Mon Sep 17 00:00:00 2001 From: D024504 Date: Thu, 19 Oct 2023 13:30:37 +0200 Subject: [PATCH 39/74] Type Facet Members --- docs/odata-csdl-json/odata-csdl-json.html | 4 ++-- docs/odata-csdl-json/odata-csdl-json.md | 4 ++-- odata-csdl/1 Introduction.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index d6f693ed4..6890b21e1 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -628,7 +628,7 @@

    3.4.1 MaxLength

    A positive integer value specifying the maximum length of a binary, stream or string value. For binary or stream values this is the octet length of the binary data, for string values it is the character length (number of code points for Unicode).

    If no maximum length is specified, clients SHOULD expect arbitrary length.

    -

    Type Facets

    +

    Type Facet Members

    $MaxLength

    The value of $MaxLength is a positive integer.

    Note: OData-CSDL-XML defines a symbolic value max that is only allowed in OData 4.0 responses. This symbolic value is not allowed in CDSL JSON documents at all. Services MAY instead specify the concrete maximum length supported for the type by the service or omit the member entirely.

    @@ -3571,7 +3571,7 @@
    [OpenUI5]

    Appendix B. Table of JSON Objects and Members

    Upon successful completion of the operation, the service creates the requested entity and relates it to the requested existing entities.

    If the target URL for the collection the entity is created in and binding information provided in the POST body contradicts the implicit binding information provided by the request URL, the request MUST fail, and the service responds with 400 Bad Request.

    @@ -1782,7 +1783,7 @@

    11.4.3 Update an Entity

    @@ -1876,7 +1877,7 @@

    1

    A PUT or PATCH request MUST NOT be treated as an update if an If-None-Match header is specified with a value of *.

    11.4.5 Delete an Entity

    To delete an individual entity, the client makes a DELETE request to a URL that identifies the entity. Services MAY restrict deletes only to requests addressing the edit URL of the entity.

    -

    The request body SHOULD be empty. Singleton entities can be deleted if they are nullable. Services supporting this SHOULD advertise it by annotating the singleton with the term Capabilities.DeleteRestrictions (nested property Deletable with value true) defined in OData-VocCap.

    +

    The request body SHOULD be empty. Top-level singleton entities can be deleted if they are nullable. Services supporting this MAY advertise it by annotating the singleton with the term Capabilities.DeleteRestrictions (nested property Deletable with value true) defined in OData-VocCap.

    On successful completion of the delete, the response MUST be 204 No Content and contain an empty body.

    Services MUST implicitly remove relations to and from an entity when deleting it; clients need not delete the relations explicitly.

    Services MAY implicitly delete or modify related entities if required by integrity constraints. If integrity constraints are declared in $metadata using a ReferentialConstraint element, services MUST modify affected related entities according to the declared integrity constraints, e.g. by deleting dependent entities, or setting dependent properties to null or their default value.

    @@ -1919,6 +1920,27 @@

    11.4.8 Managing Stream Properties

    An entity may have one or more stream properties. Stream properties are properties of type Edm.Stream.

    The values for stream properties do not usually appear in the entity payload. Instead, the values are generally read or written through URLs.

    +
    +

    Example 80: read an entity and select a stream property

    +
    GET http://host/service/Products(1)?$select=Thumbnail
    +

    would only include control information for the stream property, not the stream data itself

    +
    {
    +  "@context": "http://host/service/$metadata#Products/$entity",
    +  ...
    +  "Thumbnail@mediaReadLink": "http://server/Thumbnail546.jpg",
    +  "Thumbnail@mediaEditLink": "http://server/uploads/Thumbnail546.jpg",
    +  ...
    +}
    +

    The stream data can then be requested using the media read link:

    +
    GET http://server/Thumbnail546.jpg
    +
    +

    Services SHOULD support direct property access to a stream property's canonical URL. The response MAY be a redirect to the media read link of the stream property if the media read link is different from the canonical URL.

    +
    +

    Example 81: directly read a stream property of an entity

    +
    GET http://host/service/Products(1)/Thumbnail
    +

    can return 200 OK and the stream data, or a 3xx Redirect to the media read link of the stream property.

    +
    +

    Note: for scenarios in which the media value can only be inlined, the property should instead be modeled with type Edm.Binary.

    11.4.8.1 Update Stream Values

    A successful PUT request to the edit URL of a stream property changes the media stream associated with that property.

    If the stream metadata includes an ETag value, the client SHOULD include an If-Match header with the ETag value.

    @@ -1928,6 +1950,10 @@

    OData-VocCap.

    11.4.8.2 Delete Stream Values

    A successful DELETE request to the edit URL of a stream property attempts to set the property to null and results in an error if the property is non-nullable.

    +
    +

    Example 82: delete the stream value using the media edit link retrieved in example 80

    +
    DELETE http://server/uploads/Thumbnail546.jpg
    +

    Attempting to request a stream property whose value is null results in 204 No Content.

    11.4.9 Managing Values and Properties Directly

    Values and properties can be explicitly addressed with URLs. The edit URL of a property is the edit URL of the entity appended with the path segment(s) specifying the individual property. The edit URL allows properties to be individually modified. See OData-URL for details on addressing individual properties.

    @@ -1953,10 +1979,10 @@

    11.4.9.4 Update a Collection Property

    A successful PUT request to the edit URL of a collection property updates that collection. The message body MUST contain the desired new value, formatted as a collection property according to the specified format.

    The service MUST replace the entire value with the value supplied in the request body.

    -

    A successful POST request to the edit URL of a collection property adds an item to the collection. The body of the request MUST be a single item to be added to the collection. If the collection is ordered, the item is added to the end of the collection, and $index MAY be used to specify a zero-based ordinal position to insert the new value, with a negative value indicating an ordinal position from the end of the collection.

    +

    A successful POST request to the edit URL of a collection property adds an item to the collection. The body of the request MUST be a single item to be added to the collection. If the collection is ordered, the item is added to the end of the collection, and if the collection supports positional insert $index MAY be used to specify the insert position.

    A successful DELETE request to the edit URL of a collection property deletes all items in that collection.

    Since collection members have no individual identity, PATCH is not supported for collection properties.

    -

    Upon successful completion the service responds with either 200 OK or 204 No Content. The client may request that the response SHOULD include a body by specifying a Prefer header with a value of return=representation.

    +

    Upon successful completion the service responds with either 200 OK and a representation of the updated collection, or 204 No Content. The client may request that the response SHOULD include a body by specifying a Prefer header with a value of return=representation.

    Services MUST return an error if the property is not updatable.

    11.4.10 Managing Members of an Ordered Collection

    Collections annotated with the Core.Ordered term (see OData-VocCore) have a stable order. Members of an ordered collection of primitive and complex types can be individually updated or deleted by invoking an update operation against the URL of the collection appended by a segment containing the zero-based ordinal of the item within the collection. A negative ordinal number indexes from the end of the collection, with -1 representing the last item in the collection.

    @@ -1964,13 +1990,13 @@

    11.4.11 Positional Inserts

    Collections of entity, complex, or primitive types annotated with the Core.PositionalInsert term (see OData-VocCore) support inserting items at a specific location via POST requests to the collection URL using the $index system query option. The value of the $index system query option is the zero-based ordinal position where the item is to be inserted. The ordinal positions of items within the collection greater than or equal to the inserted position are increased by one. A negative ordinal number indexes from the end of the collection, with -1 representing an insert as the last item in the collection.

    -

    Example 80: Insert a new email address at the second position

    -
    POST /service/Customers('ALFKI')/EmailAddresses?$index=1
    -Content-Type: application/json
    -
    -{
    -  "value": "alfred@futterkiste.de"
    -}
    +

    Example 83: Insert a new email address at the second position

    +
    POST /service/Customers('ALFKI')/EmailAddresses?$index=1
    +Content-Type: application/json
    +
    +{
    +  "value": "alfred@futterkiste.de"
    +}

    11.4.12 Update a Collection of Entities

    Collections of entities can be updated by submitting a PATCH request to the resource path of the collection. The body of the request MUST be a delta payload, and the resource path of the collection MUST NOT contain type cast or filter segments, and MUST NOT contain any system query options that affect the shape of the result.

    @@ -1996,14 +2022,14 @@

    updated using PATCH semantics. Structured types MAY include nested collections or delta collections, in which case the semantics described in Update a Collection of Entities applies.

    -

    Example 81: change the color of all beige-brown products

    -
    PATCH /service/Products/$filter(@bar)/$each?@bar=Color eq
    -'beige-brown'
    -Content-Type: application/json
    -
    -{
    -  "Color": "taupe"
    -}
    +

    Example 84: change the color of all beige-brown products

    +
    PATCH /service/Products/$filter(@bar)/$each?@bar=Color eq
    +'beige-brown'
    +Content-Type: application/json
    +
    +{
    +  "Color": "taupe"
    +}

    The response, if requested, is a collection payload containing the updated representation of each member identified by the request. If the update payload includes nested collections or nested delta collections, then they MUST be included in the response, as described in Update a Collection of Entities.

    Clients should note that requesting a response may be expensive for services that could otherwise efficiently apply updates to a (possibly filtered) collection.

    @@ -2013,7 +2039,7 @@

    -

    Example 82: delete all products older than 3

    +

    Example 85: delete all products older than 3

    DELETE /service/Products/$filter(Age gt 3)/$each

    If the path identifies a collection of entities and if the service returns a representation, then the response is a delta response containing a representation of a deleted entity for each deleted member.

    @@ -2026,25 +2052,25 @@

    Actions and Functions MAY be bound to any type or collection, similar to defining a method in a class in object-oriented programming. The first parameter of a bound operation is the binding parameter.

    The namespace- or alias-qualified name of a bound operation may be appended to any URL that identifies a resource whose type matches, or is derived from, the type of the binding parameter. The resource identified by that URL is used as the binding parameter value. Only aliases defined in the metadata document of the service can be used in URLs.

    -

    Example 83: the function MostRecentOrder can be bound to any URL that identifies a SampleModel.Customer

    -
    <Function Name="MostRecentOrder" IsBound="true">
    -  <Parameter Name="customer" Type="SampleModel.Customer" />
    -  <ReturnType Type="SampleModel.Order" />
    -</Function>
    +

    Example 86: the function MostRecentOrder can be bound to any URL that identifies a SampleModel.Customer

    +
    <Function Name="MostRecentOrder" IsBound="true">
    +  <Parameter Name="customer" Type="SampleModel.Customer" />
    +  <ReturnType Type="SampleModel.Order" />
    +</Function>
    -

    Example 84: invoke the MostRecentOrder function with the value of the binding parameter customer being the entity identified by http://host/service/Customers(6)

    +

    Example 87: invoke the MostRecentOrder function with the value of the binding parameter customer being the entity identified by http://host/service/Customers(6)

    GET http://host/service/Customers(6)/SampleModel.MostRecentOrder()
    -

    Example 85: the function Comparison can be bound to any URL that identifies a collection of entities

    -
    <Function Name="Comparison" IsBound="true">
    -  <Parameter Name="in" Type="Collection(Edm.EntityType)" />
    -  <ReturnType Type="Diff.Overview" />
    -</Function>
    +

    Example 88: the function Comparison can be bound to any URL that identifies a collection of entities

    +
    <Function Name="Comparison" IsBound="true">
    +  <Parameter Name="in" Type="Collection(Edm.EntityType)" />
    +  <ReturnType Type="Diff.Overview" />
    +</Function>
    -

    Example 86: invoke the Comparison function on the set of red products

    +

    Example 89: invoke the Comparison function on the set of red products

    GET http://host/service/Products/$filter(Color eq 'Red')/Diff.Comparison()

    11.5.2 Applying an Action to Members of a Collection

    @@ -2052,7 +2078,7 @@

    -

    Example 87: invoke the MostRecentOrder function on each entity in the entity set Customers

    +

    Example 90: invoke the MostRecentOrder function on each entity in the entity set Customers

    GET http://host/service/Customers/$each/SampleModel.MostRecentOrder()

    The client MAY specify the continue-on-error preference, in which case the service MAY continue processing actions after a failure. In this case, the service MUST, regardless of the return preference, return a response containing at least the members identified by the request for which the action failed. Such members MUST be annotated with term Core.DataModificationException with a failedOperation value of invoke.

    @@ -2060,29 +2086,29 @@

    11.5.3 Advertising Available Operations within a Payload

    Services MAY return actions and/or functions bound to a particular entity or entity collection as part of the representation of the entity or entity collection within the payload. The representation of an action or function depends on the format.

    -

    Example 88: given a GET request to http://host/service/Customers('ALFKI'), the service might respond with a Customer that includes the SampleEntities.MostRecentOrder function bound to the entity

    -
    {
    -  "@context": ...,
    -  "CustomerID": "ALFKI",
    -  "CompanyName": "Alfreds Futterkiste",
    -  "#SampleEntities.MostRecentOrder": {
    -    "title": "Most Recent Order",
    -    "target": "Customers('ALFKI')/SampleEntities.MostRecentOrder()"
    -  },
    -  ...
    -}
    +

    Example 91: given a GET request to http://host/service/Customers('ALFKI'), the service might respond with a Customer that includes the SampleEntities.MostRecentOrder function bound to the entity

    +
    {
    +  "@context": ...,
    +  "CustomerID": "ALFKI",
    +  "CompanyName": "Alfreds Futterkiste",
    +  "#SampleEntities.MostRecentOrder": {
    +    "title": "Most Recent Order",
    +    "target": "Customers('ALFKI')/SampleEntities.MostRecentOrder()"
    +  },
    +  ...
    +}

    An efficient format that assumes client knowledge of metadata may omit actions and functions from the payload  whose target URL can be computed via metadata following standard conventions defined in OData-URL.

    Services can advertise that a function or action is not available for a particular instance by setting its value to null.

    -

    Example 89: the SampleEntities.MostRecentOrder function is not available for customer 'ALFKI'

    -
    {
    -  "@context": ...,
    -  "CustomerID": "ALFKI",
    -  "CompanyName": "Alfreds Futterkiste",
    -  "#SampleEntities.MostRecentOrder": null,
    -  ...
    -}
    +

    Example 92: the SampleEntities.MostRecentOrder function is not available for customer 'ALFKI'

    +
    {
    +  "@context": ...,
    +  "CustomerID": "ALFKI",
    +  "CompanyName": "Alfreds Futterkiste",
    +  "#SampleEntities.MostRecentOrder": null,
    +  ...
    +}

    11.5.4 Functions

    Functions are operations exposed by an OData service that MUST return data and MUST have no observable side effects.

    @@ -2093,7 +2119,7 @@

    inline parameter syntax. The canonical URL for a function import is the service root, followed by the name of the function import. Services MAY support omitting the parentheses when invoking a function import with no parameters, but for maximum interoperability MUST also support invoking the function import with empty parentheses.

    If the function is composable, additional path segments may be appended to the URL that identifies the composable function (or function import) as appropriate for the type returned by the function (or function import). The last path segment determines the system query options and HTTP verbs that can be used with this this URL, e.g. if the last path segment is a multi-valued navigation property, a POST request may be used to create a new entity in the identified collection.

    -

    Example 90: add a new item to the list of items of the shopping cart returned by the composable MyShoppingCart function import

    +

    Example 93: add a new item to the list of items of the shopping cart returned by the composable MyShoppingCart function import

    POST http://host/service/MyShoppingCart()/Items
      
     ...
    @@ -2107,22 +2133,22 @@
    -

    Example 91: invoke a Sales.EmployeesByManager function which takes a single ManagerID parameter via the function import EmployeesByManager

    +

    Example 94: invoke a Sales.EmployeesByManager function which takes a single ManagerID parameter via the function import EmployeesByManager

    GET http://host/service/EmployeesByManager(ManagerID=3)
    -

    Example 92: return all Customers whose City property returns "Western" when passed to the Sales.SalesRegion function

    +

    Example 95: return all Customers whose City property returns "Western" when passed to the Sales.SalesRegion function

    GET http://host/service/Customers?
           $filter=Sales.SalesRegion(City=$it/City) eq 'Western'

    A parameter alias can be used in place of an inline parameter value. The value for the alias is specified as a separate query option using the name of the parameter alias.

    -

    Example 93: invoke a Sales.EmployeesByManager function via the function import EmployeesByManager, passing 3 for the ManagerID parameter

    +

    Example 96: invoke a Sales.EmployeesByManager function via the function import EmployeesByManager, passing 3 for the ManagerID parameter

    GET http://host/service/EmployeesByManager(ManagerID=@p1)?@p1=3

    Services MAY in addition allow implicit parameter aliases for function imports and for functions that are the last path segment of the URL. An implicit parameter alias is the parameter name, optionally preceded by an at (@) sign. When using implicit parameter aliases, parentheses MUST NOT be appended to the function (import) name. The value for each parameter MUST be specified as a separate query option with the name of the parameter alias. If a parameter name is identical to a system query option name (without the optional $ prefix), the parameter name MUST be prefixed with an at (@) sign.

    -

    Example 94: invoke a Sales.EmployeesByManager function via the function import EmployeesByManager, passing 3 for the ManagerID parameter using the implicit parameter alias

    +

    Example 97: invoke a Sales.EmployeesByManager function via the function import EmployeesByManager, passing 3 for the ManagerID parameter using the implicit parameter alias

    GET http://host/service/EmployeesByManager?ManagerID=3

    Non-binding parameters annotated with the term Core.OptionalParameter defined in OData-VocCore MAY be omitted. If it is annotated and the annotation specifies a DefaultValue, the omitted parameter is interpreted as having that default value. If omitted and the annotation does not specify a default value, the service is free on how to interpret the omitted parameter.

    @@ -2151,18 +2177,18 @@

    204 No Content on success.

    To request processing of the action only if the binding parameter value, an entity or collection of entities, is unmodified, the client includes the If-Match header with the latest known ETag value for the entity or collection of entities. The ETag value for a collection as a whole is transported in the ETag header of a collection response.

    -

    Example 95: invoke the SampleEntities.CreateOrder action using /Customers('ALFKI') as the customer (or binding parameter). The values 2 for the quantity parameter and BLACKFRIDAY for the discountCode parameter are passed in the body of the request. Invoke the action only if the customer's ETag still matches.

    -
    POST http://host/service/Customers('ALFKI')/SampleEntities.CreateOrder
    -If-Match: W/"MjAxOS0wMy0yMVQxMzowNVo="`
    -Content-Type: application/json
    -
    -{
    -  "items": [
    -    { "product": 4001, "quantity": 2 },
    -    { "product": 7062, "quantity": 1 },
    -  ],
    -  "discountCode": "BLACKFRIDAY"
    -}
    +

    Example 98: invoke the SampleEntities.CreateOrder action using /Customers('ALFKI') as the customer (or binding parameter). The values 2 for the quantity parameter and BLACKFRIDAY for the discountCode parameter are passed in the body of the request. Invoke the action only if the customer's ETag still matches.

    +
    POST http://host/service/Customers('ALFKI')/SampleEntities.CreateOrder
    +If-Match: W/"MjAxOS0wMy0yMVQxMzowNVo="`
    +Content-Type: application/json
    +
    +{
    +  "items": [
    +    { "product": 4001, "quantity": 2 },
    +    { "product": 7062, "quantity": 1 },
    +  ],
    +  "discountCode": "BLACKFRIDAY"
    +}

    11.5.5.2 Action Overload Resolution

    The same action name may be used multiple times within a schema provided there is at most one unbound overload, and each bound overload specifies a different binding parameter type.

    @@ -2187,7 +2213,7 @@

    11.7 B

    11.7.1 Batch Request Headers

    A batch request using the multipart batch format MUST contain a Content-Type header specifying a content type of multipart/mixed and a boundary parameter as defined in RFC2046.

    -

    Example 96: multipart batch request

    +

    Example 99: multipart batch request

    POST /service/$batch HTTP/1.1`
     Host: odata.org
     OData-Version: 4.0
    @@ -2197,7 +2223,7 @@ 

    -

    Example 97: JSON batch request

    +

    Example 100: JSON batch request

    POST /service/$batch HTTP/1.1
     Host: odata.org
     OData-Version: 4.01
    @@ -2239,14 +2265,14 @@ 

    Absolute URI with schema, host, port, and absolute resource path.
    -

    Example 98:

    +

    Example 101:

    GET https://host:1234/path/service/People(1) HTTP/1.1 ```
    • Absolute resource path and separate Host header
    -

    Example 99:

    +

    Example 102:

    GET /path/service/People(1) HTTP/1.1
     Host: myserver.mydomain.org:1234
    @@ -2254,7 +2280,7 @@

    Resource path relative to the batch request URI.
    -

    Example 100:

    +

    Example 103:

    GET People(1) HTTP/1.1

    Services MUST support all three formats for URLs of individual requests.

    @@ -2266,7 +2292,7 @@

    Processors of batch requests MAY choose to disallow additional HTTP constructs in HTTP requests serialized within body parts. For example, a processor may choose to disallow chunked encoding to be used by such HTTP requests.

    -

    Example 101: a batch request that contains the following individual requests in the order listed

    +

    Example 104: a batch request that contains the following individual requests in the order listed

    1. A query request
    2. A change set that contains the following requests: @@ -2329,7 +2355,7 @@

      11.7.7.2 Referencing New Entities

      Entities created by an Insert request can be referenced in the request URL of subsequent requests within the same change set. Services MAY also support referencing across change sets, in which case they SHOULD advertise this support by specifying the ReferencesAcrossChangeSetsSupported property in the Capabilities.BatchSupport term applied to the entity container, see OData-VocCap.

      -

      Example 102: a batch request that contains the following operations in the order listed:

      +

      Example 105: a batch request that contains the following operations in the order listed:

      A change set that contains the following requests:

      • Insert a new entity (with Content-ID = 1)
      • @@ -2368,39 +2394,39 @@

        11.7.7.3 Referencing an ETag

        -

        Example 103: a batch request that contains the following operations in the order listed:

        +

        Example 106: a batch request that contains the following operations in the order listed:

        • Get an Employee (with Content-ID = 1)
        • Update the salary only if the employee has not changed
        -
        POST /service/$batch HTTP/1.1
        -Host: host
        -OData-Version: 4.0
        -Content-Type: multipart/mixed; boundary=batch_36522ad7-fc75-4b56-8c71-56071383e77b
        -Content-Length: ###
        -
        ---batch_36522ad7-fc75-4b56-8c71-56071383e77b
        -Content-Type: application/http
        -Content-ID: 1
        -
        -GET /service/Employees(0) HTTP/1.1
        -Host: host Accept: application/json
        -
        -
        ---batch_36522ad7-fc75-4b56-8c71-56071383e77b
        -Content-Type: application/http
        -Content-ID: 2
        -
        -PATCH /service/Employees(0) HTTP/1.1
        -Host: host
        -Content-Type: application/json
        -Content-Length: ###
        -If-Match: $1
        -
        -{
        -   "Salary": 75000
        -}
        ---batch_36522ad7-fc75-4b56-8c71-56071383e77b--
        +
        POST /service/$batch HTTP/1.1
        +Host: host
        +OData-Version: 4.0
        +Content-Type: multipart/mixed; boundary=batch_36522ad7-fc75-4b56-8c71-56071383e77b
        +Content-Length: ###
        +
        +--batch_36522ad7-fc75-4b56-8c71-56071383e77b
        +Content-Type: application/http
        +Content-ID: 1
        +
        +GET /service/Employees(0) HTTP/1.1
        +Host: host Accept: application/json
        +
        +
        +--batch_36522ad7-fc75-4b56-8c71-56071383e77b
        +Content-Type: application/http
        +Content-ID: 2
        +
        +PATCH /service/Employees(0) HTTP/1.1
        +Host: host
        +Content-Type: application/json
        +Content-Length: ###
        +If-Match: $1
        +
        +{
        +   "Salary": 75000
        +}
        +--batch_36522ad7-fc75-4b56-8c71-56071383e77b--

        11.7.7.4 Processing a Multipart Batch Request

        The service MUST process the individual requests and change sets within a multipart batch request in the order received. Processing stops on the first error unless the continue-on-error preference is specified with an explicit or implicit value of true.

        @@ -2416,7 +2442,7 @@

        Data Service Requests. Relative URLs in each individual response are relative to the request URL of the corresponding individual request. URLs in responses MUST NOT contain $-prefixed request identifiers.

        -

        Example 104: referencing the batch request example 101 above, assume all the requests except the final query request succeed. In this case the response would be

        +

        Example 107: referencing the batch request example 101 above, assume all the requests except the final query request succeed. In this case the response would be

        HTTP/1.1 200 Ok
         OData-Version: 4.0
         Content-Length: ####
        @@ -2468,7 +2494,7 @@ 

        A service MAY return interim results to an asynchronously executing batch. It does this by responding with 200 OK to a GET request to the monitor resource and including a 202 Accepted response as the last part of the multipart response. The client can use the monitor URL returned in this 202 Accepted response to continue processing the batch response.

        Since a change set is executed atomically, 202 Accepted MUST NOT be returned within a change set.

        -

        Example 105: referencing the example 101 above again, assume that

        +

        Example 108: referencing the example 101 above again, assume that

        HTTP/1.1 202 Accepted
         Location: http://service-root/async-monitor-0
         Retry-After: ###
        diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md
        index 98284010e..39201ca3a 100644
        --- a/docs/odata-protocol/odata-protocol.md
        +++ b/docs/odata-protocol/odata-protocol.md
        @@ -2908,18 +2908,12 @@ The `$expand` system query option indicates the related entities and
         stream values that MUST be represented inline. The service MUST return
         the specified content, and MAY choose to return additional information.
         
        -The value of the `$expand` query option is a comma-separated list of
        -navigation property names, stream property names, or `$value` indicating
        -the stream content of a media-entity.
        -
        -For navigation properties, the navigation property name is optionally
        -followed by a `/$ref` path segment or a `/$count` path segment, and
        -optionally a parenthesized set of [expand options](#ExpandOptions) (for
        -filtering, sorting, selecting, paging, or expanding the related
        -entities).
        +The value of `$expand` is a comma-separated list of expand items. Each
        +expand item is evaluated relative to the retrieved resource being
        +expanded.
         
         For a full description of the syntax used when building requests, see
        -[OData-URL](#ODataURL).
        +[OData-URL](#ODataURL), section 5.1.3.
         
         ::: example
         Example 38: for each customer entity within the Customers entity set the
        @@ -2952,15 +2946,18 @@ application of expand options, expressed as a semicolon-separated list
         of system query options, enclosed in parentheses, see
         [OData-URL](#ODataURL).
         
        -Allowed system query options are [`$filter`](#SystemQueryOptionfilter),
        +Allowed system query options are
        +[`$compute`](#SystemQueryOptioncompute),
         [`$select`](#SystemQueryOptionselect),
        +`$expand`, and
        +[`$levels`](#ExpandOptionlevels)
        + for all navigation properties, plus
        +[`$filter`](#SystemQueryOptionfilter),
         [`$orderby`](#SystemQueryOptionorderby),
         [`$skip`](#SystemQueryOptionskip), [`$top`](#SystemQueryOptiontop),
        -[`$count`](#SystemQueryOptioncount),
        -[`$search`](#SystemQueryOptionsearch),
        -[`$expand`](#SystemQueryOptionexpand)`,`
        -[`$compute`](#SystemQueryOptioncompute)`,` and
        -[`$levels`](#ExpandOptionlevels).
        +[`$count`](#SystemQueryOptioncount), and
        +[`$search`](#SystemQueryOptionsearch)
        + for collection-valued navigation properties.
         
         ::: example
         Example 41: for each customer entity within the `Customers` entity set,
        @@ -3000,8 +2997,8 @@ GET http://host/service.svc/Customers?$expand=SampleModel.VipCustomer/InHouseSta
         The `$levels` expand option can be used to specify the number of levels
         of recursion for a hierarchy in which the related entity type is the
         same as, or can be cast to, the source entity type. A `$levels` option
        -with a value of 1 specifies a single expand with no recursion. The same
        -expand options are applied at each level of the hierarchy.
        +with a value of 1 specifies a single expand with no recursion. All provided
        +expand options except `$levels` are applied at each level of the hierarchy.
         
         Services MAY support the symbolic value `max` in addition to numeric
         values. In that case they MUST solve circular dependencies by injecting
        @@ -3892,8 +3889,8 @@ appended to the path of a delta link in order to get just the number of
         changes available. The count includes all added, changed, or deleted
         entities, as well as added or deleted links.
         
        -The results of a request against the delta link may span multiple pages
        -but MUST be ordered by the service across all pages in such a way as to
        +The results of a request against the delta link may span one or more pages
        +and MUST be ordered by the service across all pages in such a way as to
         guarantee consistency when applied in order to the response which
         contained the delta link.
         
        @@ -4137,14 +4134,15 @@ The representation for referencing related entities is format-specific.
         
         ::: example
         Example 76: using the JSON format, 4.0 clients can create a new manager
        -entity with links to two existing employees by applying the `odata.bind`
        -annotation to the `DirectReports` navigation property
        +entity with links to an existing manager (of managers) and to two existing employees by applying the `odata.bind`
        +annotation to the `Manager` and `DirectReports` navigation properties
         ```json
         {
           "@odata.type":"#Northwind.Manager",
           "ID": 1,
           "FirstName": "Pat",
           "LastName": "Griswold",
        +  "Manager@odata.bind": "http://host/service/Employees(0)",
           "DirectReports@odata.bind": [
             "http://host/service/Employees(5)",
             "http://host/service/Employees(6)"
        @@ -4155,14 +4153,15 @@ annotation to the `DirectReports` navigation property
         
         ::: example
         Example 77: using the JSON format, 4.01 clients can create a new manager
        -entity with links to two existing employees by including the entity-ids
        -within the `DirectReports` navigation property
        +entity with links to an existing manager (of managers) and to two existing employees by including the entity-ids
        +within the `Manager` and `DirectReports` navigation properties
         ```json
         {
           "@type":"#Northwind.Manager",
           "ID": 1,
           "FirstName": "Pat",
           "LastName": "Griswold",
        +  "Manager": { "@id": "Employees(0)" },
           "DirectReports": [
             {"@id": "Employees(5)"},
             {"@id": "Employees(6)"}
        @@ -4203,9 +4202,9 @@ service responds with [`201 Created`](#ResponseCode201Created), the response MUS
         least the level that was present in the deep-insert request.
         
         Clients MAY associate an id with individual nested entities in the
        -request by using the
        +request by applying the
         [`Core.ContentID`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#ContentID)
        -term defined in [OData-VocCore](#ODataVocCore). Services that respond
        +term using the namespace or alias defined for the [OData-VocCore](#ODataVocCore) vocabulary in the service's `$metadata` document. Services that respond
         with [`201 Created`](#ResponseCode201Created) SHOULD annotate the entities in the response using
         the same
         [`Core.ContentID`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#ContentID)
        @@ -4498,8 +4497,8 @@ To delete an individual entity, the client makes a `DELETE` request to a
         URL that identifies the entity. Services MAY restrict deletes only to
         requests addressing the [edit URL](#ReadURLsandEditURLs) of the entity.
         
        -The request body SHOULD be empty. Singleton entities can be deleted if
        -they are nullable. Services supporting this SHOULD advertise it by
        +The request body SHOULD be empty. Top-level singleton entities can be deleted if
        +they are nullable. Services supporting this MAY advertise it by
         annotating the singleton with the term `Capabilities.DeleteRestrictions`
         (nested property `Deletable` with value `true`) defined in
         [OData-VocCap](#ODataVocCap).
        @@ -4659,6 +4658,42 @@ are properties of type `Edm.Stream`.
         The values for stream properties do not usually appear in the entity
         payload. Instead, the values are generally read or written through URLs.
         
        +::: example
        +Example 80: read an entity and select a stream property
        +```
        +GET http://host/service/Products(1)?$select=Thumbnail
        +```
        +would only include control information for the stream property, not the stream data itself
        +```json
        +{
        +  "@context": "http://host/service/$metadata#Products/$entity",
        +  ...
        +  "Thumbnail@mediaReadLink": "http://server/Thumbnail546.jpg",
        +  "Thumbnail@mediaEditLink": "http://server/uploads/Thumbnail546.jpg",
        +  ...
        +}
        +```
        +The stream data can then be requested using the media read link:
        +```
        +GET http://server/Thumbnail546.jpg
        +```
        +:::
        +
        +Services SHOULD support direct property access to a stream property's canonical URL.
        +The response MAY be a redirect to the media read link of the stream property
        +if the media read link is different from the canonical URL.
        +
        +::: example
        +Example 81: directly read a stream property of an entity
        +```
        +GET http://host/service/Products(1)/Thumbnail
        +```
        +can return [`200 OK`](#ResponseCode200OK) and the stream data, or a [`3xx Redirect`](#ResponseCode3xxRedirection) to the media read link of the stream property.
        +:::
        +
        +Note: for scenarios in which the media value can only be inlined,
        +the property should instead be modeled with type `Edm.Binary`.
        +
         #### 11.4.8.1 Update Stream Values
         
         A successful `PUT` request to the edit URL of a stream property changes
        @@ -4696,6 +4731,13 @@ A successful `DELETE` request to the edit URL of a stream property
         attempts to set the property to null and results in an error if the
         property is non-nullable.
         
        +::: example
        +Example 82: delete the stream value using the media edit link retrieved in [example 80](#entityWithStreamProperty)
        +```
        +DELETE http://server/uploads/Thumbnail546.jpg
        +```
        +:::
        +
         Attempting to request a stream property whose value is null results in
         [`204 No Content`](#ResponseCode204NoContent).
         
        @@ -4792,10 +4834,9 @@ request body.
         A successful `POST` request to the edit URL of a collection property
         adds an item to the collection. The body of the request MUST be a single
         item to be added to the collection. If the collection is ordered, the
        -item is added to the end of the collection, and
        +item is added to the end of the collection, and if the collection supports positional insert
         [`$index`](#RequestinganIndividualMemberofanOrderedCollection) MAY be used to specify
        -a zero-based ordinal position to insert the new value, with a negative
        -value indicating an ordinal position from the end of the collection.
        +the insert position.
         
         A successful `DELETE` request to the edit URL of a collection property
         deletes all items in that collection.
        @@ -4804,7 +4845,7 @@ Since collection members have no individual identity, `PATCH` is not
         supported for collection properties.
         
         Upon successful completion the service responds with either
        -[`200 OK`](#ResponseCode200OK) or
        +[`200 OK`](#ResponseCode200OK) and a representation of the updated collection, or
         [`204 No Content`](#ResponseCode204NoContent). The client may request
         that the response SHOULD include a body by specifying a [Prefer
         header](#Preferencereturnrepresentationandreturnminimal) with a value of
        @@ -4841,7 +4882,7 @@ ordinal number indexes from the end of the collection, with -1
         representing an insert as the last item in the collection.
         
         ::: example
        -Example 80: Insert a new email address at the second position
        +Example 83: Insert a new email address at the second position
         ```json
         POST /service/Customers('ALFKI')/EmailAddresses?$index=1
         Content-Type: application/json
        @@ -4963,7 +5004,7 @@ semantics described in [Update a Collection of
         Entities](#UpdateaCollectionofEntities) applies.
         
         ::: example
        -Example 81: change the color of all beige-brown products
        +Example 84: change the color of all beige-brown products
         ```json
         PATCH /service/Products/$filter(@bar)/$each?@bar=Color eq
         'beige-brown'
        @@ -5008,7 +5049,7 @@ The request resource path of the collection MAY contain type-cast or
         filter segments to subset the collection.
         
         ::: example
        -Example 82: delete all products older than 3
        +Example 85: delete all products older than 3
         ```
         DELETE /service/Products/$filter(Age gt 3)/$each
         ```
        @@ -5058,7 +5099,7 @@ by that URL is used as the *binding parameter value*. Only aliases
         defined in the metadata document of the service can be used in URLs.
         
         ::: example
        -Example 83: the function `MostRecentOrder` can be bound to any URL that
        +Example 86: the function `MostRecentOrder` can be bound to any URL that
         identifies a `SampleModel.Customer`
         ```xml
         
        @@ -5069,7 +5110,7 @@ identifies a `SampleModel.Customer`
         :::
         
         ::: example
        -Example 84: invoke the `MostRecentOrder` function with the value of the
        +Example 87: invoke the `MostRecentOrder` function with the value of the
         binding parameter `customer` being the entity identified by
         `http://host/service/Customers(6)`
         ```
        @@ -5078,7 +5119,7 @@ GET http://host/service/Customers(6)/SampleModel.MostRecentOrder()
         :::
         
         ::: example
        -Example 85: the function `Comparison` can be bound to any URL that
        +Example 88: the function `Comparison` can be bound to any URL that
         identifies a collection of entities
         ```xml
         
        @@ -5089,7 +5130,7 @@ identifies a collection of entities
         :::
         
         ::: example
        -Example 86: invoke the `Comparison` function on the set of red products
        +Example 89: invoke the `Comparison` function on the set of red products
         ```
         GET http://host/service/Products/$filter(Color eq 'Red')/Diff.Comparison()
         ```
        @@ -5112,7 +5153,7 @@ result type of the bound operation. If the bound operation returns a
         collection, the response is a collection of collections.
         
         ::: example
        -Example 87: invoke the `MostRecentOrder` function on each entity in the
        +Example 90: invoke the `MostRecentOrder` function on each entity in the
         entity set `Customers`
         ```
         GET http://host/service/Customers/$each/SampleModel.MostRecentOrder()
        @@ -5140,7 +5181,7 @@ or entity collection within the payload. The representation of an action
         or function depends on the [format](#Formats).
         
         ::: example
        -Example 88: given a `GET` request to
        +Example 91: given a `GET` request to
         `http://host/service/Customers('ALFKI')`, the service might respond with
         a Customer that includes the `SampleEntities.MostRecentOrder` function
         bound to the entity
        @@ -5167,7 +5208,7 @@ Services can advertise that a function or action is not available for a
         particular instance by setting its value to null.
         
         ::: example
        -Example 89: the `SampleEntities.MostRecentOrder` function is not
        +Example 92: the `SampleEntities.MostRecentOrder` function is not
         available for customer 'ALFKI'
         ```json
         {
        @@ -5237,7 +5278,7 @@ segment is a multi-valued navigation property, a `POST` request may be
         used to create a new entity in the identified collection.
         
         ::: example
        -Example 90: add a new item to the list of items of the shopping cart
        +Example 93: add a new item to the list of items of the shopping cart
         returned by the composable `MyShoppingCart` function import
         ```
         POST http://host/service/MyShoppingCart()/Items
        @@ -5282,7 +5323,7 @@ Each parameter value is represented as a name/value pair in the format
         and `Value` is the parameter value.
         
         ::: example
        -Example 91: invoke a `Sales.EmployeesByManager` function which takes a
        +Example 94: invoke a `Sales.EmployeesByManager` function which takes a
         single `ManagerID` parameter via the function import
         `EmployeesByManager`
         ```
        @@ -5291,7 +5332,7 @@ GET http://host/service/EmployeesByManager(ManagerID=3)
         :::
         
         ::: example
        -Example 92: return all `Customers` whose City property returns
        +Example 95: return all `Customers` whose City property returns
         "Western" when passed to the `Sales.SalesRegion` function
         ```
         GET http://host/service/Customers?
        @@ -5304,7 +5345,7 @@ parameter value. The value for the alias is specified as a separate
         query option using the name of the parameter alias.
         
         ::: example
        -Example 93: invoke a `Sales.EmployeesByManager` function via the
        +Example 96: invoke a `Sales.EmployeesByManager` function via the
         function import `EmployeesByManager`, passing 3 for the `ManagerID`
         parameter
         ```
        @@ -5324,7 +5365,7 @@ optional `$` prefix), the parameter name MUST be prefixed with an at
         (`@`) sign.
         
         ::: example
        -Example 94: invoke a `Sales.EmployeesByManager` function via the
        +Example 97: invoke a `Sales.EmployeesByManager` function via the
         function import `EmployeesByManager`, passing 3 for the `ManagerID`
         parameter using the implicit parameter alias
         ```
        @@ -5454,7 +5495,7 @@ collection as a whole is transported in the `ETag` header of a
         collection response.
         
         ::: example
        -Example 95: invoke the `SampleEntities.CreateOrder` action using
        +Example 98: invoke the `SampleEntities.CreateOrder` action using
         `/Customers('ALFKI') `as the customer (or binding parameter). The values
         `2` for the `quantity` parameter and `BLACKFRIDAY` for the
         `discountCode` parameter are passed in the body of the request. Invoke
        @@ -5590,7 +5631,7 @@ format](#MultipartBatchFormat) MUST contain a
         [RFC2046](#rfc2046).
         
         ::: example
        -Example 96: multipart batch request
        +Example 99: multipart batch request
         ```
         POST /service/$batch HTTP/1.1`
         Host: odata.org
        @@ -5605,7 +5646,7 @@ A batch request using the JSON batch format MUST contain a
         `Content-Type` header specifying a content type of `application/json`.
         
         ::: example
        -Example 97: JSON batch request
        +Example 100: JSON batch request
         ```
         POST /service/$batch HTTP/1.1
         Host: odata.org
        @@ -5757,7 +5798,7 @@ set can use one of the following three formats:
         - Absolute URI with schema, host, port, and absolute resource path.
         
         ::: example
        -Example 98:
        +Example 101:
         ```
         GET https://host:1234/path/service/People(1) HTTP/1.1 ```
         :::
        @@ -5765,7 +5806,7 @@ GET https://host:1234/path/service/People(1) HTTP/1.1 ```
         - Absolute resource path and separate `Host` header
         
         ::: example
        -Example 99:
        +Example 102:
         ```
         GET /path/service/People(1) HTTP/1.1
         Host: myserver.mydomain.org:1234
        @@ -5775,7 +5816,7 @@ Host: myserver.mydomain.org:1234
         - Resource path relative to the batch request URI.
         
         ::: example
        -Example 100:
        +Example 103:
         ```
         GET People(1) HTTP/1.1
         ```
        @@ -5800,7 +5841,7 @@ processor may choose to disallow chunked encoding to be used by such
         HTTP requests.
         
         ::: example
        -Example 101: a batch request that contains the following individual
        +Example 104: a batch request that contains the following individual
         requests in the order listed
         
           1. A query request
        @@ -5879,7 +5920,7 @@ which case they SHOULD advertise this support by specifying the
         term applied to the entity container, see [OData-VocCap](#ODataVocCap).
         
         ::: example
        -Example 102: a batch request that contains the following operations in
        +Example 105: a batch request that contains the following operations in
         the order listed:
         
         A change set that contains the following requests:
        @@ -5922,7 +5963,7 @@ Content-Length: ###
         #### 11.7.7.3 Referencing an ETag
         
         ::: example
        -Example 103: a batch request that contains the following operations in
        +Example 106: a batch request that contains the following operations in
         the order listed:
         - Get an Employee (with `Content-ID = 1`)
         - Update the salary only if the employee has not changed
        @@ -6020,7 +6061,7 @@ URL of the corresponding individual request. URLs in responses MUST NOT
         contain `$`-prefixed request identifiers.
         
         ::: example
        -Example 104: referencing the batch request example 101 above, assume all
        +Example 107: referencing the batch request example 101 above, assume all
         the requests except the final query request succeed. In this case the
         response would be
         ```
        @@ -6097,7 +6138,7 @@ Since a change set is executed atomically,
         a change set.
         
         ::: example
        -Example 105: referencing the example 101 above again, assume that
        +Example 108: referencing the example 101 above again, assume that
         ```
         HTTP/1.1 202 Accepted
         Location: http://service-root/async-monitor-0
        diff --git a/docs/odata-temporal-ext/odata-temporal-ext.html b/docs/odata-temporal-ext/odata-temporal-ext.html
        index fe5427e4c..d9960b80f 100644
        --- a/docs/odata-temporal-ext/odata-temporal-ext.html
        +++ b/docs/odata-temporal-ext/odata-temporal-ext.html
        @@ -330,18 +330,819 @@ 

        2.1 Exampl

        Example 2: model for api-1 with snapshot entity sets (hidden application time), key properties marked with {id}

        -

        Employee
        Employee
        ID: Edm.String {id}
        ID: Edm.String {id}
        Name: Edm.String
        Name: Edm.String
        Jobtitle: Edm.String
        Jobtitle: Edm.String
        Department
        Department
        ID: Edm.String {id}
        ID: Edm.String {id}
        Name: Edm.String
        Name: Edm.String
        *
        Employees
        *...
        1
        Department
        1...
        Text is not SVG - cannot display

        + + + + + + + + + +
        +
        +
        + Employee +
        +
        +
        +
        + + Employee + +
        +
        + + + +
        +
        +
        + ID: Edm.String {id} +
        +
        +
        +
        + + ID: Edm.String {id} + +
        +
        + + + +
        +
        +
        + Name: Edm.String +
        +
        +
        +
        + + Name: Edm.String + +
        +
        + + + +
        +
        +
        + Jobtitle: Edm.String +
        +
        +
        +
        + + Jobtitle: Edm.String + +
        +
        + + + + + + +
        +
        +
        + Department +
        +
        +
        +
        + + Department + +
        +
        + + + +
        +
        +
        + ID: Edm.String {id} +
        +
        +
        +
        + + ID: Edm.String {id} + +
        +
        + + + +
        +
        +
        + Name: Edm.String +
        +
        +
        +
        + + Name: Edm.String + +
        +
        + + + + + + +
        +
        +
        +
        + + * + +
        +
        + + Employees + +
        +
        +
        +
        +
        + + *... + +
        +
        + + + +
        +
        +
        +
        +
        + + 1 + +
        +
        + + Department + +
        +
        +
        +
        +
        +
        + + 1... + +
        +
        +
        + + + + + Text is not SVG - cannot display + + + +
        +

        and

        Example 3: model for api-2 with timeline entity sets (visible application time), key properties marked with {id}

        -

        Employee_history
        Employee_history
        From: Edm.Date {id}
        From: Edm.Date {id}
        To: Edm.Date
        To: Edm.Date
        Name: Edm.String
        Name: Edm.String
        Jobtitle: Edm.String
        Jobtitle: Edm.String
        Department_history
        Department_history
        From: Edm.Date {id}
        From: Edm.Date {id}
        To: Edm.Date
        To: Edm.Date
        Name: Edm.String
        Name: Edm.String
        Budget: Edm.Decimal
        Budget: Edm.Decimal
        Employee
        Employee
        ID: Edm.String {id}
        ID: Edm.String {id}
        Department
        Department
        ID: Edm.String {id}
        ID: Edm.String {id}
        *
        Employees
        *...
        *
        history
        *...
        *
        history
        *...
        1
        Department
        1...
        Text is not SVG - cannot display

        + + + + + + + + + +
        +
        +
        + Employee_history +
        +
        +
        +
        + + Employee_history + +
        +
        + + + +
        +
        +
        + From: Edm.Date {id} +
        +
        +
        +
        + + From: Edm.Date {id} + +
        +
        + + + +
        +
        +
        + To: Edm.Date +
        +
        +
        +
        + + To: Edm.Date + +
        +
        + + + +
        +
        +
        + Name: Edm.String +
        +
        +
        +
        + + Name: Edm.String + +
        +
        + + + +
        +
        +
        + Jobtitle: Edm.String +
        +
        +
        +
        + + Jobtitle: Edm.String + +
        +
        + + + + + + +
        +
        +
        + Department_history +
        +
        +
        +
        + + Department_history + +
        +
        + + + +
        +
        +
        + From: Edm.Date {id} +
        +
        +
        +
        + + From: Edm.Date {id} + +
        +
        + + + +
        +
        +
        + To: Edm.Date +
        +
        +
        +
        + + To: Edm.Date + +
        +
        + + + +
        +
        +
        + Name: Edm.String +
        +
        +
        +
        + + Name: Edm.String + +
        +
        + + + +
        +
        +
        + Budget: Edm.Decimal +
        +
        +
        +
        + + Budget: Edm.Decimal + +
        +
        + + + + + + +
        +
        +
        + Employee +
        +
        +
        +
        + + Employee + +
        +
        + + + +
        +
        +
        + ID: Edm.String {id} +
        +
        +
        +
        + + ID: Edm.String {id} + +
        +
        + + + + + + +
        +
        +
        + Department +
        +
        +
        +
        + + Department + +
        +
        + + + +
        +
        +
        + ID: Edm.String {id} +
        +
        +
        +
        + + ID: Edm.String {id} + +
        +
        + + + + + +
        +
        +
        +
        + + * + +
        +
        + + Employees + +
        +
        +
        +
        +
        + + *... + +
        +
        + + + + + +
        +
        +
        +
        + + * + +
        +
        + history +
        +
        +
        +
        +
        + + *... + +
        +
        + + + + + +
        +
        +
        +
        + + * + +
        +
        + history +
        +
        +
        +
        +
        + + *... + +
        +
        + + + +
        +
        +
        +
        +
        + + 1 + +
        +
        + + Department + +
        +
        +
        +
        +
        +
        + + 1... + +
        +
        + + +
        + + + + + Text is not SVG - cannot display + + + +
        +

        2.2 Example Data

        Both API models in the previous section are views on the same underlying data. A possible storage model for this data is:

        Example 4: simple storage model: object key in dark green, temporal sub-key in light green, foreign keys in orange, non-key fields in blue

        -

        Employee
        Employee
        ID: String {id}
        ID: String {id}
        From: Date {id}
        From: Date {id}
        To: Date
        To: Date
        Name: String
        Name: String
        Jobtitle: String
        Jobtitle: String
        Department.ID
        Department.ID
        Department
        Department
        ID: String {id}
        ID: String {id}
        From: Date {id}
        From: Date {id}
        To: Date
        To: Date
        Name: String
        Name: String
        Budget: Decimal
        Budget: Decimal
        1
        1
        Text is not SVG - cannot display

        + + + + + + + + + +
        +
        +
        + Employee +
        +
        +
        +
        + + Employee + +
        +
        + + + + +
        +
        +
        + ID: String {id} +
        +
        +
        +
        + + ID: String {id} + +
        +
        + + + + +
        +
        +
        + From: Date {id} +
        +
        +
        +
        + + From: Date {id} + +
        +
        + + + + +
        +
        +
        + To: Date +
        +
        +
        +
        + + To: Date + +
        +
        + + + + +
        +
        +
        + Name: String +
        +
        +
        +
        + + Name: String + +
        +
        + + + + +
        +
        +
        + Jobtitle: String +
        +
        +
        +
        + + Jobtitle: String + +
        +
        + + + + +
        +
        +
        + Department.ID +
        +
        +
        +
        + + Department.ID + +
        +
        + + + + + + +
        +
        +
        + Department +
        +
        +
        +
        + + Department + +
        +
        + + + + +
        +
        +
        + ID: String {id} +
        +
        +
        +
        + + ID: String {id} + +
        +
        + + + + +
        +
        +
        + From: Date {id} +
        +
        +
        +
        + + From: Date {id} + +
        +
        + + + + +
        +
        +
        + To: Date +
        +
        +
        +
        + + To: Date + +
        +
        + + + + +
        +
        +
        + Name: String +
        +
        +
        +
        + + Name: String + +
        +
        + + + + +
        +
        +
        + Budget: Decimal +
        +
        +
        +
        + + Budget: Decimal + +
        +
        + + + +
        +
        +
        +
        +
        + 1 +
        +
        +
        +
        +
        +
        + + 1 + +
        +
        + + +
        + + + + + Text is not SVG - cannot display + + + +
        +

        The period start date is used as the temporal sub-key for identifying time slices together with the key of the temporal object.

        Note: alternatively, the period end date could have been used as temporal sub-key, or the primary key of the time slice tables could have been an artificial key (sequence number, UUID, ...) with both the temporal object key and the period boundaries as non-key fields.

        The following example data will be used to further illustrate the capabilities introduced by this extension. It assumes that the example services only support four-digit years.

        diff --git a/docs/odata-temporal-ext/odata-temporal-ext.md b/docs/odata-temporal-ext/odata-temporal-ext.md index 0716934f4..3c033c901 100644 --- a/docs/odata-temporal-ext/odata-temporal-ext.md +++ b/docs/odata-temporal-ext/odata-temporal-ext.md @@ -372,7 +372,192 @@ Example 2: model for `api-1` with snapshot entit application time), key properties marked with {id} ::: -
        Employee
        Employee
        ID: Edm.String {id}
        ID: Edm.String {id}
        Name: Edm.String
        Name: Edm.String
        Jobtitle: Edm.String
        Jobtitle: Edm.String
        Department
        Department
        ID: Edm.String {id}
        ID: Edm.String {id}
        Name: Edm.String
        Name: Edm.String
        \*
        Employees
        \*...
        1
        Department
        1...
        Text is not SVG - cannot display
        + + + + + + + + + +
        +
        +
        + Employee +
        +
        +
        +
        + + Employee + +
        +
        + + + +
        +
        +
        + ID: Edm.String {id} +
        +
        +
        +
        + + ID: Edm.String {id} + +
        +
        + + + +
        +
        +
        + Name: Edm.String +
        +
        +
        +
        + + Name: Edm.String + +
        +
        + + + +
        +
        +
        + Jobtitle: Edm.String +
        +
        +
        +
        + + Jobtitle: Edm.String + +
        +
        + + + + + + +
        +
        +
        + Department +
        +
        +
        +
        + + Department + +
        +
        + + + +
        +
        +
        + ID: Edm.String {id} +
        +
        +
        +
        + + ID: Edm.String {id} + +
        +
        + + + +
        +
        +
        + Name: Edm.String +
        +
        +
        +
        + + Name: Edm.String + +
        +
        + + + + + + +
        +
        +
        +
        + + * + +
        +
        + + Employees + +
        +
        +
        +
        +
        + + *... + +
        +
        + + + +
        +
        +
        +
        +
        + + 1 + +
        +
        + + Department + +
        +
        +
        +
        +
        +
        + + 1... + +
        +
        +
        + + + + + Text is not SVG - cannot display + + + +
        and @@ -381,7 +566,361 @@ Example 3: model for `api-2` with timeline entit application time), key properties marked with {id} ::: -
        Employee_history
        Employee_history
        From: Edm.Date {id}
        From: Edm.Date {id}
        To: Edm.Date
        To: Edm.Date
        Name: Edm.String
        Name: Edm.String
        Jobtitle: Edm.String
        Jobtitle: Edm.String
        Department_history
        Department_history
        From: Edm.Date {id}
        From: Edm.Date {id}
        To: Edm.Date
        To: Edm.Date
        Name: Edm.String
        Name: Edm.String
        Budget: Edm.Decimal
        Budget: Edm.Decimal
        Employee
        Employee
        ID: Edm.String {id}
        ID: Edm.String {id}
        Department
        Department
        ID: Edm.String {id}
        ID: Edm.String {id}
        \*
        Employees
        \*...
        \*
        history
        \*...
        \*
        history
        \*...
        1
        Department
        1...
        Text is not SVG - cannot display
        + + + + + + + + + +
        +
        +
        + Employee_history +
        +
        +
        +
        + + Employee_history + +
        +
        + + + +
        +
        +
        + From: Edm.Date {id} +
        +
        +
        +
        + + From: Edm.Date {id} + +
        +
        + + + +
        +
        +
        + To: Edm.Date +
        +
        +
        +
        + + To: Edm.Date + +
        +
        + + + +
        +
        +
        + Name: Edm.String +
        +
        +
        +
        + + Name: Edm.String + +
        +
        + + + +
        +
        +
        + Jobtitle: Edm.String +
        +
        +
        +
        + + Jobtitle: Edm.String + +
        +
        + + + + + + +
        +
        +
        + Department_history +
        +
        +
        +
        + + Department_history + +
        +
        + + + +
        +
        +
        + From: Edm.Date {id} +
        +
        +
        +
        + + From: Edm.Date {id} + +
        +
        + + + +
        +
        +
        + To: Edm.Date +
        +
        +
        +
        + + To: Edm.Date + +
        +
        + + + +
        +
        +
        + Name: Edm.String +
        +
        +
        +
        + + Name: Edm.String + +
        +
        + + + +
        +
        +
        + Budget: Edm.Decimal +
        +
        +
        +
        + + Budget: Edm.Decimal + +
        +
        + + + + + + +
        +
        +
        + Employee +
        +
        +
        +
        + + Employee + +
        +
        + + + +
        +
        +
        + ID: Edm.String {id} +
        +
        +
        +
        + + ID: Edm.String {id} + +
        +
        + + + + + + +
        +
        +
        + Department +
        +
        +
        +
        + + Department + +
        +
        + + + +
        +
        +
        + ID: Edm.String {id} +
        +
        +
        +
        + + ID: Edm.String {id} + +
        +
        + + + + + +
        +
        +
        +
        + + * + +
        +
        + + Employees + +
        +
        +
        +
        +
        + + *... + +
        +
        + + + + + +
        +
        +
        +
        + + * + +
        +
        + history +
        +
        +
        +
        +
        + + *... + +
        +
        + + + + + +
        +
        +
        +
        + + * + +
        +
        + history +
        +
        +
        +
        +
        + + *... + +
        +
        + + + +
        +
        +
        +
        +
        + + 1 + +
        +
        + + Department + +
        +
        +
        +
        +
        +
        + + 1... + +
        +
        + + +
        + + + + + Text is not SVG - cannot display + + + +
        ## 2.2 Example Data @@ -393,7 +932,266 @@ Example 4: simple storage model: object key in dark green, temporal sub-key in light green, foreign keys in orange, non-key fields in blue ::: -
        Employee
        Employee
        ID: String {id}
        ID: String {id}
        From: Date {id}
        From: Date {id}
        To: Date
        To: Date
        Name: String
        Name: String
        Jobtitle: String
        Jobtitle: String
        Department.ID
        Department.ID
        Department
        Department
        ID: String {id}
        ID: String {id}
        From: Date {id}
        From: Date {id}
        To: Date
        To: Date
        Name: String
        Name: String
        Budget: Decimal
        Budget: Decimal
        1
        1
        Text is not SVG - cannot display
        + + + + + + + + + +
        +
        +
        + Employee +
        +
        +
        +
        + + Employee + +
        +
        + + + + +
        +
        +
        + ID: String {id} +
        +
        +
        +
        + + ID: String {id} + +
        +
        + + + + +
        +
        +
        + From: Date {id} +
        +
        +
        +
        + + From: Date {id} + +
        +
        + + + + +
        +
        +
        + To: Date +
        +
        +
        +
        + + To: Date + +
        +
        + + + + +
        +
        +
        + Name: String +
        +
        +
        +
        + + Name: String + +
        +
        + + + + +
        +
        +
        + Jobtitle: String +
        +
        +
        +
        + + Jobtitle: String + +
        +
        + + + + +
        +
        +
        + Department.ID +
        +
        +
        +
        + + Department.ID + +
        +
        + + + + + + +
        +
        +
        + Department +
        +
        +
        +
        + + Department + +
        +
        + + + + +
        +
        +
        + ID: String {id} +
        +
        +
        +
        + + ID: String {id} + +
        +
        + + + + +
        +
        +
        + From: Date {id} +
        +
        +
        +
        + + From: Date {id} + +
        +
        + + + + +
        +
        +
        + To: Date +
        +
        +
        +
        + + To: Date + +
        +
        + + + + +
        +
        +
        + Name: String +
        +
        +
        +
        + + Name: String + +
        +
        + + + + +
        +
        +
        + Budget: Decimal +
        +
        +
        +
        + + Budget: Decimal + +
        +
        + + + +
        +
        +
        +
        +
        + 1 +
        +
        +
        +
        +
        +
        + + 1 + +
        +
        + + +
        + + + + + Text is not SVG - cannot display + + + +
        The period start date is used as the temporal sub-key for identifying time slices together with the key of the temporal object. diff --git a/docs/odata-url-conventions/odata-url-conventions.html b/docs/odata-url-conventions/odata-url-conventions.html index 04988f8b2..64222437b 100644 --- a/docs/odata-url-conventions/odata-url-conventions.html +++ b/docs/odata-url-conventions/odata-url-conventions.html @@ -1417,11 +1417,11 @@
        5.1.1.12.1 case$compute=case(X gt 0:1,X lt 0:-1,true:0) as SignumX

        5.1.1.13 Lambda Operators

        -

        OData defines two operators that evaluate a Boolean expression on a collection. Both must be prepended with a navigation path that identifies a collection.

        +

        OData defines two operators that evaluate a Boolean expression on a collection. Both must be prepended with a path expression that identifies a collection.

        4.01 Services MUST support case-insensitive lambda operator names. Clients that want to work with 4.0 services MUST use lower case lambda operator names.

        -

        The argument of a lambda operator is a case-sensitive lambda variable name followed by a colon (:) and a Boolean expression that uses the lambda variable name to refer to properties of members of the collection identified by the navigation path.

        +

        The argument of a lambda operator is a case-sensitive lambda variable name followed by a colon (:) and a Boolean expression that uses the lambda variable name to refer to properties of the instance or of members of the collection identified by the path expression.

        If the name chosen for the lambda variable matches a property name of the current resource referenced by the resource path, the lambda variable takes precedence. Clients can prefix properties of the current resource referenced by the resource path with $it.

        -

        Other path expressions in the Boolean expression neither prefixed with the lambda variable nor $it are evaluated in the scope of the collection instances at the origin of the navigation path prepended to the lambda operator.

        +

        Other path expressions in the Boolean expression neither prefixed with the lambda variable nor $it are evaluated in the scope of the instance or of members of the collection at the origin of the path expression prepended to the lambda operator.

        5.1.1.13.1 any

        The any operator applies a Boolean expression to each member of a collection and returns true if and only if the expression is true for any member of the collection, otherwise it returns false. This implies that the any operator always returns false for an empty collection.

        The any operator can be used without an argument expression. This short form returns false if and only if the collection is empty.

        @@ -1756,7 +1756,7 @@

        $filter, $select, $orderby, $skip, $top, $count, $search, and $expand.

        +

        Query options can be applied to an expanded navigation property by appending a semicolon-separated list of query options, enclosed in parentheses, to the navigation property name. Allowed system query options are $compute, $select, $expand, and $levels for all navigation properties, plus $filter, $orderby, $skip, $top, $count, and $search for collection-valued navigation properties.

        Example 117: all categories and for each category all related products with a discontinued date equal to null

        http://host/service/Categories?$expand=Products($filter=DiscontinuedDate eq null)
        @@ -1783,7 +1783,7 @@

        Cyclic navigation properties (whose target type is identical or can be cast to its source type) can be recursively expanded using the special $levels option. The value of the $levels option is either a positive integer to specify the number of levels to expand, or the literal string max to specify the maximum expansion level supported by that service. A $levels option with a value of 1 specifies a single expand with no recursion.

        Example 123: all employees with their manager, manager's manager, and manager's manager's manager

        http://host/service/Employees?$expand=ReportsTo($levels=3)
        @@ -1826,7 +1826,7 @@

        Example 128: rating and release date of all products

        http://host/service/Products?$select=Rating,ReleaseDate
        @@ -1865,7 +1865,6 @@

        5.1.5 System Query Option $orderby

        The $orderby system query option allows clients to request resources in a particular order.

        The semantics of $orderby are covered in the OData-Protocol document.

        diff --git a/docs/odata-url-conventions/odata-url-conventions.md b/docs/odata-url-conventions/odata-url-conventions.md index c7d4865c2..8ea6a3eb4 100644 --- a/docs/odata-url-conventions/odata-url-conventions.md +++ b/docs/odata-url-conventions/odata-url-conventions.md @@ -2831,7 +2831,7 @@ $compute=case(X gt 0:1,X lt 0:-1,true:0) as SignumX #### 5.1.1.13 Lambda Operators OData defines two operators that evaluate a Boolean expression on a -collection. Both must be prepended with a navigation path that +collection. Both must be prepended with a path expression that identifies a collection. 4.01 Services MUST support case-insensitive lambda operator names. @@ -2840,8 +2840,8 @@ operator names. The argument of a lambda operator is a case-sensitive lambda variable name followed by a colon (`:`) and a Boolean expression that uses the -lambda variable name to refer to properties of members of the collection -identified by the navigation path. +lambda variable name to refer to properties of the instance or of members of the collection +identified by the path expression. If the name chosen for the lambda variable matches a property name of the current resource referenced by the resource path, the lambda @@ -2850,7 +2850,7 @@ resource referenced by the resource path with [`$it`](#it). Other path expressions in the Boolean expression neither prefixed with the lambda variable nor `$it` are evaluated in the scope of the -collection instances at the origin of the navigation path prepended to +instance or of members of the collection at the origin of the path expression prepended to the lambda operator. ##### 5.1.1.13.1 `any` @@ -3329,14 +3329,15 @@ A path MUST NOT appear in more than one expand item. Query options can be applied to an expanded navigation property by appending a semicolon-separated list of query options, enclosed in -parentheses, to the navigation property name. Allowed system query -options are [`$filter`](#SystemQueryOptionfilter), +parentheses, to the navigation property name. Allowed system query options are +[`$compute`](#SystemQueryOptioncompute), [`$select`](#SystemQueryOptionselect), +`$expand`, and [`$levels`](#ExpandOptionlevels) for all navigation properties, plus +[`$filter`](#SystemQueryOptionfilter), [`$orderby`](#SystemQueryOptionorderby), -[`$skip`](#SystemQueryOptionstopandskip), -[`$top`](#SystemQueryOptionstopandskip), -[`$count`](#SystemQueryOptioncount), -[`$search`](#SystemQueryOptionsearch), and `$expand`. +[`$skip`](#SystemQueryOptionstopandskip), [`$top`](#SystemQueryOptionstopandskip), +[`$count`](#SystemQueryOptioncount), and +[`$search`](#SystemQueryOptionsearch) for collection-valued navigation properties. ::: example Example 117: all categories and for each category all related products @@ -3402,13 +3403,13 @@ http://host/service/Categories?$expand=Products/Sales.PremierProduct/$ref($filte ``` ::: -Cyclic navigation properties (whose target type is identical or can be +Cyclic navigation properties (whose target type is identical or can be cast to its source type) can be recursively expanded using the special `$levels` option. The value of the `$levels` option is either a positive integer to specify the number of levels to expand, or the literal string `max` to specify the maximum expansion level supported by that service. A `$levels` option with a value of 1 specifies a single expand with no -recursion. +recursion. ::: example Example 123: all employees with their manager, manager's manager, and @@ -3510,10 +3511,10 @@ The `$select` system query option is interpreted relative to the entity type or complex type of the resources identified by the resource path section of the URL. Each select item in the `$select` clause indicates that the response MUST include the declared or dynamic properties, -actions and functions identified by that select item. The simplest form -of a select item explicitly requests a property defined on the entity -type of the resources identified by the resource path section of the -URL. +actions and functions identified by that select item. If a select item is a path expression traversing an entity or complex property that is `null` on an instance, then +the null-valued entity or complex property is included and represented as `null`. +The simplest form of a select item explicitly requests a property defined on the entity +type of the resources identified by the resource path section of the URL. ::: example Example 128: rating and release date of all products @@ -3638,10 +3639,6 @@ of properties, open properties, navigation properties, actions and functions to be returned is equal to the union of the set of those identified by each select item. -If a select item is a path expression requesting a component of a -complex property and the complex property is `null` on an instance, then -the component is treated as `null` as well. - ### 5.1.5 System Query Option `$orderby` The `$orderby` system query option allows clients to request resources diff --git a/lib/README.md b/lib/README.md index 09c5ae282..40483f2b7 100644 --- a/lib/README.md +++ b/lib/README.md @@ -22,6 +22,7 @@ The [`number.js`](number.js) module generates a single Markdown document by prep - Generate section and example numbers - Generate a table of contents - Resolve references +- Include files like `$$$include images/drawing.svg$$$` - Replace placeholders like `$$$pagetitle$$$` with values from a [`meta.yaml`](../odata-data-aggregation-ext/meta.yaml) file - Join multiple lines that end with a single space into one line - Sections of the file between `: varXXX` and `:` or between `::: {.varXXX ...}` and `:::` belong to a variant. One source file can contain several variants. @@ -89,7 +90,11 @@ The [`pdf.js`](pdf.js) module uses a headless browser ([`puppeteer`](https://git The following scripts can be executed manually or as part of a GitHub Action: -- [`npm run build`](build.js) runs the conversion and writes the Markdown output as well as the HTML output into the [`docs/*`](../docs) folder. The Markdown file starts with a byte-order mark (`EF BB BF`) so that it is recognized as UTF-8 when loaded from github.io. +- [`npm run build`](build.js) runs the conversion and writes the following into the [`docs/*`](../docs) folder: + - the Markdown output + - the HTML output + - a copy of the common [`styles`](../styles) folder + - a copy of the document-specific `*/images` folder, if this exists. - [`npm run pdf`](build-pdf.mjs) runs the PDF conversion and writes the PDF document into the [`docs/*`](../docs) folder. - [`npm test`](../test) runs a test suite. diff --git a/lib/build.js b/lib/build.js index ca1371e42..b538990d6 100644 --- a/lib/build.js +++ b/lib/build.js @@ -10,6 +10,13 @@ iterator(function (srcname, name, variant, meta) { fs.cpSync(`${__dirname}/../styles`, `${__dirname}/../docs/${name}/styles`, { recursive: true, }); + const srcImages = `${__dirname}/../${srcname}/images`; + if (fs.existsSync(srcImages)) { + const targetImages = `${__dirname}/../docs/${name}/images`; + if (fs.existsSync(targetImages)) + fs.rmSync(targetImages, { recursive: true }); + fs.cpSync(srcImages, targetImages, { recursive: true }); + } var md = fs.createWriteStream(`${__dirname}/../docs/${name}/${name}.md`); var html = pandoc({ "--metadata-file": `${__dirname}/../${srcname}/${variant}.yaml`, diff --git a/lib/number.js b/lib/number.js index 2d8efa6fa..a1c9357dd 100644 --- a/lib/number.js +++ b/lib/number.js @@ -15,7 +15,7 @@ class Number { this.meta = meta || yaml.load( - fs.readFileSync(dir + "/" + (this.variant || "meta") + ".yaml") + fs.readFileSync(dir + "/" + (this.variant || "meta") + ".yaml"), ); } @@ -71,7 +71,7 @@ class Number { this.toc[m[1]] = { sub: [] }; if (m[1].endsWith("sec")) { m = line.match( - / ##([A-Za-z0-9.]+)(?:_[A-Za-z0-9]+)?\s+(.+)$/ + / ##([A-Za-z0-9.]+)(?:_[A-Za-z0-9]+)?\s+(.+)$/, ); m[3] = m[2].replace(/[^A-Za-z0-9]/g, ""); } @@ -112,10 +112,10 @@ class Number { } this.match++; } - }.bind(this) + }.bind(this), ) .on("close", resolve); - }.bind(this) + }.bind(this), ); } @@ -134,19 +134,28 @@ class Number { function (line) { lineno++; if (this.skip(line)) return; - var m1 = line.match(/^\$\$\$(.*?isec)\$\$\$$/); + var m1 = line.match(/^\$\$\$include\s+(.*?)\$\$\$\s*$/); + if (m1) { + try { + out.write(fs.readFileSync(this.dir + "/" + m1[1])); + } catch (e) { + this.errors.push(e); + } + return; + } + m1 = line.match(/^\$\$\$(.*?isec)\$\$\$\s*$/); if (m1) this.tableofcontents(this.toc[m1[1]]?.sub || [], out, ""); else { line = line.replace( /\$\$\$(.*?)\$\$\$/g, function (m, p) { return this.meta[p] || m; - }.bind(this) + }.bind(this), ); for (var m, regex = /\]\(#(.*?)\)/g; (m = regex.exec(line)); ) if (!this.refs[m[1]]) this.errors.push( - `${this.dir}/${file}(${lineno}): Undefined link #${m[1]}` + `${this.dir}/${file}(${lineno}): Undefined link #${m[1]}`, ); m = line.match(/ ##([A-Za-z0-9.]+)(_([A-Za-z0-9]+))?/); var outline = line; @@ -171,19 +180,19 @@ class Number { if (r) return `${r}](#${p})`; else { this.errors.push( - `${this.dir}/${file}(${lineno}): Undefined link ##${p}` + `${this.dir}/${file}(${lineno}): Undefined link ##${p}`, ); return `~~${p}~~]`; } - }.bind(this) - ) + }.bind(this), + ), ); if (!/\S\s$/.test(line)) out.write("\n"); } - }.bind(this) + }.bind(this), ) .on("close", resolve); - }.bind(this) + }.bind(this), ); } @@ -192,7 +201,7 @@ class Number { out.write( `${indent}- [${ s.number.startsWith("i") ? "" : s.number + " " - }${s.name.replace(/,? $/, "")}](#${s.href})\n` + }${s.name.replace(/,? $/, "")}](#${s.href})\n`, ); this.tableofcontents(s.sub, out, indent + " "); } diff --git a/lib/server.js b/lib/server.js index c9e90dcae..07961651a 100644 --- a/lib/server.js +++ b/lib/server.js @@ -10,18 +10,26 @@ const liveReloadServer = livereload.createServer({ extraExts: ["md"] }); liveReloadServer.watch(path.join(__dirname, "..")); const connectLivereload = require("connect-livereload"); +const statics = { images: {} }; -var app = express() +const app = express() + .enable("strict routing") .use(connectLivereload()) - .use("/styles", express.static(`${__dirname}/../styles`)) .get("/", function (_req, res, _next) { var docs = []; iterator(function (srcname, name, variant) { - docs.push(`
      • ${name}
      • `); + docs.push( + `
      • ${name}
      • `, + ); }); res.send(`

        Documents

          ${docs.join("")}
        `); }) - .get("/:doc", function (req, res, next) { + .get("/:doc", function (req, res, _next) { + var url = new URL("s://" + req.originalUrl); + url.pathname += "/"; + res.redirect(url.href.substring(4)); + }) + .get("/:doc/", function (req, res, next) { try { var branch = execSync("git branch --show-current", { cwd: __dirname, @@ -31,7 +39,7 @@ var app = express() try { var number = new Number( __dirname + "/../" + req.params.doc, - req.query.variant + req.query.variant, ); var meta = `${__dirname}/../${req.params.doc}/${ req.query.variant || "meta" @@ -50,6 +58,12 @@ var app = express() } catch (err) { next(); } + }) + .use("/:doc/styles", express.static(`${__dirname}/../styles`)) + .use("/:doc/images", function (req, res, next) { + (statics.images[req.params.doc] ||= express.static( + `${__dirname}/../${req.params.doc}/images`, + ))(req, res, next); }); if (module.parent) module.exports = app; diff --git a/odata-csdl/1 Introduction.md b/odata-csdl/1 Introduction.md index bf0ba4d80..6ca9588ea 100644 --- a/odata-csdl/1 Introduction.md +++ b/odata-csdl/1 Introduction.md @@ -27,6 +27,12 @@ Schema Definition Language (XSD) 1.1 as described in ## ##subsec Changes from Earlier Versions +Section | Feature / Change | Issue +--------|------------------|------ +[Section ##PathEvaluation]| +New path evaluation rules for annotations targeting annotations and external targeting via container| +[ODATA-1420](https://issues.oasis-open.org/browse/ODATA-1420) + ## ##subsec Glossary ### ##subsubsec Definitions of Terms diff --git a/odata-csdl/13 Entity Container.md b/odata-csdl/13 Entity Container.md index 318c6e1b8..89fda7b92 100644 --- a/odata-csdl/13 Entity Container.md +++ b/odata-csdl/13 Entity Container.md @@ -399,10 +399,10 @@ If the entity type of an entity set or singleton declares navigation properties, a navigation property binding allows describing which entity set or singleton will contain the related entities. -An [entity set](#EntitySet) or a [singleton](#Singleton) SHOULD specify -a navigation property binding for each [navigation -property](#NavigationProperty) of its entity type, including navigation -properties defined on complex typed properties or derived types. +An [entity set](#EntitySet) or a [singleton](#Singleton) SHOULD contain a navigation +property binding for each non-containment navigation property that can be reached +from the entity type through a sequence of type casts, complex properties, +or containment navigation properties. If omitted, clients MUST assume that the target entity set or singleton can vary per related entity. diff --git a/odata-csdl/14 Vocabulary and Annotation.md b/odata-csdl/14 Vocabulary and Annotation.md index e80c5e662..f3c2d6549 100644 --- a/odata-csdl/14 Vocabulary and Annotation.md +++ b/odata-csdl/14 Vocabulary and Annotation.md @@ -1398,56 +1398,203 @@ Addresses/-1/Street #### ##subsubsubsec Path Evaluation -Annotations MAY be embedded within their target, or specified -separately, e.g. as part of a different schema, and specify a path to -their target model element. The latter situation is referred to as -*targeting* in the remainder of this section. - -For annotations embedded within or targeting an entity container, the -path is evaluated starting at the entity container, i.e. an empty path -resolves to the entity container, and non-empty paths MUST start with a -segment identifying a container child (entity set, function import, -action import, or singleton). The subsequent segments follow the rules -for paths targeting the corresponding child element. - -For annotations embedded within or targeting an entity set or a -singleton, the path is evaluated starting at the entity set or -singleton, i.e. an empty path resolves to the entity set or singleton, -and non-empty paths MUST follow the rules for annotations targeting the -declared entity type of the entity set or singleton. - -For annotations embedded within or targeting an entity type or complex -type, the path is evaluated starting at the type, i.e. an empty path -resolves to the type, and the first segment of a non-empty path MUST be -a structural or navigation property of the type, a [type -cast](#TypeCast), or a [term cast](#TermCast). - -For annotations embedded within a structural or navigation property of -an entity type or complex type, the path is evaluated starting at the -directly enclosing type. This allows e.g. specifying the value of an -annotation on one property to be calculated from values of other -properties of the same type. An empty path resolves to the enclosing -type, and non-empty paths MUST follow the rules for annotations -targeting the directly enclosing type. - -For annotations targeting a structural or navigation property of an -entity type or complex type, the path is evaluated starting at the -*outermost* entity type or complex type named in the target of the -annotation, i.e. an empty path resolves to the outermost type, and the -first segment of a non-empty path MUST be a structural or navigation -property of the outermost type, a [type cast](#TypeCast), or a [term -cast](#TermCast). - -For annotations embedded within or targeting an action, action import, -function, function import, parameter, or return type, the first segment -of the path MUST be a parameter name or `$ReturnType`. +Annotations MAY be embedded within their target, or specified separately, +e.g. as part of a different schema, and specify a path to their target model +element. The latter situation is referred to as *targeting* in the remainder of +this section. + +The *host* of an annotation is the model element targeted by the annotation, +unless that target is another annotation or a model element (collection, +record or property value) directly or indirectly embedded within another +annotation, in which case the host is the host of that other annotation. + +If the value of an annotation is expressed dynamically with a path +expression, the path evaluation rules for this expression depend upon the +model element by which the annotation is hosted. + +For annotations hosted by an entity container, the path is evaluated starting +at the entity container, i.e. an empty path resolves to the entity container, +and non-empty paths MUST start with a segment identifying a container child +(entity set, function import, action import, or singleton). The subsequent +segments follow the rules for path expressions targeting the corresponding +child element. + +For annotations hosted by an entity set or a singleton, the path is evaluated +starting at the entity set or singleton, i.e. an empty path resolves to the +entity set or singleton, and non-empty paths MUST follow the rules for +annotations targeting the declared entity type of the entity set or singleton. + +For annotations hosted by an entity type or complex type, the path is +evaluated starting at the type, i.e. an empty path resolves to the type, and +the first segment of a non-empty path MUST be a structural or navigation +property of the type, a [type cast](#TypeCast), or a [term cast](#TermCast). + +For annotations hosted by an action, action import, function, function +import, parameter, or return type, the first segment of the path MUST be the +name of a parameter of the action or function or `$ReturnType`. + +For annotations hosted by a structural or navigation property, the path +evaluation rules additionally depend upon how the annotation target is +specified, as follows: + +1. If the annotation is directly or indirectly embedded within the hosting + property, the path is evaluated starting at the directly enclosing type of + the hosting property. This allows e.g. specifying the value of an + annotation on one property to be calculated from values of other properties + of the same enclosing type. An empty path resolves to the enclosing type, + and non-empty paths MUST follow the rules for annotations targeting the + directly enclosing type. + +2. If the annotation uses targeting and the target path starts with an entity + container, or the annotation is directly or indirectly embedded within such an + annotation, the path is evaluated starting at the declared type of the + hosting property. An empty path resolves to the declared type of the + property, and non-empty paths MUST follow the rules for annotations + targeting the declared type of the property. If the type is primitive, the + first segment of a non-empty path MUST be a [type cast](#TypeCast) or a + [term cast](#TermCast). + +3. If the annotation uses targeting and the target path does not start with + an entity container, or the annotation is directly or indirectly embedded + within such an annotation, the path is evaluated starting at the *outermost* + entity type or complex type named in the target path. This allows e.g. + specifying the value of an annotation on one property to be calculated from + values of other properties of the outermost type. An empty path resolves to + the outermost type, and the first segment of a non-empty path MUST be a + structural or navigation property of the outermost type, a [type cast](#TypeCast), + or a [term cast](#TermCast). + +::: example +Example ##ex: Annotations hosted by property `A2` in various modes + +Path evaluation for the annotations in the first block starts at the directly +enclosing type `self.A` of the hosting property `A2`. +:::: varjson +```json +"self": { + "A": { + "$Kind": "EntityType", + "A1": { + "$Type": "Edm.Boolean" + }, + "A2": { + "$Type": "self.B" + "@Core.Description@Core.IsLanguageDependent": { + "$Path": "A1" + }, + "@Core.Description": "..." + } + }, + "B": { + "$Kind": "ComplexType", + "B1": { + "$Type": "Edm.Boolean" + } + }, +``` +:::: + +:::: varxml +```xml + + + + + + + + + + + + +``` +:::: + +Path evaluation for the annotations in the next block starts at the declared +type `self.B` of the hosting property `A2`. +:::: varjson +```json + "Container": { + "$Kind": "EntityContainer", + "SetA": { + "$Collection": true, + "$Type": "self.A" + } + }, + "$Annotations": { + "self.Container/SetA/A2": { + "@Core.Description#viaset@Core.IsLanguageDependent": { + "$Path": "B1" + }, + "@Core.Description#viaset": "..." + }, + "self.Container/SetA/A2/@Core.Description#viaset": { + "@Core.IsLanguageDependent": { + "$Path": "B1" + } + }, +``` +:::: + +:::: varxml +```xml + + + + + + + + + + + +``` +:::: + +Path evaluation for the annotations in the final block starts at the outermost +type `self.A` named in the target path. +:::: varjson +```json + "self.A/A2": { + "@Core.Description#external@Core.IsLanguageDependent": { + "$Path": "A1" + }, + "@Core.Description#external": "..." + }, + "self.A/A2/@Core.Description": { + "@Core.IsLanguageDependent": { + "$Path": "A1" + } + } + } +} +``` +:::: + +:::: varxml +```xml + + + + + + + + + +``` +:::: + +::: #### ##subsubsubsec Annotation Path The annotation path expression provides a value for terms or term properties that specify the [built-in types](#BuiltInTypesfordefiningVocabularyTerms) -`Edm.AnnotationPath or Edm.ModelElementPath`. Its argument is a [model +`Edm.AnnotationPath` or `Edm.ModelElementPath`. Its argument is a [model path](#PathExpressions) with the following restriction: - A non-null path MUST resolve to an annotation. @@ -2285,6 +2432,7 @@ Name property of the Actor entity The `odata.matchesPattern` client-side function takes two string expressions as arguments and returns a Boolean value. +It is the counterpart of the identically named URL function [OData-URL, section 5.1.1.7.1](#ODataURL). The function returns true if the second expression evaluates to an [ECMAScript](#_ECMAScript) (JavaScript) regular expression and diff --git a/odata-data-aggregation-ext/meta.yaml b/odata-data-aggregation-ext/meta.yaml index c737a9f57..903f3557f 100644 --- a/odata-data-aggregation-ext/meta.yaml +++ b/odata-data-aggregation-ext/meta.yaml @@ -3,9 +3,9 @@ subtitle: Committee Specification 03 filename: odata-data-aggregation-ext-v4.0-cs03 stage: cs03 previousStage: csd04 -pubdate: 30 August 2023 -pubdateISO: '2023-08-30' +pubdate: 19 September 2023 +pubdateISO: '2023-09-19' copyright: © OASIS Open 2023 description: This specification adds basic grouping and aggregation functionality (e.g. sum, min, and max) - to the Open Data Protocol (OData) without changing any of the base principles of OData. \ No newline at end of file + to the Open Data Protocol (OData) without changing any of the base principles of OData. diff --git a/odata-json-format/4 Common Characteristics.md b/odata-json-format/4 Common Characteristics.md index 366a04275..2461e5c64 100644 --- a/odata-json-format/4 Common Characteristics.md +++ b/odata-json-format/4 Common Characteristics.md @@ -533,7 +533,7 @@ For [media entities](#MediaEntity) and [stream properties](#StreamProperty) at least one of the control information `mediaEditLink` and `mediaReadLink` MUST be included in responses if they don\'t follow standard URL conventions as defined -in [OData-URL](#ODataURL) or if +in [OData-URL](#ODataURL), sections 4.6 Addressing a property and 4.14 Addressing the Media Stream of a Media Entity, or if [`metadata=full`](#metadatafullodatametadatafull) is requested. diff --git a/odata-json-format/5 Service Document.md b/odata-json-format/5 Service Document.md index 3e6f5df8f..09ab16a27 100644 --- a/odata-json-format/5 Service Document.md +++ b/odata-json-format/5 Service Document.md @@ -104,7 +104,7 @@ represented as a name/value pair within the object. The order properties appear within the object is considered insignificant. An entity in a payload may be a complete entity, a projected entity (see -_System Query Option_ `$select` +_System Query Option_ `$select` in [OData-Protocol](#ODataProtocol)), or a partial entity update (see _Update an Entity_ in [OData-Protocol](#ODataProtocol)). diff --git a/odata-json-format/7 Structural Property.md b/odata-json-format/7 Structural Property.md index 9ba42be97..d7f7ef314 100644 --- a/odata-json-format/7 Structural Property.md +++ b/odata-json-format/7 Structural Property.md @@ -4,19 +4,19 @@ # ##sec Structural Property A property within an entity or complex type instance is represented as a -name/value pair. The name MUST be the name of the property; the value is +name/value pair. The name MUST be the name of the property; a non-null value is represented depending on its type as a [primitive value](#PrimitiveValue), a [complex value](#ComplexValue), a [collection of primitive values](#CollectionofPrimitiveValues), or a [collection of complex values](#CollectionofComplexValues). +Null values are represented as the JSON literal `null`. + ## ##subsec Primitive Value Primitive values are represented following the rules of [RFC8259](#rfc8259). -Null values are represented as the JSON literal `null`. - Values of type `Edm.Boolean` are represented as the JSON literals `true` and `false` @@ -461,11 +461,15 @@ An entity or complex type instance can have one or more stream properties. The actual stream data is not usually contained in the representation. Instead stream property data is generally read and edited via URLs. +- Stream properties requested with `$select` or included in the default selection are represented by +[`media*`](#ControlInformationmediaodatamedia) control information. +- Stream properties requested with `$expand` or implicitly expanded are represented as a property with its value. + +See [OData-Protocol](#ODataProtocol) for details on the system query options `$select` and `$expand`. Depending on the [metadata level](#ControllingtheAmountofControlInformationinResponses), the stream property MAY be annotated to provide the read link, edit -link, media type, and ETag of the media stream through a set of -[`media*`](#ControlInformationmediaodatamedia) control information. +link, media type, and ETag of the media stream through their `media*` control information. If the actual stream data is included inline, the control information [`mediaContentType`](#ControlInformationmediaodatamedia) diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index e3db32113..9167fa2a2 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -383,18 +383,12 @@ The `$expand` system query option indicates the related entities and stream values that MUST be represented inline. The service MUST return the specified content, and MAY choose to return additional information. -The value of the `$expand` query option is a comma-separated list of -navigation property names, stream property names, or `$value` indicating -the stream content of a media-entity. - -For navigation properties, the navigation property name is optionally -followed by a `/$ref` path segment or a `/$count` path segment, and -optionally a parenthesized set of [expand options](#ExpandOptions) (for -filtering, sorting, selecting, paging, or expanding the related -entities). +The value of `$expand` is a comma-separated list of expand items. Each +expand item is evaluated relative to the retrieved resource being +expanded. For a full description of the syntax used when building requests, see -[OData-URL](#ODataURL). +[OData-URL](#ODataURL), section 5.1.3. ::: example Example ##ex: for each customer entity within the Customers entity set the @@ -427,15 +421,18 @@ application of expand options, expressed as a semicolon-separated list of system query options, enclosed in parentheses, see [OData-URL](#ODataURL). -Allowed system query options are [`$filter`](#SystemQueryOptionfilter), +Allowed system query options are +[`$compute`](#SystemQueryOptioncompute), [`$select`](#SystemQueryOptionselect), +`$expand`, and +[`$levels`](#ExpandOptionlevels) + for all navigation properties, plus +[`$filter`](#SystemQueryOptionfilter), [`$orderby`](#SystemQueryOptionorderby), [`$skip`](#SystemQueryOptionskip), [`$top`](#SystemQueryOptiontop), -[`$count`](#SystemQueryOptioncount), -[`$search`](#SystemQueryOptionsearch), -[`$expand`](#SystemQueryOptionexpand)`,` -[`$compute`](#SystemQueryOptioncompute)`,` and -[`$levels`](#ExpandOptionlevels). +[`$count`](#SystemQueryOptioncount), and +[`$search`](#SystemQueryOptionsearch) + for collection-valued navigation properties. ::: example Example ##ex: for each customer entity within the `Customers` entity set, @@ -475,8 +472,8 @@ GET http://host/service.svc/Customers?$expand=SampleModel.VipCustomer/InHouseSta The `$levels` expand option can be used to specify the number of levels of recursion for a hierarchy in which the related entity type is the same as, or can be cast to, the source entity type. A `$levels` option -with a value of 1 specifies a single expand with no recursion. The same -expand options are applied at each level of the hierarchy. +with a value of 1 specifies a single expand with no recursion. All provided +expand options except `$levels` are applied at each level of the hierarchy. Services MAY support the symbolic value `max` in addition to numeric values. In that case they MUST solve circular dependencies by injecting @@ -1368,8 +1365,8 @@ appended to the path of a delta link in order to get just the number of changes available. The count includes all added, changed, or deleted entities, as well as added or deleted links. -The results of a request against the delta link may span multiple pages -but MUST be ordered by the service across all pages in such a way as to +The results of a request against the delta link may span one or more pages +and MUST be ordered by the service across all pages in such a way as to guarantee consistency when applied in order to the response which contained the delta link. diff --git a/odata-protocol/11.4 Data Modification.md b/odata-protocol/11.4 Data Modification.md index 76ec0c6c5..885435a89 100644 --- a/odata-protocol/11.4 Data Modification.md +++ b/odata-protocol/11.4 Data Modification.md @@ -208,14 +208,15 @@ The representation for referencing related entities is format-specific. ::: example Example ##ex: using the JSON format, 4.0 clients can create a new manager -entity with links to two existing employees by applying the `odata.bind` -annotation to the `DirectReports` navigation property +entity with links to an existing manager (of managers) and to two existing employees by applying the `odata.bind` +annotation to the `Manager` and `DirectReports` navigation properties ```json {   "@odata.type":"#Northwind.Manager",   "ID": 1,   "FirstName": "Pat",   "LastName": "Griswold", + "Manager@odata.bind": "http://host/service/Employees(0)",   "DirectReports@odata.bind": [     "http://host/service/Employees(5)",     "http://host/service/Employees(6)" @@ -226,14 +227,15 @@ annotation to the `DirectReports` navigation property ::: example Example ##ex: using the JSON format, 4.01 clients can create a new manager -entity with links to two existing employees by including the entity-ids -within the `DirectReports` navigation property +entity with links to an existing manager (of managers) and to two existing employees by including the entity-ids +within the `Manager` and `DirectReports` navigation properties ```json {   "@type":"#Northwind.Manager",   "ID": 1,   "FirstName": "Pat",   "LastName": "Griswold", + "Manager": { "@id": "Employees(0)" },   "DirectReports": [     {"@id": "Employees(5)"},     {"@id": "Employees(6)"} @@ -274,9 +276,9 @@ service responds with [`201 Created`](#ResponseCode201Created), the response MUS least the level that was present in the deep-insert request. Clients MAY associate an id with individual nested entities in the -request by using the +request by applying the [`Core.ContentID`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#ContentID) -term defined in [OData-VocCore](#ODataVocCore). Services that respond +term using the namespace or alias defined for the [OData-VocCore](#ODataVocCore) vocabulary in the service's `$metadata` document. Services that respond with [`201 Created`](#ResponseCode201Created) SHOULD annotate the entities in the response using the same [`Core.ContentID`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#ContentID) @@ -569,8 +571,8 @@ To delete an individual entity, the client makes a `DELETE` request to a URL that identifies the entity. Services MAY restrict deletes only to requests addressing the [edit URL](#ReadURLsandEditURLs) of the entity. -The request body SHOULD be empty. Singleton entities can be deleted if -they are nullable. Services supporting this SHOULD advertise it by +The request body SHOULD be empty. Top-level singleton entities can be deleted if +they are nullable. Services supporting this MAY advertise it by annotating the singleton with the term `Capabilities.DeleteRestrictions` (nested property `Deletable` with value `true`) defined in [OData-VocCap](#ODataVocCap). @@ -730,6 +732,43 @@ are properties of type `Edm.Stream`. The values for stream properties do not usually appear in the entity payload. Instead, the values are generally read or written through URLs. +::: example +Example ##ex_entityWithStreamProperty: read an entity and select a stream property +``` +GET http://host/service/Products(1)?$select=Thumbnail +``` +would only include control information for the stream property, not the stream data itself +```json +{ + "@context": "http://host/service/$metadata#Products/$entity", + ... + "Thumbnail@mediaReadLink": "http://server/Thumbnail546.jpg", + "Thumbnail@mediaEditLink": "http://server/uploads/Thumbnail546.jpg", + ... +} +``` +The stream data can then be requested using the media read link: +``` +GET http://server/Thumbnail546.jpg +``` +::: + +Services SHOULD support direct property access to a stream property's canonical URL. +The response MAY be a redirect to the media read link of the stream property +if the media read link is different from the canonical URL. + +::: example +Example ##ex: directly read a stream property of an entity +``` +GET http://host/service/Products(1)/Thumbnail +``` +can return [`200 OK`](#ResponseCode200OK) and the stream data, or a +[`3xx Redirect`](#ResponseCode3xxRedirection) to the media read link of the stream property. +::: + +Note: for scenarios in which the media value can only be inlined, +the property should instead be modeled with type `Edm.Binary`. + #### ##subsubsubsec Update Stream Values A successful `PUT` request to the edit URL of a stream property changes @@ -767,6 +806,13 @@ A successful `DELETE` request to the edit URL of a stream property attempts to set the property to null and results in an error if the property is non-nullable. +::: example +Example ##ex: delete the stream value using the media edit link retrieved in [example ##entityWithStreamProperty] +``` +DELETE http://server/uploads/Thumbnail546.jpg +``` +::: + Attempting to request a stream property whose value is null results in [`204 No Content`](#ResponseCode204NoContent). @@ -863,10 +909,9 @@ request body. A successful `POST` request to the edit URL of a collection property adds an item to the collection. The body of the request MUST be a single item to be added to the collection. If the collection is ordered, the -item is added to the end of the collection, and +item is added to the end of the collection, and if the collection supports positional insert [`$index`](#RequestinganIndividualMemberofanOrderedCollection) MAY be used to specify -a zero-based ordinal position to insert the new value, with a negative -value indicating an ordinal position from the end of the collection. +the insert position. A successful `DELETE` request to the edit URL of a collection property deletes all items in that collection. @@ -875,7 +920,7 @@ Since collection members have no individual identity, `PATCH` is not supported for collection properties. Upon successful completion the service responds with either -[`200 OK`](#ResponseCode200OK) or +[`200 OK`](#ResponseCode200OK) and a representation of the updated collection, or [`204 No Content`](#ResponseCode204NoContent). The client may request that the response SHOULD include a body by specifying a [Prefer header](#Preferencereturnrepresentationandreturnminimal) with a value of diff --git a/odata-temporal-ext/2 Overview.md b/odata-temporal-ext/2 Overview.md index 3a4853bde..160f42f93 100644 --- a/odata-temporal-ext/2 Overview.md +++ b/odata-temporal-ext/2 Overview.md @@ -58,7 +58,7 @@ Example ##ex_api1: model for `api-1` with snapshot entity sets (hidden application time), key properties marked with {id} ::: -
        Employee
        Employee
        ID: Edm.String {id}
        ID: Edm.String {id}
        Name: Edm.String
        Name: Edm.String
        Jobtitle: Edm.String
        Jobtitle: Edm.String
        Department
        Department
        ID: Edm.String {id}
        ID: Edm.String {id}
        Name: Edm.String
        Name: Edm.String
        \*
        Employees
        \*...
        1
        Department
        1...
        Text is not SVG - cannot display
        +$$$include diagrams/api-1.drawio.svg$$$ and @@ -67,7 +67,7 @@ Example ##ex_api2: model for `api-2` with timeline entity sets (visible application time), key properties marked with {id} ::: -
        Employee_history
        Employee_history
        From: Edm.Date {id}
        From: Edm.Date {id}
        To: Edm.Date
        To: Edm.Date
        Name: Edm.String
        Name: Edm.String
        Jobtitle: Edm.String
        Jobtitle: Edm.String
        Department_history
        Department_history
        From: Edm.Date {id}
        From: Edm.Date {id}
        To: Edm.Date
        To: Edm.Date
        Name: Edm.String
        Name: Edm.String
        Budget: Edm.Decimal
        Budget: Edm.Decimal
        Employee
        Employee
        ID: Edm.String {id}
        ID: Edm.String {id}
        Department
        Department
        ID: Edm.String {id}
        ID: Edm.String {id}
        \*
        Employees
        \*...
        \*
        history
        \*...
        \*
        history
        \*...
        1
        Department
        1...
        Text is not SVG - cannot display
        +$$$include diagrams/api-2.drawio.svg$$$ ## ##subsec Example Data @@ -79,7 +79,7 @@ Example ##ex: simple storage model: object key in dark green, temporal sub-key in light green, foreign keys in orange, non-key fields in blue ::: -
        Employee
        Employee
        ID: String {id}
        ID: String {id}
        From: Date {id}
        From: Date {id}
        To: Date
        To: Date
        Name: String
        Name: String
        Jobtitle: String
        Jobtitle: String
        Department.ID
        Department.ID
        Department
        Department
        ID: String {id}
        ID: String {id}
        From: Date {id}
        From: Date {id}
        To: Date
        To: Date
        Name: String
        Name: String
        Budget: Decimal
        Budget: Decimal
        1
        1
        Text is not SVG - cannot display
        +$$$include diagrams/db.drawio.svg$$$ The period start date is used as the temporal sub-key for identifying time slices together with the key of the temporal object. diff --git a/odata-temporal-ext/diagrams/README.md b/odata-temporal-ext/diagrams/README.md deleted file mode 100644 index f3feb3edf..000000000 --- a/odata-temporal-ext/diagrams/README.md +++ /dev/null @@ -1,4 +0,0 @@ -Diagrams in the [Draw.io](https://marketplace.visualstudio.com/items?itemName=hediet.vscode-drawio) `example-model.drawio` file are exported as `*.svg` and then embedded into the `.md` files without changes. - -Note: star `*` characters in a diagram description needs to be escaped as `\*` to avoid -interpretation as markdown. diff --git a/odata-temporal-ext/diagrams/api-1.drawio.svg b/odata-temporal-ext/diagrams/api-1.drawio.svg new file mode 100644 index 000000000..d0414882c --- /dev/null +++ b/odata-temporal-ext/diagrams/api-1.drawio.svg @@ -0,0 +1,186 @@ + + + + + + + + + +
        +
        +
        + Employee +
        +
        +
        +
        + + Employee + +
        +
        + + + +
        +
        +
        + ID: Edm.String {id} +
        +
        +
        +
        + + ID: Edm.String {id} + +
        +
        + + + +
        +
        +
        + Name: Edm.String +
        +
        +
        +
        + + Name: Edm.String + +
        +
        + + + +
        +
        +
        + Jobtitle: Edm.String +
        +
        +
        +
        + + Jobtitle: Edm.String + +
        +
        + + + + + + +
        +
        +
        + Department +
        +
        +
        +
        + + Department + +
        +
        + + + +
        +
        +
        + ID: Edm.String {id} +
        +
        +
        +
        + + ID: Edm.String {id} + +
        +
        + + + +
        +
        +
        + Name: Edm.String +
        +
        +
        +
        + + Name: Edm.String + +
        +
        + + + + + + +
        +
        +
        +
        + + * + +
        +
        + + Employees + +
        +
        +
        +
        +
        + + *... + +
        +
        + + + +
        +
        +
        +
        +
        + + 1 + +
        +
        + + Department + +
        +
        +
        +
        +
        +
        + + 1... + +
        +
        +
        + + + + + Text is not SVG - cannot display + + + +
        diff --git a/odata-temporal-ext/diagrams/api-1.svg b/odata-temporal-ext/diagrams/api-1.svg deleted file mode 100644 index b17470763..000000000 --- a/odata-temporal-ext/diagrams/api-1.svg +++ /dev/null @@ -1 +0,0 @@ -
        Employee
        Employee
        ID: Edm.String {id}
        ID: Edm.String {id}
        Name: Edm.String
        Name: Edm.String
        Jobtitle: Edm.String
        Jobtitle: Edm.String
        Department
        Department
        ID: Edm.String {id}
        ID: Edm.String {id}
        Name: Edm.String
        Name: Edm.String
        \*
        Employees
        \*...
        1
        Department
        1...
        Text is not SVG - cannot display
        \ No newline at end of file diff --git a/odata-temporal-ext/diagrams/api-2.drawio.svg b/odata-temporal-ext/diagrams/api-2.drawio.svg new file mode 100644 index 000000000..b4cfe12b8 --- /dev/null +++ b/odata-temporal-ext/diagrams/api-2.drawio.svg @@ -0,0 +1,355 @@ + + + + + + + + + +
        +
        +
        + Employee_history +
        +
        +
        +
        + + Employee_history + +
        +
        + + + +
        +
        +
        + From: Edm.Date {id} +
        +
        +
        +
        + + From: Edm.Date {id} + +
        +
        + + + +
        +
        +
        + To: Edm.Date +
        +
        +
        +
        + + To: Edm.Date + +
        +
        + + + +
        +
        +
        + Name: Edm.String +
        +
        +
        +
        + + Name: Edm.String + +
        +
        + + + +
        +
        +
        + Jobtitle: Edm.String +
        +
        +
        +
        + + Jobtitle: Edm.String + +
        +
        + + + + + + +
        +
        +
        + Department_history +
        +
        +
        +
        + + Department_history + +
        +
        + + + +
        +
        +
        + From: Edm.Date {id} +
        +
        +
        +
        + + From: Edm.Date {id} + +
        +
        + + + +
        +
        +
        + To: Edm.Date +
        +
        +
        +
        + + To: Edm.Date + +
        +
        + + + +
        +
        +
        + Name: Edm.String +
        +
        +
        +
        + + Name: Edm.String + +
        +
        + + + +
        +
        +
        + Budget: Edm.Decimal +
        +
        +
        +
        + + Budget: Edm.Decimal + +
        +
        + + + + + + +
        +
        +
        + Employee +
        +
        +
        +
        + + Employee + +
        +
        + + + +
        +
        +
        + ID: Edm.String {id} +
        +
        +
        +
        + + ID: Edm.String {id} + +
        +
        + + + + + + +
        +
        +
        + Department +
        +
        +
        +
        + + Department + +
        +
        + + + +
        +
        +
        + ID: Edm.String {id} +
        +
        +
        +
        + + ID: Edm.String {id} + +
        +
        + + + + + +
        +
        +
        +
        + + * + +
        +
        + + Employees + +
        +
        +
        +
        +
        + + *... + +
        +
        + + + + + +
        +
        +
        +
        + + * + +
        +
        + history +
        +
        +
        +
        +
        + + *... + +
        +
        + + + + + +
        +
        +
        +
        + + * + +
        +
        + history +
        +
        +
        +
        +
        + + *... + +
        +
        + + + +
        +
        +
        +
        +
        + + 1 + +
        +
        + + Department + +
        +
        +
        +
        +
        +
        + + 1... + +
        +
        + + +
        + + + + + Text is not SVG - cannot display + + + +
        diff --git a/odata-temporal-ext/diagrams/api-2.svg b/odata-temporal-ext/diagrams/api-2.svg deleted file mode 100644 index f832e2925..000000000 --- a/odata-temporal-ext/diagrams/api-2.svg +++ /dev/null @@ -1 +0,0 @@ -
        Employee_history
        Employee_history
        From: Edm.Date {id}
        From: Edm.Date {id}
        To: Edm.Date
        To: Edm.Date
        Name: Edm.String
        Name: Edm.String
        Jobtitle: Edm.String
        Jobtitle: Edm.String
        Department_history
        Department_history
        From: Edm.Date {id}
        From: Edm.Date {id}
        To: Edm.Date
        To: Edm.Date
        Name: Edm.String
        Name: Edm.String
        Budget: Edm.Decimal
        Budget: Edm.Decimal
        Employee
        Employee
        ID: Edm.String {id}
        ID: Edm.String {id}
        Department
        Department
        ID: Edm.String {id}
        ID: Edm.String {id}
        \*
        Employees
        \*...
        \*
        history
        \*...
        \*
        history
        \*...
        1
        Department
        1...
        Text is not SVG - cannot display
        \ No newline at end of file diff --git a/odata-temporal-ext/diagrams/db.drawio.svg b/odata-temporal-ext/diagrams/db.drawio.svg new file mode 100644 index 000000000..e1fa16baf --- /dev/null +++ b/odata-temporal-ext/diagrams/db.drawio.svg @@ -0,0 +1,260 @@ + + + + + + + + + +
        +
        +
        + Employee +
        +
        +
        +
        + + Employee + +
        +
        + + + + +
        +
        +
        + ID: String {id} +
        +
        +
        +
        + + ID: String {id} + +
        +
        + + + + +
        +
        +
        + From: Date {id} +
        +
        +
        +
        + + From: Date {id} + +
        +
        + + + + +
        +
        +
        + To: Date +
        +
        +
        +
        + + To: Date + +
        +
        + + + + +
        +
        +
        + Name: String +
        +
        +
        +
        + + Name: String + +
        +
        + + + + +
        +
        +
        + Jobtitle: String +
        +
        +
        +
        + + Jobtitle: String + +
        +
        + + + + +
        +
        +
        + Department.ID +
        +
        +
        +
        + + Department.ID + +
        +
        + + + + + + +
        +
        +
        + Department +
        +
        +
        +
        + + Department + +
        +
        + + + + +
        +
        +
        + ID: String {id} +
        +
        +
        +
        + + ID: String {id} + +
        +
        + + + + +
        +
        +
        + From: Date {id} +
        +
        +
        +
        + + From: Date {id} + +
        +
        + + + + +
        +
        +
        + To: Date +
        +
        +
        +
        + + To: Date + +
        +
        + + + + +
        +
        +
        + Name: String +
        +
        +
        +
        + + Name: String + +
        +
        + + + + +
        +
        +
        + Budget: Decimal +
        +
        +
        +
        + + Budget: Decimal + +
        +
        + + + +
        +
        +
        +
        +
        + 1 +
        +
        +
        +
        +
        +
        + + 1 + +
        +
        + + +
        + + + + + Text is not SVG - cannot display + + + +
        diff --git a/odata-temporal-ext/diagrams/db.svg b/odata-temporal-ext/diagrams/db.svg deleted file mode 100644 index 0cc58df72..000000000 --- a/odata-temporal-ext/diagrams/db.svg +++ /dev/null @@ -1 +0,0 @@ -
        Employee
        Employee
        ID: String {id}
        ID: String {id}
        From: Date {id}
        From: Date {id}
        To: Date
        To: Date
        Name: String
        Name: String
        Jobtitle: String
        Jobtitle: String
        Department.ID
        Department.ID
        Department
        Department
        ID: String {id}
        ID: String {id}
        From: Date {id}
        From: Date {id}
        To: Date
        To: Date
        Name: String
        Name: String
        Budget: Decimal
        Budget: Decimal
        1
        1
        Text is not SVG - cannot display
        \ No newline at end of file diff --git a/odata-temporal-ext/diagrams/example-model.drawio b/odata-temporal-ext/diagrams/example-model.drawio deleted file mode 100644 index 3e804637c..000000000 --- a/odata-temporal-ext/diagrams/example-model.drawio +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/odata-url-conventions/5 Query Options.md b/odata-url-conventions/5 Query Options.md index 72830adc7..fa7224133 100644 --- a/odata-url-conventions/5 Query Options.md +++ b/odata-url-conventions/5 Query Options.md @@ -1437,7 +1437,7 @@ $compute=case(X gt 0:1,X lt 0:-1,true:0) as SignumX #### ##subsubsubsec Lambda Operators OData defines two operators that evaluate a Boolean expression on a -collection. Both must be prepended with a navigation path that +collection. Both must be prepended with a path expression that identifies a collection. 4.01 Services MUST support case-insensitive lambda operator names. @@ -1446,8 +1446,8 @@ operator names. The argument of a lambda operator is a case-sensitive lambda variable name followed by a colon (`:`) and a Boolean expression that uses the -lambda variable name to refer to properties of members of the collection -identified by the navigation path. +lambda variable name to refer to properties of the instance or of members of the collection +identified by the path expression. If the name chosen for the lambda variable matches a property name of the current resource referenced by the resource path, the lambda @@ -1456,7 +1456,7 @@ resource referenced by the resource path with [`$it`](#it). Other path expressions in the Boolean expression neither prefixed with the lambda variable nor `$it` are evaluated in the scope of the -collection instances at the origin of the navigation path prepended to +instance or of members of the collection at the origin of the path expression prepended to the lambda operator. ##### ##subsubsubsubsec `any` @@ -1935,14 +1935,18 @@ A path MUST NOT appear in more than one expand item. Query options can be applied to an expanded navigation property by appending a semicolon-separated list of query options, enclosed in -parentheses, to the navigation property name. Allowed system query -options are [`$filter`](#SystemQueryOptionfilter), +parentheses, to the navigation property name. +Allowed system query options are +[`$compute`](#SystemQueryOptioncompute), [`$select`](#SystemQueryOptionselect), +`$expand`, and +[`$levels`](#ExpandOptionlevels) for all navigation properties, plus +[`$filter`](#SystemQueryOptionfilter), [`$orderby`](#SystemQueryOptionorderby), -[`$skip`](#SystemQueryOptionstopandskip), -[`$top`](#SystemQueryOptionstopandskip), -[`$count`](#SystemQueryOptioncount), -[`$search`](#SystemQueryOptionsearch), and `$expand`. +[`$skip`](#SystemQueryOptionstopandskip), [`$top`](#SystemQueryOptionstopandskip), +[`$count`](#SystemQueryOptioncount), and +[`$search`](#SystemQueryOptionsearch) + for collection-valued navigation properties. ::: example Example ##ex: all categories and for each category all related products @@ -2008,13 +2012,13 @@ http://host/service/Categories?$expand=Products/Sales.PremierProduct/$ref($filte ``` ::: -Cyclic navigation properties (whose target type is identical or can be +Cyclic navigation properties (whose target type is identical or can be cast to its source type) can be recursively expanded using the special `$levels` option. The value of the `$levels` option is either a positive integer to specify the number of levels to expand, or the literal string `max` to specify the maximum expansion level supported by that service. A `$levels` option with a value of 1 specifies a single expand with no -recursion. +recursion. ::: example Example ##ex: all employees with their manager, manager's manager, and @@ -2116,10 +2120,11 @@ The `$select` system query option is interpreted relative to the entity type or complex type of the resources identified by the resource path section of the URL. Each select item in the `$select` clause indicates that the response MUST include the declared or dynamic properties, -actions and functions identified by that select item. The simplest form -of a select item explicitly requests a property defined on the entity -type of the resources identified by the resource path section of the -URL. +actions and functions identified by that select item. +If a select item is a path expression traversing an entity or complex property that is `null` on an instance, then +the null-valued entity or complex property is included and represented as `null`. +The simplest form of a select item explicitly requests a property defined on the entity +type of the resources identified by the resource path section of the URL. ::: example Example ##ex: rating and release date of all products @@ -2244,10 +2249,6 @@ of properties, open properties, navigation properties, actions and functions to be returned is equal to the union of the set of those identified by each select item. -If a select item is a path expression requesting a component of a -complex property and the complex property is `null` on an instance, then -the component is treated as `null` as well. - ### ##subsubsec System Query Option `$orderby` The `$orderby` system query option allows clients to request resources diff --git a/package.json b/package.json index 4d33eca48..33ce27150 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "clean-xxx": "node lib/clean.mjs odata-xxx/temp odata-xxx-v4.0" }, "author": "", - "license": "ISC", + "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "c8": "^8.0.0", "express": "^4", From bc0f094d3e88bc06a028c2422ebfd66c7c494386 Mon Sep 17 00:00:00 2001 From: D024504 Date: Thu, 19 Oct 2023 13:54:01 +0200 Subject: [PATCH 43/74] rebuild --- docs/odata-csdl-json/odata-csdl-json.html | 34 +---------------------- docs/odata-csdl-json/odata-csdl-json.md | 6 +--- docs/odata-csdl-xml/odata-csdl-xml.html | 25 +---------------- docs/odata-csdl-xml/odata-csdl-xml.md | 6 +--- 4 files changed, 4 insertions(+), 67 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index 4e176615a..78723c8f0 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -3204,38 +3204,7 @@

        14.4.12 Record

        It MAY contain annotations for itself and its members. Annotations for record members are prefixed with the member name.

        -<<<<<<< HEAD -

        Example 86: this annotation "morphs" the entity type from example 13 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

        -
        "@person.Employee": {
        -  "@type": "https://example.org/vocabs/person#org.example.person.Manager",
        -  "@Core.Description": "Annotation on record",
        -  "GivenName": {
        -    "$Path": "FirstName"
        -  },
        -  "GivenName@Core.Description": "Annotation on record member",
        -  "Surname": {
        -    "$Path": "LastName"
        -  },
        -  "DirectSupervisor": {
        -    "$Path": "Manager"
        -  },
        -  "CostCenter": {
        -    "$UrlRef": {
        -      "$Apply": [
        -        "http://host/anotherservice/CostCenters('{ccid}')",
        -        {
        -          "$LabeledElement": {
        -            "$Path": "CostCenterID"
        -          },
        -          "$Name": "ccid"
        -        }
        -      ],
        -      "$Function": "odata.fillUriTemplate"
        -    }
        -  }
        -}
        -======= -

        Example 87: this annotation "morphs" the entity type from example 8 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

        +

        Example 87: this annotation "morphs" the entity type from example 13 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

        "@person.Employee": {
           "@type": "https://example.org/vocabs/person#org.example.person.Manager",
           "@Core.Description": "Annotation on record",
        @@ -3264,7 +3233,6 @@ 

        14.4.12 Record

        } } }
        ->>>>>>> refs/remotes/origin/main

        14.4.13 URL Reference

        The URL reference expression enables a value to be obtained by sending a GET request.

        diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 38224998d..463f1ae85 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -5378,11 +5378,7 @@ Annotations for record members are prefixed with the member name. ::: ::: {.varjson .example} -<<<<<<< HEAD -Example 86: this annotation "morphs" the entity type from [example 13](#entitytype) into -======= -Example 87: this annotation "morphs" the entity type from [example 8](#entitytype) into ->>>>>>> refs/remotes/origin/main +Example 87: this annotation "morphs" the entity type from [example 13](#entitytype) into a structured type with two structural properties `GivenName` and `Surname` and two navigation properties `DirectSupervisor` and `CostCenter`. The first three properties simply rename properties of the diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 07f6beaa9..5da6b8d14 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -2977,29 +2977,7 @@

        -<<<<<<< HEAD -

        Example 86: this annotation "morphs" the entity type from example 13 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

        -
        <Annotation Term="org.example.person.Employee">
        -  <Record>
        -    <Annotation Term="Core.Description" String="Annotation on record" />
        -    <PropertyValue Property="GivenName" Path="FirstName">
        -      <Annotation Term="Core.Description"
        -                  String="Annotation on record member" />
        -    </PropertyValue>
        -    <PropertyValue Property="Surname" Path="LastName" />
        -    <PropertyValue Property="DirectSupervisor" Path="Manager" />
        -    <PropertyValue Property="CostCenter">
        -      <UrlRef>
        -        <Apply Function="odata.fillUriTemplate">
        -          <String>http://host/anotherservice/CostCenters('{ccid}')</String>
        -          <LabeledElement Name="ccid" Path="CostCenterID" />
        -        </Apply>
        -      </UrlRef>
        -    </PropertyValue>
        -  </Record>
        -</Annotation>
        -======= -

        Example 87: this annotation "morphs" the entity type from example 8 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

        +

        Example 87: this annotation "morphs" the entity type from example 13 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

        <Annotation Term="org.example.person.Employee">
           <Record>
             <Annotation Term="Core.Description" String="Annotation on record" />
        @@ -3019,7 +2997,6 @@ 

        </PropertyValue> </Record> </Annotation>

        ->>>>>>> refs/remotes/origin/main

        14.4.13 URL Reference

        The URL reference expression enables a value to be obtained by sending a GET request.

        diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 8e53f196e..236001946 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -5201,11 +5201,7 @@ enclosing `edm:Record` expression. ::: ::: {.varxml .example} -<<<<<<< HEAD -Example 86: this annotation "morphs" the entity type from [example 13](#entitytype) into -======= -Example 87: this annotation "morphs" the entity type from [example 8](#entitytype) into ->>>>>>> refs/remotes/origin/main +Example 87: this annotation "morphs" the entity type from [example 13](#entitytype) into a structured type with two structural properties `GivenName` and `Surname` and two navigation properties `DirectSupervisor` and `CostCenter`. The first three properties simply rename properties of the From 58c3b1ba7678b2ff1c7bcf74af9d6e671bce58d4 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 19 Oct 2023 13:56:37 +0200 Subject: [PATCH 44/74] Explain Nullable --- docs/odata-csdl-json/odata-csdl-json.html | 1348 ++++++++++----------- docs/odata-csdl-json/odata-csdl-json.md | 258 ++-- docs/odata-csdl-xml/odata-csdl-xml.html | 872 ++++++------- docs/odata-csdl-xml/odata-csdl-xml.md | 253 ++-- odata-csdl/1 Introduction.md | 23 +- 5 files changed, 1169 insertions(+), 1585 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index 4e176615a..14e783136 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -370,22 +370,6 @@

        1 Introducti

        OData services are described in terms of an Entity Model. The Common Schema Definition Language (CSDL) defines a representation of the entity model exposed by an OData service using the JavaScript Object Notation (JSON), see RFC8259.

        This format is based on the OpenUI5 OData V4 Metadata JSON Format, see OpenUI5, with some extensions and modifications made necessary to fully cover OData CSDL Version 4.01.

        1.1 Changes from Earlier Versions

        - - - - - - - - - - - - - - - -
        SectionFeature / ChangeIssue
        Section 14.4.1.2New path evaluation rules for annotations targeting annotations and external targeting via containerODATA-1420

        1.2 Glossary

        1.2.1 Definitions of Terms

        1.2.2 Acronyms and Abbreviations

        @@ -684,40 +668,36 @@

        $Scale

        Example 3: Precision=3 and Scale=2.
        Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3

        "Amount32": {
        -  "$Nullable": true,
        -  "$Type": "Edm.Decimal",
        -  "$Precision": 3,
        -  "$Scale": 2
        -}
        + "$Type": "Edm.Decimal", + "$Precision": 3, + "$Scale": 2 +}

      Example 4: Precision=2 equals Scale.
      Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2

      "Amount22": {
      -  "$Nullable": true,
      -  "$Type": "Edm.Decimal",
      -  "$Precision": 2,
      -  "$Scale": 2
      -}
      + "$Type": "Edm.Decimal", + "$Precision": 2, + "$Scale": 2 +}

    Example 5: Precision=3 and a variable Scale.
    Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed values: 12.34, 1234 and 123.4 due to the limited precision.

    "Amount3v": {
    -  "$Nullable": true,
    -  "$Type": "Edm.Decimal",
    -  "$Precision": 3
    -}
    + "$Type": "Edm.Decimal", + "$Precision": 3 +}

    Example 6: Precision=7 and a floating Scale.
    Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: 1e-102 and 1e97 due to the limited precision.

    "Amount7f": {
    -  "$Nullable": true,
    -  "$Type": "Edm.Decimal",
    -  "$Precision": 7,
    -  "$Scale": "floating"
    -}
    + "$Type": "Edm.Decimal", + "$Precision": 7, + "$Scale": "floating" +}

    3.4.4 Unicode

    For a string-typed model element the Unicode facet indicates whether the it might contain and accept string values with Unicode characters (code points) beyond the ASCII character set. The value false indicates that the it will only contain and accept string values with characters limited to the ASCII character set.

    @@ -1887,7 +1867,7 @@

    $Nullabl

    13.4 Navigation Property Binding

    If the entity type of an entity set or singleton declares navigation properties, a navigation property binding allows describing which entity set or singleton will contain the related entities.

    -

    An entity set or a singleton SHOULD contain a navigation property binding for each non-containment navigation property that can be reached from the entity type through a sequence of type casts, complex properties, or containment navigation properties.

    +

    An entity set or a singleton SHOULD specify a navigation property binding for each navigation property of its entity type, including navigation properties defined on complex typed properties or derived types.

    If omitted, clients MUST assume that the target entity set or singleton can vary per related entity.

    13.4.1 Navigation Property Path Binding

    A navigation property binding MUST specify a path to a navigation property of the entity set's or singleton's declared entity type, or a navigation property reached through a chain of type casts, complex properties, or containment navigation properties. If the navigation property is defined on a subtype, the path MUST contain the qualified name of the subtype, followed by a forward slash, followed by the navigation property name. If the navigation property is defined on a complex type used in the definition of the entity set's entity type, the path MUST contain a forward-slash separated list of complex property names and qualified type names that describe the path leading to the navigation property.

    @@ -2576,84 +2556,14 @@

    14.4.1.1 Path

    14.4.1.2 Path Evaluation

    Annotations MAY be embedded within their target, or specified separately, e.g. as part of a different schema, and specify a path to their target model element. The latter situation is referred to as targeting in the remainder of this section.

    -

    The host of an annotation is the model element targeted by the annotation, unless that target is another annotation or a model element (collection, record or property value) directly or indirectly embedded within another annotation, in which case the host is the host of that other annotation.

    -

    If the value of an annotation is expressed dynamically with a path expression, the path evaluation rules for this expression depend upon the model element by which the annotation is hosted.

    -

    For annotations hosted by an entity container, the path is evaluated starting at the entity container, i.e. an empty path resolves to the entity container, and non-empty paths MUST start with a segment identifying a container child (entity set, function import, action import, or singleton). The subsequent segments follow the rules for path expressions targeting the corresponding child element.

    -

    For annotations hosted by an entity set or a singleton, the path is evaluated starting at the entity set or singleton, i.e. an empty path resolves to the entity set or singleton, and non-empty paths MUST follow the rules for annotations targeting the declared entity type of the entity set or singleton.

    -

    For annotations hosted by an entity type or complex type, the path is evaluated starting at the type, i.e. an empty path resolves to the type, and the first segment of a non-empty path MUST be a structural or navigation property of the type, a type cast, or a term cast.

    -

    For annotations hosted by an action, action import, function, function import, parameter, or return type, the first segment of the path MUST be the name of a parameter of the action or function or $ReturnType.

    -

    For annotations hosted by a structural or navigation property, the path evaluation rules additionally depend upon how the annotation target is specified, as follows:

    -
      -
    1. If the annotation is directly or indirectly embedded within the hosting property, the path is evaluated starting at the directly enclosing type of the hosting property. This allows e.g. specifying the value of an annotation on one property to be calculated from values of other properties of the same enclosing type. An empty path resolves to the enclosing type, and non-empty paths MUST follow the rules for annotations targeting the directly enclosing type.

    2. -
    3. If the annotation uses targeting and the target path starts with an entity container, or the annotation is directly or indirectly embedded within such an annotation, the path is evaluated starting at the declared type of the hosting property. An empty path resolves to the declared type of the property, and non-empty paths MUST follow the rules for annotations targeting the declared type of the property. If the type is primitive, the first segment of a non-empty path MUST be a type cast or a term cast.

    4. -
    5. If the annotation uses targeting and the target path does not start with an entity container, or the annotation is directly or indirectly embedded within such an annotation, the path is evaluated starting at the outermost entity type or complex type named in the target path. This allows e.g. specifying the value of an annotation on one property to be calculated from values of other properties of the outermost type. An empty path resolves to the outermost type, and the first segment of a non-empty path MUST be a structural or navigation property of the outermost type, a type cast, or a term cast.

    6. -
    -
    -

    Example 67: Annotations hosted by property A2 in various modes

    -

    Path evaluation for the annotations in the first block starts at the directly enclosing type self.A of the hosting property A2.

    -
    -
    "self": {
    -  "A": {
    -    "$Kind": "EntityType",
    -    "A1": {
    -      "$Type": "Edm.Boolean"
    -    },
    -    "A2": {
    -      "$Type": "self.B"
    -      "@Core.Description@Core.IsLanguageDependent": {
    -        "$Path": "A1"
    -      },
    -      "@Core.Description": "..."
    -    }
    -  },
    -  "B": {
    -    "$Kind": "ComplexType",
    -    "B1": {
    -      "$Type": "Edm.Boolean"
    -    }
    -  },
    -
    -

    Path evaluation for the annotations in the next block starts at the declared type self.B of the hosting property A2.

    -
    -
      "Container": {
    -    "$Kind": "EntityContainer",
    -    "SetA": {
    -      "$Collection": true,
    -      "$Type": "self.A"
    -    }
    -  },
    -  "$Annotations": {
    -    "self.Container/SetA/A2": {
    -      "@Core.Description#viaset@Core.IsLanguageDependent": {
    -        "$Path": "B1"
    -      },
    -      "@Core.Description#viaset": "..."
    -    },
    -    "self.Container/SetA/A2/@Core.Description#viaset": {
    -      "@Core.IsLanguageDependent": {
    -        "$Path": "B1"
    -      }
    -    },
    -
    -

    Path evaluation for the annotations in the final block starts at the outermost type self.A named in the target path.

    -
    -
        "self.A/A2": {
    -      "@Core.Description#external@Core.IsLanguageDependent": {
    -        "$Path": "A1"
    -      },
    -      "@Core.Description#external": "..."
    -    },
    -    "self.A/A2/@Core.Description": {
    -      "@Core.IsLanguageDependent": {
    -        "$Path": "A1"
    -      }
    -    }
    -  }
    -}
    -
    -
    +

    For annotations embedded within or targeting an entity container, the path is evaluated starting at the entity container, i.e. an empty path resolves to the entity container, and non-empty paths MUST start with a segment identifying a container child (entity set, function import, action import, or singleton). The subsequent segments follow the rules for paths targeting the corresponding child element.

    +

    For annotations embedded within or targeting an entity set or a singleton, the path is evaluated starting at the entity set or singleton, i.e. an empty path resolves to the entity set or singleton, and non-empty paths MUST follow the rules for annotations targeting the declared entity type of the entity set or singleton.

    +

    For annotations embedded within or targeting an entity type or complex type, the path is evaluated starting at the type, i.e. an empty path resolves to the type, and the first segment of a non-empty path MUST be a structural or navigation property of the type, a type cast, or a term cast.

    +

    For annotations embedded within a structural or navigation property of an entity type or complex type, the path is evaluated starting at the directly enclosing type. This allows e.g. specifying the value of an annotation on one property to be calculated from values of other properties of the same type. An empty path resolves to the enclosing type, and non-empty paths MUST follow the rules for annotations targeting the directly enclosing type.

    +

    For annotations targeting a structural or navigation property of an entity type or complex type, the path is evaluated starting at the outermost entity type or complex type named in the target of the annotation, i.e. an empty path resolves to the outermost type, and the first segment of a non-empty path MUST be a structural or navigation property of the outermost type, a type cast, or a term cast.

    +

    For annotations embedded within or targeting an action, action import, function, function import, parameter, or return type, the first segment of the path MUST be a parameter name or $ReturnType.

    14.4.1.3 Annotation Path

    -

    The annotation path expression provides a value for terms or term properties that specify the built-in types Edm.AnnotationPath or Edm.ModelElementPath. Its argument is a model path with the following restriction:

    +

    The annotation path expression provides a value for terms or term properties that specify the built-in types Edm.AnnotationPath or Edm.ModelElementPath. Its argument is a model path with the following restriction:

    • A non-null path MUST resolve to an annotation.
    @@ -2663,12 +2573,12 @@

    1

    Annotation path expressions are represented as a string containing a path.

    -

    Example 68:

    -
    "@UI.ReferenceFacet": "Product/Supplier/@UI.LineItem",
    -"@UI.CollectionFacet#Contacts": [
    -  "Supplier/@Communication.Contact",
    -  "Customer/@Communication.Contact"
    -]
    +

    Example 67:

    +
    "@UI.ReferenceFacet": "Product/Supplier/@UI.LineItem",
    +"@UI.CollectionFacet#Contacts": [
    +  "Supplier/@Communication.Contact",
    +  "Customer/@Communication.Contact"
    +]

    14.4.1.4 Model Element Path

    The model element path expression provides a value for terms or term properties that specify the built-in type Edm.ModelElementPath. Its argument is a model path.

    @@ -2677,8 +2587,8 @@

    -

    Example 69:

    -
    "@org.example.MyFavoriteModelElement": "/self.someAction"
    +

    Example 68:

    +
    "@org.example.MyFavoriteModelElement": "/self.someAction"

    14.4.1.5 Navigation Property Path

    The navigation property path expression provides a value for terms or term properties that specify the built-in types Edm.NavigationPropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

    @@ -2690,15 +2600,15 @@

    -

    Example 70:

    -
    "@UI.HyperLink": "Supplier",
    -
    -"@Capabilities.UpdateRestrictions": {
    -  "NonUpdatableNavigationProperties": [
    -    "Supplier",
    -    "Category"
    -  ]
    -}
    +

    Example 69:

    +
    "@UI.HyperLink": "Supplier",
    +
    +"@Capabilities.UpdateRestrictions": {
    +  "NonUpdatableNavigationProperties": [
    +    "Supplier",
    +    "Category"
    +  ]
    +}

    14.4.1.6 Property Path

    The property path expression provides a value for terms or term properties that specify one of the built-in types Edm.PropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

    @@ -2710,15 +2620,15 @@

    14.4.1.

    Property path expressions are represented as a string containing a path.

    -

    Example 71:

    -
    "@UI.RefreshOnChangeOf": "ChangedAt",
    -
    -"@Capabilities.UpdateRestrictions": {
    -  "NonUpdatableProperties": [
    -    "CreatedAt",
    -    "ChangedAt"
    -  ]
    -}
    +

    Example 70:

    +
    "@UI.RefreshOnChangeOf": "ChangedAt",
    +
    +"@Capabilities.UpdateRestrictions": {
    +  "NonUpdatableProperties": [
    +    "CreatedAt",
    +    "ChangedAt"
    +  ]
    +}

    14.4.1.7 Value Path

    The value path expression allows assigning a value by traversing an object graph. It can be used in annotations that target entity containers, entity sets, entity types, complex types, navigation properties of structured types, and structural properties of structured types. Its argument is an instance path.

    @@ -2728,14 +2638,14 @@

    $Path

    Path expressions are represented as an object with a single member $Path whose value is a string containing a path.

    -

    Example 72:

    -
    "@UI.DisplayName": {
    -  "$Path": "FirstName"
    -},
    -
    -"@UI.DisplayName#second": {
    -  "$Path": "@vCard.Address#work/FullName"
    -}
    +

    Example 71:

    +
    "@UI.DisplayName": {
    +  "$Path": "FirstName"
    +},
    +
    +"@UI.DisplayName#second": {
    +  "$Path": "@vCard.Address#work/FullName"
    +}

    14.4.2 Comparison and Logical Operators

    Annotations MAY use the following logical and comparison expressions which evaluate to a Boolean value. These expressions MAY be combined and they MAY be used anywhere instead of a Boolean expression.

    @@ -2770,99 +2680,99 @@

    <

    They MAY contain annotations.

    -

    Example 73:

    -
    {
    -  "$And": [
    -    {
    -      "$Path": "IsMale"
    -    },
    -    {
    -      "$Path": "IsMarried"
    -    }
    -  ]
    -},
    -{
    -  "$Or": [
    -    {
    -      "$Path": "IsMale"
    -    },
    -    {
    -      "$Path": "IsMarried"
    -    }
    -  ]
    -},
    -{
    -  "$Not": {
    -    "$Path": "IsMale"
    -  }
    -},
    -{
    -  "$Eq": [
    -    null,
    -    {
    -      "$Path": "IsMale"
    -    }
    -  ]
    -},
    -{
    -  "$Ne": [
    -    null,
    -    {
    -      "$Path": "IsMale"
    -    }
    -  ]
    -},
    -{
    -  "$Gt": [
    -    {
    -      "$Path": "Price"
    -    },
    -    20
    -  ]
    -},
    -{
    -  "$Ge": [
    -    {
    -      "$Path": "Price"
    -    },
    -    10
    -  ]
    -},
    -{
    -  "$Lt": [
    -    {
    -      "$Path": "Price"
    -    },
    -    20
    -  ]
    -},
    -{
    -  "$Le": [
    -    {
    -      "$Path": "Price"
    -    },
    -    100
    -  ]
    -},
    -{
    -  "$Has": [
    -    {
    -      "$Path": "Fabric"
    -    },
    -    "Red"
    -  ]
    -},
    -{
    -  "$In": [
    -    {
    -      "$Path": "Size"
    -    },
    -    [
    -      "XS",
    -      "S"
    -    ]
    -  ]
    -} ```
    +

    Example 72:

    +
    {
    +  "$And": [
    +    {
    +      "$Path": "IsMale"
    +    },
    +    {
    +      "$Path": "IsMarried"
    +    }
    +  ]
    +},
    +{
    +  "$Or": [
    +    {
    +      "$Path": "IsMale"
    +    },
    +    {
    +      "$Path": "IsMarried"
    +    }
    +  ]
    +},
    +{
    +  "$Not": {
    +    "$Path": "IsMale"
    +  }
    +},
    +{
    +  "$Eq": [
    +    null,
    +    {
    +      "$Path": "IsMale"
    +    }
    +  ]
    +},
    +{
    +  "$Ne": [
    +    null,
    +    {
    +      "$Path": "IsMale"
    +    }
    +  ]
    +},
    +{
    +  "$Gt": [
    +    {
    +      "$Path": "Price"
    +    },
    +    20
    +  ]
    +},
    +{
    +  "$Ge": [
    +    {
    +      "$Path": "Price"
    +    },
    +    10
    +  ]
    +},
    +{
    +  "$Lt": [
    +    {
    +      "$Path": "Price"
    +    },
    +    20
    +  ]
    +},
    +{
    +  "$Le": [
    +    {
    +      "$Path": "Price"
    +    },
    +    100
    +  ]
    +},
    +{
    +  "$Has": [
    +    {
    +      "$Path": "Fabric"
    +    },
    +    "Red"
    +  ]
    +},
    +{
    +  "$In": [
    +    {
    +      "$Path": "Size"
    +    },
    +    [
    +      "XS",
    +      "S"
    +    ]
    +  ]
    +} ```

    14.4.3 Arithmetic Operators

    Annotations MAY use the following arithmetic expressions which evaluate to a numeric value. These expressions MAY be combined, and they MAY be used anywhere instead of a numeric expression of the appropriate type. The semantics and evaluation rules for each arithmetic expression is identical to the corresponding arithmetic operator defined in OData-URL.

    @@ -2914,72 +2824,72 @@

    They MAY contain annotations.

    -

    Example 74:

    -
    {
    -  "$Add": [
    -    {
    -      "$Path": "StartDate"
    -    },
    -    {
    -      "$Path": "Duration"
    -    }
    -  ]
    -},
    -{
    -  "$Sub": [
    -    {
    -      "$Path": "Revenue"
    -    },
    -    {
    -      "$Path": "Cost"
    -    }
    -  ]
    -},
    -{
    -  "$Neg": {
    -    "$Path": "Height"
    -  }
    -},
    -{
    -  "$Mul": [
    -    {
    -      "$Path": "NetPrice"
    -    },
    -    {
    -      "$Path": "TaxRate"
    -    }
    -  ]
    -},
    -{
    -  "$Div": [
    -    {
    -      "$Path": "Quantity"
    -    },
    -    {
    -      "$Path": "QuantityPerParcel"
    -    }
    -  ]
    -},
    -{
    -  "$DivBy": [
    -    {
    -      "$Path": "Quantity"
    -    },
    -    {
    -      "$Path": "QuantityPerParcel"
    -    }
    -  ]
    -},
    -{
    -  "$Mod": [
    -    {
    -      "$Path": "Quantity"
    -    },
    -    {
    -      "$Path": "QuantityPerParcel"
    -    }
    -  ]
    -}
    +

    Example 73:

    +
    {
    +  "$Add": [
    +    {
    +      "$Path": "StartDate"
    +    },
    +    {
    +      "$Path": "Duration"
    +    }
    +  ]
    +},
    +{
    +  "$Sub": [
    +    {
    +      "$Path": "Revenue"
    +    },
    +    {
    +      "$Path": "Cost"
    +    }
    +  ]
    +},
    +{
    +  "$Neg": {
    +    "$Path": "Height"
    +  }
    +},
    +{
    +  "$Mul": [
    +    {
    +      "$Path": "NetPrice"
    +    },
    +    {
    +      "$Path": "TaxRate"
    +    }
    +  ]
    +},
    +{
    +  "$Div": [
    +    {
    +      "$Path": "Quantity"
    +    },
    +    {
    +      "$Path": "QuantityPerParcel"
    +    }
    +  ]
    +},
    +{
    +  "$DivBy": [
    +    {
    +      "$Path": "Quantity"
    +    },
    +    {
    +      "$Path": "QuantityPerParcel"
    +    }
    +  ]
    +},
    +{
    +  "$Mod": [
    +    {
    +      "$Path": "Quantity"
    +    },
    +    {
    +      "$Path": "QuantityPerParcel"
    +    }
    +  ]
    +}

    14.4.4 Apply Client-Side Functions

    The apply expression enables a value to be obtained by applying a client-side function. The apply expression MAY have operand expressions. The operand expressions are used as parameters to the client-side function.

    @@ -2993,25 +2903,25 @@

    OData-URL can be used as client-side functions, qualified with the namespace odata. The semantics of these client-side functions is identical to their counterpart function defined in OData-URL.

    For example, the odata.concat client-side function takes two or more expressions as arguments. Each argument MUST evaluate to a primitive or enumeration type. It returns a value of type Edm.String that is the concatenation of the literal representations of the results of the argument expressions. Values of primitive types other than Edm.String are represented according to the appropriate alternative in the primitiveValue rule of OData-ABNF, i.e. Edm.Binary as binaryValue, Edm.Boolean as booleanValue etc.

    -

    Example 75:

    -
    "@UI.DisplayName": {
    -  "$Apply": [
    -    "Product: ",
    -    {
    -      "$Path": "ProductName"
    -    },
    -    " (",
    -    {
    -      "$Path": "Available/Quantity"
    -    },
    -    " ",
    -    {
    -      "$Path": "Available/Unit"
    -    },
    -    " available)"
    -  ],
    -  "$Function": "odata.concat"
    -}
    +

    Example 74:

    +
    "@UI.DisplayName": {
    +  "$Apply": [
    +    "Product: ",
    +    {
    +      "$Path": "ProductName"
    +    },
    +    " (",
    +    {
    +      "$Path": "Available/Quantity"
    +    },
    +    " ",
    +    {
    +      "$Path": "Available/Unit"
    +    },
    +    " available)"
    +  ],
    +  "$Function": "odata.concat"
    +}

    ProductName is of type String, Quantity in complex type Available is of type Decimal, and Unit in Available is of type enumeration, so the result of the Path expression is represented as the member name of the enumeration value.

    14.4.4.2 Function odata.fillUriTemplate

    @@ -3022,57 +2932,57 @@

    labeled element expressions that evaluate to a collection of primitive values.

    Key-value maps are represented as labeled element expressions that evaluate to a collection of complex types with two properties that are used in lexicographic order. The first property is used as key, the second property as value.

    -

    Example 76: assuming there are no special characters in values of the Name property of the Actor entity

    -
    {
    -  "$Apply": [
    -    "http://host/someAPI/Actors/{actorName}/CV",
    -    {
    -      "$LabeledElement": {
    -        "$Path": "Actor/Name"
    -      },
    -      "$Name": "self.actorName"
    -    }
    -  ],
    -  "$Function": "odata.fillUriTemplate"
    -}
    +

    Example 75: assuming there are no special characters in values of the Name property of the Actor entity

    +
    {
    +  "$Apply": [
    +    "http://host/someAPI/Actors/{actorName}/CV",
    +    {
    +      "$LabeledElement": {
    +        "$Path": "Actor/Name"
    +      },
    +      "$Name": "self.actorName"
    +    }
    +  ],
    +  "$Function": "odata.fillUriTemplate"
    +}

    14.4.4.3 Function odata.matchesPattern

    -

    The odata.matchesPattern client-side function takes two string expressions as arguments and returns a Boolean value. It is the counterpart of the identically named URL function OData-URL, section 5.1.1.7.1.

    +

    The odata.matchesPattern client-side function takes two string expressions as arguments and returns a Boolean value.

    The function returns true if the second expression evaluates to an ECMAScript (JavaScript) regular expression and the result of the first argument expression matches that regular expression, using syntax and semantics of ECMAScript regular expressions.

    -

    Example 77: all non-empty FirstName values not containing the letters b, c, or d evaluate to true

    -
    {
    -  "$Apply": [
    -    {
    -      "$Path": "FirstName"
    -    },
    -    "^[^b-d]+$"
    -  ],
    -  "$Function": "odata.matchesPattern"
    -}
    +

    Example 76: all non-empty FirstName values not containing the letters b, c, or d evaluate to true

    +
    {
    +  "$Apply": [
    +    {
    +      "$Path": "FirstName"
    +    },
    +    "^[^b-d]+$"
    +  ],
    +  "$Function": "odata.matchesPattern"
    +}

    14.4.4.4 Function odata.uriEncode

    The odata.uriEncode client-side function takes one argument of primitive type and returns the URL-encoded OData literal that can be used as a key value in OData URLs or in the query part of OData URLs.

    Note: string literals are surrounded by single quotes as required by the paren-style key syntax.

    -

    Example 78:

    -
    {
    -  "$Apply": [
    -    "http://host/service/Genres({genreName})",
    -    {
    -      "$LabeledElement": {
    -        "$Apply": [
    -          {
    -            "$Path": "NameOfMovieGenre"
    -          }
    -        ],
    -        "$Function": "odata.uriEncode"
    -      },
    -      "$Name": "self.genreName"
    -    }
    -  ],
    -  "$Function": "odata.fillUriTemplate"
    -}
    +

    Example 77:

    +
    {
    +  "$Apply": [
    +    "http://host/service/Genres({genreName})",
    +    {
    +      "$LabeledElement": {
    +        "$Apply": [
    +          {
    +            "$Path": "NameOfMovieGenre"
    +          }
    +        ],
    +        "$Function": "odata.uriEncode"
    +      },
    +      "$Name": "self.genreName"
    +    }
    +  ],
    +  "$Function": "odata.fillUriTemplate"
    +}

    14.4.5 Cast

    The cast expression casts the value obtained from its single child expression to the specified type. The cast expression follows the same rules as the cast canonical function defined in OData-URL.

    @@ -3083,13 +2993,13 @@

    $Cast

    If the specified type is a primitive type or a collection of primitive types, the facet members $MaxLength, $Unicode, $Precision, $Scale, and $SRID MAY be specified if applicable to the specified primitive type. If the facet members are not specified, their values are considered unspecified.

    -

    Example 79:

    -
    "@UI.Threshold": {
    -  "$Cast": {
    -    "$Path": "Average"
    -  },
    -  "$Type": "Edm.Decimal"
    -}
    +

    Example 78:

    +
    "@UI.Threshold": {
    +  "$Cast": {
    +    "$Path": "Average"
    +  },
    +  "$Type": "Edm.Decimal"
    +}

    14.4.6 Collection

    The collection expression enables a value to be obtained from zero or more item expressions. The value calculated by the collection expression is the collection of the values calculated by each of the item expressions. The values of the child expressions MUST all be type compatible.

    @@ -3097,12 +3007,12 @@

    14.4.6 Collecti

    Collection expressions are represented as arrays with one array item per item expression within the collection expression.

    -

    Example 80:

    -
    "@seo.SeoTerms": [
    -  "Product",
    -  "Supplier",
    -  "Customer"
    -]
    +

    Example 79:

    +
    "@seo.SeoTerms": [
    +  "Product",
    +  "Supplier",
    +  "Customer"
    +]

    14.4.7 If-Then-Else

    The if-then-else expression enables a value to be obtained by evaluating a condition expression. It MUST contain exactly three child expressions. There is one exception to this rule: if and only if the if-then-else expression is an item of a collection expression, the third child expression MAY be omitted, reducing it to an if-then expression. This can be used to conditionally add an element to a collection.

    @@ -3115,16 +3025,16 @@

    $If

    It MAY contain annotations.

    -

    Example 81: the condition is a value path expression referencing the Boolean property IsFemale, whose value then determines the value of the $If expression (or so it was long ago)

    -
    "@person.Gender": {
    -  "$If": [
    -    {
    -      "$Path": "IsFemale"
    -    },
    -    "Female",
    -    "Male"
    -  ]
    -}
    +

    Example 80: the condition is a value path expression referencing the Boolean property IsFemale, whose value then determines the value of the $If expression (or so it was long ago)

    +
    "@person.Gender": {
    +  "$If": [
    +    {
    +      "$Path": "IsFemale"
    +    },
    +    "Female",
    +    "Male"
    +  ]
    +}

    14.4.8 Is-Of

    The is-of expression checks whether the value obtained from its single child expression is compatible with the specified type. It returns true if the child expression returns a type that is compatible with the specified type, and false otherwise.

    @@ -3135,13 +3045,13 @@

    $IsOf

    If the specified type is a primitive type or a collection of primitive types, the facet members $MaxLength, $Unicode, $Precision, $Scale, and $SRID MAY be specified if applicable to the specified primitive type. If the facet members are not specified, their values are considered unspecified.

    -

    Example 82:

    -
    "@Self.IsPreferredCustomer": {
    -  "$IsOf": {
    -    "$Path": "Customer"
    -  },
    -  "$Type": "self.PreferredCustomer"
    -}
    +

    Example 81:

    +
    "@Self.IsPreferredCustomer": {
    +  "$IsOf": {
    +    "$Path": "Customer"
    +  },
    +  "$Type": "self.PreferredCustomer"
    +}

    14.4.9 Labeled Element

    The labeled element expression assigns a name to its single child expression. The value of the child expression can then be reused elsewhere with a labeled element reference expression.

    @@ -3153,13 +3063,13 @@

    $LabeledEle

    It MAY contain annotations.

    -

    Example 83:

    -
    "@UI.DisplayName": {
    -  "$LabeledElement": {
    -    "$Path": "FirstName"
    -  },
    -  "$Name": "CustomerFirstName"
    -}
    +

    Example 82:

    +
    "@UI.DisplayName": {
    +  "$LabeledElement": {
    +    "$Path": "FirstName"
    +  },
    +  "$Name": "CustomerFirstName"
    +}

    14.4.10 Labeled Element Reference

    The labeled element reference expression MUST specify the qualified name of a labeled element expression in scope and returns the value of the identified labeled element expression as its value.

    @@ -3168,10 +3078,10 @@

    Labeled element reference expressions are represented as an object with a member $LabeledElementReference whose value is a string containing an qualified name.

    -

    Example 84:

    -
    "@UI.DisplayName": {
    -  "$LabeledElementReference": "self.CustomerFirstName"
    -}
    +

    Example 83:

    +
    "@UI.DisplayName": {
    +  "$LabeledElementReference": "self.CustomerFirstName"
    +}

    14.4.11 Null

    The null expression indicates the absence of a value. The null expression MAY be annotated.

    @@ -3179,19 +3089,19 @@

    14.4.11 Null

    Null expressions that do not contain annotations are represented as the literal null.

    -

    Example 85:

    -
    "@UI.DisplayName": null,
    +

    Example 84:

    +
    "@UI.DisplayName": null,

    $Null

    Null expression containing annotations are represented as an object with a member $Null whose value is the literal null.

    -

    Example 86:

    -
    "@UI.Address": {
    -  "$Null": null,
    -  "@self.Reason": "Private"
    -}
    +

    Example 85:

    +
    "@UI.Address": {
    +  "$Null": null,
    +  "@self.Reason": "Private"
    +}

    14.4.12 Record

    The record expression enables a new entity type or complex type instance to be constructed.

    @@ -3204,7 +3114,6 @@

    14.4.12 Record

    It MAY contain annotations for itself and its members. Annotations for record members are prefixed with the member name.

    -<<<<<<< HEAD

    Example 86: this annotation "morphs" the entity type from example 13 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

    "@person.Employee": {
       "@type": "https://example.org/vocabs/person#org.example.person.Manager",
    @@ -3234,37 +3143,6 @@ 

    14.4.12 Record

    } } }
    -======= -

    Example 87: this annotation "morphs" the entity type from example 8 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

    -
    "@person.Employee": {
    -  "@type": "https://example.org/vocabs/person#org.example.person.Manager",
    -  "@Core.Description": "Annotation on record",
    -  "GivenName": {
    -    "$Path": "FirstName"
    -  },
    -  "GivenName@Core.Description": "Annotation on record member",
    -  "Surname": {
    -    "$Path": "LastName"
    -  },
    -  "DirectSupervisor": {
    -    "$Path": "Manager"
    -  },
    -  "CostCenter": {
    -    "$UrlRef": {
    -      "$Apply": [
    -        "http://host/anotherservice/CostCenters('{ccid}')",
    -        {
    -          "$LabeledElement": {
    -            "$Path": "CostCenterID"
    -          },
    -          "$Name": "ccid"
    -        }
    -      ],
    -      "$Function": "odata.fillUriTemplate"
    -    }
    -  }
    -}
    ->>>>>>> refs/remotes/origin/main

    14.4.13 URL Reference

    The URL reference expression enables a value to be obtained by sending a GET request.

    @@ -3276,30 +3154,30 @@

    $UrlRef

    It MAY contain annotations.

    -

    Example 88:

    -
    "@org.example.person.Supplier": {
    -  "$UrlRef": {
    -    "$Apply": [
    -      "http://host/service/Suppliers({suppID})",
    -      {
    -        "$LabeledElement": {
    -          "$Apply": [
    -            {
    -              "$Path": "SupplierId"
    -            }
    -          ],
    -          "$Function": "odata.uriEncode"
    -        },
    -        "$Name": "suppID"
    -      }
    -    ],
    -    "$Function": "odata.fillUriTemplate"
    -  }
    -},
    - 
    -"@Core.LongDescription#element": {
    -  "$UrlRef": "http://host/wiki/HowToUse"
    -}
    +

    Example 87:

    +
    "@org.example.person.Supplier": {
    +  "$UrlRef": {
    +    "$Apply": [
    +      "http://host/service/Suppliers({suppID})",
    +      {
    +        "$LabeledElement": {
    +          "$Apply": [
    +            {
    +              "$Path": "SupplierId"
    +            }
    +          ],
    +          "$Function": "odata.uriEncode"
    +        },
    +        "$Name": "suppID"
    +      }
    +    ],
    +    "$Function": "odata.fillUriTemplate"
    +  }
    +},
    + 
    +"@Core.LongDescription#element": {
    +  "$UrlRef": "http://host/wiki/HowToUse"
    +}

    15 Identifier and Path Values

    @@ -3324,7 +3202,7 @@

    15.4 Target Pat
  • The target path of a container child followed by a forward slash and one or more forward-slash separated property, navigation property, or type-cast segments
  • -

    Example 89: Target expressions

    +

    Example 88: Target expressions

    MySchema.MyEntityContainer/MyEntitySet
     MySchema.MyEntityContainer/MySingleton
     MySchema.MyEntityContainer/MySingleton/MyContainmentNavigationProperty
    @@ -3336,272 +3214,272 @@ 

    16 CSDL Ex

    Following are two basic examples of valid EDM models as represented in CSDL JSON. These examples demonstrate many of the topics covered above.

    16.1 Products and Categories Example

    -

    Example 90:

    -
    {
    -  "$Version": "4.0",
    -  "$EntityContainer": "ODataDemo.DemoService",
    -  "$Reference": {
    -    "https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.json": {
    -      "$Include": [
    -        {
    -          "$Namespace": "Org.OData.Core.V1",
    -          "$Alias": "Core",
    -          "@Core.DefaultNamespace": true
    -        }
    -      ]
    -    },
    -    "https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.json": {
    -      "$Include": [
    -        {
    -          "$Namespace": "Org.OData.Measures.V1",
    -          "$Alias": "Measures"
    -        }
    -      ]
    -    }
    -  },
    -  "ODataDemo": {
    -    "$Alias": "self",
    -    "@Core.DefaultNamespace": true,
    -    "Product": {
    -      "$Kind": "EntityType",
    -      "$HasStream": true,
    -      "$Key": [
    -        "ID"
    -      ],
    -      "ID": {},
    -      "Description": {
    -        "$Nullable": true,
    -        "@Core.IsLanguageDependent": true
    -      },
    -      "ReleaseDate": {
    -        "$Nullable": true,
    -        "$Type": "Edm.Date"
    -      },
    -      "DiscontinuedDate": {
    -        "$Nullable": true,
    -        "$Type": "Edm.Date"
    -      },
    -      "Rating": {
    -        "$Nullable": true,
    -        "$Type": "Edm.Int32"
    -      },
    -      "Price": {
    -        "$Nullable": true,
    -        "$Type": "Edm.Decimal",
    -        "@Measures.ISOCurrency": {
    -          "$Path": "Currency"
    -        }
    -      },
    -      "Currency": {
    -        "$Nullable": true,
    -        "$MaxLength": 3
    -      },
    -      "Category": {
    -        "$Kind": "NavigationProperty",
    -        "$Type": "self.Category",
    -        "$Partner": "Products"
    -      },
    -      "Supplier": {
    -        "$Kind": "NavigationProperty",
    -        "$Nullable": true,
    -        "$Type": "self.Supplier",
    -        "$Partner": "Products"
    -      }
    -    },
    -    "Category": {
    -      "$Kind": "EntityType",
    -      "$Key": [
    -        "ID"
    -      ],
    -      "ID": {
    -        "$Type": "Edm.Int32"
    -      },
    -      "Name": {
    -        "@Core.IsLanguageDependent": true
    -      },
    -      "Products": {
    -        "$Kind": "NavigationProperty",
    -        "$Partner": "Category",
    -        "$Collection": true,
    -        "$Type": "self.Product",
    -        "$OnDelete": "Cascade"
    -      }
    -    },
    -    "Supplier": {
    -      "$Kind": "EntityType",
    -      "$Key": [
    -        "ID"
    -      ],
    -      "ID": {},
    -      "Name": {
    -        "$Nullable": true
    -      },
    -      "Address": {
    -        "$Type": "self.Address"
    -      },
    -      "Concurrency": {
    -        "$Type": "Edm.Int32"
    -      },
    -      "Products": {
    -        "$Kind": "NavigationProperty",
    -        "$Partner": "Supplier",
    -        "$Collection": true,
    -        "$Type": "self.Product"
    -      }
    -    },
    -    "Country": {
    -      "$Kind": "EntityType",
    -      "$Key": [
    -        "Code"
    -      ],
    -      "Code": {
    -        "$MaxLength": 2
    -      },
    -      "Name": {
    -        "$Nullable": true
    -      }
    -    },
    -    "Address": {
    -      "$Kind": "ComplexType",
    -      "Street": {
    -        "$Nullable": true
    -      },
    -      "City": {
    -        "$Nullable": true
    -      },
    -      "State": {
    -        "$Nullable": true
    -      },
    -      "ZipCode": {
    -        "$Nullable": true
    -      },
    -      "CountryName": {
    -        "$Nullable": true
    -      },
    -      "Country": {
    -        "$Kind": "NavigationProperty",
    -        "$Nullable": true,
    -        "$Type": "self.Country",
    -        "$ReferentialConstraint": {
    -          "CountryName": "Name"
    -        }
    -      }
    -    },
    -    "ProductsByRating": [
    -      {
    -        "$Kind": "Function",
    -        "$Parameter": [
    -          {
    -            "$Name": "Rating",
    -            "$Nullable": true,
    -            "$Type": "Edm.Int32"
    -          }
    -        ],
    -        "$ReturnType": {
    -          "$Collection": true,
    -          "$Type": "self.Product"
    -        }
    -      }
    -    ],
    -    "DemoService": {
    -      "$Kind": "EntityContainer",
    -      "Products": {
    -        "$Collection": true,
    -        "$Type": "self.Product",
    -        "$NavigationPropertyBinding": {
    -          "Category": "Categories"
    -        }
    -      },
    -      "Categories": {
    -        "$Collection": true,
    -        "$Type": "self.Category",
    -        "$NavigationPropertyBinding": {
    -          "Products": "Products"
    -        },
    -        "@Core.Description": "Product Categories"
    -      },
    -      "Suppliers": {
    -        "$Collection": true,
    -        "$Type": "self.Supplier",
    -        "$NavigationPropertyBinding": {
    -          "Products": "Products",
    -          "Address/Country": "Countries"
    -        },
    -        "@Core.OptimisticConcurrency": [
    -          "Concurrency"
    -        ]
    -      },
    -      "Countries": {
    -        "$Collection": true,
    -        "$Type": "self.Country"
    -      },
    -      "MainSupplier": {
    -        "$Type": "self.Supplier",
    -        "$NavigationPropertyBinding": {
    -          "Products": "Products"
    -        },
    -        "@Core.Description": "Primary Supplier"
    -      },
    -      "ProductsByRating": {
    -        "$EntitySet": "Products",
    -        "$Function": "self.ProductsByRating"
    -      }
    -    }
    -  }
    -}
    +

    Example 89:

    +
    {
    +  "$Version": "4.0",
    +  "$EntityContainer": "ODataDemo.DemoService",
    +  "$Reference": {
    +    "https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.json": {
    +      "$Include": [
    +        {
    +          "$Namespace": "Org.OData.Core.V1",
    +          "$Alias": "Core",
    +          "@Core.DefaultNamespace": true
    +        }
    +      ]
    +    },
    +    "https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.json": {
    +      "$Include": [
    +        {
    +          "$Namespace": "Org.OData.Measures.V1",
    +          "$Alias": "Measures"
    +        }
    +      ]
    +    }
    +  },
    +  "ODataDemo": {
    +    "$Alias": "self",
    +    "@Core.DefaultNamespace": true,
    +    "Product": {
    +      "$Kind": "EntityType",
    +      "$HasStream": true,
    +      "$Key": [
    +        "ID"
    +      ],
    +      "ID": {},
    +      "Description": {
    +        "$Nullable": true,
    +        "@Core.IsLanguageDependent": true
    +      },
    +      "ReleaseDate": {
    +        "$Nullable": true,
    +        "$Type": "Edm.Date"
    +      },
    +      "DiscontinuedDate": {
    +        "$Nullable": true,
    +        "$Type": "Edm.Date"
    +      },
    +      "Rating": {
    +        "$Nullable": true,
    +        "$Type": "Edm.Int32"
    +      },
    +      "Price": {
    +        "$Nullable": true,
    +        "$Type": "Edm.Decimal",
    +        "@Measures.ISOCurrency": {
    +          "$Path": "Currency"
    +        }
    +      },
    +      "Currency": {
    +        "$Nullable": true,
    +        "$MaxLength": 3
    +      },
    +      "Category": {
    +        "$Kind": "NavigationProperty",
    +        "$Type": "self.Category",
    +        "$Partner": "Products"
    +      },
    +      "Supplier": {
    +        "$Kind": "NavigationProperty",
    +        "$Nullable": true,
    +        "$Type": "self.Supplier",
    +        "$Partner": "Products"
    +      }
    +    },
    +    "Category": {
    +      "$Kind": "EntityType",
    +      "$Key": [
    +        "ID"
    +      ],
    +      "ID": {
    +        "$Type": "Edm.Int32"
    +      },
    +      "Name": {
    +        "@Core.IsLanguageDependent": true
    +      },
    +      "Products": {
    +        "$Kind": "NavigationProperty",
    +        "$Partner": "Category",
    +        "$Collection": true,
    +        "$Type": "self.Product",
    +        "$OnDelete": "Cascade"
    +      }
    +    },
    +    "Supplier": {
    +      "$Kind": "EntityType",
    +      "$Key": [
    +        "ID"
    +      ],
    +      "ID": {},
    +      "Name": {
    +        "$Nullable": true
    +      },
    +      "Address": {
    +        "$Type": "self.Address"
    +      },
    +      "Concurrency": {
    +        "$Type": "Edm.Int32"
    +      },
    +      "Products": {
    +        "$Kind": "NavigationProperty",
    +        "$Partner": "Supplier",
    +        "$Collection": true,
    +        "$Type": "self.Product"
    +      }
    +    },
    +    "Country": {
    +      "$Kind": "EntityType",
    +      "$Key": [
    +        "Code"
    +      ],
    +      "Code": {
    +        "$MaxLength": 2
    +      },
    +      "Name": {
    +        "$Nullable": true
    +      }
    +    },
    +    "Address": {
    +      "$Kind": "ComplexType",
    +      "Street": {
    +        "$Nullable": true
    +      },
    +      "City": {
    +        "$Nullable": true
    +      },
    +      "State": {
    +        "$Nullable": true
    +      },
    +      "ZipCode": {
    +        "$Nullable": true
    +      },
    +      "CountryName": {
    +        "$Nullable": true
    +      },
    +      "Country": {
    +        "$Kind": "NavigationProperty",
    +        "$Nullable": true,
    +        "$Type": "self.Country",
    +        "$ReferentialConstraint": {
    +          "CountryName": "Name"
    +        }
    +      }
    +    },
    +    "ProductsByRating": [
    +      {
    +        "$Kind": "Function",
    +        "$Parameter": [
    +          {
    +            "$Name": "Rating",
    +            "$Nullable": true,
    +            "$Type": "Edm.Int32"
    +          }
    +        ],
    +        "$ReturnType": {
    +          "$Collection": true,
    +          "$Type": "self.Product"
    +        }
    +      }
    +    ],
    +    "DemoService": {
    +      "$Kind": "EntityContainer",
    +      "Products": {
    +        "$Collection": true,
    +        "$Type": "self.Product",
    +        "$NavigationPropertyBinding": {
    +          "Category": "Categories"
    +        }
    +      },
    +      "Categories": {
    +        "$Collection": true,
    +        "$Type": "self.Category",
    +        "$NavigationPropertyBinding": {
    +          "Products": "Products"
    +        },
    +        "@Core.Description": "Product Categories"
    +      },
    +      "Suppliers": {
    +        "$Collection": true,
    +        "$Type": "self.Supplier",
    +        "$NavigationPropertyBinding": {
    +          "Products": "Products",
    +          "Address/Country": "Countries"
    +        },
    +        "@Core.OptimisticConcurrency": [
    +          "Concurrency"
    +        ]
    +      },
    +      "Countries": {
    +        "$Collection": true,
    +        "$Type": "self.Country"
    +      },
    +      "MainSupplier": {
    +        "$Type": "self.Supplier",
    +        "$NavigationPropertyBinding": {
    +          "Products": "Products"
    +        },
    +        "@Core.Description": "Primary Supplier"
    +      },
    +      "ProductsByRating": {
    +        "$EntitySet": "Products",
    +        "$Function": "self.ProductsByRating"
    +      }
    +    }
    +  }
    +}

    16.2 Annotations for Products and Categories Example

    -

    Example 91:

    -
    {
    -  "$Version": "4.01",
    -  "$Reference": {
    -    "http://host/service/$metadata": {
    -      "$Include": [
    -        {
    -          "$Namespace": "ODataDemo",
    -          "$Alias": "target"
    -        }
    -      ]
    -    },
    -    "http://somewhere/Vocabulary/V1": {
    -      "$Include": [
    -        {
    -          "$Namespace": "Some.Vocabulary.V1",
    -          "$Alias": "Vocabulary1"
    -        }
    -      ]
    -    }
    -  },
    -  "External.Annotations": {
    -    "$Annotations": {
    -      "target.Supplier": {
    -        "@Vocabulary1.EMail": null,
    -        "@Vocabulary1.AccountID": {
    -          "$Path": "ID"
    -        },
    -        "@Vocabulary1.Title": "Supplier Info",
    -        "@Vocabulary1.DisplayName": {
    -          "$Apply": [
    -            {
    -              "$Path": "Name"
    -            },
    -            " in ",
    -            {
    -              "$Path": "Address/CountryName"
    -            }
    -          ],
    -          "$Function": "odata.concat"
    -        }
    -      },
    -      "target.Product": {
    -        "@Vocabulary1.Tags": [
    -          "MasterData"
    -        ]
    -      }
    -    }
    -  }
    -} ```
    +

    Example 90:

    +
    {
    +  "$Version": "4.01",
    +  "$Reference": {
    +    "http://host/service/$metadata": {
    +      "$Include": [
    +        {
    +          "$Namespace": "ODataDemo",
    +          "$Alias": "target"
    +        }
    +      ]
    +    },
    +    "http://somewhere/Vocabulary/V1": {
    +      "$Include": [
    +        {
    +          "$Namespace": "Some.Vocabulary.V1",
    +          "$Alias": "Vocabulary1"
    +        }
    +      ]
    +    }
    +  },
    +  "External.Annotations": {
    +    "$Annotations": {
    +      "target.Supplier": {
    +        "@Vocabulary1.EMail": null,
    +        "@Vocabulary1.AccountID": {
    +          "$Path": "ID"
    +        },
    +        "@Vocabulary1.Title": "Supplier Info",
    +        "@Vocabulary1.DisplayName": {
    +          "$Apply": [
    +            {
    +              "$Path": "Name"
    +            },
    +            " in ",
    +            {
    +              "$Path": "Address/CountryName"
    +            }
    +          ],
    +          "$Function": "odata.concat"
    +        }
    +      },
    +      "target.Product": {
    +        "@Vocabulary1.Tags": [
    +          "MasterData"
    +        ]
    +      }
    +    }
    +  }
    +} ```

    17 Conformance

    diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 38224998d..0450acfe6 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -257,10 +257,6 @@ modifications made necessary to fully cover OData CSDL Version 4.01. ## 1.1 Changes from Earlier Versions -Section | Feature / Change | Issue ---------|------------------|------ -[Section 14.4.1.2](#PathEvaluation)| New path evaluation rules for annotations targeting annotations and external targeting via container| [ODATA-1420](https://issues.oasis-open.org/browse/ODATA-1420) - ## 1.2 Glossary ### 1.2.1 Definitions of Terms @@ -742,7 +738,6 @@ Example 3: [`Precision`](#Precision)`=3` and `Scale=2`. Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 ```json "Amount32": { - "$Nullable": true, "$Type": "Edm.Decimal", "$Precision": 3, "$Scale": 2 @@ -755,7 +750,6 @@ Example 4: `Precision=2` equals `Scale`. Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2 ```json "Amount22": { - "$Nullable": true, "$Type": "Edm.Decimal", "$Precision": 2, "$Scale": 2 @@ -769,7 +763,6 @@ Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed values: 12.34, 1234 and 123.4 due to the limited precision. ```json "Amount3v": { - "$Nullable": true, "$Type": "Edm.Decimal", "$Precision": 3 } @@ -782,7 +775,6 @@ Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: 1e-102 and 1e97 due to the limited precision. ```json "Amount7f": { - "$Nullable": true, "$Type": "Edm.Decimal", "$Precision": 7, "$Scale": "floating" @@ -3240,10 +3232,10 @@ If the entity type of an entity set or singleton declares navigation properties, a navigation property binding allows describing which entity set or singleton will contain the related entities. -An [entity set](#EntitySet) or a [singleton](#Singleton) SHOULD contain a navigation -property binding for each non-containment navigation property that can be reached -from the entity type through a sequence of type casts, complex properties, -or containment navigation properties. +An [entity set](#EntitySet) or a [singleton](#Singleton) SHOULD specify +a navigation property binding for each [navigation +property](#NavigationProperty) of its entity type, including navigation +properties defined on complex typed properties or derived types. If omitted, clients MUST assume that the target entity set or singleton can vary per related entity. @@ -4321,159 +4313,56 @@ Addresses/-1/Street #### 14.4.1.2 Path Evaluation -Annotations MAY be embedded within their target, or specified separately, -e.g. as part of a different schema, and specify a path to their target model -element. The latter situation is referred to as *targeting* in the remainder of -this section. - -The *host* of an annotation is the model element targeted by the annotation, -unless that target is another annotation or a model element (collection, -record or property value) directly or indirectly embedded within another -annotation, in which case the host is the host of that other annotation. - -If the value of an annotation is expressed dynamically with a path -expression, the path evaluation rules for this expression depend upon the -model element by which the annotation is hosted. - -For annotations hosted by an entity container, the path is evaluated starting -at the entity container, i.e. an empty path resolves to the entity container, -and non-empty paths MUST start with a segment identifying a container child -(entity set, function import, action import, or singleton). The subsequent -segments follow the rules for path expressions targeting the corresponding -child element. - -For annotations hosted by an entity set or a singleton, the path is evaluated -starting at the entity set or singleton, i.e. an empty path resolves to the -entity set or singleton, and non-empty paths MUST follow the rules for -annotations targeting the declared entity type of the entity set or singleton. - -For annotations hosted by an entity type or complex type, the path is -evaluated starting at the type, i.e. an empty path resolves to the type, and -the first segment of a non-empty path MUST be a structural or navigation -property of the type, a [type cast](#TypeCast), or a [term cast](#TermCast). - -For annotations hosted by an action, action import, function, function -import, parameter, or return type, the first segment of the path MUST be the -name of a parameter of the action or function or `$ReturnType`. - -For annotations hosted by a structural or navigation property, the path -evaluation rules additionally depend upon how the annotation target is -specified, as follows: - -1. If the annotation is directly or indirectly embedded within the hosting - property, the path is evaluated starting at the directly enclosing type of - the hosting property. This allows e.g. specifying the value of an - annotation on one property to be calculated from values of other properties - of the same enclosing type. An empty path resolves to the enclosing type, - and non-empty paths MUST follow the rules for annotations targeting the - directly enclosing type. - -2. If the annotation uses targeting and the target path starts with an entity - container, or the annotation is directly or indirectly embedded within such an - annotation, the path is evaluated starting at the declared type of the - hosting property. An empty path resolves to the declared type of the - property, and non-empty paths MUST follow the rules for annotations - targeting the declared type of the property. If the type is primitive, the - first segment of a non-empty path MUST be a [type cast](#TypeCast) or a - [term cast](#TermCast). - -3. If the annotation uses targeting and the target path does not start with - an entity container, or the annotation is directly or indirectly embedded - within such an annotation, the path is evaluated starting at the *outermost* - entity type or complex type named in the target path. This allows e.g. - specifying the value of an annotation on one property to be calculated from - values of other properties of the outermost type. An empty path resolves to - the outermost type, and the first segment of a non-empty path MUST be a - structural or navigation property of the outermost type, a [type cast](#TypeCast), - or a [term cast](#TermCast). - -::: example -Example 67: Annotations hosted by property `A2` in various modes - -Path evaluation for the annotations in the first block starts at the directly -enclosing type `self.A` of the hosting property `A2`. -:::: varjson -```json -"self": { - "A": { - "$Kind": "EntityType", - "A1": { - "$Type": "Edm.Boolean" - }, - "A2": { - "$Type": "self.B" - "@Core.Description@Core.IsLanguageDependent": { - "$Path": "A1" - }, - "@Core.Description": "..." - } - }, - "B": { - "$Kind": "ComplexType", - "B1": { - "$Type": "Edm.Boolean" - } - }, -``` -:::: - - -Path evaluation for the annotations in the next block starts at the declared -type `self.B` of the hosting property `A2`. -:::: varjson -```json - "Container": { - "$Kind": "EntityContainer", - "SetA": { - "$Collection": true, - "$Type": "self.A" - } - }, - "$Annotations": { - "self.Container/SetA/A2": { - "@Core.Description#viaset@Core.IsLanguageDependent": { - "$Path": "B1" - }, - "@Core.Description#viaset": "..." - }, - "self.Container/SetA/A2/@Core.Description#viaset": { - "@Core.IsLanguageDependent": { - "$Path": "B1" - } - }, -``` -:::: - - -Path evaluation for the annotations in the final block starts at the outermost -type `self.A` named in the target path. -:::: varjson -```json - "self.A/A2": { - "@Core.Description#external@Core.IsLanguageDependent": { - "$Path": "A1" - }, - "@Core.Description#external": "..." - }, - "self.A/A2/@Core.Description": { - "@Core.IsLanguageDependent": { - "$Path": "A1" - } - } - } -} -``` -:::: - - -::: +Annotations MAY be embedded within their target, or specified +separately, e.g. as part of a different schema, and specify a path to +their target model element. The latter situation is referred to as +*targeting* in the remainder of this section. + +For annotations embedded within or targeting an entity container, the +path is evaluated starting at the entity container, i.e. an empty path +resolves to the entity container, and non-empty paths MUST start with a +segment identifying a container child (entity set, function import, +action import, or singleton). The subsequent segments follow the rules +for paths targeting the corresponding child element. + +For annotations embedded within or targeting an entity set or a +singleton, the path is evaluated starting at the entity set or +singleton, i.e. an empty path resolves to the entity set or singleton, +and non-empty paths MUST follow the rules for annotations targeting the +declared entity type of the entity set or singleton. + +For annotations embedded within or targeting an entity type or complex +type, the path is evaluated starting at the type, i.e. an empty path +resolves to the type, and the first segment of a non-empty path MUST be +a structural or navigation property of the type, a [type +cast](#TypeCast), or a [term cast](#TermCast). + +For annotations embedded within a structural or navigation property of +an entity type or complex type, the path is evaluated starting at the +directly enclosing type. This allows e.g. specifying the value of an +annotation on one property to be calculated from values of other +properties of the same type. An empty path resolves to the enclosing +type, and non-empty paths MUST follow the rules for annotations +targeting the directly enclosing type. + +For annotations targeting a structural or navigation property of an +entity type or complex type, the path is evaluated starting at the +*outermost* entity type or complex type named in the target of the +annotation, i.e. an empty path resolves to the outermost type, and the +first segment of a non-empty path MUST be a structural or navigation +property of the outermost type, a [type cast](#TypeCast), or a [term +cast](#TermCast). + +For annotations embedded within or targeting an action, action import, +function, function import, parameter, or return type, the first segment +of the path MUST be a parameter name or `$ReturnType`. #### 14.4.1.3 Annotation Path The annotation path expression provides a value for terms or term properties that specify the [built-in types](#BuiltInTypesfordefiningVocabularyTerms) -`Edm.AnnotationPath` or `Edm.ModelElementPath`. Its argument is a [model +`Edm.AnnotationPath or Edm.ModelElementPath`. Its argument is a [model path](#PathExpressions) with the following restriction: - A non-null path MUST resolve to an annotation. @@ -4492,7 +4381,7 @@ path. ::: ::: {.varjson .example} -Example 68: +Example 67: ```json "@UI.ReferenceFacet": "Product/Supplier/@UI.LineItem", "@UI.CollectionFacet#Contacts": [ @@ -4520,7 +4409,7 @@ path. ::: ::: {.varjson .example} -Example 69: +Example 68: ```json "@org.example.MyFavoriteModelElement": "/self.someAction" ``` @@ -4549,7 +4438,7 @@ containing a path. ::: ::: {.varjson .example} -Example 70: +Example 69: ```json "@UI.HyperLink": "Supplier", @@ -4585,7 +4474,7 @@ Property path expressions are represented as a string containing a path. ::: ::: {.varjson .example} -Example 71: +Example 70: ```json "@UI.RefreshOnChangeOf": "ChangedAt", @@ -4619,7 +4508,7 @@ Path expressions are represented as an object with a single member ::: ::: {.varjson .example} -Example 72: +Example 71: ```json "@UI.DisplayName": { "$Path": "FirstName" @@ -4691,7 +4580,7 @@ They MAY contain [annotations](#Annotation). ::: ::: {.varjson .example} -Example 73: +Example 72: ```json { "$And": [ @@ -4831,7 +4720,7 @@ They MAY contain [annotations](#Annotation). ::: ::: {.varjson .example} -Example 74: +Example 73: ```json { "$Add": [ @@ -4944,7 +4833,7 @@ are represented according to the appropriate alternative in the `binaryValue`, `Edm.Boolean` as `booleanValue` etc. ::: {.varjson .example} -Example 75: +Example 74: ```json "@UI.DisplayName": { "$Apply": [ @@ -5003,7 +4892,7 @@ types with two properties that are used in lexicographic order. The first property is used as key, the second property as value. ::: {.varjson .example} -Example 76: assuming there are no special characters in values of the +Example 75: assuming there are no special characters in values of the Name property of the Actor entity ```json { @@ -5026,7 +4915,6 @@ Name property of the Actor entity The `odata.matchesPattern` client-side function takes two string expressions as arguments and returns a Boolean value. -It is the counterpart of the identically named URL function [OData-URL, section 5.1.1.7.1](#ODataURL). The function returns true if the second expression evaluates to an [ECMAScript](#_ECMAScript) (JavaScript) regular expression and @@ -5035,7 +4923,7 @@ expression, using syntax and semantics of [ECMAScript](#_ECMAScript) regular expressions. ::: {.varjson .example} -Example 77: all non-empty `FirstName` values not containing the letters +Example 76: all non-empty `FirstName` values not containing the letters `b`, `c`, or `d` evaluate to `true` ```json { @@ -5061,7 +4949,7 @@ Note: string literals are surrounded by single quotes as required by the paren-style key syntax. ::: {.varjson .example} -Example 78: +Example 77: ```json { "$Apply": [ @@ -5110,7 +4998,7 @@ considered unspecified. ::: ::: {.varjson .example} -Example 79: +Example 78: ```json "@UI.Threshold": { "$Cast": { @@ -5137,7 +5025,7 @@ item expression within the collection expression. ::: ::: {.varjson .example} -Example 80: +Example 79: ```json "@seo.SeoTerms": [ "Product", @@ -5184,7 +5072,7 @@ It MAY contain [annotations](#Annotation). ::: ::: {.varjson .example} -Example 81: the condition is a [value path expression](#ValuePath) +Example 80: the condition is a [value path expression](#ValuePath) referencing the Boolean property `IsFemale`, whose value then determines the value of the `$If` expression (or so it was long ago) ```json @@ -5228,7 +5116,7 @@ considered unspecified. ::: ::: {.varjson .example} -Example 82: +Example 81: ```json "@Self.IsPreferredCustomer": { "$IsOf": { @@ -5267,7 +5155,7 @@ It MAY contain [annotations](#Annotation). ::: ::: {.varjson .example} -Example 83: +Example 82: ```json "@UI.DisplayName": { "$LabeledElement": { @@ -5296,7 +5184,7 @@ an qualified name. ::: ::: {.varjson .example} -Example 84: +Example 83: ```json "@UI.DisplayName": { "$LabeledElementReference": "self.CustomerFirstName" @@ -5317,7 +5205,7 @@ literal `null`. ::: ::: {.varjson .example} -Example 85: +Example 84: ```json "@UI.DisplayName": null, ``` @@ -5331,7 +5219,7 @@ as an object with a member `$Null` whose value is the literal `null`. ::: ::: {.varjson .example} -Example 86: +Example 85: ```json "@UI.Address": { "$Null": null, @@ -5378,11 +5266,7 @@ Annotations for record members are prefixed with the member name. ::: ::: {.varjson .example} -<<<<<<< HEAD Example 86: this annotation "morphs" the entity type from [example 13](#entitytype) into -======= -Example 87: this annotation "morphs" the entity type from [example 8](#entitytype) into ->>>>>>> refs/remotes/origin/main a structured type with two structural properties `GivenName` and `Surname` and two navigation properties `DirectSupervisor` and `CostCenter`. The first three properties simply rename properties of the @@ -5448,7 +5332,7 @@ It MAY contain [annotations](#Annotation). ::: ::: {.varjson .example} -Example 88: +Example 87: ```json "@org.example.person.Supplier": { "$UrlRef": { @@ -5532,7 +5416,7 @@ forward-slash separated property, navigation property, or type-cast segments ::: example -Example 89: Target expressions +Example 88: Target expressions ``` MySchema.MyEntityContainer/MyEntitySet MySchema.MyEntityContainer/MySingleton @@ -5553,7 +5437,7 @@ CSDL JSON. These examples demonstrate many of the topics covered above. ## 16.1 Products and Categories Example ::: {.varjson .example} -Example 90: +Example 89: ```json { "$Version": "4.0", @@ -5775,7 +5659,7 @@ Example 90: ## 16.2 Annotations for Products and Categories Example ::: {.varjson .example} -Example 91: +Example 90: ```json { "$Version": "4.01", diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 07f6beaa9..c26bb53c0 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -365,22 +365,6 @@

    Table of Contents

    1 Introduction

    OData services are described in terms of an Entity Model. The Common Schema Definition Language (CSDL) defines a representation of the entity model exposed by an OData service using the Extensible Markup Language (XML) 1.1 (Second Edition) XML-1.1 with further building blocks from the W3C XML Schema Definition Language (XSD) 1.1 as described in XML-Schema-1 and XML-Schema-2.

    1.1 Changes from Earlier Versions

    - - - - - - - - - - - - - - - -
    SectionFeature / ChangeIssue
    Section 14.4.1.2New path evaluation rules for annotations targeting annotations and external targeting via containerODATA-1420

    1.2 Glossary

    1.2.1 Definitions of Terms

    1.2.2 Acronyms and Abbreviations

    @@ -672,20 +656,25 @@

    Attribute Scale

    If not specified, the Scale facet defaults to zero.

    -

    Example 3: Precision=3 and Scale=2. Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3

    -
    <Property Name="Amount32" Type="Edm.Decimal" Precision="3" Scale="2" />
    +

    Example 3: Precision=3 and Scale=2.
    +Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3
    +(the Nullable attribute can be ignored in these examples)

    +
    <Property Name="Amount32" Type="Edm.Decimal" Nullable="false" Precision="3" Scale="2" />
    -

    Example 4: Precision=2 equals Scale. Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2

    -
    <Property Name="Amount22" Type="Edm.Decimal" Precision="2" Scale="2" />
    +

    Example 4: Precision=2 equals Scale.
    +Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2

    +
    <Property Name="Amount22" Type="Edm.Decimal" Nullable="false" Precision="2" Scale="2" />
    -

    Example 5: Precision=3 and a variable Scale. Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed values: 12.34, 1234 and 123.4 due to the limited precision.

    -
    <Property Name="Amount3v" Type="Edm.Decimal" Precision="3" Scale="variable" />
    +

    Example 5: Precision=3 and a variable Scale.
    +Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed values: 12.34, 1234 and 123.4 due to the limited precision.

    +
    <Property Name="Amount3v" Type="Edm.Decimal" Nullable="false" Precision="3" Scale="variable" />
    -

    Example 6: Precision=7 and a floating Scale. Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: 1e-102 and 1e97 due to the limited precision.

    -
    <Property Name="Amount7f" Type="Edm.Decimal" Precision="7" Scale="floating" />
    +

    Example 6: Precision=7 and a floating Scale.
    +Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: 1e-102 and 1e97 due to the limited precision.

    +
    <Property Name="Amount7f" Type="Edm.Decimal" Nullable="false" Precision="7" Scale="floating" />

    3.4.4 Unicode

    For a string-typed model element the Unicode facet indicates whether the it might contain and accept string values with Unicode characters (code points) beyond the ASCII character set. The value false indicates that the it will only contain and accept string values with characters limited to the ASCII character set.

    @@ -1703,7 +1692,7 @@

    13.4 Navigation Property Binding

    If the entity type of an entity set or singleton declares navigation properties, a navigation property binding allows describing which entity set or singleton will contain the related entities.

    -

    An entity set or a singleton SHOULD contain a navigation property binding for each non-containment navigation property that can be reached from the entity type through a sequence of type casts, complex properties, or containment navigation properties.

    +

    An entity set or a singleton SHOULD specify a navigation property binding for each navigation property of its entity type, including navigation properties defined on complex typed properties or derived types.

    If omitted, clients MUST assume that the target entity set or singleton can vary per related entity.

    13.4.1 Navigation Property Path Binding

    A navigation property binding MUST specify a path to a navigation property of the entity set's or singleton's declared entity type, or a navigation property reached through a chain of type casts, complex properties, or containment navigation properties. If the navigation property is defined on a subtype, the path MUST contain the qualified name of the subtype, followed by a forward slash, followed by the navigation property name. If the navigation property is defined on a complex type used in the definition of the entity set's entity type, the path MUST contain a forward-slash separated list of complex property names and qualified type names that describe the path leading to the navigation property.

    @@ -2447,64 +2436,14 @@

    14.4.1.1 Path

    14.4.1.2 Path Evaluation

    Annotations MAY be embedded within their target, or specified separately, e.g. as part of a different schema, and specify a path to their target model element. The latter situation is referred to as targeting in the remainder of this section.

    -

    The host of an annotation is the model element targeted by the annotation, unless that target is another annotation or a model element (collection, record or property value) directly or indirectly embedded within another annotation, in which case the host is the host of that other annotation.

    -

    If the value of an annotation is expressed dynamically with a path expression, the path evaluation rules for this expression depend upon the model element by which the annotation is hosted.

    -

    For annotations hosted by an entity container, the path is evaluated starting at the entity container, i.e. an empty path resolves to the entity container, and non-empty paths MUST start with a segment identifying a container child (entity set, function import, action import, or singleton). The subsequent segments follow the rules for path expressions targeting the corresponding child element.

    -

    For annotations hosted by an entity set or a singleton, the path is evaluated starting at the entity set or singleton, i.e. an empty path resolves to the entity set or singleton, and non-empty paths MUST follow the rules for annotations targeting the declared entity type of the entity set or singleton.

    -

    For annotations hosted by an entity type or complex type, the path is evaluated starting at the type, i.e. an empty path resolves to the type, and the first segment of a non-empty path MUST be a structural or navigation property of the type, a type cast, or a term cast.

    -

    For annotations hosted by an action, action import, function, function import, parameter, or return type, the first segment of the path MUST be the name of a parameter of the action or function or $ReturnType.

    -

    For annotations hosted by a structural or navigation property, the path evaluation rules additionally depend upon how the annotation target is specified, as follows:

    -
      -
    1. If the annotation is directly or indirectly embedded within the hosting property, the path is evaluated starting at the directly enclosing type of the hosting property. This allows e.g. specifying the value of an annotation on one property to be calculated from values of other properties of the same enclosing type. An empty path resolves to the enclosing type, and non-empty paths MUST follow the rules for annotations targeting the directly enclosing type.

    2. -
    3. If the annotation uses targeting and the target path starts with an entity container, or the annotation is directly or indirectly embedded within such an annotation, the path is evaluated starting at the declared type of the hosting property. An empty path resolves to the declared type of the property, and non-empty paths MUST follow the rules for annotations targeting the declared type of the property. If the type is primitive, the first segment of a non-empty path MUST be a type cast or a term cast.

    4. -
    5. If the annotation uses targeting and the target path does not start with an entity container, or the annotation is directly or indirectly embedded within such an annotation, the path is evaluated starting at the outermost entity type or complex type named in the target path. This allows e.g. specifying the value of an annotation on one property to be calculated from values of other properties of the outermost type. An empty path resolves to the outermost type, and the first segment of a non-empty path MUST be a structural or navigation property of the outermost type, a type cast, or a term cast.

    6. -
    -
    -

    Example 67: Annotations hosted by property A2 in various modes

    -

    Path evaluation for the annotations in the first block starts at the directly enclosing type self.A of the hosting property A2.

    -
    -
    <Schema Namespace="self">
    -  <EntityType Name="A">
    -    <Property Name="A1" Type="Edm.Boolean" Nullable="false" />
    -    <Property Name="A2" Type="self.B" Nullable="false">
    -      <Annotation Term="Core.Description" String="...">
    -        <Annotation Term="Core.IsLanguageDependent" Path="A1" />
    -      </Annotation>
    -    </Property>
    -  </EntityType>
    -  <ComplexType Name="B">
    -    <Property Name="B1" Type="Edm.Boolean" Nullable="false" />
    -  </ComplexType>
    -
    -

    Path evaluation for the annotations in the next block starts at the declared type self.B of the hosting property A2.

    -
    -
      <EntityContainer Name="Container">
    -    <EntitySet Name="SetA" EntityType="self.A" />
    -  </EntityContainer>
    -  <Annotations Target="self.Container/SetA/A2">
    -    <Annotation Term="Core.Description" Qualifier="viaset" String="...">
    -      <Annotation Term="Core.IsLanguageDependent" Path="B1" />
    -    </Annotation>
    -  </Annotations>
    -  <Annotations Target="self.Container/SetA/A2/@Core.Description#viaset">
    -    <Annotation Term="Core.IsLanguageDependent" Path="B1" />
    -  </Annotations>
    -
    -

    Path evaluation for the annotations in the final block starts at the outermost type self.A named in the target path.

    -
    -
      <Annotations Target="self.A/A2">
    -    <Annotation Term="Core.Description" Qualifier="external" String="...">
    -      <Annotation Term="Core.IsLanguageDependent" Path="A1" />
    -    </Annotation>
    -  </Annotations>
    -  <Annotations Target="self.A/A2/@Core.Description">
    -    <Annotation Term="Core.IsLanguageDependent" Path="A1" />
    -  </Annotations>
    -</Schema>
    -
    -
    +

    For annotations embedded within or targeting an entity container, the path is evaluated starting at the entity container, i.e. an empty path resolves to the entity container, and non-empty paths MUST start with a segment identifying a container child (entity set, function import, action import, or singleton). The subsequent segments follow the rules for paths targeting the corresponding child element.

    +

    For annotations embedded within or targeting an entity set or a singleton, the path is evaluated starting at the entity set or singleton, i.e. an empty path resolves to the entity set or singleton, and non-empty paths MUST follow the rules for annotations targeting the declared entity type of the entity set or singleton.

    +

    For annotations embedded within or targeting an entity type or complex type, the path is evaluated starting at the type, i.e. an empty path resolves to the type, and the first segment of a non-empty path MUST be a structural or navigation property of the type, a type cast, or a term cast.

    +

    For annotations embedded within a structural or navigation property of an entity type or complex type, the path is evaluated starting at the directly enclosing type. This allows e.g. specifying the value of an annotation on one property to be calculated from values of other properties of the same type. An empty path resolves to the enclosing type, and non-empty paths MUST follow the rules for annotations targeting the directly enclosing type.

    +

    For annotations targeting a structural or navigation property of an entity type or complex type, the path is evaluated starting at the outermost entity type or complex type named in the target of the annotation, i.e. an empty path resolves to the outermost type, and the first segment of a non-empty path MUST be a structural or navigation property of the outermost type, a type cast, or a term cast.

    +

    For annotations embedded within or targeting an action, action import, function, function import, parameter, or return type, the first segment of the path MUST be a parameter name or $ReturnType.

    14.4.1.3 Annotation Path

    -

    The annotation path expression provides a value for terms or term properties that specify the built-in types Edm.AnnotationPath or Edm.ModelElementPath. Its argument is a model path with the following restriction:

    +

    The annotation path expression provides a value for terms or term properties that specify the built-in types Edm.AnnotationPath or Edm.ModelElementPath. Its argument is a model path with the following restriction:

    • A non-null path MUST resolve to an annotation.
    @@ -2515,16 +2454,16 @@

    -

    Example 68:

    -
    <Annotation Term="UI.ReferenceFacet"
    -            AnnotationPath="Product/Supplier/@UI.LineItem" />
    -
    -<Annotation Term="UI.CollectionFacet" Qualifier="Contacts">
    -  <Collection>
    -    <AnnotationPath>Supplier/@Communication.Contact</AnnotationPath>
    -    <AnnotationPath>Customer/@Communication.Contact</AnnotationPath>
    -  </Collection>
    -</Annotation>
    +

    Example 67:

    +
    <Annotation Term="UI.ReferenceFacet"
    +            AnnotationPath="Product/Supplier/@UI.LineItem" />
    +
    +<Annotation Term="UI.CollectionFacet" Qualifier="Contacts">
    +  <Collection>
    +    <AnnotationPath>Supplier/@Communication.Contact</AnnotationPath>
    +    <AnnotationPath>Customer/@Communication.Contact</AnnotationPath>
    +  </Collection>
    +</Annotation>

    14.4.1.4 Model Element Path

    The model element path expression provides a value for terms or term properties that specify the built-in type Edm.ModelElementPath. Its argument is a model path.

    @@ -2534,13 +2473,13 @@

    -

    Example 69:

    -
    <Annotation Term="org.example.MyFavoriteModelElement"
    -            ModelElementPath="/org.example.someAction" />
    -
    -<Annotation Term="org.example.MyFavoriteModelElement">
    -  <ModelElementPath>/org.example.someAction</ModelElementPath>
    -</Annotation>
    +

    Example 68:

    +
    <Annotation Term="org.example.MyFavoriteModelElement"
    +            ModelElementPath="/org.example.someAction" />
    +
    +<Annotation Term="org.example.MyFavoriteModelElement">
    +  <ModelElementPath>/org.example.someAction</ModelElementPath>
    +</Annotation>

    14.4.1.5 Navigation Property Path

    The navigation property path expression provides a value for terms or term properties that specify the built-in types Edm.NavigationPropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

    @@ -2553,19 +2492,19 @@

    -

    Example 70:

    -
    <Annotation Term="UI.HyperLink" NavigationPropertyPath="Supplier" />
    -
    -<Annotation Term="Capabilities.UpdateRestrictions">
    -  <Record>
    -    <PropertyValue Property="NonUpdatableNavigationProperties">
    -      <Collection>
    -        <NavigationPropertyPath>Supplier</NavigationPropertyPath>
    -        <NavigationPropertyPath>Category</NavigationPropertyPath>
    -      </Collection>
    -    </PropertyValue>
    -  </Record>
    -</Annotation>
    +

    Example 69:

    +
    <Annotation Term="UI.HyperLink" NavigationPropertyPath="Supplier" />
    +
    +<Annotation Term="Capabilities.UpdateRestrictions">
    +  <Record>
    +    <PropertyValue Property="NonUpdatableNavigationProperties">
    +      <Collection>
    +        <NavigationPropertyPath>Supplier</NavigationPropertyPath>
    +        <NavigationPropertyPath>Category</NavigationPropertyPath>
    +      </Collection>
    +    </PropertyValue>
    +  </Record>
    +</Annotation>

    14.4.1.6 Property Path

    The property path expression provides a value for terms or term properties that specify one of the built-in types Edm.PropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

    @@ -2578,19 +2517,19 @@

    E

    The edm:PropertyPath MAY be provided using either element notation or attribute notation.

    -

    Example 71:

    -
    <Annotation Term="UI.RefreshOnChangeOf" PropertyPath="ChangedAt" />
    -
    -<Annotation Term="Capabilities.UpdateRestrictions">
    -  <Record>
    -    <PropertyValue Property="NonUpdatableProperties">
    -      <Collection>
    -        <PropertyPath>CreatedAt</PropertyPath>
    -        <PropertyPath>ChangedAt</PropertyPath>
    -      </Collection>
    -    </PropertyValue>
    -  </Record>
    -</Annotation>
    +

    Example 70:

    +
    <Annotation Term="UI.RefreshOnChangeOf" PropertyPath="ChangedAt" />
    +
    +<Annotation Term="Capabilities.UpdateRestrictions">
    +  <Record>
    +    <PropertyValue Property="NonUpdatableProperties">
    +      <Collection>
    +        <PropertyPath>CreatedAt</PropertyPath>
    +        <PropertyPath>ChangedAt</PropertyPath>
    +      </Collection>
    +    </PropertyValue>
    +  </Record>
    +</Annotation>

    14.4.1.7 Value Path

    The value path expression allows assigning a value by traversing an object graph. It can be used in annotations that target entity containers, entity sets, entity types, complex types, navigation properties of structured types, and structural properties of structured types. Its argument is an instance path.

    @@ -2600,12 +2539,12 @@

    Expression

    The edm:Path expression MAY be provided using element notation or attribute notation.

    -

    Example 72:

    -
    <Annotation Term="org.example.display.DisplayName" Path="FirstName" />
    -
    -<Annotation Term="org.example.display.DisplayName">
    -  <Path>@vCard.Address#work/FullName</Path>
    -</Annotation>
    +

    Example 71:

    +
    <Annotation Term="org.example.display.DisplayName" Path="FirstName" />
    +
    +<Annotation Term="org.example.display.DisplayName">
    +  <Path>@vCard.Address#work/FullName</Path>
    +</Annotation>

    14.4.2 Comparison and Logical Operators

    Annotations MAY use the following logical and comparison expressions which evaluate to a Boolean value. These expressions MAY be combined and they MAY be used anywhere instead of a Boolean expression.

    @@ -2640,53 +2579,53 @@

    edm:Annotation elements.

    -

    Example 73:

    -
    <And>
    -  <Path>IsMale</Path>
    -  <Path>IsMarried</Path>
    -</And>
    -<Or>
    -  <Path>IsMale</Path>
    -  <Path>IsMarried</Path>
    -</Or>
    -<Not>
    -  <Path>IsMale</Path>
    -</Not>
    -<Eq>
    -  <Null />
    -  <Path>IsMale</Path>
    -</Eq>
    -<Ne>
    -  <Null />
    -  <Path>IsMale</Path>
    -</Ne>
    -<Gt>
    -  <Path>Price</Path>
    -  <Int>20</Int>
    -</Gt>
    -<Ge>
    -  <Path>Price</Path>
    -  <Int>10</Int>
    -</Ge>
    -<Lt>
    -  <Path>Price</Path>
    -  <Int>20</Int>
    -</Lt>
    -<Le>
    -  <Path>Price</Path>
    -  <Int>100</Int>
    -</Le>
    -<Has>
    -  <Path>Fabric</Path>
    -  <EnumMember>org.example.Pattern/Red</EnumMember>
    -</Has>
    -<In>
    -  <Path>Size</Path>
    -  <Collection>
    -    <String>XS</String>
    -    <String>S</String>
    -  </Collection>
    -</In>
    +

    Example 72:

    +
    <And>
    +  <Path>IsMale</Path>
    +  <Path>IsMarried</Path>
    +</And>
    +<Or>
    +  <Path>IsMale</Path>
    +  <Path>IsMarried</Path>
    +</Or>
    +<Not>
    +  <Path>IsMale</Path>
    +</Not>
    +<Eq>
    +  <Null />
    +  <Path>IsMale</Path>
    +</Eq>
    +<Ne>
    +  <Null />
    +  <Path>IsMale</Path>
    +</Ne>
    +<Gt>
    +  <Path>Price</Path>
    +  <Int>20</Int>
    +</Gt>
    +<Ge>
    +  <Path>Price</Path>
    +  <Int>10</Int>
    +</Ge>
    +<Lt>
    +  <Path>Price</Path>
    +  <Int>20</Int>
    +</Lt>
    +<Le>
    +  <Path>Price</Path>
    +  <Int>100</Int>
    +</Le>
    +<Has>
    +  <Path>Fabric</Path>
    +  <EnumMember>org.example.Pattern/Red</EnumMember>
    +</Has>
    +<In>
    +  <Path>Size</Path>
    +  <Collection>
    +    <String>XS</String>
    +    <String>S</String>
    +  </Collection>
    +</In>

    14.4.3 Arithmetic Operators

    Annotations MAY use the following arithmetic expressions which evaluate to a numeric value. These expressions MAY be combined, and they MAY be used anywhere instead of a numeric expression of the appropriate type. The semantics and evaluation rules for each arithmetic expression is identical to the corresponding arithmetic operator defined in OData-URL.

    @@ -2738,34 +2677,34 @@

    They MAY contain edm:Annotation elements.

    -

    Example 74:

    -
    <Add>
    -  <Path>StartDate</Path>
    -  <Path>Duration</Path>
    -</Add>
    -<Sub>
    -  <Path>Revenue</Path>
    -  <Path>Cost</Path>
    -</Sub>
    -<Neg>
    -  <Path>Height</Path>
    -</Neg>
    -<Mul>
    -  <Path>NetPrice</Path>
    -  <Path>TaxRate</Path>
    -</Mul>
    -<Div>
    -  <Path>Quantity</Path>
    -  <Path>QuantityPerParcel</Path>
    -</Div>
    -<DivBy>
    -  <Path>Quantity</Path>
    -  <Path>QuantityPerParcel</Path>
    -</DivBy>
    -<Mod>
    -  <Path>Quantity</Path>
    -  <Path>QuantityPerParcel</Path>
    -</Mod>
    +

    Example 73:

    +
    <Add>
    +  <Path>StartDate</Path>
    +  <Path>Duration</Path>
    +</Add>
    +<Sub>
    +  <Path>Revenue</Path>
    +  <Path>Cost</Path>
    +</Sub>
    +<Neg>
    +  <Path>Height</Path>
    +</Neg>
    +<Mul>
    +  <Path>NetPrice</Path>
    +  <Path>TaxRate</Path>
    +</Mul>
    +<Div>
    +  <Path>Quantity</Path>
    +  <Path>QuantityPerParcel</Path>
    +</Div>
    +<DivBy>
    +  <Path>Quantity</Path>
    +  <Path>QuantityPerParcel</Path>
    +</DivBy>
    +<Mod>
    +  <Path>Quantity</Path>
    +  <Path>QuantityPerParcel</Path>
    +</Mod>

    14.4.4 Apply Client-Side Functions

    The apply expression enables a value to be obtained by applying a client-side function. The apply expression MAY have operand expressions. The operand expressions are used as parameters to the client-side function.

    @@ -2781,18 +2720,18 @@

    OData-URL can be used as client-side functions, qualified with the namespace odata. The semantics of these client-side functions is identical to their counterpart function defined in OData-URL.

    For example, the odata.concat client-side function takes two or more expressions as arguments. Each argument MUST evaluate to a primitive or enumeration type. It returns a value of type Edm.String that is the concatenation of the literal representations of the results of the argument expressions. Values of primitive types other than Edm.String are represented according to the appropriate alternative in the primitiveValue rule of OData-ABNF, i.e. Edm.Binary as binaryValue, Edm.Boolean as booleanValue etc.

    -

    Example 75:

    -
    <Annotation Term="org.example.display.DisplayName">
    -  <Apply Function="odata.concat">
    -    <String>Product: </String>
    -    <Path>ProductName</Path>
    -    <String> (</String>
    -    <Path>Available/Quantity</Path>
    -    <String> </String>
    -    <Path>Available/Unit</Path>
    -    <String> available)</String>
    -  </Apply>
    -</Annotation>
    +

    Example 74:

    +
    <Annotation Term="org.example.display.DisplayName">
    +  <Apply Function="odata.concat">
    +    <String>Product: </String>
    +    <Path>ProductName</Path>
    +    <String> (</String>
    +    <Path>Available/Quantity</Path>
    +    <String> </String>
    +    <Path>Available/Unit</Path>
    +    <String> available)</String>
    +  </Apply>
    +</Annotation>

    ProductName is of type String, Quantity in complex type Available is of type Decimal, and Unit in Available is of type enumeration, so the result of the Path expression is represented as the member name of the enumeration value.

    14.4.4.2 Function odata.fillUriTemplate

    @@ -2803,35 +2742,35 @@

    labeled element expressions that evaluate to a collection of primitive values.

    Key-value maps are represented as labeled element expressions that evaluate to a collection of complex types with two properties that are used in lexicographic order. The first property is used as key, the second property as value.

    -

    Example 76: assuming there are no special characters in values of the Name property of the Actor entity

    -
    <Apply Function="odata.fillUriTemplate">
    -  <String>http://host/someAPI/Actors/{actorName}/CV</String>
    -  <LabeledElement Name="actorName" Path="Actor/Name" />
    -</Apply>
    +

    Example 75: assuming there are no special characters in values of the Name property of the Actor entity

    +
    <Apply Function="odata.fillUriTemplate">
    +  <String>http://host/someAPI/Actors/{actorName}/CV</String>
    +  <LabeledElement Name="actorName" Path="Actor/Name" />
    +</Apply>

    14.4.4.3 Function odata.matchesPattern

    -

    The odata.matchesPattern client-side function takes two string expressions as arguments and returns a Boolean value. It is the counterpart of the identically named URL function OData-URL, section 5.1.1.7.1.

    +

    The odata.matchesPattern client-side function takes two string expressions as arguments and returns a Boolean value.

    The function returns true if the second expression evaluates to an ECMAScript (JavaScript) regular expression and the result of the first argument expression matches that regular expression, using syntax and semantics of ECMAScript regular expressions.

    -

    Example 77: all non-empty FirstName values not containing the letters b, c, or d evaluate to true

    -
    <Apply Function="odata.matchesPattern">
    -  <Path>FirstName</Path>
    -  <String>^[^b-d]+$</String>
    -</Apply>
    +

    Example 76: all non-empty FirstName values not containing the letters b, c, or d evaluate to true

    +
    <Apply Function="odata.matchesPattern">
    +  <Path>FirstName</Path>
    +  <String>^[^b-d]+$</String>
    +</Apply>

    14.4.4.4 Function odata.uriEncode

    The odata.uriEncode client-side function takes one argument of primitive type and returns the URL-encoded OData literal that can be used as a key value in OData URLs or in the query part of OData URLs.

    Note: string literals are surrounded by single quotes as required by the paren-style key syntax.

    -

    Example 78:

    -
    <Apply Function="odata.fillUriTemplate">
    -  <String>http://host/service/Genres({genreName})</String>
    -  <LabeledElement Name="genreName">
    -    <Apply Function="odata.uriEncode" >
    -      <Path>NameOfMovieGenre</Path>
    -    </Apply>
    -  </LabeledElement>
    -</Apply>
    +

    Example 77:

    +
    <Apply Function="odata.fillUriTemplate">
    +  <String>http://host/service/Genres({genreName})</String>
    +  <LabeledElement Name="genreName">
    +    <Apply Function="odata.uriEncode" >
    +      <Path>NameOfMovieGenre</Path>
    +    </Apply>
    +  </LabeledElement>
    +</Apply>

    14.4.5 Cast

    The cast expression casts the value obtained from its single child expression to the specified type. The cast expression follows the same rules as the cast canonical function defined in OData-URL.

    @@ -2844,12 +2783,12 @@

    If the specified type is a primitive type or a collection of a primitive type, the facet attributes MaxLength, Unicode, Precision, Scale, and SRID MAY be specified if applicable to the specified primitive type. If the facet attributes are not specified, their values are considered unspecified.

    -

    Example 79:

    -
    <Annotation Term="org.example.display.Threshold">
    -  <Cast Type="Edm.Decimal">
    -    <Path>Average</Path>
    -  </Cast>
    -</Annotation>
    +

    Example 78:

    +
    <Annotation Term="org.example.display.Threshold">
    +  <Cast Type="Edm.Decimal">
    +    <Path>Average</Path>
    +  </Cast>
    +</Annotation>

    14.4.6 Collection

    The collection expression enables a value to be obtained from zero or more item expressions. The value calculated by the collection expression is the collection of the values calculated by each of the item expressions. The values of the child expressions MUST all be type compatible.

    @@ -2858,14 +2797,14 @@

    Expre

    The edm:Collection element contains zero or more child expressions.

    -

    Example 80:

    -
    <Annotation Term="org.example.seo.SeoTerms">
    -  <Collection>
    -    <String>Product</String>
    -    <String>Supplier</String>
    -    <String>Customer</String>
    -  </Collection>
    -</Annotation>
    +

    Example 79:

    +
    <Annotation Term="org.example.seo.SeoTerms">
    +  <Collection>
    +    <String>Product</String>
    +    <String>Supplier</String>
    +    <String>Customer</String>
    +  </Collection>
    +</Annotation>

    14.4.7 If-Then-Else

    The if-then-else expression enables a value to be obtained by evaluating a condition expression. It MUST contain exactly three child expressions. There is one exception to this rule: if and only if the if-then-else expression is an item of a collection expression, the third child expression MAY be omitted, reducing it to an if-then expression. This can be used to conditionally add an element to a collection.

    @@ -2878,14 +2817,14 @@

    Expression edm:

    It MAY contain edm:Annotation elements.

    -

    Example 81: the condition is a value path expression referencing the Boolean property IsFemale, whose value then determines the value of the edm:If expression (or so it was long ago)

    -
    <Annotation Term="org.example.person.Gender">
    -  <If>
    -    <Path>IsFemale</Path>
    -    <String>Female</String>
    -    <String>Male</String>
    -  </If>
    -</Annotation>
    +

    Example 80: the condition is a value path expression referencing the Boolean property IsFemale, whose value then determines the value of the edm:If expression (or so it was long ago)

    +
    <Annotation Term="org.example.person.Gender">
    +  <If>
    +    <Path>IsFemale</Path>
    +    <String>Female</String>
    +    <String>Male</String>
    +  </If>
    +</Annotation>

    14.4.8 Is-Of

    The is-of expression checks whether the value obtained from its single child expression is compatible with the specified type. It returns true if the child expression returns a type that is compatible with the specified type, and false otherwise.

    @@ -2896,12 +2835,12 @@

    Expression In element notation it MAY contain edm:Annotation elements.

    -

    Example 82:

    -
    <Annotation Term="self.IsPreferredCustomer">
    -  <IsOf Type="self.PreferredCustomer">
    -    <Path>Customer</Path>
    -  </IsOf>
    -</Annotation>
    +

    Example 81:

    +
    <Annotation Term="self.IsPreferredCustomer">
    +  <IsOf Type="self.PreferredCustomer">
    +    <Path>Customer</Path>
    +  </IsOf>
    +</Annotation>

    14.4.9 Labeled Element

    The labeled element expression assigns a name to its single child expression. The value of the child expression can then be reused elsewhere with a labeled element reference expression.

    @@ -2916,16 +2855,16 @@

    -

    Example 83:

    -
    <Annotation Term="org.example.display.DisplayName">
    -  <LabeledElement Name="CustomerFirstName" Path="FirstName" />
    -</Annotation>
    -
    -<Annotation Term="org.example.display.DisplayName">
    -  <LabeledElement Name="CustomerFirstName">
    -    <Path>FirstName</Path>
    -  </LabeledElement>
    -</Annotation>
    +

    Example 82:

    +
    <Annotation Term="org.example.display.DisplayName">
    +  <LabeledElement Name="CustomerFirstName" Path="FirstName" />
    +</Annotation>
    +
    +<Annotation Term="org.example.display.DisplayName">
    +  <LabeledElement Name="CustomerFirstName">
    +    <Path>FirstName</Path>
    +  </LabeledElement>
    +</Annotation>

    14.4.10 Labeled Element Reference

    The labeled element reference expression MUST specify the qualified name of a labeled element expression in scope and returns the value of the identified labeled element expression as its value.

    @@ -2934,10 +2873,10 @@

    -

    Example 84:

    -
    <Annotation Term="org.example.display.DisplayName">
    -  <LabeledElementReference>Model.CustomerFirstName</LabeledElementReference>
    -</Annotation>
    +

    Example 83:

    +
    <Annotation Term="org.example.display.DisplayName">
    +  <LabeledElementReference>Model.CustomerFirstName</LabeledElementReference>
    +</Annotation>

    14.4.11 Null

    The null expression indicates the absence of a value. The null expression MAY be annotated.

    @@ -2946,18 +2885,18 @@

    Expression

    The edm:Null element MAY contain edm:Annotation elements.

    -

    Example 85:

    -
    <Annotation Term="org.example.display.DisplayName">
    -  <Null/>
    -</Annotation>
    +

    Example 84:

    +
    <Annotation Term="org.example.display.DisplayName">
    +  <Null/>
    +</Annotation>
    -

    Example 86:

    -
    <Annotation Term="@UI.Address">
    -  <Null>
    -    <Annotation Term="self.Reason" String="Private" />
    -  </Null>
    -</Annotation>
    +

    Example 85:

    +
    <Annotation Term="@UI.Address">
    +  <Null>
    +    <Annotation Term="self.Reason" String="Private" />
    +  </Null>
    +</Annotation>

    14.4.12 Record

    The record expression enables a new entity type or complex type instance to be constructed.

    @@ -2977,7 +2916,6 @@

    -<<<<<<< HEAD

    Example 86: this annotation "morphs" the entity type from example 13 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

    <Annotation Term="org.example.person.Employee">
       <Record>
    @@ -2998,28 +2936,6 @@ 

    </PropertyValue> </Record> </Annotation>

    -======= -

    Example 87: this annotation "morphs" the entity type from example 8 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

    -
    <Annotation Term="org.example.person.Employee">
    -  <Record>
    -    <Annotation Term="Core.Description" String="Annotation on record" />
    -    <PropertyValue Property="GivenName" Path="FirstName">
    -      <Annotation Term="Core.Description"
    -                  String="Annotation on record member" />
    -    </PropertyValue>
    -    <PropertyValue Property="Surname" Path="LastName" />
    -    <PropertyValue Property="DirectSupervisor" Path="Manager" />
    -    <PropertyValue Property="CostCenter">
    -      <UrlRef>
    -        <Apply Function="odata.fillUriTemplate">
    -          <String>http://host/anotherservice/CostCenters('{ccid}')</String>
    -          <LabeledElement Name="ccid" Path="CostCenterID" />
    -        </Apply>
    -      </UrlRef>
    -    </PropertyValue>
    -  </Record>
    -</Annotation>
    ->>>>>>> refs/remotes/origin/main

    14.4.13 URL Reference

    The URL reference expression enables a value to be obtained by sending a GET request.

    @@ -3032,25 +2948,25 @@

    Expression In element notation it MAY contain edm:Annotation elements.

    -

    Example 88:

    -
    <Annotation Term="org.example.person.Supplier">
    -  <UrlRef>
    -    <Apply Function="odata.fillUriTemplate">
    -      <String>http://host/service/Suppliers({suppID})</String>
    -      <LabeledElement Name="suppID">
    -      <Apply Function="odata.uriEncode">
    -        <Path>SupplierId</Path>
    -      </Apply>
    -      </LabeledElement>
    -     </Apply>
    -  </UrlRef>
    -</Annotation>
    -
    -<Annotation Term="Core.LongDescription">
    -  <UrlRef><String>http://host/wiki/HowToUse</String></UrlRef>
    -</Annotation>
    -
    -<Annotation Term="Core.LongDescription" UrlRef="http://host/wiki/HowToUse" />
    +

    Example 87:

    +
    <Annotation Term="org.example.person.Supplier">
    +  <UrlRef>
    +    <Apply Function="odata.fillUriTemplate">
    +      <String>http://host/service/Suppliers({suppID})</String>
    +      <LabeledElement Name="suppID">
    +      <Apply Function="odata.uriEncode">
    +        <Path>SupplierId</Path>
    +      </Apply>
    +      </LabeledElement>
    +     </Apply>
    +  </UrlRef>
    +</Annotation>
    +
    +<Annotation Term="Core.LongDescription">
    +  <UrlRef><String>http://host/wiki/HowToUse</String></UrlRef>
    +</Annotation>
    +
    +<Annotation Term="Core.LongDescription" UrlRef="http://host/wiki/HowToUse" />

    15 Identifier and Path Values

    @@ -3075,7 +2991,7 @@

    15.4 Target Pat
  • The target path of a container child followed by a forward slash and one or more forward-slash separated property, navigation property, or type-cast segments
  • -

    Example 89: Target expressions

    +

    Example 88: Target expressions

    MySchema.MyEntityContainer/MyEntitySet
     MySchema.MyEntityContainer/MySingleton
     MySchema.MyEntityContainer/MySingleton/MyContainmentNavigationProperty
    @@ -3087,154 +3003,154 @@ 

    16 CSDL Ex

    Following are two basic examples of valid EDM models as represented in CSDL. These examples demonstrate many of the topics covered above.

    16.1 Products and Categories Example

    -

    Example 90:

    -
    <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    -           xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.0">
    -  <edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
    -    <edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
    -      <Annotation Term="Core.DefaultNamespace" />
    -    </edmx:Include>
    -  </edmx:Reference>
    -  <edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml">
    -    <edmx:Include Alias="Measures" Namespace="Org.OData.Measures.V1" />
    -  </edmx:Reference>
    -  <edmx:DataServices>
    -    <Schema Namespace="ODataDemo">
    -      <EntityType Name="Product" HasStream="true">
    -        <Key>
    -          <PropertyRef Name="ID" />
    -        </Key>
    -        <Property Name="ID" Type="Edm.Int32" Nullable="false" />
    -        <Property Name="Description" Type="Edm.String" >
    -          <Annotation Term="Core.IsLanguageDependent" />
    -        </Property>
    -        <Property Name="ReleaseDate" Type="Edm.Date" />
    -        <Property Name="DiscontinuedDate" Type="Edm.Date" />
    -        <Property Name="Rating" Type="Edm.Int32" />
    -        <Property Name="Price" Type="Edm.Decimal" Scale="variable">
    -          <Annotation Term="Measures.ISOCurrency" Path="Currency" />
    -        </Property>
    -        <Property Name="Currency" Type="Edm.String" MaxLength="3" />
    -        <NavigationProperty Name="Category" Type="ODataDemo.Category"
    -                            Nullable="false" Partner="Products" />
    -        <NavigationProperty Name="Supplier" Type="ODataDemo.Supplier"
    -                            Partner="Products" />
    -      </EntityType>
    -      <EntityType Name="Category">
    -        <Key>
    -         <PropertyRef Name="ID" />
    -        </Key>
    -        <Property Name="ID" Type="Edm.Int32" Nullable="false" />
    -        <Property Name="Name" Type="Edm.String" Nullable="false">
    -          <Annotation Term="Core.IsLanguageDependent" />
    -        </Property>
    -        <NavigationProperty Name="Products" Partner="Category"
    -                            Type="Collection(ODataDemo.Product)">
    -          <OnDelete Action="Cascade" />
    -        </NavigationProperty>
    -      </EntityType>
    -      <EntityType Name="Supplier">
    -        <Key>
    -          <PropertyRef Name="ID" />
    -        </Key>
    -        <Property Name="ID" Type="Edm.String" Nullable="false" />
    -        <Property Name="Name" Type="Edm.String" />
    -        <Property Name="Address" Type="ODataDemo.Address" Nullable="false" />
    -        <Property Name="Concurrency" Type="Edm.Int32" Nullable="false" />
    -        <NavigationProperty Name="Products" Partner="Supplier"
    -                            Type="Collection(ODataDemo.Product)" />
    -      </EntityType>
    -      <EntityType Name="Country">
    -        <Key>
    -          <PropertyRef Name="Code" />
    -        </Key>
    -        <Property Name="Code" Type="Edm.String" MaxLength="2"
    -                              Nullable="false" />
    -        <Property Name="Name" Type="Edm.String" />
    -      </EntityType>
    -      <ComplexType Name="Address">
    -        <Property Name="Street" Type="Edm.String" />
    -        <Property Name="City" Type="Edm.String" />
    -        <Property Name="State" Type="Edm.String" />
    -        <Property Name="ZipCode" Type="Edm.String" />
    -        <Property Name="CountryName" Type="Edm.String" />
    -        <NavigationProperty Name="Country" Type="ODataDemo.Country">
    -          <ReferentialConstraint Property="CountryName"  
    -                                 ReferencedProperty="Name" />
    -        </NavigationProperty>
    -      </ComplexType>
    -      <Function Name="ProductsByRating">
    -        <Parameter Name="Rating" Type="Edm.Int32" />
    -        <ReturnType Type="Collection(ODataDemo.Product)" />
    -      </Function>
    -      <EntityContainer Name="DemoService">
    -        <EntitySet Name="Products" EntityType="ODataDemo.Product">
    -          <NavigationPropertyBinding Path="Category" Target="Categories" />
    -        </EntitySet>
    -        <EntitySet Name="Categories" EntityType="ODataDemo.Category">
    -          <NavigationPropertyBinding Path="Products" Target="Products" />
    -          <Annotation Term="Core.Description" String="Product Categories" />
    -        </EntitySet>
    -        <EntitySet Name="Suppliers" EntityType="ODataDemo.Supplier">
    -          <NavigationPropertyBinding Path="Products" Target="Products" />
    -          <NavigationPropertyBinding Path="Address/Country"
    -                                     Target="Countries" />
    -          <Annotation Term="Core.OptimisticConcurrency">
    -            <Collection>
    -              <PropertyPath>Concurrency</PropertyPath>
    -            </Collection>
    -          </Annotation>
    -        </EntitySet>
    -        <Singleton Name="MainSupplier" Type="self.Supplier">
    -          <NavigationPropertyBinding Path="Products" Target="Products" />
    -          <Annotation Term="Core.Description" String="Primary Supplier" />
    -        </Singleton>
    -        <EntitySet Name="Countries" EntityType="ODataDemo.Country" />
    -        <FunctionImport Name="ProductsByRating" EntitySet="Products"
    -                        Function="ODataDemo.ProductsByRating" />
    -      </EntityContainer>
    -    </Schema>
    -  </edmx:DataServices>
    -</edmx:Edmx>
    +

    Example 89:

    +
    <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    +           xmlns="http://docs.oasis-open.org/odata/ns/edm" Version="4.0">
    +  <edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
    +    <edmx:Include Namespace="Org.OData.Core.V1" Alias="Core">
    +      <Annotation Term="Core.DefaultNamespace" />
    +    </edmx:Include>
    +  </edmx:Reference>
    +  <edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml">
    +    <edmx:Include Alias="Measures" Namespace="Org.OData.Measures.V1" />
    +  </edmx:Reference>
    +  <edmx:DataServices>
    +    <Schema Namespace="ODataDemo">
    +      <EntityType Name="Product" HasStream="true">
    +        <Key>
    +          <PropertyRef Name="ID" />
    +        </Key>
    +        <Property Name="ID" Type="Edm.Int32" Nullable="false" />
    +        <Property Name="Description" Type="Edm.String" >
    +          <Annotation Term="Core.IsLanguageDependent" />
    +        </Property>
    +        <Property Name="ReleaseDate" Type="Edm.Date" />
    +        <Property Name="DiscontinuedDate" Type="Edm.Date" />
    +        <Property Name="Rating" Type="Edm.Int32" />
    +        <Property Name="Price" Type="Edm.Decimal" Scale="variable">
    +          <Annotation Term="Measures.ISOCurrency" Path="Currency" />
    +        </Property>
    +        <Property Name="Currency" Type="Edm.String" MaxLength="3" />
    +        <NavigationProperty Name="Category" Type="ODataDemo.Category"
    +                            Nullable="false" Partner="Products" />
    +        <NavigationProperty Name="Supplier" Type="ODataDemo.Supplier"
    +                            Partner="Products" />
    +      </EntityType>
    +      <EntityType Name="Category">
    +        <Key>
    +         <PropertyRef Name="ID" />
    +        </Key>
    +        <Property Name="ID" Type="Edm.Int32" Nullable="false" />
    +        <Property Name="Name" Type="Edm.String" Nullable="false">
    +          <Annotation Term="Core.IsLanguageDependent" />
    +        </Property>
    +        <NavigationProperty Name="Products" Partner="Category"
    +                            Type="Collection(ODataDemo.Product)">
    +          <OnDelete Action="Cascade" />
    +        </NavigationProperty>
    +      </EntityType>
    +      <EntityType Name="Supplier">
    +        <Key>
    +          <PropertyRef Name="ID" />
    +        </Key>
    +        <Property Name="ID" Type="Edm.String" Nullable="false" />
    +        <Property Name="Name" Type="Edm.String" />
    +        <Property Name="Address" Type="ODataDemo.Address" Nullable="false" />
    +        <Property Name="Concurrency" Type="Edm.Int32" Nullable="false" />
    +        <NavigationProperty Name="Products" Partner="Supplier"
    +                            Type="Collection(ODataDemo.Product)" />
    +      </EntityType>
    +      <EntityType Name="Country">
    +        <Key>
    +          <PropertyRef Name="Code" />
    +        </Key>
    +        <Property Name="Code" Type="Edm.String" MaxLength="2"
    +                              Nullable="false" />
    +        <Property Name="Name" Type="Edm.String" />
    +      </EntityType>
    +      <ComplexType Name="Address">
    +        <Property Name="Street" Type="Edm.String" />
    +        <Property Name="City" Type="Edm.String" />
    +        <Property Name="State" Type="Edm.String" />
    +        <Property Name="ZipCode" Type="Edm.String" />
    +        <Property Name="CountryName" Type="Edm.String" />
    +        <NavigationProperty Name="Country" Type="ODataDemo.Country">
    +          <ReferentialConstraint Property="CountryName"  
    +                                 ReferencedProperty="Name" />
    +        </NavigationProperty>
    +      </ComplexType>
    +      <Function Name="ProductsByRating">
    +        <Parameter Name="Rating" Type="Edm.Int32" />
    +        <ReturnType Type="Collection(ODataDemo.Product)" />
    +      </Function>
    +      <EntityContainer Name="DemoService">
    +        <EntitySet Name="Products" EntityType="ODataDemo.Product">
    +          <NavigationPropertyBinding Path="Category" Target="Categories" />
    +        </EntitySet>
    +        <EntitySet Name="Categories" EntityType="ODataDemo.Category">
    +          <NavigationPropertyBinding Path="Products" Target="Products" />
    +          <Annotation Term="Core.Description" String="Product Categories" />
    +        </EntitySet>
    +        <EntitySet Name="Suppliers" EntityType="ODataDemo.Supplier">
    +          <NavigationPropertyBinding Path="Products" Target="Products" />
    +          <NavigationPropertyBinding Path="Address/Country"
    +                                     Target="Countries" />
    +          <Annotation Term="Core.OptimisticConcurrency">
    +            <Collection>
    +              <PropertyPath>Concurrency</PropertyPath>
    +            </Collection>
    +          </Annotation>
    +        </EntitySet>
    +        <Singleton Name="MainSupplier" Type="self.Supplier">
    +          <NavigationPropertyBinding Path="Products" Target="Products" />
    +          <Annotation Term="Core.Description" String="Primary Supplier" />
    +        </Singleton>
    +        <EntitySet Name="Countries" EntityType="ODataDemo.Country" />
    +        <FunctionImport Name="ProductsByRating" EntitySet="Products"
    +                        Function="ODataDemo.ProductsByRating" />
    +      </EntityContainer>
    +    </Schema>
    +  </edmx:DataServices>
    +</edmx:Edmx>

    16.2 Annotations for Products and Categories Example

    -

    Example 91:

    -
    <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    -           Version="4.01">
    -  <edmx:Reference Uri="http://host/service/$metadata">
    -    <edmx:Include Namespace="ODataDemo" Alias="target" />
    -  </edmx:Reference>
    -  <edmx:Reference Uri="http://somewhere/Vocabulary/V1">
    -    <edmx:Include Alias="Vocabulary1" Namespace="Some.Vocabulary.V1" />
    -  </edmx:Reference>
    -  <edmx:DataServices>
    -    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm"
    -            Namespace="External.Annotations">
    -      <Annotations Target="ODataDemo.Supplier">
    -        <Annotation Term="Vocabulary1.EMail">
    -          <Null />
    -        </Annotation>
    -        <Annotation Term="Vocabulary1.AccountID" Path="ID" />
    -        <Annotation Term="Vocabulary1.Title" String="Supplier Info" />
    -        <Annotation Term="Vocabulary1.DisplayName">
    -        <Apply Function="odata.concat">
    -            <Path>Name</Path>
    -            <String> in </String>
    -            <Path>Address/CountryName</Path>
    -          </Apply>
    -        </Annotation>
    -      </Annotations>
    -      <Annotations Target="ODataDemo.Product">
    -        <Annotation Term="Vocabulary1.Tags">
    -          <Collection>
    -            <String>MasterData</String>
    -          </Collection>
    -        </Annotation>
    -      </Annotations>
    -  </Schema>
    -  </edmx:DataServices>
    -</edmx:Edmx>
    +

    Example 90:

    +
    <edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"
    +           Version="4.01">
    +  <edmx:Reference Uri="http://host/service/$metadata">
    +    <edmx:Include Namespace="ODataDemo" Alias="target" />
    +  </edmx:Reference>
    +  <edmx:Reference Uri="http://somewhere/Vocabulary/V1">
    +    <edmx:Include Alias="Vocabulary1" Namespace="Some.Vocabulary.V1" />
    +  </edmx:Reference>
    +  <edmx:DataServices>
    +    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm"
    +            Namespace="External.Annotations">
    +      <Annotations Target="ODataDemo.Supplier">
    +        <Annotation Term="Vocabulary1.EMail">
    +          <Null />
    +        </Annotation>
    +        <Annotation Term="Vocabulary1.AccountID" Path="ID" />
    +        <Annotation Term="Vocabulary1.Title" String="Supplier Info" />
    +        <Annotation Term="Vocabulary1.DisplayName">
    +        <Apply Function="odata.concat">
    +            <Path>Name</Path>
    +            <String> in </String>
    +            <Path>Address/CountryName</Path>
    +          </Apply>
    +        </Annotation>
    +      </Annotations>
    +      <Annotations Target="ODataDemo.Product">
    +        <Annotation Term="Vocabulary1.Tags">
    +          <Collection>
    +            <String>MasterData</String>
    +          </Collection>
    +        </Annotation>
    +      </Annotations>
    +  </Schema>
    +  </edmx:DataServices>
    +</edmx:Edmx>

    17 Conformance

    diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 8e53f196e..103410bc1 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -255,10 +255,6 @@ Schema Definition Language (XSD) 1.1 as described in ## 1.1 Changes from Earlier Versions -Section | Feature / Change | Issue ---------|------------------|------ -[Section 14.4.1.2](#PathEvaluation)| New path evaluation rules for annotations targeting annotations and external targeting via container| [ODATA-1420](https://issues.oasis-open.org/browse/ODATA-1420) - ## 1.2 Glossary ### 1.2.1 Definitions of Terms @@ -687,36 +683,37 @@ If not specified, the `Scale` facet defaults to zero. ::: ::: {.varxml .example} -Example 3: [`Precision`](#Precision)`=3` and `Scale=2`. -Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 +Example 3: [`Precision`](#Precision)`=3` and `Scale=2`. +Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 +(the [`Nullable`](#Nullable) attribute can be ignored in these examples) ```xml - + ``` ::: ::: {.varxml .example} -Example 4: `Precision=2` equals `Scale`. +Example 4: `Precision=2` equals `Scale`. Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2 ```xml - + ``` ::: ::: {.varxml .example} -Example 5: `Precision=3` and a variable `Scale`. +Example 5: `Precision=3` and a variable `Scale`. Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed values: 12.34, 1234 and 123.4 due to the limited precision. ```xml - + ``` ::: ::: {.varxml .example} -Example 6: `Precision=7` and a floating `Scale`. +Example 6: `Precision=7` and a floating `Scale`. Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: 1e-102 and 1e97 due to the limited precision. ```xml - + ``` ::: @@ -3044,10 +3041,10 @@ If the entity type of an entity set or singleton declares navigation properties, a navigation property binding allows describing which entity set or singleton will contain the related entities. -An [entity set](#EntitySet) or a [singleton](#Singleton) SHOULD contain a navigation -property binding for each non-containment navigation property that can be reached -from the entity type through a sequence of type casts, complex properties, -or containment navigation properties. +An [entity set](#EntitySet) or a [singleton](#Singleton) SHOULD specify +a navigation property binding for each [navigation +property](#NavigationProperty) of its entity type, including navigation +properties defined on complex typed properties or derived types. If omitted, clients MUST assume that the target entity set or singleton can vary per related entity. @@ -4234,139 +4231,56 @@ Addresses/-1/Street #### 14.4.1.2 Path Evaluation -Annotations MAY be embedded within their target, or specified separately, -e.g. as part of a different schema, and specify a path to their target model -element. The latter situation is referred to as *targeting* in the remainder of -this section. - -The *host* of an annotation is the model element targeted by the annotation, -unless that target is another annotation or a model element (collection, -record or property value) directly or indirectly embedded within another -annotation, in which case the host is the host of that other annotation. - -If the value of an annotation is expressed dynamically with a path -expression, the path evaluation rules for this expression depend upon the -model element by which the annotation is hosted. - -For annotations hosted by an entity container, the path is evaluated starting -at the entity container, i.e. an empty path resolves to the entity container, -and non-empty paths MUST start with a segment identifying a container child -(entity set, function import, action import, or singleton). The subsequent -segments follow the rules for path expressions targeting the corresponding -child element. - -For annotations hosted by an entity set or a singleton, the path is evaluated -starting at the entity set or singleton, i.e. an empty path resolves to the -entity set or singleton, and non-empty paths MUST follow the rules for -annotations targeting the declared entity type of the entity set or singleton. - -For annotations hosted by an entity type or complex type, the path is -evaluated starting at the type, i.e. an empty path resolves to the type, and -the first segment of a non-empty path MUST be a structural or navigation -property of the type, a [type cast](#TypeCast), or a [term cast](#TermCast). - -For annotations hosted by an action, action import, function, function -import, parameter, or return type, the first segment of the path MUST be the -name of a parameter of the action or function or `$ReturnType`. - -For annotations hosted by a structural or navigation property, the path -evaluation rules additionally depend upon how the annotation target is -specified, as follows: - -1. If the annotation is directly or indirectly embedded within the hosting - property, the path is evaluated starting at the directly enclosing type of - the hosting property. This allows e.g. specifying the value of an - annotation on one property to be calculated from values of other properties - of the same enclosing type. An empty path resolves to the enclosing type, - and non-empty paths MUST follow the rules for annotations targeting the - directly enclosing type. - -2. If the annotation uses targeting and the target path starts with an entity - container, or the annotation is directly or indirectly embedded within such an - annotation, the path is evaluated starting at the declared type of the - hosting property. An empty path resolves to the declared type of the - property, and non-empty paths MUST follow the rules for annotations - targeting the declared type of the property. If the type is primitive, the - first segment of a non-empty path MUST be a [type cast](#TypeCast) or a - [term cast](#TermCast). - -3. If the annotation uses targeting and the target path does not start with - an entity container, or the annotation is directly or indirectly embedded - within such an annotation, the path is evaluated starting at the *outermost* - entity type or complex type named in the target path. This allows e.g. - specifying the value of an annotation on one property to be calculated from - values of other properties of the outermost type. An empty path resolves to - the outermost type, and the first segment of a non-empty path MUST be a - structural or navigation property of the outermost type, a [type cast](#TypeCast), - or a [term cast](#TermCast). - -::: example -Example 67: Annotations hosted by property `A2` in various modes - -Path evaluation for the annotations in the first block starts at the directly -enclosing type `self.A` of the hosting property `A2`. - -:::: varxml -```xml - - - - - - - - - - - - -``` -:::: - -Path evaluation for the annotations in the next block starts at the declared -type `self.B` of the hosting property `A2`. - -:::: varxml -```xml - - - - - - - - - - - -``` -:::: - -Path evaluation for the annotations in the final block starts at the outermost -type `self.A` named in the target path. - -:::: varxml -```xml - - - - - - - - - -``` -:::: - -::: +Annotations MAY be embedded within their target, or specified +separately, e.g. as part of a different schema, and specify a path to +their target model element. The latter situation is referred to as +*targeting* in the remainder of this section. + +For annotations embedded within or targeting an entity container, the +path is evaluated starting at the entity container, i.e. an empty path +resolves to the entity container, and non-empty paths MUST start with a +segment identifying a container child (entity set, function import, +action import, or singleton). The subsequent segments follow the rules +for paths targeting the corresponding child element. + +For annotations embedded within or targeting an entity set or a +singleton, the path is evaluated starting at the entity set or +singleton, i.e. an empty path resolves to the entity set or singleton, +and non-empty paths MUST follow the rules for annotations targeting the +declared entity type of the entity set or singleton. + +For annotations embedded within or targeting an entity type or complex +type, the path is evaluated starting at the type, i.e. an empty path +resolves to the type, and the first segment of a non-empty path MUST be +a structural or navigation property of the type, a [type +cast](#TypeCast), or a [term cast](#TermCast). + +For annotations embedded within a structural or navigation property of +an entity type or complex type, the path is evaluated starting at the +directly enclosing type. This allows e.g. specifying the value of an +annotation on one property to be calculated from values of other +properties of the same type. An empty path resolves to the enclosing +type, and non-empty paths MUST follow the rules for annotations +targeting the directly enclosing type. + +For annotations targeting a structural or navigation property of an +entity type or complex type, the path is evaluated starting at the +*outermost* entity type or complex type named in the target of the +annotation, i.e. an empty path resolves to the outermost type, and the +first segment of a non-empty path MUST be a structural or navigation +property of the outermost type, a [type cast](#TypeCast), or a [term +cast](#TermCast). + +For annotations embedded within or targeting an action, action import, +function, function import, parameter, or return type, the first segment +of the path MUST be a parameter name or `$ReturnType`. #### 14.4.1.3 Annotation Path The annotation path expression provides a value for terms or term properties that specify the [built-in types](#BuiltInTypesfordefiningVocabularyTerms) -`Edm.AnnotationPath` or `Edm.ModelElementPath`. Its argument is a [model +`Edm.AnnotationPath or Edm.ModelElementPath`. Its argument is a [model path](#PathExpressions) with the following restriction: - A non-null path MUST resolve to an annotation. @@ -4389,7 +4303,7 @@ notation or attribute notation. ::: ::: {.varxml .example} -Example 68: +Example 67: ```xml @@ -4423,7 +4337,7 @@ notation or attribute notation. ::: ::: {.varxml .example} -Example 69: +Example 68: ```xml @@ -4459,7 +4373,7 @@ element notation or attribute notation. ::: ::: {.varxml .example} -Example 70: +Example 69: ```xml @@ -4502,7 +4416,7 @@ attribute notation. ::: ::: {.varxml .example} -Example 71: +Example 70: ```xml @@ -4540,7 +4454,7 @@ attribute notation. ::: ::: {.varxml .example} -Example 72: +Example 71: ```xml @@ -4607,7 +4521,7 @@ They MAY contain [`edm:Annotation`](#Annotation) elements. ::: ::: {.varxml .example} -Example 73: +Example 72: ```xml IsMale @@ -4700,7 +4614,7 @@ They MAY contain [`edm:Annotation`](#Annotation) elements. ::: ::: {.varxml .example} -Example 74: +Example 73: ```xml StartDate @@ -4777,7 +4691,7 @@ are represented according to the appropriate alternative in the ::: {.varxml .example} -Example 75: +Example 74: ```xml @@ -4829,7 +4743,7 @@ first property is used as key, the second property as value. ::: {.varxml .example} -Example 76: assuming there are no special characters in values of the +Example 75: assuming there are no special characters in values of the Name property of the Actor entity ```xml @@ -4843,7 +4757,6 @@ Name property of the Actor entity The `odata.matchesPattern` client-side function takes two string expressions as arguments and returns a Boolean value. -It is the counterpart of the identically named URL function [OData-URL, section 5.1.1.7.1](#ODataURL). The function returns true if the second expression evaluates to an [ECMAScript](#_ECMAScript) (JavaScript) regular expression and @@ -4853,7 +4766,7 @@ expression, using syntax and semantics of ::: {.varxml .example} -Example 77: all non-empty `FirstName` values not containing the letters +Example 76: all non-empty `FirstName` values not containing the letters `b`, `c`, or `d` evaluate to `true` ```xml @@ -4874,7 +4787,7 @@ paren-style key syntax. ::: {.varxml .example} -Example 78: +Example 77: ```xml http://host/service/Genres({genreName}) @@ -4919,7 +4832,7 @@ are considered unspecified. ::: ::: {.varxml .example} -Example 79: +Example 78: ```xml @@ -4946,7 +4859,7 @@ The `edm:Collection` element contains zero or more child expressions. ::: ::: {.varxml .example} -Example 80: +Example 79: ```xml @@ -4995,7 +4908,7 @@ It MAY contain [`edm:Annotation`](#Annotation) elements. ::: ::: {.varxml .example} -Example 81: the condition is a [value path expression](#ValuePath) +Example 80: the condition is a [value path expression](#ValuePath) referencing the Boolean property `IsFemale`, whose value then determines the value of the `edm:If` expression (or so it was long ago) ```xml @@ -5032,7 +4945,7 @@ elements. ::: ::: {.varxml .example} -Example 82: +Example 81: ```xml @@ -5075,7 +4988,7 @@ The value of `Name` is the labeled element's name. ::: ::: {.varxml .example} -Example 83: +Example 82: ```xml @@ -5106,7 +5019,7 @@ of a labeled element expression in its body. ::: ::: {.varxml .example} -Example 84: +Example 83: ```xml Model.CustomerFirstName @@ -5131,7 +5044,7 @@ elements. ::: ::: {.varxml .example} -Example 85: +Example 84: ```xml @@ -5140,7 +5053,7 @@ Example 85: ::: ::: {.varxml .example} -Example 86: +Example 85: ```xml @@ -5201,11 +5114,7 @@ enclosing `edm:Record` expression. ::: ::: {.varxml .example} -<<<<<<< HEAD Example 86: this annotation "morphs" the entity type from [example 13](#entitytype) into -======= -Example 87: this annotation "morphs" the entity type from [example 8](#entitytype) into ->>>>>>> refs/remotes/origin/main a structured type with two structural properties `GivenName` and `Surname` and two navigation properties `DirectSupervisor` and `CostCenter`. The first three properties simply rename properties of the @@ -5266,7 +5175,7 @@ elements. ::: ::: {.varxml .example} -Example 88: +Example 87: ```xml @@ -5343,7 +5252,7 @@ forward-slash separated property, navigation property, or type-cast segments ::: example -Example 89: Target expressions +Example 88: Target expressions ``` MySchema.MyEntityContainer/MyEntitySet MySchema.MyEntityContainer/MySingleton @@ -5365,7 +5274,7 @@ CSDL. These examples demonstrate many of the topics covered above. ::: {.varxml .example} -Example 90: +Example 89: ```xml @@ -5483,7 +5392,7 @@ Example 90: ::: {.varxml .example} -Example 91: +Example 90: ```xml diff --git a/odata-csdl/1 Introduction.md b/odata-csdl/1 Introduction.md index bf0ba4d80..ed318bac7 100644 --- a/odata-csdl/1 Introduction.md +++ b/odata-csdl/1 Introduction.md @@ -647,7 +647,6 @@ Example ##ex: [`Precision`](#Precision)`=3` and `Scale=2`. Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 ```json "Amount32": { - "$Nullable": true, "$Type": "Edm.Decimal", "$Precision": 3, "$Scale": 2 @@ -660,7 +659,6 @@ Example ##ex: `Precision=2` equals `Scale`. Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2 ```json "Amount22": { - "$Nullable": true, "$Type": "Edm.Decimal", "$Precision": 2, "$Scale": 2 @@ -674,7 +672,6 @@ Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed values: 12.34, 1234 and 123.4 due to the limited precision. ```json "Amount3v": { - "$Nullable": true, "$Type": "Edm.Decimal", "$Precision": 3 } @@ -687,7 +684,6 @@ Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: 1e-102 and 1e97 due to the limited precision. ```json "Amount7f": { - "$Nullable": true, "$Type": "Edm.Decimal", "$Precision": 7, "$Scale": "floating" @@ -708,36 +704,37 @@ If not specified, the `Scale` facet defaults to zero. ::: ::: {.varxml .example} -Example ##ex: [`Precision`](#Precision)`=3` and `Scale=2`. -Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 +Example ##ex: [`Precision`](#Precision)`=3` and `Scale=2`. +Allowed values: 1.23, 0.23, 3.14 and 0.7, not allowed values: 123, 12.3 +(the [`Nullable`](#Nullable) attribute can be ignored in these examples) ```xml - + ``` ::: ::: {.varxml .example} -Example ##ex: `Precision=2` equals `Scale`. +Example ##ex: `Precision=2` equals `Scale`. Allowed values: 0.23, 0.7, not allowed values: 1.23, 1.2 ```xml - + ``` ::: ::: {.varxml .example} -Example ##ex: `Precision=3` and a variable `Scale`. +Example ##ex: `Precision=3` and a variable `Scale`. Allowed values: 0.123, 1.23, 0.23, 0.7, 123 and 12.3, not allowed values: 12.34, 1234 and 123.4 due to the limited precision. ```xml - + ``` ::: ::: {.varxml .example} -Example ##ex: `Precision=7` and a floating `Scale`. +Example ##ex: `Precision=7` and a floating `Scale`. Allowed values: -1.234567e3, 1e-101, 9.999999e96, not allowed values: 1e-102 and 1e97 due to the limited precision. ```xml - + ``` ::: From 9a9da74658975f1ce483d209b3bba74c289ee27f Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 19 Oct 2023 14:00:05 +0200 Subject: [PATCH 45/74] Reverted to "property" in chapter 7 --- docs/odata-csdl-json/odata-csdl-json.html | 2 +- docs/odata-csdl-json/odata-csdl-json.md | 2 +- docs/odata-csdl-xml/odata-csdl-xml.html | 2 +- docs/odata-csdl-xml/odata-csdl-xml.md | 2 +- odata-csdl/7 Structural Property.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index 297abda5c..c7ee15e54 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -1241,7 +1241,7 @@

    $Nullable

    For collection-valued properties the value will always be a collection that MAY be empty. In this case $Nullable applies to items of the collection and specifies whether the collection MAY contain null values.

    7.3 Default Value

    -

    A primitive- or enumeration-typed model element MAY define a default value that is used if it is not explicitly represented in an annotation or the body of a request or response.

    +

    A primitive- or enumeration-typed property MAY define a default value that is used if it is not explicitly represented in an annotation or the body of a request or response.

    If no value is specified, the client SHOULD NOT assume a default value.

    $DefaultValue

    diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 8368643ec..662549f29 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -1816,7 +1816,7 @@ of the collection and specifies whether the collection MAY contain ## 7.3 Default Value -A primitive- or enumeration-typed model element MAY define a default value that is +A primitive- or enumeration-typed property MAY define a default value that is used if it is not explicitly represented in an annotation or the body of a request or response. diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 8f3e741ce..1e28bae63 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -1151,7 +1151,7 @@

    Attribute If no value is specified for a collection-valued property, the client cannot assume any default value. Clients SHOULD be prepared for this situation even in OData 4.01 responses.

    7.3 Default Value

    -

    A primitive- or enumeration-typed model element MAY define a default value that is used if it is not explicitly represented in an annotation or the body of a request or response.

    +

    A primitive- or enumeration-typed property MAY define a default value that is used if it is not explicitly represented in an annotation or the body of a request or response.

    If no value is specified, the client SHOULD NOT assume a default value.

    Attribute DefaultValue

    diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 64ccebfea..0aeee3c61 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -1713,7 +1713,7 @@ situation even in OData 4.01 responses. ## 7.3 Default Value -A primitive- or enumeration-typed model element MAY define a default value that is +A primitive- or enumeration-typed property MAY define a default value that is used if it is not explicitly represented in an annotation or the body of a request or response. diff --git a/odata-csdl/7 Structural Property.md b/odata-csdl/7 Structural Property.md index 75e9c7c5c..a23ed0e6c 100644 --- a/odata-csdl/7 Structural Property.md +++ b/odata-csdl/7 Structural Property.md @@ -200,7 +200,7 @@ situation even in OData 4.01 responses. ## ##subsec Default Value -A primitive- or enumeration-typed model element MAY define a default value that is +A primitive- or enumeration-typed property MAY define a default value that is used if it is not explicitly represented in an annotation or the body of a request or response. From 0ba8d9ef4ad8beb0b027ead6b3071c7ae7ae393e Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 19 Oct 2023 14:01:40 +0200 Subject: [PATCH 46/74] Tweak --- docs/odata-csdl-json/odata-csdl-json.html | 2 +- docs/odata-csdl-json/odata-csdl-json.md | 2 +- docs/odata-csdl-xml/odata-csdl-xml.html | 2 +- docs/odata-csdl-xml/odata-csdl-xml.md | 2 +- odata-csdl/7 Structural Property.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index c7ee15e54..bf4198940 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -1241,7 +1241,7 @@

    $Nullable

    For collection-valued properties the value will always be a collection that MAY be empty. In this case $Nullable applies to items of the collection and specifies whether the collection MAY contain null values.

    7.3 Default Value

    -

    A primitive- or enumeration-typed property MAY define a default value that is used if it is not explicitly represented in an annotation or the body of a request or response.

    +

    A primitive- or enumeration-typed property MAY define a default value that is used if the property is not explicitly represented in an annotation or the body of a request or response.

    If no value is specified, the client SHOULD NOT assume a default value.

    $DefaultValue

    diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 662549f29..14799f95c 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -1817,7 +1817,7 @@ of the collection and specifies whether the collection MAY contain ## 7.3 Default Value A primitive- or enumeration-typed property MAY define a default value that is -used if it is not explicitly represented in an annotation or +used if the property is not explicitly represented in an annotation or the body of a request or response. If no value is specified, the client SHOULD NOT assume a default value. diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 1e28bae63..7c6e29744 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -1151,7 +1151,7 @@

    Attribute If no value is specified for a collection-valued property, the client cannot assume any default value. Clients SHOULD be prepared for this situation even in OData 4.01 responses.

    7.3 Default Value

    -

    A primitive- or enumeration-typed property MAY define a default value that is used if it is not explicitly represented in an annotation or the body of a request or response.

    +

    A primitive- or enumeration-typed property MAY define a default value that is used if the property is not explicitly represented in an annotation or the body of a request or response.

    If no value is specified, the client SHOULD NOT assume a default value.

    Attribute DefaultValue

    diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 0aeee3c61..26e69d380 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -1714,7 +1714,7 @@ situation even in OData 4.01 responses. ## 7.3 Default Value A primitive- or enumeration-typed property MAY define a default value that is -used if it is not explicitly represented in an annotation or +used if the property is not explicitly represented in an annotation or the body of a request or response. If no value is specified, the client SHOULD NOT assume a default value. diff --git a/odata-csdl/7 Structural Property.md b/odata-csdl/7 Structural Property.md index a23ed0e6c..4ae5436f7 100644 --- a/odata-csdl/7 Structural Property.md +++ b/odata-csdl/7 Structural Property.md @@ -201,7 +201,7 @@ situation even in OData 4.01 responses. ## ##subsec Default Value A primitive- or enumeration-typed property MAY define a default value that is -used if it is not explicitly represented in an annotation or +used if the property is not explicitly represented in an annotation or the body of a request or response. If no value is specified, the client SHOULD NOT assume a default value. From 47079e72f199c7577dafc8fd83787b7cec056ba5 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Tue, 24 Oct 2023 10:14:57 +0200 Subject: [PATCH 47/74] Update odata-csdl/1 Introduction.md Co-authored-by: Michael Pizzo --- odata-csdl/1 Introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odata-csdl/1 Introduction.md b/odata-csdl/1 Introduction.md index 24675157d..eeda16f4e 100644 --- a/odata-csdl/1 Introduction.md +++ b/odata-csdl/1 Introduction.md @@ -496,7 +496,7 @@ responses. ## ##subsec Type Facets -Facets modify or constrain the acceptable values for a model element of a given primitive type, +Facets modify or constrain the acceptable values of primitive typed model elements, for example a [structural property](#StructuralProperty), action or function [parameter](#Parameter), action or function [return type](#ReturnType), or From aecd656ee2d331d15ba221dc7230a57b99ce1dce Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Tue, 24 Oct 2023 10:16:11 +0200 Subject: [PATCH 48/74] Rebuilt --- docs/odata-csdl-json/odata-csdl-json.html | 2 +- docs/odata-csdl-json/odata-csdl-json.md | 2 +- docs/odata-csdl-xml/odata-csdl-xml.html | 2 +- docs/odata-csdl-xml/odata-csdl-xml.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index bf4198940..eb714b1e0 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -638,7 +638,7 @@

    3.3

    Some of these types allow facets, defined in section "Type Facets".

    See rule primitiveLiteral in OData-ABNF for the representation of primitive type values in URLs and OData-JSON for the representation in requests and responses.

    3.4 Type Facets

    -

    Facets modify or constrain the acceptable values for a model element of a given primitive type, for example a structural property, action or function parameter, action or function return type, or term.

    +

    Facets modify or constrain the acceptable values of primitive typed model elements, for example a structural property, action or function parameter, action or function return type, or term.

    For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

    3.4.1 MaxLength

    A positive integer value specifying the maximum length of a binary, stream or string value. For binary or stream values this is the octet length of the binary data, for string values it is the character length (number of code points for Unicode).

    diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 14799f95c..d03d41b96 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -620,7 +620,7 @@ responses. ## 3.4 Type Facets -Facets modify or constrain the acceptable values for a model element of a given primitive type, +Facets modify or constrain the acceptable values of primitive typed model elements, for example a [structural property](#StructuralProperty), action or function [parameter](#Parameter), action or function [return type](#ReturnType), or [term](#Term). diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 7c6e29744..6824e99bb 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -631,7 +631,7 @@

    3.3

    Some of these types allow facets, defined in section "Type Facets".

    See rule primitiveLiteral in OData-ABNF for the representation of primitive type values in URLs and OData-JSON for the representation in requests and responses.

    3.4 Type Facets

    -

    Facets modify or constrain the acceptable values for a model element of a given primitive type, for example a structural property, action or function parameter, action or function return type, or term.

    +

    Facets modify or constrain the acceptable values of primitive typed model elements, for example a structural property, action or function parameter, action or function return type, or term.

    For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

    3.4.1 MaxLength

    A positive integer value specifying the maximum length of a binary, stream or string value. For binary or stream values this is the octet length of the binary data, for string values it is the character length (number of code points for Unicode).

    diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 26e69d380..1e59d1c00 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -560,7 +560,7 @@ responses. ## 3.4 Type Facets -Facets modify or constrain the acceptable values for a model element of a given primitive type, +Facets modify or constrain the acceptable values of primitive typed model elements, for example a [structural property](#StructuralProperty), action or function [parameter](#Parameter), action or function [return type](#ReturnType), or [term](#Term). From 4c63739e177a1e54bda6d2f6399b1c4259df3fef Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Tue, 24 Oct 2023 15:44:09 +0200 Subject: [PATCH 49/74] Update pdf.yml to use Node 20 (#198) --- .github/workflows/pdf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pdf.yml b/.github/workflows/pdf.yml index 65dddd807..42054800b 100644 --- a/.github/workflows/pdf.yml +++ b/.github/workflows/pdf.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v3 From 3707eaafd083010407ddf40b00075e40f6b96a7f Mon Sep 17 00:00:00 2001 From: D024504 Date: Wed, 25 Oct 2023 17:24:24 +0200 Subject: [PATCH 50/74] TC 2023-10-25 --- docs/odata-protocol/odata-protocol.html | 16 ++++----- docs/odata-protocol/odata-protocol.md | 38 +++++++++++----------- odata-protocol/11 Data Service Requests.md | 30 ++++++++--------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 15ce9a89e..bb5c8f0f4 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -306,8 +306,8 @@

    Table of Contents

  • 11.2.3 Requesting the Media Stream of a Media Entity using $value
  • 11.2.4 Requesting Individual Properties
  • 11.2.5 Specifying Properties to Return
      @@ -1276,7 +1276,10 @@

      11.2.4.1 Requesting a Property's Raw Value using $value

      +

      11.2.4.1 Requesting Stream Properties

      +

      If the property being requested has type Edm.Stream (see OData-URL, section 9), the media type of the response is the media type of the stream, subject to content type negotiation based on the Accept header of the request. The response body is the octet-stream that represents the raw value of the stream property with that media type.

      +

      Note this response format disregards any $format system query option.

      +

      11.2.4.2 Requesting a Property's Raw Value using $value

      To retrieve the raw value of a primitive type property, the client sends a GET request to the property value URL. See the OData-URL document for details.

      The Content-Type of the response is determined using the Accept header and the $format system query option.

      The default format for Edm.Binary is the format specified by the Core.MediaType annotation of this property (see OData-VocCore) if this annotation is present. If not annotated, the format cannot be predicted by the client.

      @@ -1284,14 +1287,11 @@

      OData-ABNF.

      A $value request for a property that is null results in a 204 No Content response.

      If the property is not available, for example due to permissions, the service responds with 404 Not Found.

      +

      Appending /$value to the property URL of a property of type Edm.Stream returns 400 Bad Request.

      Example 32:

      GET http://host/service/Products(1)/Name/$value
      -

      11.2.4.2 Requesting Stream Properties

      -

      If the property being requested has type Edm.Stream (see OData-URL, section 9), the media type of the response is the media type of the stream, subject to content type negotiation based on the Accept header of the request. The response body is the octet-stream that represents the raw value of the stream with that media type.

      -

      Note this response format disregards any $format system query option.

      -

      Appending /$value to the property URL of a property of type Edm.Stream returns 400 Bad Request.

      11.2.5 Specifying Properties to Return

      The $select and $expand system query options enable the client to specify the set of structural properties and navigation properties to include in a response. The service MAY include additional properties not specified in $select and $expand, including properties not defined in the metadata document.

      11.2.5.1 System Query Option $select

      @@ -2634,7 +2634,7 @@

      section 11.2.5.1)
    • MUST support casting to a derived type according to OData-URL if derived types are present in the model
    • MUST support $top (section 11.2.6.3)
    • -
    • MUST support /$value on media entities (section 11.1.2) and individual properties (section 11.2.4.1)
    • +
    • MUST support /$value on media entities (section 11.1.2) and individual properties (section 11.2.4.2)
    • MUST support $filter (section 11.2.6.1)
      1. MUST support eq, ne filter operations on properties of entities in the requested entity set (section 11.2.6.1.1)
      2. diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index 65d6b76a9..efc481ef6 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -204,8 +204,8 @@ For complete copyright information please see the full Notices section in an App - [11.2.2 Requesting Individual Entities](#RequestingIndividualEntities) - [11.2.3 Requesting the Media Stream of a Media Entity using `$value`](#RequestingtheMediaStreamofaMediaEntityusingvalue) - [11.2.4 Requesting Individual Properties](#RequestingIndividualProperties) - - [11.2.4.1 Requesting a Property's Raw Value using `$value`](#RequestingaPropertysRawValueusingvalue) - - [11.2.4.2 Requesting Stream Properties](#RequestingStreamProperties) + - [11.2.4.1 Requesting Stream Properties](#RequestingStreamProperties) + - [11.2.4.2 Requesting a Property's Raw Value using `$value`](#RequestingaPropertysRawValueusingvalue) - [11.2.5 Specifying Properties to Return](#SpecifyingPropertiestoReturn) - [11.2.5.1 System Query Option `$select`](#SystemQueryOptionselect) - [11.2.5.2 System Query Option `$expand`](#SystemQueryOptionexpand) @@ -2746,7 +2746,19 @@ GET http://host/service/Products(1)/Name ``` ::: -#### 11.2.4.1 Requesting a Property's Raw Value using `$value` +#### 11.2.4.1 Requesting Stream Properties + +If the property being requested has type `Edm.Stream` (see +[OData-URL, section 9](#ODataURL)), the media type of the response is the +media type of the stream, subject to content type negotiation based on the +[`Accept`](#HeaderAccept) header of the request. +The response body is the octet-stream that represents the raw +value of the stream property with that media type. + +Note this response format disregards any [`$format`](#SystemQueryOptionformat) +system query option. + +#### 11.2.4.2 Requesting a Property's Raw Value using `$value` To retrieve the raw value of a primitive type property, the client sends a `GET` request to the property value URL. See the @@ -2785,6 +2797,9 @@ A `$value` request for a property that is `null` results in a If the property is not available, for example due to permissions, the service responds with [`404 Not Found`](#ResponseCode404NotFound). +Appending `/$value` to the property URL of a property of type `Edm.Stream` +returns `400 Bad Request`. + ::: example Example 32: ``` @@ -2792,21 +2807,6 @@ GET http://host/service/Products(1)/Name/$value ``` ::: -#### 11.2.4.2 Requesting Stream Properties - -If the property being requested has type `Edm.Stream` (see -[OData-URL, section 9](#ODataURL)), the media type of the response is the -media type of the stream, subject to content type negotiation based on the -[`Accept`](#HeaderAccept) header of the request. -The response body is the octet-stream that represents the raw -value of the stream with that media type. - -Note this response format disregards any [`$format`](#SystemQueryOptionformat) -system query option. - -Appending `/$value` to the property URL of a property of type `Edm.Stream` -returns `400 Bad Request`. - ### 11.2.5 Specifying Properties to Return The [`$select`](#SystemQueryOptionselect) and @@ -6379,7 +6379,7 @@ unsupported functionality ([section 9.3.1](#ResponseCode501NotImplemented)) 4. MUST support casting to a derived type according to [OData-URL](#ODataURL) if derived types are present in the model 5. MUST support `$top` ([section 11.2.6.3](#SystemQueryOptiontop)) -6. MUST support `/$value` on media entities ([section 11.1.2](#MetadataDocumentRequest)) and individual properties ([section 11.2.4.1](#RequestingaPropertysRawValueusingvalue)) +6. MUST support `/$value` on media entities ([section 11.1.2](#MetadataDocumentRequest)) and individual properties ([section 11.2.4.2](#RequestingaPropertysRawValueusingvalue)) 7. MUST support `$filter` ([section 11.2.6.1](#SystemQueryOptionfilter)) 1. MUST support `eq`, `ne` filter operations on properties of entities in the requested entity set ([section 11.2.6.1.1](#BuiltinFilterOperations)) diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index 5339e96ce..7a65426c6 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -220,6 +220,18 @@ GET http://host/service/Products(1)/Name ``` ::: +#### ##subsubsubsec Requesting Stream Properties + +If the property being requested has type `Edm.Stream` (see +[OData-URL, section 9](#ODataURL)), the media type of the response is the +media type of the stream, subject to content type negotiation based on the +[`Accept`](#HeaderAccept) header of the request. +The response body is the octet-stream that represents the raw +value of the stream property with that media type. + +Note this response format disregards any [`$format`](#SystemQueryOptionformat) +system query option. + #### ##subsubsubsec Requesting a Property's Raw Value using `$value` To retrieve the raw value of a primitive type property, the client sends @@ -259,6 +271,9 @@ A `$value` request for a property that is `null` results in a If the property is not available, for example due to permissions, the service responds with [`404 Not Found`](#ResponseCode404NotFound). +Appending `/$value` to the property URL of a property of type `Edm.Stream` +returns `400 Bad Request`. + ::: example Example ##ex: ``` @@ -266,21 +281,6 @@ GET http://host/service/Products(1)/Name/$value ``` ::: -#### ##subsubsubsec Requesting Stream Properties - -If the property being requested has type `Edm.Stream` (see -[OData-URL, section 9](#ODataURL)), the media type of the response is the -media type of the stream, subject to content type negotiation based on the -[`Accept`](#HeaderAccept) header of the request. -The response body is the octet-stream that represents the raw -value of the stream with that media type. - -Note this response format disregards any [`$format`](#SystemQueryOptionformat) -system query option. - -Appending `/$value` to the property URL of a property of type `Edm.Stream` -returns `400 Bad Request`. - ### ##subsubsec Specifying Properties to Return The [`$select`](#SystemQueryOptionselect) and From 369b3b28ba1a177150add5bdd4d279525f3a93f1 Mon Sep 17 00:00:00 2001 From: D024504 Date: Wed, 25 Oct 2023 17:32:32 +0200 Subject: [PATCH 51/74] TC 2023-10-25 --- docs/odata-protocol/odata-protocol.html | 3 ++- docs/odata-protocol/odata-protocol.md | 5 ++++- odata-protocol/11.5 Operations.md | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index bb5c8f0f4..3b646605c 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -2129,7 +2129,7 @@

        requesting stream properties.

        +

        If the function returns a value of type Edm.Stream and no additional path segments follow the function invocation, the response to the GET request follows the rules for requesting stream properties.

        Parameter values passed to functions MUST be specified either as a URL literal (for primitive values) or as a JSON formatted OData object (for complex values, or collections of primitive or complex values). Entity typed values are passed as JSON formatted entities that MAY include a subset of the properties, or just the entity reference, as appropriate to the function.  

        If a collection-valued function has no result for a given parameter value combination, the response is the format-specific representation of an empty collection. If a single-valued function with a nullable return-type has no result, the service returns 204 No Content.

        If a single-valued function with a non-nullable return type has no result, the service returns 4xx. For functions that return a single entity 404 Not Found is the appropriate response code.

        @@ -2180,6 +2180,7 @@

        return Prefer header.

        Actions that create and return a single entity follow the rules for entity creation and return a Location header that contains the edit URL or read URL of the created entity.

        +

        If the action returns a value of type Edm.Stream, the response to the POST request follows the rules for requesting stream properties.

        Actions without a return type respond with 204 No Content on success.

        To request processing of the action only if the binding parameter value, an entity or collection of entities, is unmodified, the client includes the If-Match header with the latest known ETag value for the entity or collection of entities. The ETag value for a collection as a whole is transported in the ETag header of a collection response.

        diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index efc481ef6..b25bca069 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -5305,7 +5305,7 @@ POST http://host/service/MyShoppingCart()/Items If the function returns a value of type `Edm.Stream` and no additional path segments follow the function invocation, the response to the `GET` request -obeys the rules for [requesting stream properties](#RequestingStreamProperties). +follows the rules for [requesting stream properties](#RequestingStreamProperties). Parameter values passed to functions MUST be specified either as a URL literal (for primitive values) or as a JSON formatted OData object (for @@ -5504,6 +5504,9 @@ Actions that create and return a single entity follow the rules for header](#HeaderLocation) that contains the edit URL or read URL of the created entity. +If the action returns a value of type `Edm.Stream`, the response to the `POST` request +follows the rules for [requesting stream properties](#RequestingStreamProperties). + Actions without a return type respond with [`204 No Content`](#ResponseCode204NoContent) on success. diff --git a/odata-protocol/11.5 Operations.md b/odata-protocol/11.5 Operations.md index 88b423127..f8c619ec5 100644 --- a/odata-protocol/11.5 Operations.md +++ b/odata-protocol/11.5 Operations.md @@ -210,7 +210,7 @@ POST http://host/service/MyShoppingCart()/Items If the function returns a value of type `Edm.Stream` and no additional path segments follow the function invocation, the response to the `GET` request -obeys the rules for [requesting stream properties](#RequestingStreamProperties). +follows the rules for [requesting stream properties](#RequestingStreamProperties). Parameter values passed to functions MUST be specified either as a URL literal (for primitive values) or as a JSON formatted OData object (for @@ -409,6 +409,9 @@ Actions that create and return a single entity follow the rules for header](#HeaderLocation) that contains the edit URL or read URL of the created entity. +If the action returns a value of type `Edm.Stream`, the response to the `POST` request +follows the rules for [requesting stream properties](#RequestingStreamProperties). + Actions without a return type respond with [`204 No Content`](#ResponseCode204NoContent) on success. From 7c382ba9334dcd35dcfe5ed51f6af339b2beb9fb Mon Sep 17 00:00:00 2001 From: D024504 Date: Wed, 25 Oct 2023 17:44:09 +0200 Subject: [PATCH 52/74] TC 2023-10-25 --- docs/odata-protocol/odata-protocol.html | 10 +++++----- docs/odata-protocol/odata-protocol.md | 20 +++++++++++++------- odata-protocol/11 Data Service Requests.md | 13 +++++++++---- odata-protocol/11.4 Data Modification.md | 8 ++++---- 4 files changed, 31 insertions(+), 20 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 3b646605c..225a33d07 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1258,13 +1258,13 @@

        OData-JSON payload. In addition, services MAY support conventions for constructing a read URL using the entity's key value(s), as described in OData-URL.

        The set of structural or navigation properties to return may be specified through $select or $expandsystem query options.

        Clients MUST be prepared to receive additional properties in an entity or complex type instance that are not advertised in metadata, even for types not marked as open.

        -

        Properties that are not available, for example due to permissions, are not returned. In this case, the Core.Permissions annotation, defined in OData-VocCore MUST be returned for the property with a value of None.

        +

        Properties that are not available, for example due to permissions, are not returned. In this case, the Core.Permissions annotation, defined in OData-VocCore MUST be returned for the property with a value of None.

        If no entity exists with the specified request URL, the service responds with 404 Not Found.

        11.2.3 Requesting the Media Stream of a Media Entity using $value

        A media entity is an entity that represents an out-of-band stream, such as a photograph.

        Use a media entity if the out-of-band stream is the main topic of interest and the media entity is just structured additional information attached to the stream. Use a normal entity with one or more stream properties if the structured data of the entity is the main topic of interest and the stream data is just additional information attached to the structured data.

        -

        To address the media stream represented by a media entity, clients append /$value to the resource path of the media entity URL. Services may redirect from this canonical URL to the source URL of the media stream.

        -

        Appending /$value to an entity that is not a media entity returns 400 Bad Request.

        +

        To address the media stream represented by a media entity, clients append /$value to the resource path of the media entity URL. The media type of the response is the media type of the stream, subject to content type negotiation based on the Accept header of the request. The response body is the octet-stream that represents the raw value of the stream property with that media type. Alternatively, services MAY redirect from this canonical URL to the source URL of the media stream.

        +

        Appending /$value to an entity that is not a media entity returns 400 Bad Request.

        Attempting to retrieve the media stream from a single-valued navigation property referencing a media entity whose value is null returns 404 Not Found.

        11.2.4 Requesting Individual Properties

        To retrieve an individual property, the client issues a GET request to the property URL. The property URL is the entity read URL with "/" and the property name appended.

        @@ -1913,7 +1913,7 @@

        11.4.7.1 Create a Media Entity

        A POST request to a media entity's entity set creates a new media entity. The request body MUST contain the media value (for example, the photograph) whose media type MUST be specified in a Content-Type header. The request body is always interpreted as the media value, even if it has the media type of an OData format supported by the service. It is not possible to set the structural properties of the media entity when creating the media entity.

        Upon successful completion, the response MUST contain Location header that contains the edit URL of the created media entity.

        -

        Upon successful completion the service responds with either 201 Created, or 204 No Contentif the request included a Prefer header with a value of return=minimal.

        +

        Upon successful completion the service responds with either 201 Created, or 204 No Content if the request included a Prefer header with a value of return=minimal.

        11.4.7.2 Update a Media Entity Stream

        A successful PUT request to the media edit URL of a media entity changes the media stream of the entity.

        If the entity includes an ETag value for the media stream, the client MUST include an If-Match header with the ETag value.

        @@ -1943,7 +1943,7 @@

        Example 81: directly read a stream property of an entity

        GET http://host/service/Products(1)/Thumbnail
        -

        can return 200 OK and the stream data, or a 3xx Redirect to the media read link of the stream property.

        +

        can return 200 OK and the stream data (see section 11.2.4.1), or a 3xx Redirect to the media read link of the stream property.

        Note: for scenarios in which the media value can only be inlined, the property should instead be modeled with type Edm.Binary.

        11.4.8.1 Update Stream Values

        diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index b25bca069..f4e9a7a3d 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -2693,7 +2693,7 @@ Properties that are not available, for example due to permissions, are not returned. In this case, the [`Core.Permissions`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#Permissions) annotation, defined in [OData-VocCore](#ODataVocCore) MUST be returned -for the property with a value of `None.` +for the property with a value of `None`. If no entity exists with the specified request URL, the service responds with [`404 Not Found`](#ResponseCode404NotFound). @@ -2711,12 +2711,17 @@ entity is the main topic of interest and the stream data is just additional information attached to the structured data. To address the media stream represented by a media entity, clients -append `/$value` to the resource path of the media entity URL. Services -may redirect from this canonical URL to the source URL of the media +append `/$value` to the resource path of the media entity URL. +The media type of the response is the +media type of the stream, subject to content type negotiation based on the +[`Accept`](#HeaderAccept) header of the request. +The response body is the octet-stream that represents the raw +value of the stream property with that media type. Alternatively, services +MAY redirect from this canonical URL to the source URL of the media stream. Appending `/$value` to an entity that is not a media entity returns -`400 Bad Request.` +`400 Bad Request`. Attempting to retrieve the media stream from a single-valued navigation property referencing a media entity whose value is null returns @@ -4635,8 +4640,8 @@ entity. Upon successful completion the service responds with either [`201 Created`](#ResponseCode201Created), or -[`204 No Content`](#ResponseCode204NoContent)if the request included a -[Prefer header](#Preferencereturnrepresentationandreturnminimal) with a value of +[`204 No Content`](#ResponseCode204NoContent) if the request included a +[`Prefer` header](#Preferencereturnrepresentationandreturnminimal) with a value of [`return=minimal`](#Preferencereturnrepresentationandreturnminimal). #### 11.4.7.2 Update a Media Entity Stream @@ -4704,7 +4709,8 @@ Example 81: directly read a stream property of an entity ``` GET http://host/service/Products(1)/Thumbnail ``` -can return [`200 OK`](#ResponseCode200OK) and the stream data, or a [`3xx Redirect`](#ResponseCode3xxRedirection) to the media read link of the stream property. +can return [`200 OK`](#ResponseCode200OK) and the stream data (see [section 11.2.4.1](#RequestingStreamProperties)), +or a [`3xx Redirect`](#ResponseCode3xxRedirection) to the media read link of the stream property. ::: Note: for scenarios in which the media value can only be inlined, diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index 7a65426c6..4a6732034 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -167,7 +167,7 @@ Properties that are not available, for example due to permissions, are not returned. In this case, the [`Core.Permissions`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#Permissions) annotation, defined in [OData-VocCore](#ODataVocCore) MUST be returned -for the property with a value of `None.` +for the property with a value of `None`. If no entity exists with the specified request URL, the service responds with [`404 Not Found`](#ResponseCode404NotFound). @@ -185,12 +185,17 @@ entity is the main topic of interest and the stream data is just additional information attached to the structured data. To address the media stream represented by a media entity, clients -append `/$value` to the resource path of the media entity URL. Services -may redirect from this canonical URL to the source URL of the media +append `/$value` to the resource path of the media entity URL. +The media type of the response is the +media type of the stream, subject to content type negotiation based on the +[`Accept`](#HeaderAccept) header of the request. +The response body is the octet-stream that represents the raw +value of the stream property with that media type. Alternatively, services +MAY redirect from this canonical URL to the source URL of the media stream. Appending `/$value` to an entity that is not a media entity returns -`400 Bad Request.` +`400 Bad Request`. Attempting to retrieve the media stream from a single-valued navigation property referencing a media entity whose value is null returns diff --git a/odata-protocol/11.4 Data Modification.md b/odata-protocol/11.4 Data Modification.md index 885435a89..06eebe7d8 100644 --- a/odata-protocol/11.4 Data Modification.md +++ b/odata-protocol/11.4 Data Modification.md @@ -693,8 +693,8 @@ entity. Upon successful completion the service responds with either [`201 Created`](#ResponseCode201Created), or -[`204 No Content`](#ResponseCode204NoContent)if the request included a -[Prefer header](#Preferencereturnrepresentationandreturnminimal) with a value of +[`204 No Content`](#ResponseCode204NoContent) if the request included a +[`Prefer` header](#Preferencereturnrepresentationandreturnminimal) with a value of [`return=minimal`](#Preferencereturnrepresentationandreturnminimal). #### ##subsubsubsec Update a Media Entity Stream @@ -762,8 +762,8 @@ Example ##ex: directly read a stream property of an entity ``` GET http://host/service/Products(1)/Thumbnail ``` -can return [`200 OK`](#ResponseCode200OK) and the stream data, or a -[`3xx Redirect`](#ResponseCode3xxRedirection) to the media read link of the stream property. +can return [`200 OK`](#ResponseCode200OK) and the stream data (see [section ##RequestingStreamProperties]), +or a [`3xx Redirect`](#ResponseCode3xxRedirection) to the media read link of the stream property. ::: Note: for scenarios in which the media value can only be inlined, From 33cc8697efad705fb55e968c43b1fe0ae3d099e2 Mon Sep 17 00:00:00 2001 From: D024504 Date: Wed, 25 Oct 2023 17:45:56 +0200 Subject: [PATCH 53/74] TC 2023-10-25 --- docs/odata-protocol/odata-protocol.html | 2 +- docs/odata-protocol/odata-protocol.md | 2 +- odata-protocol/11 Data Service Requests.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 225a33d07..22c26f51b 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1263,7 +1263,7 @@

        11.2.3 Requesting the Media Stream of a Media Entity using $value

        A media entity is an entity that represents an out-of-band stream, such as a photograph.

        Use a media entity if the out-of-band stream is the main topic of interest and the media entity is just structured additional information attached to the stream. Use a normal entity with one or more stream properties if the structured data of the entity is the main topic of interest and the stream data is just additional information attached to the structured data.

        -

        To address the media stream represented by a media entity, clients append /$value to the resource path of the media entity URL. The media type of the response is the media type of the stream, subject to content type negotiation based on the Accept header of the request. The response body is the octet-stream that represents the raw value of the stream property with that media type. Alternatively, services MAY redirect from this canonical URL to the source URL of the media stream.

        +

        To address the media stream represented by a media entity, clients append /$value to the resource path of the media entity URL. The media type of the response is the media type of the stream, subject to content type negotiation based on the Accept header of the request. The response body is the octet-stream that represents the raw value of the media stream with that media type. Alternatively, services MAY redirect from this canonical URL to the source URL of the media stream.

        Appending /$value to an entity that is not a media entity returns 400 Bad Request.

        Attempting to retrieve the media stream from a single-valued navigation property referencing a media entity whose value is null returns 404 Not Found.

        11.2.4 Requesting Individual Properties

        diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index f4e9a7a3d..a73983948 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -2716,7 +2716,7 @@ The media type of the response is the media type of the stream, subject to content type negotiation based on the [`Accept`](#HeaderAccept) header of the request. The response body is the octet-stream that represents the raw -value of the stream property with that media type. Alternatively, services +value of the media stream with that media type. Alternatively, services MAY redirect from this canonical URL to the source URL of the media stream. diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index 4a6732034..076c5b512 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -190,7 +190,7 @@ The media type of the response is the media type of the stream, subject to content type negotiation based on the [`Accept`](#HeaderAccept) header of the request. The response body is the octet-stream that represents the raw -value of the stream property with that media type. Alternatively, services +value of the media stream with that media type. Alternatively, services MAY redirect from this canonical URL to the source URL of the media stream. From 6f559c71a1a2d8f250ac605e42d7181d2e084d84 Mon Sep 17 00:00:00 2001 From: D024504 Date: Wed, 25 Oct 2023 18:18:39 +0200 Subject: [PATCH 54/74] TC 2023-10-25 --- docs/odata-csdl-json/odata-csdl-json.html | 2 +- docs/odata-csdl-json/odata-csdl-json.md | 2 +- docs/odata-csdl-xml/odata-csdl-xml.html | 4 ++-- docs/odata-csdl-xml/odata-csdl-xml.md | 4 ++-- odata-csdl/1 Introduction.md | 2 +- odata-csdl/7 Structural Property.md | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index eb714b1e0..fd9b8ee35 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -638,7 +638,7 @@

        3.3

        Some of these types allow facets, defined in section "Type Facets".

        See rule primitiveLiteral in OData-ABNF for the representation of primitive type values in URLs and OData-JSON for the representation in requests and responses.

        3.4 Type Facets

        -

        Facets modify or constrain the acceptable values of primitive typed model elements, for example a structural property, action or function parameter, action or function return type, or term.

        +

        The facets in the following subsections modify or constrain the acceptable values of primitive typed model elements, for example a structural property, action or function parameter, action or function return type, or term.

        For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

        3.4.1 MaxLength

        A positive integer value specifying the maximum length of a binary, stream or string value. For binary or stream values this is the octet length of the binary data, for string values it is the character length (number of code points for Unicode).

        diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index d03d41b96..ca66b44a0 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -620,7 +620,7 @@ responses. ## 3.4 Type Facets -Facets modify or constrain the acceptable values of primitive typed model elements, +The facets in the following subsections modify or constrain the acceptable values of primitive typed model elements, for example a [structural property](#StructuralProperty), action or function [parameter](#Parameter), action or function [return type](#ReturnType), or [term](#Term). diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 6824e99bb..45c523bea 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -631,7 +631,7 @@

        3.3

        Some of these types allow facets, defined in section "Type Facets".

        See rule primitiveLiteral in OData-ABNF for the representation of primitive type values in URLs and OData-JSON for the representation in requests and responses.

        3.4 Type Facets

        -

        Facets modify or constrain the acceptable values of primitive typed model elements, for example a structural property, action or function parameter, action or function return type, or term.

        +

        The facets in the following subsections modify or constrain the acceptable values of primitive typed model elements, for example a structural property, action or function parameter, action or function return type, or term.

        For single-valued model elements the facets apply to the value of the model element. For collection-valued model elements the facets apply to the items in the collection.

        3.4.1 MaxLength

        A positive integer value specifying the maximum length of a binary, stream or string value. For binary or stream values this is the octet length of the binary data, for string values it is the character length (number of code points for Unicode).

        @@ -1142,7 +1142,7 @@

        Attribute Type<

        7.2 Nullable

        A Boolean value specifying whether the property can have the value null.

        -

        Attribute Nullable

        +

        Attribute Nullable

        The value of Nullable is one of the Boolean literals true or false.

        For single-valued properties the value true means that the property allows the null value.

        For collection-valued properties the value will always be a collection that MAY be empty. In this case the Nullable attribute applies to items of the collection and specifies whether the collection MAY contain null values.

        diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 1e59d1c00..5f2bcead3 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -560,7 +560,7 @@ responses. ## 3.4 Type Facets -Facets modify or constrain the acceptable values of primitive typed model elements, +The facets in the following subsections modify or constrain the acceptable values of primitive typed model elements, for example a [structural property](#StructuralProperty), action or function [parameter](#Parameter), action or function [return type](#ReturnType), or [term](#Term). @@ -1687,7 +1687,7 @@ A Boolean value specifying whether the property can have the value ::: {.varxml .rep} -## Attribute `Nullable` +### Attribute `Nullable` The value of `Nullable` is one of the Boolean literals `true` or `false`. diff --git a/odata-csdl/1 Introduction.md b/odata-csdl/1 Introduction.md index eeda16f4e..acbe3775f 100644 --- a/odata-csdl/1 Introduction.md +++ b/odata-csdl/1 Introduction.md @@ -496,7 +496,7 @@ responses. ## ##subsec Type Facets -Facets modify or constrain the acceptable values of primitive typed model elements, +The facets in the following subsections modify or constrain the acceptable values of primitive typed model elements, for example a [structural property](#StructuralProperty), action or function [parameter](#Parameter), action or function [return type](#ReturnType), or diff --git a/odata-csdl/7 Structural Property.md b/odata-csdl/7 Structural Property.md index 4ae5436f7..6b8170bbf 100644 --- a/odata-csdl/7 Structural Property.md +++ b/odata-csdl/7 Structural Property.md @@ -174,7 +174,7 @@ of the collection and specifies whether the collection MAY contain ::: ::: {.varxml .rep} -## ##subisec Attribute `Nullable` +### ##subisec Attribute `Nullable` The value of `Nullable` is one of the Boolean literals `true` or `false`. From 6e178d12abe10b7cdd8b7ee4e080d3dac0c10bf4 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 25 Oct 2023 18:40:38 +0200 Subject: [PATCH 55/74] Rephrased --- docs/odata-protocol/odata-protocol.html | 4 ++-- docs/odata-protocol/odata-protocol.md | 6 +++--- odata-protocol/11.4 Data Modification.md | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 872224e5f..2d92c379b 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1945,9 +1945,9 @@

        Updating a primitive property or a complex property with a null value also sets the property to null.

        11.4.9.3 Update a Complex Property

        -

        A successful PATCH request to the edit URL for a complex typed property updates that property. The request body MUST contain a single valid representation for the target complex type or one of its derived types.

        +

        A successful PATCH request to the edit URL for a complex typed property updates that property. The request body MUST contain a single valid representation for the declared type of the complex property or one of its derived types.

        The service MUST directly modify only those properties of the complex type specified in the payload of the PATCH request.

        -

        A complex-typed property can be set to different type in a PATCH request by specifying a different type in the update payload. Properties shared through inheritance, as well as dynamic properties, are retained (unless overwritten by new values in the payload). Other properties of the original type are discarded.

        +

        If a complex-typed property is set to a different type in a PATCH request, properties shared through inheritance, as well as dynamic properties, are retained (unless overwritten by new values in the payload). Other properties of the original type are discarded.

        The service MAY additionally support clients sending a PUT request to a URL that specifies a complex type. In this case, the service MUST replace the entire complex property with the values specified in the request body and set all unspecified properties to their default value.

        Upon successful completion the service responds with either 200 OK or 204 No Content. The client may request that the response SHOULD include a body by specifying a Prefer header with a value of return=representation.

        Services MUST return an error if the property is not updatable.

        diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index d1c224326..38e8c16a1 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -4762,13 +4762,13 @@ property to null. A successful `PATCH` request to the edit URL for a complex typed property updates that property. The request body MUST contain a single -valid representation for the target complex type or one of its derived types. +valid representation for the declared type of the complex property or one of its derived types. The service MUST directly modify only those properties of the complex type specified in the payload of the `PATCH` request. -A complex-typed property can be set to different type in a `PATCH` request by specifying a different type in the update payload. -Properties shared through inheritance, as well as dynamic properties, are retained (unless overwritten by new values in the payload). +If a complex-typed property is set to a different type in a `PATCH` request, +properties shared through inheritance, as well as dynamic properties, are retained (unless overwritten by new values in the payload). Other properties of the original type are discarded. The service MAY additionally support clients sending a `PUT` request to diff --git a/odata-protocol/11.4 Data Modification.md b/odata-protocol/11.4 Data Modification.md index de8789f54..52f2f81bf 100644 --- a/odata-protocol/11.4 Data Modification.md +++ b/odata-protocol/11.4 Data Modification.md @@ -833,14 +833,13 @@ property to null. A successful `PATCH` request to the edit URL for a complex typed property updates that property. The request body MUST contain a single -valid representation for the target complex type or one of its derived types. +valid representation for the declared type of the complex property or one of its derived types. The service MUST directly modify only those properties of the complex type specified in the payload of the `PATCH` request. -A complex-typed property can be set to different type in a `PATCH` request -by specifying a different type in the update payload. -Properties shared through inheritance, as well as dynamic properties, +If a complex-typed property is set to a different type in a `PATCH` request, +properties shared through inheritance, as well as dynamic properties, are retained (unless overwritten by new values in the payload). Other properties of the original type are discarded. From 1e57f59d9857dacad641c5786aacef54cd6bee6e Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 25 Oct 2023 18:53:06 +0200 Subject: [PATCH 56/74] Remove Markdown conversion artifact ` ` (#196) --- docs/odata-json-format/odata-json-format.html | 4 +-- docs/odata-json-format/odata-json-format.md | 8 ++--- docs/odata-protocol/odata-protocol.html | 30 +++++++++---------- docs/odata-protocol/odata-protocol.md | 30 +++++++++---------- .../odata-url-conventions.html | 8 ++--- .../odata-url-conventions.md | 8 ++--- .../19 Batch Requests and Responses.md | 2 +- odata-json-format/4 Common Characteristics.md | 6 ++-- odata-protocol/11 Data Service Requests.md | 2 +- odata-protocol/11.4 Data Modification.md | 2 +- odata-protocol/11.5 Operations.md | 10 +++---- odata-protocol/11.7 Batch Requests.md | 2 +- odata-protocol/12 Conformance.md | 8 ++--- odata-protocol/8 Header Fields.md | 6 ++-- odata-url-conventions/4 Resource Path.md | 4 +-- odata-url-conventions/5 Query Options.md | 4 +-- 16 files changed, 65 insertions(+), 69 deletions(-) diff --git a/docs/odata-json-format/odata-json-format.html b/docs/odata-json-format/odata-json-format.html index 39db73572..1072a0ec7 100644 --- a/docs/odata-json-format/odata-json-format.html +++ b/docs/odata-json-format/odata-json-format.html @@ -530,7 +530,7 @@

        }

  • -

    Example 6: entity of type Model.VipCustomer defined in the metadata document of a different service

    +

    Example 6: entity of type Model.VipCustomer defined in the metadata document of a different service

    {
       "@context": "http://host/service/$metadata#Customers/$entity",
       "@type": "http://host/alternate/$metadata#Model.VipCustomer",
    @@ -1512,7 +1512,7 @@ 

    19.1 Batc

    Note: the id name/value pair corresponds to the Content-ID header in the multipart batch format specified in OData-Protocol.

    The value of method is a string that MUST contain one of the literals delete, get, patch, post, or put. These literals are case-insensitive.

    The value of url is a string containing the individual request URL. The URL MAY be an absolute path (starting with a forward slash /) which is appended to scheme, host, and port of the batch request URL, or a relative path (not starting with a forward slash /).

    -

    If the first segment of a relative path starts with a $ character and is not identical to the name of a top-level system resource ($batch, $crossjoin, $all, $entity, $root, $id, $metadata, or other system resources defined according to the OData-Version of the protocol specified in the request), then this first segment is replaced with the URL of the entity created by or returned from a preceding request whose id value is identical to the value of the first segment with the leading $ character removed. The id of this request MUST be specified in the dependsOn name/value pair.

    +

    If the first segment of a relative path starts with a $ character and is not identical to the name of a top-level system resource ($batch, $crossjoin, $all, $entity, $root, $id, $metadata, or other system resources defined according to the OData-Version of the protocol specified in the request), then this first segment is replaced with the URL of the entity created by or returned from a preceding request whose id value is identical to the value of the first segment with the leading $ character removed. The id of this request MUST be specified in the dependsOn name/value pair.

    Otherwise, the relative path is resolved relative to the batch request URL (i.e. relative to the service root).

    The value of atomicityGroup is a string whose content MUST NOT be identical to any value of id within the batch request, and which MUST satisfy the rule request-id in OData-ABNF. All request objects with the same value for atomicityGroup MUST be adjacent in the requests array. These requests are processed as an atomic operation and MUST either all succeed, or all fail.

    Note: the atomicity group is a generalization of the change set in the multipart batch format specified in OData-Protocol.

    diff --git a/docs/odata-json-format/odata-json-format.md b/docs/odata-json-format/odata-json-format.md index fd7860882..d8231fcc5 100644 --- a/docs/odata-json-format/odata-json-format.md +++ b/docs/odata-json-format/odata-json-format.md @@ -876,10 +876,8 @@ metadata document of the same service with a dynamic property of type ::: ::: example -Example 6: entity of type -`Model.VipCustomer` defined in the -metadata` `document of a different -service +Example 6: entity of type `Model.VipCustomer` defined in the +metadata document of a different service ```json { "@context": "http://host/service/$metadata#Customers/$entity", @@ -2872,7 +2870,7 @@ batch request URL, or a relative path (not starting with a forward slash `/`). If the first segment of a relative path starts with a `$` character and is not identical to the name of a top-level system -resource (`$batch`, `$crossjoin,` `$all,` `$entity`, `$root,` +resource (`$batch`, `$crossjoin`, `$all`, `$entity`, `$root`, `$id`, `$metadata`, or other system resources defined according to the `OData-Version` of the protocol specified in the request), then this first segment is replaced with the diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 83af44633..9f32d72fb 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -692,7 +692,7 @@

    8.2.4 Header If-Match

    As defined in RFC7232, a client MAY include an If-Match header in a request to GET, POST, PUT, PATCH or DELETE. The value of the If-Match request header MUST be an ETag value previously retrieved for the resource, or * to match any value.

    -

    If an operation on an existing resource requires an ETag, (see term Core.OptimisticConcurrency in OData-VocCore and property OptimisticConcurrencyControl of type Capabilities.NavigationPropertyRestriction in OData-VocCap) and the client does not specify an If-Match request header in a Data Modification Request or in an Action Request invoking an action bound to the resource, the service responds with a 428 Precondition Required and MUST ensure that no observable change occurs as a result of the request.

    +

    If an operation on an existing resource requires an ETag, (see term Core.OptimisticConcurrency in OData-VocCore and property OptimisticConcurrencyControl of type Capabilities.NavigationPropertyRestriction in OData-VocCap) and the client does not specify an If-Match request header in a Data Modification Request or in an Action Request invoking an action bound to the resource, the service responds with a 428 Precondition Required and MUST ensure that no observable change occurs as a result of the request.

    If present, the request MUST only be processed if the specified ETag value matches the current ETag value of the target resource. Services sending ETag headers with weak ETags that only depend on the representation-independent entity state MUST use the weak comparison function because it is sufficient to prevent accidental overwrites. This is a deviation from RFC7232.

    If the value does not match the current ETag value of the resource for a Data Modification Request or Action Request, the service MUST respond with 412 Precondition Failed and MUST ensure that no observable change occurs as a result of the request. In the case of an upsert, if the addressed entity does not exist the provided ETag value is considered not to match.

    An If-Match header with a value of * in a PUT or PATCH request results in an upsert request being processed as an update and not an insert.

    @@ -809,14 +809,14 @@

    RFC7240.

    In OData, return=representation or return=minimal is defined for use with a POST, PUT, or PATCH Data Modification Request, or with an Action Request. Specifying a preference of return=representation or return=minimal in a GET or DELETE request does not have any effect.

    A preference of return=representation or return=minimal is allowed on an individual Data Modification Request or Action Request within a batch, subject to the same restrictions, but SHOULD return a 4xx Client Error if specified on the batch request itself.

    -

    A preference of return=minimal requests that the service invoke the request but does not return content in the response. The service MAY apply this preference by returning 204 No Content in which case it MAY include a Preference-Applied response header containing the return=minimal preference.

    +

    A preference of return=minimal requests that the service invoke the request but does not return content in the response. The service MAY apply this preference by returning 204 No Content in which case it MAY include a Preference-Applied response header containing the return=minimal preference.

    A preference of return=representation requests that the service invokes the request and returns the modified resource. The service MAY apply this preference by returning the representation of the successfully modified resource in the body of the response, formatted according to the rules specified for the requested format. In this case the service MAY include a Preference-Applied response header containing the return=representation preference.

    The return preference SHOULD NOT be applied to a batch request, but MAY be applied to individual requests within a batch.

    8.2.8.8 Preference respond-async

    The respond-async preference, as defined in RFC7240, allows clients to request that the service process the request asynchronously.

    If the client has specified respond-async in the request, the service MAY process the request asynchronously and return a 202 Accepted response.

    The respond-async preference MAY be used for batch requests, in which case it applies to the batch request as a whole and not to individual requests within the batch request.

    -

    In the case that the service applies the respond-async preference it MUST include a Preference-Applied response header containing the respond-async preference.

    +

    In the case that the service applies the respond-async preference it MUST include a Preference-Applied response header containing the respond-async preference.

    A service MAY specify the support for the respond-async preference using an annotation with term Capabilities.AsynchronousRequestsSupported, see OData-VocCap.

    Example 9: a service receiving the following header might choose to respond

    @@ -1685,7 +1685,7 @@

    11.3 Requesting Changes

    Services advertise their change-tracking capabilities by annotating entity sets with the Capabilities.ChangeTracking term defined in OData-VocCap.

    Any GET request to retrieve one or more entities MAY allow change-tracking.

    -

    Clients request that the service track changes to a result by specifying the track-changes preference on a request. If supported for the request, the service includes a Preference-Applied header in the response containing the track-changes preference and includes a delta link in a result for a single entity, and on the last page of results for a collection of entities in place of the next link.

    +

    Clients request that the service track changes to a result by specifying the track-changes preference on a request. If supported for the request, the service includes a Preference-Applied header in the response containing the track-changes preference and includes a delta link in a result for a single entity, and on the last page of results for a collection of entities in place of the next link.

    Delta links are opaque, service-generated links that the client uses to retrieve subsequent changes to a result.

    Delta links are based on a defining query that describes the set of results for which changes are being tracked; for example, the request that generated the results containing the delta link. The delta link encodes the collection of entities for which changes are being tracked, along with a starting point from which to track changes. OData services may use the reserved system query option $deltatoken when building delta links. Its content is opaque, service-specific, and must only follow the rules for URL query parts.

    @@ -1717,7 +1717,7 @@

    11.4.1.1 Use of ETags for Avoiding Update Conflicts

    Each entity has its own ETag value that MUST change when structural properties or links from that entity have changed. In addition, modifying, adding, or deleting a contained entity MAY change the ETag of the parent entity.

    Collections of entities (including collections of related entities) MAY have their own ETag value whose semantics is service-specific. It typically changes if entities are added to or removed from the collection, or if an entity in the collection is changed. The ETag of a collection of related entities reached via a navigation property MAY differ from the ETag of the entity containing the navigation property.

    -

    A Data Modification Request on an existing resource or an Action Request invoking an action bound to an existing resource MAY require optimistic concurrency control. Services SHOULD announce this via annotations with the terms Core.OptimisticConcurrency in OData-VocCore and Capabilities.NavigationRestrictions (nested property OptimisticConcurrencyControl) in OData-VocCap.

    +

    A Data Modification Request on an existing resource or an Action Request invoking an action bound to an existing resource MAY require optimistic concurrency control. Services SHOULD announce this via annotations with the terms Core.OptimisticConcurrency in OData-VocCore and Capabilities.NavigationRestrictions (nested property OptimisticConcurrencyControl) in OData-VocCap.

    If optimistic concurrency control is required for a resource, the service MUST include an ETag header in a response to a GET request to the resource, and MAY include the ETag in a format-specific manner in responses containing that resource.

    The presence of an ETag header in a response does not imply in itself that the resource requires optimistic concurrency control; the ETag may just be used for caching and/or conditional GET requests.

    If an ETag value is specified in an If-Match or If-None-Match header of a Data Modification Request or Action Request, the operation MUST only be invoked if the If-Match or If-None-Match condition is satisfied.

    @@ -2120,7 +2120,7 @@

    11.5.4 FunctionsFunctions are operations exposed by an OData service that MUST return data and MUST have no observable side effects.

    11.5.4.1 Invoking a Function

    To invoke a function bound to a resource, the client issues a GET request to a function URL. A function URL may be obtained from a previously returned entity representation or constructed by appending the namespace- or alias-qualified function name to a URL that identifies a resource whose type is the same as, or derived from, the type of the binding parameter of the function. The value for the binding parameter is the value of the resource identified by the URL prior to appending the function name, and additional parameter values are specified using inline parameter syntax. If the function URL is obtained from a previously returned entity representation, parameter aliases that are identical to the parameter name preceded by an at (@) sign MUST be used. Clients MUST check if the obtained URL already contains a query part and appropriately precede the parameters either with an ampersand (&) or a question mark (?).

    -

    Services MAY additionally support invoking functions using the unqualified function name by defining one or more default namespaces through the Core.DefaultNamespace term defined in  OData-VocCore.

    +

    Services MAY additionally support invoking functions using the unqualified function name by defining one or more default namespaces through the Core.DefaultNamespace term defined in  OData-VocCore.

    Functions can be used within $filter or $orderby system query options. Such functions can be bound to a resource, as described above, or called directly by specifying the namespace- (or alias-) qualified function name. Parameter values for functions within $filter or $orderby are specified according to the inline parameter syntax.

    To invoke a function through a function import the client issues a GET request to a URL identifying the function import and passing parameter values using inline parameter syntax. The canonical URL for a function import is the service root, followed by the name of the function import. Services MAY support omitting the parentheses when invoking a function import with no parameters, but for maximum interoperability MUST also support invoking the function import with empty parentheses.

    If the function is composable, additional path segments may be appended to the URL that identifies the composable function (or function import) as appropriate for the type returned by the function (or function import). The last path segment determines the system query options and HTTP verbs that can be used with this this URL, e.g. if the last path segment is a multi-valued navigation property, a POST request may be used to create a new entity in the identified collection.

    @@ -2158,7 +2158,7 @@

    Core.OptionalParameter defined in OData-VocCore MAY be omitted. If it is annotated and the annotation specifies a DefaultValue, the omitted parameter is interpreted as having that default value. If omitted and the annotation does not specify a default value, the service is free on how to interpret the omitted parameter.

    +

    Non-binding parameters annotated with the term Core.OptionalParameter defined in OData-VocCore MAY be omitted. If it is annotated and the annotation specifies a DefaultValue, the omitted parameter is interpreted as having that default value. If omitted and the annotation does not specify a default value, the service is free on how to interpret the omitted parameter.

    11.5.4.2 Function overload resolution

    The same function name may be used multiple times within a schema, each with a different set of parameters. For unbound overloads the combination of the function name and the unordered set of parameter names MUST identify a particular function overload. For bound overloads the combination of the function name, the binding parameter type, and the unordered set of names of the non-binding parameters MUST identify a particular function overload.

    All unbound overloads MUST have the same return type. Also, all bound overloads with a given binding parameter type MUST have the same return type.

    @@ -2171,12 +2171,12 @@

    Services SHOULD avoid ambiguity, i.e. the combination of the function name, the unordered set of non-optional non-binding parameter names, plus the binding parameter type for bound overloads SHOULD identify a particular function overload. If there is ambiguity, then services MAY return 400 Bad Request with an error response body stating that the request was ambiguous.

    11.5.5 Actions

    -

    Actions are operations exposed by an OData service that MAY have side effects when invoked. Actions MAY return data but MUST NOT be further composed with additional path segments.

    +

    Actions are operations exposed by an OData service that MAY have side effects when invoked. Actions MAY return data but MUST NOT be further composed with additional path segments.

    11.5.5.1 Invoking an Action

    To invoke an action bound to a resource, the client issues a POST request to an action URL. An action URL may be obtained from a previously returned entity representation or constructed by appending the namespace- or alias-qualified action name to a URL that identifies a resource whose type is the same as, or derives from, the type of the binding parameter of the action. The value for the binding parameter is the resource identified by the URL preceding the action name, and only the non-binding parameter values are passed in the request body according to the particular format.

    -

    Services MAY additionally support invoking actions using the unqualified action name by defining one or more default namespaces through the Core.DefaultNamespace term defined in  OData-VocCore.

    +

    Services MAY additionally support invoking actions using the unqualified action name by defining one or more default namespaces through the Core.DefaultNamespace term defined in  OData-VocCore.

    To invoke an action through an action import, the client issues a POST request to a URL identifying the action import. The canonical URL for an action import is the service root, followed by the name of the action import. When invoking an action through an action import all parameter values MUST be passed in the request body according to the particular format.

    -

    Non-binding parameters that are nullable or annotated with the term Core.OptionalParameter defined in OData-VocCore MAY be omitted from the request body. If an omitted parameter is not annotated (and thus nullable), it MUST be interpreted as having the null value. If it is annotated and the annotation specifies a DefaultValue, the omitted parameter is interpreted as having that default value. If omitted and the annotation does not specify a default value, the service is free on how to interpret the omitted parameter. Note: a nullable non-binding parameter is equivalent to being annotated as optional with a default value of null.

    +

    Non-binding parameters that are nullable or annotated with the term Core.OptionalParameter defined in OData-VocCore MAY be omitted from the request body. If an omitted parameter is not annotated (and thus nullable), it MUST be interpreted as having the null value. If it is annotated and the annotation specifies a DefaultValue, the omitted parameter is interpreted as having that default value. If omitted and the annotation does not specify a default value, the service is free on how to interpret the omitted parameter. Note: a nullable non-binding parameter is equivalent to being annotated as optional with a default value of null.

    4.01 services MUST support invoking actions with no non-binding parameters and parameterless action imports both without a request body and with a request body representing no parameters, according to the particular format. Interoperable clients SHOULD always include a request body, even when invoking actions with no non-binding parameters and parameterless action imports.

    If the action returns results, the client SHOULD use content type negotiation to request the results in the desired format, otherwise the default content type will be used.

    The client can request whether any results from the action be returned using the return Prefer header.

    @@ -2252,7 +2252,7 @@

    11.7.4 Referencing Returned Entities

    Entities created by an insert request can be referenced in the request URL of subsequent requests by using the request identifier prefixed with a $ character as the first segment of the request URL. If the Location header in the response contains a relative URL, clients MUST be able to resolve it relative to the request's URL even if that contains such a reference.

    -

    If the $-prefixed request identifier is identical to the name of a top-level system resource ($batch, $crossjoin, $all, $entity, $root, $id, $metadata, or other system resources defined according to the OData-Version of the protocol specified in the request), then the reference to the top-level system resource is used. This collision can be avoided by e.g. using only numeric request identifiers.

    +

    If the $-prefixed request identifier is identical to the name of a top-level system resource ($batch, $crossjoin, $all, $entity, $root, $id, $metadata, or other system resources defined according to the OData-Version of the protocol specified in the request), then the reference to the top-level system resource is used. This collision can be avoided by e.g. using only numeric request identifiers.

    Services MAY also support referencing within request bodies, in which case they SHOULD advertise this support by specifying the ReferencesInRequestBodiesSupported property in the Capabilities.BatchSupport term applied to the entity container, see OData-VocCap.

    11.7.5 Referencing the ETag of an Entity

    Services MAY support the use of an ETag returned from a previous operation in an If-Match or If-None-Match header of a subsequent statement. Services SHOULD advertise this support by specifying the EtagReferencesSupported property in the Capabilities.BatchSupport annotation term applied to the entity container, see OData-VocCap.

    @@ -2666,13 +2666,13 @@

    OData-URL)
  • MUST support the $skip system query option (section 11.2.6.4)
  • MUST support the $count system query option (section 11.2.6.5)
  • -
  • MUST support $orderby asc and desc on individual properties (section 11.2.6.2)
  • +
  • MUST support $orderby with asc and desc on individual properties (section 11.2.6.2)
  • MUST support $expand (section 11.2.5.2)
    1. MUST support returning references for expanded properties
    2. MUST support $filter on expanded collection-valued properties
    3. MUST support cast segment in expand with derived types
    4. -
    5. SHOULD support $orderby asc and desc on expanded collection-valued properties
    6. +
    7. SHOULD support $orderby with asc and desc on expanded collection-valued properties
    8. SHOULD support $count on expanded collection-valued properties
    9. SHOULD support $top and $skip on expanded collection-valued properties
    10. SHOULD support $search on expanded collection-valued properties
    11. @@ -2748,7 +2748,7 @@

      OData 4.01 Minimal Conformance Level
    12. MUST conform to the OData 4.0 Intermediate Conformance Level
    13. MUST support eq/ne null comparison for navigation properties with a maximum cardinality of one
    14. -
    15. MUST support the in operator
    16. +
    17. MUST support the in operator
    18. MUST support the $select option nested within $select
    19. SHOULD support the count of a filtered collection in a common expression
    20. SHOULD support equal and non-equal structural comparison
    21. @@ -2767,7 +2767,7 @@

    22. MUST support $filter on selected collection-valued properties
    23. -
    24. SHOULD support $orderby asc and desc on selected collection-valued properties
    25. +
    26. SHOULD support $orderby with asc and desc on selected collection-valued properties
    27. SHOULD support the $count on selected collection-valued properties
    28. SHOULD support $top and $skip on selected collection-valued properties
    29. SHOULD support $search on selected collection-valued properties
    30. diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index 665d7b4e1..e19e97d36 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -1045,7 +1045,7 @@ As defined in [RFC7232](#rfc7232), a client MAY include an value previously retrieved for the resource, or `*` to match any value. If an operation on an existing resource requires an ETag, (see term -[`Core.OptimisticConcurrency`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptimisticConcurrency)` `in +[`Core.OptimisticConcurrency`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptimisticConcurrency) in [OData-VocCore](#ODataVocCore) and property `OptimisticConcurrencyControl` of type [`Capabilities.NavigationPropertyRestriction`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Capabilities.V1.md#NavigationPropertyRestriction) @@ -1517,7 +1517,7 @@ A preference of `return=minimal` requests that the service invoke the request but does not return content in the response. The service MAY apply this preference by returning [`204 No Content`](#ResponseCode204NoContent) in which case it MAY -include a [`Preference-Applied`](#HeaderPreferenceApplied)` `response +include a [`Preference-Applied`](#HeaderPreferenceApplied) response header containing the `return=minimal `preference. A preference of `return=representation` requests that the service @@ -1548,7 +1548,7 @@ requests within the batch request. In the case that the service applies the `respond-async` preference it MUST include a -[`Preference-Applied`](#HeaderPreferenceApplied)` `response header +[`Preference-Applied`](#HeaderPreferenceApplied) response header containing the `respond-async` preference. A service MAY specify the support for the `respond-async` preference @@ -3818,7 +3818,7 @@ change-tracking. Clients request that the service track changes to a result by specifying the [`track-changes`](#Preferencetrackchangesodatatrackchanges) preference on a request. If supported for the request, the service includes a -[`Preference-Applied`](#HeaderPreferenceApplied)` `header in the +[`Preference-Applied`](#HeaderPreferenceApplied) header in the response containing the `track-changes` preference and includes a *delta link* in a result for a single entity, and on the last page of results for a collection of entities in place of the next link. @@ -3981,7 +3981,7 @@ A [Data Modification Request](#DataModification) on an existing resource or an [Action Request](#Actions) invoking an action bound to an existing resource MAY require optimistic concurrency control. Services SHOULD announce this via annotations with the terms -[`Core.OptimisticConcurrency`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptimisticConcurrency)` `in +[`Core.OptimisticConcurrency`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptimisticConcurrency) in [OData-VocCore](#ODataVocCore) and [`Capabilities.NavigationRestrictions`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Capabilities.V1.md#NavigationRestrictions) (nested property `OptimisticConcurrencyControl`) in @@ -5276,7 +5276,7 @@ ampersand (`&`) or a question mark (`?`). Services MAY additionally support invoking functions using the unqualified function name by defining one or more [default namespaces](#DefaultNamespaces) through the -[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace)` `term +[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace) term defined in  [OData-VocCore](#ODataVocCore). Functions can be used within [`$filter`](#SystemQueryOptionfilter) or @@ -5406,7 +5406,7 @@ GET http://host/service/EmployeesByManager?ManagerID=3 ::: Non-binding parameters annotated with the term -[`Core.OptionalParameter`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptionalParameter)` `defined +[`Core.OptionalParameter`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptionalParameter) defined in [OData-VocCore](#ODataVocCore) MAY be omitted. If it is annotated and the annotation specifies a `DefaultValue`, the omitted parameter is interpreted as having that default value. If omitted and the annotation @@ -5456,7 +5456,7 @@ request was ambiguous. ###
      11.5.5 Actions Actions are operations exposed by an OData service that MAY have side -effects when invoked. Actions MAY return data but` `MUST NOT be further +effects when invoked. Actions MAY return data but MUST NOT be further composed with additional path segments. #### 11.5.5.1 Invoking an Action @@ -5475,7 +5475,7 @@ according to the particular format. Services MAY additionally support invoking actions using the unqualified action name by defining one or more [default namespaces](#DefaultNamespaces) through the -[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace)` `term +[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace) term defined in  [OData-VocCore](#ODataVocCore). To invoke an action through an action import, the client issues a `POST` @@ -5486,7 +5486,7 @@ values MUST be passed in the request body according to the particular format. Non-binding parameters that are nullable or annotated with the term -[`Core.OptionalParameter`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptionalParameter)` `defined +[`Core.OptionalParameter`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptionalParameter) defined in [OData-VocCore](#ODataVocCore) MAY be omitted from the request body. If an omitted parameter is not annotated (and thus nullable), it MUST be interpreted as having the `null` value. If it is annotated and the @@ -5748,7 +5748,7 @@ clients MUST be able to resolve it relative to the request's URL even if that contains such a reference. If the `$`-prefixed request identifier is identical to the name of a -top-level system resource (`$batch`, `$crossjoin,` `$all,` `$entity`, +top-level system resource (`$batch`, `$crossjoin`, `$all`, `$entity`, `$root`, `$id`, `$metadata`, or other system resources defined according to the [`OData-Version`](#HeaderODataVersion) of the protocol specified in the request), then the reference to the top-level system resource is @@ -6440,13 +6440,13 @@ collection-valued properties (section 5.1.1.10 in [OData-URL](#ODataURL)) 6. MUST support the `$skip` system query option ([section 11.2.6.4](#SystemQueryOptionskip)) 7. MUST support the `$count` system query option ([section 11.2.6.5](#SystemQueryOptioncount)) -8. MUST support `$orderby` `asc` and `desc` on individual properties +8. MUST support `$orderby` with `asc` and `desc` on individual properties ([section 11.2.6.2](#SystemQueryOptionorderby)) 9. MUST support `$expand` ([section 11.2.5.2](#SystemQueryOptionexpand)) 1. MUST support returning references for expanded properties 2. MUST support `$filter` on expanded collection-valued properties 3. MUST support cast segment in expand with derived types - 4. SHOULD support `$orderby` `asc` and `desc` on expanded + 4. SHOULD support `$orderby` with `asc` and `desc` on expanded collection-valued properties 5. SHOULD support `$count` on expanded collection-valued properties 6. SHOULD support `$top` and `$skip` on expanded collection-valued @@ -6574,7 +6574,7 @@ Level](#OData401MinimalConformanceLevel) Level](#OData40IntermediateConformanceLevel) 3. MUST support `eq/ne null` comparison for navigation properties with a maximum cardinality of one -4. MUST support the [`in`](#BuiltinFilterOperations)` `operator +4. MUST support the [`in`](#BuiltinFilterOperations) operator 5. MUST support the `$select` option nested within `$select` 6. SHOULD support the count of a filtered collection in a common expression @@ -6599,7 +6599,7 @@ expression 4. MUST support `$compute` system query option 5. MUST support nested options in `$select` 1. MUST support `$filter` on selected collection-valued properties - 2. SHOULD support `$orderby` `asc` and `desc` on selected + 2. SHOULD support `$orderby` with `asc` and `desc` on selected collection-valued properties 3. SHOULD support the `$count` on selected collection-valued properties diff --git a/docs/odata-url-conventions/odata-url-conventions.html b/docs/odata-url-conventions/odata-url-conventions.html index 64222437b..bc10c47c6 100644 --- a/docs/odata-url-conventions/odata-url-conventions.html +++ b/docs/odata-url-conventions/odata-url-conventions.html @@ -678,7 +678,7 @@

      4.5 Addressing Operations

      The semantic rules for addressing and invoking actions and functions are defined in the OData-Protocol document.

      -

      Services MAY additionally support the use of the unqualified name of an action or function in a URL by defining one or more default namespaces through the Core.DefaultNamespace term defined in OData-VocCore. For more information on default namespaces, see Default Namespaces in OData-Protocol.

      +

      Services MAY additionally support the use of the unqualified name of an action or function in a URL by defining one or more default namespaces through the Core.DefaultNamespace term defined in OData-VocCore. For more information on default namespaces, see Default Namespaces in OData-Protocol.

      4.5.1 Addressing Actions

      The grammar for addressing and invoking actions is defined by the following syntax grammar rules in OData-ABNF:

        @@ -798,7 +798,7 @@

        4.15 Addressing the Cross Join of Entity Sets

        In addition to querying related entities through navigation properties defined in the entity model of a service, the cross join operator allows querying across unrelated entity sets.

        The cross join is addressed by appending the path segment $crossjoin to the service root URL, followed by the parenthesized comma-separated list of joined entity sets. It returns the Cartesian product of all the specified entity sets, represented as a collection of instances of a virtual complex type. Each instance consists of one non-nullable, single-valued navigation property per joined entity set. Each such navigation property is named identical to the corresponding entity set, with a target type equal to the declared entity type of the corresponding entity set.

        -

        The $filter and $orderby query options can be specified using properties of the entities in the selected entity sets, prepended with the entity set as the navigation property name.

        +

        The $filter and $orderby query options can be specified using properties of the entities in the selected entity sets, prepended with the entity set as the navigation property name.

        The $expand query option can be specified using the names of the selected entity sets as navigation property names. If a selected entity set is not expanded, it MUST be represented using the read URL of the related entity as a navigation link in the complex type instance.

        The $count, $skip, and $top query options can also be used with no special semantics.

        -

        Services MAY additionally support the use of the unqualified term name by defining one or more default namespaces through the Core.DefaultNamespace annotation term defined in OData-VocCore. For more information on default namespaces, see Default Namespaces in OData-Protocol. This short notation however uses the same name pattern as parameter aliases. If a query option is specified as a parameter alias, then any occurrence of the parameter alias name in an expression MUST evaluate to the parameter alias value and MUST NOT evaluate to the annotation value of an identical unqualified term name.

        +

        Services MAY additionally support the use of the unqualified term name by defining one or more default namespaces through the Core.DefaultNamespace annotation term defined in OData-VocCore. For more information on default namespaces, see Default Namespaces in OData-Protocol. This short notation however uses the same name pattern as parameter aliases. If a query option is specified as a parameter alias, then any occurrence of the parameter alias name in an expression MUST evaluate to the parameter alias value and MUST NOT evaluate to the annotation value of an identical unqualified term name.

        5.1.1.17 Operator Precedence

        OData services MUST use the following operator precedence for supported operators when evaluating $filter and $orderby expressions. Operators are listed by category in order of precedence from highest to lowest. Operators in the same category have equal precedence:

        diff --git a/docs/odata-url-conventions/odata-url-conventions.md b/docs/odata-url-conventions/odata-url-conventions.md index 8ea6a3eb4..521e0ab8b 100644 --- a/docs/odata-url-conventions/odata-url-conventions.md +++ b/docs/odata-url-conventions/odata-url-conventions.md @@ -925,7 +925,7 @@ defined in the [OData-Protocol](#ODataProtocol) document. Services MAY additionally support the use of the unqualified name of an action or function in a URL by defining one or more default namespaces through the -[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace)` `term +[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace) term defined in [OData-VocCore](#ODataVocCore). For more information on default namespaces, see Default Namespaces in [OData-Protocol](#ODataProtocol). @@ -1285,7 +1285,7 @@ the corresponding entity set, with a target type equal to the declared entity type of the corresponding entity set. The [`$filter`](#SystemQueryOptionfilter) and -[`$orderby`](#SystemQueryOptionorderby)` `query options can be specified +[`$orderby`](#SystemQueryOptionorderby) query options can be specified using properties of the entities in the selected entity sets, prepended with the entity set as the navigation property name. @@ -1771,7 +1771,7 @@ or `variable` if any operand has variable scale. The `sub` operator is also valid for the following time-related operands: -- `DateTimeOffset` `sub` `Duration` +- `DateTimeOffset sub Duration` results in a `DateTimeOffset` - `Duration sub Duration` results in a `Duration` @@ -3187,7 +3187,7 @@ http://host/service/Employees?$filter=@Core.Messages/any(m:m/severity eq 'error' Services MAY additionally support the use of the unqualified term name by defining one or more default namespaces through the -[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace)` `annotation +[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace) annotation term defined in [OData-VocCore](#ODataVocCore). For more information on default namespaces, see Default Namespaces in [OData-Protocol](#ODataProtocol). This short notation however uses the same name pattern as parameter diff --git a/odata-json-format/19 Batch Requests and Responses.md b/odata-json-format/19 Batch Requests and Responses.md index 00944e295..359d3443c 100644 --- a/odata-json-format/19 Batch Requests and Responses.md +++ b/odata-json-format/19 Batch Requests and Responses.md @@ -39,7 +39,7 @@ batch request URL, or a relative path (not starting with a forward slash `/`). If the first segment of a relative path starts with a `$` character and is not identical to the name of a top-level system -resource (`$batch`, `$crossjoin,` `$all,` `$entity`, `$root,` +resource (`$batch`, `$crossjoin`, `$all`, `$entity`, `$root`, `$id`, `$metadata`, or other system resources defined according to the `OData-Version` of the protocol specified in the request), then this first segment is replaced with the diff --git a/odata-json-format/4 Common Characteristics.md b/odata-json-format/4 Common Characteristics.md index 2461e5c64..73d22defa 100644 --- a/odata-json-format/4 Common Characteristics.md +++ b/odata-json-format/4 Common Characteristics.md @@ -341,10 +341,8 @@ metadata document of the same service with a dynamic property of type ::: ::: example -Example ##ex: entity of type -`Model.VipCustomer` defined in the -metadata` `document of a different -service +Example ##ex: entity of type `Model.VipCustomer` defined in the +metadata document of a different service ```json { "@context": "http://host/service/$metadata#Customers/$entity", diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index 076c5b512..3c513c250 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -1292,7 +1292,7 @@ change-tracking. Clients request that the service track changes to a result by specifying the [`track-changes`](#Preferencetrackchangesodatatrackchanges) preference on a request. If supported for the request, the service includes a -[`Preference-Applied`](#HeaderPreferenceApplied)` `header in the +[`Preference-Applied`](#HeaderPreferenceApplied) header in the response containing the `track-changes` preference and includes a *delta link* in a result for a single entity, and on the last page of results for a collection of entities in place of the next link. diff --git a/odata-protocol/11.4 Data Modification.md b/odata-protocol/11.4 Data Modification.md index f6216345f..766be833e 100644 --- a/odata-protocol/11.4 Data Modification.md +++ b/odata-protocol/11.4 Data Modification.md @@ -34,7 +34,7 @@ A [Data Modification Request](#DataModification) on an existing resource or an [Action Request](#Actions) invoking an action bound to an existing resource MAY require optimistic concurrency control. Services SHOULD announce this via annotations with the terms -[`Core.OptimisticConcurrency`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptimisticConcurrency)` `in +[`Core.OptimisticConcurrency`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptimisticConcurrency) in [OData-VocCore](#ODataVocCore) and [`Capabilities.NavigationRestrictions`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Capabilities.V1.md#NavigationRestrictions) (nested property `OptimisticConcurrencyControl`) in diff --git a/odata-protocol/11.5 Operations.md b/odata-protocol/11.5 Operations.md index f8c619ec5..82d15fe15 100644 --- a/odata-protocol/11.5 Operations.md +++ b/odata-protocol/11.5 Operations.md @@ -169,7 +169,7 @@ ampersand (`&`) or a question mark (`?`). Services MAY additionally support invoking functions using the unqualified function name by defining one or more [default namespaces](#DefaultNamespaces) through the -[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace)` `term +[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace) term defined in  [OData-VocCore](#ODataVocCore). Functions can be used within [`$filter`](#SystemQueryOptionfilter) or @@ -299,7 +299,7 @@ GET http://host/service/EmployeesByManager?ManagerID=3 ::: Non-binding parameters annotated with the term -[`Core.OptionalParameter`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptionalParameter)` `defined +[`Core.OptionalParameter`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptionalParameter) defined in [OData-VocCore](#ODataVocCore) MAY be omitted. If it is annotated and the annotation specifies a `DefaultValue`, the omitted parameter is interpreted as having that default value. If omitted and the annotation @@ -349,7 +349,7 @@ request was ambiguous. ### ##subsubsec Actions Actions are operations exposed by an OData service that MAY have side -effects when invoked. Actions MAY return data but` `MUST NOT be further +effects when invoked. Actions MAY return data but MUST NOT be further composed with additional path segments. #### ##subsubsubsec Invoking an Action @@ -368,7 +368,7 @@ according to the particular format. Services MAY additionally support invoking actions using the unqualified action name by defining one or more [default namespaces](#DefaultNamespaces) through the -[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace)` `term +[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace) term defined in  [OData-VocCore](#ODataVocCore). To invoke an action through an action import, the client issues a `POST` @@ -379,7 +379,7 @@ values MUST be passed in the request body according to the particular format. Non-binding parameters that are nullable or annotated with the term -[`Core.OptionalParameter`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptionalParameter)` `defined +[`Core.OptionalParameter`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptionalParameter) defined in [OData-VocCore](#ODataVocCore) MAY be omitted from the request body. If an omitted parameter is not annotated (and thus nullable), it MUST be interpreted as having the `null` value. If it is annotated and the diff --git a/odata-protocol/11.7 Batch Requests.md b/odata-protocol/11.7 Batch Requests.md index 6ceb42e4b..b796e702c 100644 --- a/odata-protocol/11.7 Batch Requests.md +++ b/odata-protocol/11.7 Batch Requests.md @@ -110,7 +110,7 @@ clients MUST be able to resolve it relative to the request's URL even if that contains such a reference. If the `$`-prefixed request identifier is identical to the name of a -top-level system resource (`$batch`, `$crossjoin,` `$all,` `$entity`, +top-level system resource (`$batch`, `$crossjoin`, `$all`, `$entity`, `$root`, `$id`, `$metadata`, or other system resources defined according to the [`OData-Version`](#HeaderODataVersion) of the protocol specified in the request), then the reference to the top-level system resource is diff --git a/odata-protocol/12 Conformance.md b/odata-protocol/12 Conformance.md index df016cd9e..bceb51a95 100644 --- a/odata-protocol/12 Conformance.md +++ b/odata-protocol/12 Conformance.md @@ -180,13 +180,13 @@ collection-valued properties (section 5.1.1.10 in [OData-URL](#ODataURL)) 6. MUST support the `$skip` system query option ([section ##SystemQueryOptionskip]) 7. MUST support the `$count` system query option ([section ##SystemQueryOptioncount]) -8. MUST support `$orderby` `asc` and `desc` on individual properties +8. MUST support `$orderby` with `asc` and `desc` on individual properties ([section ##SystemQueryOptionorderby]) 9. MUST support `$expand` ([section ##SystemQueryOptionexpand]) 1. MUST support returning references for expanded properties 2. MUST support `$filter` on expanded collection-valued properties 3. MUST support cast segment in expand with derived types - 4. SHOULD support `$orderby` `asc` and `desc` on expanded + 4. SHOULD support `$orderby` with `asc` and `desc` on expanded collection-valued properties 5. SHOULD support `$count` on expanded collection-valued properties 6. SHOULD support `$top` and `$skip` on expanded collection-valued @@ -315,7 +315,7 @@ Level](#OData401MinimalConformanceLevel) Level](#OData40IntermediateConformanceLevel) 3. MUST support `eq/ne null` comparison for navigation properties with a maximum cardinality of one -4. MUST support the [`in`](#BuiltinFilterOperations)` `operator +4. MUST support the [`in`](#BuiltinFilterOperations) operator 5. MUST support the `$select` option nested within `$select` 6. SHOULD support the count of a filtered collection in a common expression @@ -340,7 +340,7 @@ expression 4. MUST support `$compute` system query option 5. MUST support nested options in `$select` 1. MUST support `$filter` on selected collection-valued properties - 2. SHOULD support `$orderby` `asc` and `desc` on selected + 2. SHOULD support `$orderby` with `asc` and `desc` on selected collection-valued properties 3. SHOULD support the `$count` on selected collection-valued properties diff --git a/odata-protocol/8 Header Fields.md b/odata-protocol/8 Header Fields.md index 76d79daa8..58ec55898 100644 --- a/odata-protocol/8 Header Fields.md +++ b/odata-protocol/8 Header Fields.md @@ -167,7 +167,7 @@ As defined in [RFC7232](#rfc7232), a client MAY include an value previously retrieved for the resource, or `*` to match any value. If an operation on an existing resource requires an ETag, (see term -[`Core.OptimisticConcurrency`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptimisticConcurrency)` `in +[`Core.OptimisticConcurrency`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#OptimisticConcurrency) in [OData-VocCore](#ODataVocCore) and property `OptimisticConcurrencyControl` of type [`Capabilities.NavigationPropertyRestriction`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Capabilities.V1.md#NavigationPropertyRestriction) @@ -642,7 +642,7 @@ A preference of `return=minimal` requests that the service invoke the request but does not return content in the response. The service MAY apply this preference by returning [`204 No Content`](#ResponseCode204NoContent) in which case it MAY -include a [`Preference-Applied`](#HeaderPreferenceApplied)` `response +include a [`Preference-Applied`](#HeaderPreferenceApplied) response header containing the `return=minimal `preference. A preference of `return=representation` requests that the service @@ -673,7 +673,7 @@ requests within the batch request. In the case that the service applies the `respond-async` preference it MUST include a -[`Preference-Applied`](#HeaderPreferenceApplied)` `response header +[`Preference-Applied`](#HeaderPreferenceApplied) response header containing the `respond-async` preference. A service MAY specify the support for the `respond-async` preference diff --git a/odata-url-conventions/4 Resource Path.md b/odata-url-conventions/4 Resource Path.md index ff7a73a65..de5970e77 100644 --- a/odata-url-conventions/4 Resource Path.md +++ b/odata-url-conventions/4 Resource Path.md @@ -490,7 +490,7 @@ defined in the [OData-Protocol](#ODataProtocol) document. Services MAY additionally support the use of the unqualified name of an action or function in a URL by defining one or more default namespaces through the -[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace)` `term +[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace) term defined in [OData-VocCore](#ODataVocCore). For more information on default namespaces, see Default Namespaces in [OData-Protocol](#ODataProtocol). @@ -851,7 +851,7 @@ the corresponding entity set, with a target type equal to the declared entity type of the corresponding entity set. The [`$filter`](#SystemQueryOptionfilter) and -[`$orderby`](#SystemQueryOptionorderby)` `query options can be specified +[`$orderby`](#SystemQueryOptionorderby) query options can be specified using properties of the entities in the selected entity sets, prepended with the entity set as the navigation property name. diff --git a/odata-url-conventions/5 Query Options.md b/odata-url-conventions/5 Query Options.md index fa7224133..e11dc0fc4 100644 --- a/odata-url-conventions/5 Query Options.md +++ b/odata-url-conventions/5 Query Options.md @@ -377,7 +377,7 @@ or `variable` if any operand has variable scale. The `sub` operator is also valid for the following time-related operands: -- `DateTimeOffset` `sub` `Duration` +- `DateTimeOffset sub Duration` results in a `DateTimeOffset` - `Duration sub Duration` results in a `Duration` @@ -1793,7 +1793,7 @@ http://host/service/Employees?$filter=@Core.Messages/any(m:m/severity eq 'error' Services MAY additionally support the use of the unqualified term name by defining one or more default namespaces through the -[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace)` `annotation +[`Core.DefaultNamespace`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#DefaultNamespace) annotation term defined in [OData-VocCore](#ODataVocCore). For more information on default namespaces, see Default Namespaces in [OData-Protocol](#ODataProtocol). This short notation however uses the same name pattern as parameter From 01d02fa7b23a101263d15959cb217736403158a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Thu, 26 Oct 2023 14:16:41 +0200 Subject: [PATCH 57/74] Punctuation on the wrong side of the backtick (#200) --- docs/odata-csdl-json/odata-csdl-json.html | 2 +- docs/odata-csdl-json/odata-csdl-json.md | 2 +- docs/odata-csdl-xml/odata-csdl-xml.html | 4 ++-- docs/odata-csdl-xml/odata-csdl-xml.md | 6 +++--- docs/odata-json-format/odata-json-format.html | 4 ++-- docs/odata-json-format/odata-json-format.md | 4 ++-- docs/odata-protocol/odata-protocol.html | 14 +++++++------- docs/odata-protocol/odata-protocol.md | 14 +++++++------- .../odata-url-conventions.html | 6 +++--- .../odata-url-conventions/odata-url-conventions.md | 6 +++--- odata-csdl/14 Vocabulary and Annotation.md | 2 +- odata-csdl/4 CSDL Document.md | 4 ++-- odata-json-format/15 Delta Payload.md | 2 +- odata-json-format/4 Common Characteristics.md | 2 +- odata-protocol/11 Data Service Requests.md | 6 +++--- odata-protocol/11.4 Data Modification.md | 6 +++--- odata-protocol/11.7 Batch Requests.md | 2 +- odata-url-conventions/5 Query Options.md | 6 +++--- 18 files changed, 46 insertions(+), 46 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index fd9b8ee35..d73e47da3 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -3011,7 +3011,7 @@

        14.4.4.2 Function odata.fillUriTemplate

        -

        The odata.fillUriTemplate client-side function takes two or more expressions as arguments and returns a value of type Edm.String.

        +

        The odata.fillUriTemplate client-side function takes two or more expressions as arguments and returns a value of type Edm.String.

        The first argument MUST be of type Edm.String and specifies a URI template according to RFC6570, the other arguments MUST be labeled element expressions. Each labeled element expression specifies the template parameter name as its name and evaluates to the template parameter value.

        RFC6570 defines three kinds of template parameters: simple values, lists of values, and key-value maps.

        Simple values are represented as labeled element expressions that evaluate to a single primitive value. The literal representation of this value according to OData-ABNF is used to fill the corresponding template parameter.

        diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index ca66b44a0..c3c0540a2 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -4972,7 +4972,7 @@ the member name of the enumeration value. #### 14.4.4.2 Function `odata.fillUriTemplate` The `odata.fillUriTemplate` client-side function takes two or more -expressions as arguments and returns a value of type `Edm.String.` +expressions as arguments and returns a value of type `Edm.String`. The first argument MUST be of type `Edm.String` and specifies a URI template according to [RFC6570](#rfc6570), the other arguments MUST be diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 45c523bea..0d1b52af9 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -774,7 +774,7 @@

        The edmx:Edmx element is the root element of a CSDL XML document. It MUST contain the Version attribute and it MUST contain exactly one edmx:DataServices element.

        It MAY contain edmx:Reference elements to reference other CSDL documents.

        Attribute Version

        -

        The Version attribute specifies the OData protocol version of the service. For OData 4.0 responses the value of this attribute MUST be 4.0. For OData 4.01 responses the value of this attribute MUST be 4.01. Services MUST return an OData 4.0 response if the request was made with an OData-MaxVersion header with a value of 4.0.

        +

        The Version attribute specifies the OData protocol version of the service. For OData 4.0 responses the value of this attribute MUST be 4.0. For OData 4.01 responses the value of this attribute MUST be 4.01. Services MUST return an OData 4.0 response if the request was made with an OData-MaxVersion header with a value of 4.0.

        Element edmx:DataServices

        The edmx:DataServices element MUST contain one or more edm:Schema elements which define the schemas exposed by the OData service.

        @@ -2801,7 +2801,7 @@

        14.4.4.2 Function odata.fillUriTemplate

        -

        The odata.fillUriTemplate client-side function takes two or more expressions as arguments and returns a value of type Edm.String.

        +

        The odata.fillUriTemplate client-side function takes two or more expressions as arguments and returns a value of type Edm.String.

        The first argument MUST be of type Edm.String and specifies a URI template according to RFC6570, the other arguments MUST be labeled element expressions. Each labeled element expression specifies the template parameter name as its name and evaluates to the template parameter value.

        RFC6570 defines three kinds of template parameters: simple values, lists of values, and key-value maps.

        Simple values are represented as labeled element expressions that evaluate to a single primitive value. The literal representation of this value according to OData-ABNF is used to fill the corresponding template parameter.

        diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index 5f2bcead3..54781c677 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -852,8 +852,8 @@ other CSDL documents. The `Version` attribute specifies the OData protocol version of the service. For OData 4.0 responses the value of this attribute MUST be -`4.0.` For OData 4.01 responses the value of this attribute MUST be -`4.01.` Services MUST return an OData 4.0 response if the request was +`4.0`. For OData 4.01 responses the value of this attribute MUST be +`4.01`. Services MUST return an OData 4.0 response if the request was made with an `OData-MaxVersion `header with a value of `4.0`. ### Element `edmx:DataServices` @@ -4802,7 +4802,7 @@ the member name of the enumeration value. #### 14.4.4.2 Function `odata.fillUriTemplate` The `odata.fillUriTemplate` client-side function takes two or more -expressions as arguments and returns a value of type `Edm.String.` +expressions as arguments and returns a value of type `Edm.String`. The first argument MUST be of type `Edm.String` and specifies a URI template according to [RFC6570](#rfc6570), the other arguments MUST be diff --git a/docs/odata-json-format/odata-json-format.html b/docs/odata-json-format/odata-json-format.html index f78c08bfa..372c60dfe 100644 --- a/docs/odata-json-format/odata-json-format.html +++ b/docs/odata-json-format/odata-json-format.html @@ -416,7 +416,7 @@

        4.1 Header Content-Type

        Requests and responses with a JSON message body MUST have a Content-Type header value of application/json.

        -

        Requests MAY add the charset parameter to the content type. Allowed values are UTF-8, UTF-16, and UTF-32. If no charset parameter is present, UTF-8 MUST be assumed.

        +

        Requests MAY add the charset parameter to the content type. Allowed values are UTF-8, UTF-16, and UTF-32. If no charset parameter is present, UTF-8 MUST be assumed.

        Responses MUST include the metadata parameter to specify the amount of metadata included in the response.

        Requests and responses MUST include the IEEE754Compatible parameter if Edm.Int64 and Edm.Decimal numbers are represented as strings.

        Requests and responses MAY add the streaming parameter with a value of true or false, see section "Payload Ordering Constraints".

        @@ -1256,7 +1256,7 @@

        15.3 D

        In OData 4.01 payloads the deleted-entity object MUST include the following properties, regardless of the specified metadata value:

        • Control information removed, whose value is an object that MAY contain a property named reason. If present, the value of reason MUST be either deleted if the entity was deleted (destroyed), or changed if the entity was removed from membership in the result either due to change in value such that the entity no longer matches the defining query or because the entity was removed from the collection. The object MAY include annotations, and clients SHOULD NOT error due to the presence of additional properties that MAY be defined by future versions of this specification. For ordered payloads, the control information removed MUST immediately follow the context control information, if present, otherwise it MUST be the first property in the deleted entity.

        • -
        • Control information id or all of the entity's key fields. The id control information MUST appear if any of the entity's key fields are omitted from the response or the entity-id is not identical to the canonical URL of the entity. For ordered payloads, the control information id, if present, MUST immediately follow the control information removed.

        • +
        • Control information id or all of the entity's key fields. The id control information MUST appear if any of the entity's key fields are omitted from the response or the entity-id is not identical to the canonical URL of the entity. For ordered payloads, the control information id, if present, MUST immediately follow the control information removed.

        For full metadata the context control information MUST be included. It also MUST be included if the entity set of the deleted entity cannot be determined from the surrounding context.

        The deleted-entity object MAY include additional properties of the entity, as well as annotations, and MAY include related entities, related deleted entities, or a delta or full representation of a related collection of entities, to represent related entities that have been modified or deleted.

        diff --git a/docs/odata-json-format/odata-json-format.md b/docs/odata-json-format/odata-json-format.md index 7c4aad95d..539712cc3 100644 --- a/docs/odata-json-format/odata-json-format.md +++ b/docs/odata-json-format/odata-json-format.md @@ -551,7 +551,7 @@ Requests and responses with a JSON message body MUST have a `Content-Type` header value of `application/json`. Requests MAY add the `charset` parameter to the content type. -Allowed values are `UTF-8`,` UTF-16`, and +Allowed values are `UTF-8`, `UTF-16`, and `UTF-32`. If no `charset` parameter is present, `UTF-8` MUST be assumed. @@ -2383,7 +2383,7 @@ following properties, regardless of the specified from the response _or_ the entity-id is not identical to the canonical URL of the entity. For [ordered payloads](#PayloadOrderingConstraints), the control information - `id,` if present, MUST immediately follow the control + `id`, if present, MUST immediately follow the control information [`removed`](#ControlInformationremovedodataremoved). diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 9f32d72fb..0a5a90a4f 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1480,7 +1480,7 @@

        11.2.6.1.3 Parameter Aliases
        -

        Parameter aliases can be used in place of literal values in entity keys, function parameters, or within a $compute, $filter or $orderby expression. Parameters aliases are names beginning with an at sign (@).

        +

        Parameter aliases can be used in place of literal values in entity keys, function parameters, or within a $compute, $filter or $orderby expression. Parameters aliases are names beginning with an at sign (@).

        Actual parameter values are specified as query options in the query part of the request URL. The query option name is the name of the parameter alias, and the query option value is the value to be used for the specified parameter alias.

        Example 48: returns all employees whose Region property matches the string parameter value "WA"

        @@ -1673,7 +1673,7 @@

        GET http://host/service/Orders?$format=json

        is equivalent to a request with the Accept header set to application/json; it requests the set of Order entities represented using the JSON media type with minimal metadata, as defined in OData-JSON.

        -

        In metadata document requests, the values application/xml and application/json, along with their subtypes and parameterized variants, as well as the format-specific abbreviations xml and json, are reserved for this specification.

        +

        In metadata document requests, the values application/xml and application/json, along with their subtypes and parameterized variants, as well as the format-specific abbreviations xml and json, are reserved for this specification.

        11.2.12 System Query Option $schemaversion

        The $schemaversion system query option MAY be included in any request. For a metadata document request the value of the $schemaversion system query option addresses a specific schema version. For all other request types the value specifies the version of the schema against which the request is made. The syntax of the $schemaversion system query option is defined in OData-ABNF.

        The value of the $schemaversion system query option MUST be a version of the schema as returned in the Core.SchemaVersion annotation, defined in OData-VocCore, of a previous request to the metadata document, or * in order to specify the current version of the metadata.

        @@ -1683,7 +1683,7 @@

        404 Not Found. The response body SHOULD provide additional information.

        11.3 Requesting Changes

        -

        Services advertise their change-tracking capabilities by annotating entity sets with the Capabilities.ChangeTracking term defined in OData-VocCap.

        +

        Services advertise their change-tracking capabilities by annotating entity sets with the Capabilities.ChangeTracking term defined in OData-VocCap.

        Any GET request to retrieve one or more entities MAY allow change-tracking.

        Clients request that the service track changes to a result by specifying the track-changes preference on a request. If supported for the request, the service includes a Preference-Applied header in the response containing the track-changes preference and includes a delta link in a result for a single entity, and on the last page of results for a collection of entities in place of the next link.

        @@ -1810,16 +1810,16 @@
        - + @@ -552,7 +552,7 @@

        3.3

        - + @@ -564,7 +564,7 @@

        3.3

        - + @@ -635,7 +635,7 @@

        3.3

        Edm.Date and Edm.DateTimeOffset follow XML-Schema-2 and use the proleptic Gregorian calendar, allowing the year 0000 (equivalent to 1 BCE) and negative years (year -0001 being equivalent to 2 BCE etc.). The supported date range is service-specific and typically depends on the underlying persistency layer, e.g. SQL only supports years 0001 to 9999.

        Edm.Decimal with a Scale value of floating, Edm.Double, and Edm.Single allow the special numeric values -INF, INF, and NaN.

        Edm.Stream is a primitive type that can be used as a property of an entity type or complex type, the underlying type for a type definition, or the binding parameter or return type of an action or function. Edm.Stream, or a type definition whose underlying type is Edm.Stream, cannot be used in collections or for non-binding parameters to functions or actions.

        -

        Some of these types allow facets, defined in section "Type Facets".

        +

        Some of these types allow facets, defined in section “Type Facets”.

        See rule primitiveLiteral in OData-ABNF for the representation of primitive type values in URLs and OData-JSON for the representation in requests and responses.

        3.4 Type Facets

        The facets in the following subsections modify or constrain the acceptable values of primitive typed model elements, for example a structural property, action or function parameter, action or function return type, or term.

        @@ -650,7 +650,7 @@

        $MaxLengt

        Note: OData-CSDL-XML defines a symbolic value max that is only allowed in OData 4.0 responses. This symbolic value is not allowed in CDSL JSON documents at all. Services MAY instead specify the concrete maximum length supported for the type by the service or omit the member entirely.

        3.4.2 Precision

        -

        For a decimal value: the maximum number of significant decimal digits of the model element's value; it MUST be a positive integer.

        +

        For a decimal value: the maximum number of significant decimal digits of the model element’s value; it MUST be a positive integer.

        For a temporal value (datetime-with-timezone-offset, duration, or time-of-day): the number of decimal places allowed in the seconds portion of the value; it MUST be a non-negative integer between zero and twelve.

        Note: service authors SHOULD be aware that some clients are unable to support a precision greater than 28 for decimal values and 7 for temporal values. Client developers MUST be aware of the potential for data loss when round-tripping values of greater precision. Updating via PATCH and exclusively specifying modified values will reduce the risk for unintended data loss.

        Note: model elements with duration values and a granularity less than seconds (e.g. minutes, hours, days) can be annotated with term Measures.DurationGranularity, see OData-VocMeasures.

        @@ -742,7 +742,7 @@

        Path Expressions" for details.

        +

        as the type of a primitive term, or the type of a property of a complex type (recursively) that is exclusively used as the type of a term. See section “Path Expressions” for details.

        3.7 Annotations

        Many parts of the model can be decorated with additional information using annotations. Annotations are identified by their term name and an optional qualifier that allows applying the same term multiple times to the same model element.

        A model element MUST NOT specify more than one annotation for a given combination of term and qualifier.

        @@ -812,7 +812,7 @@

        4.1 Reference

        -

        A reference to an external CSDL document allows to bring part of the referenced document's content into the scope of the referencing document.

        +

        A reference to an external CSDL document allows to bring part of the referenced document’s content into the scope of the referencing document.

        A reference MUST specify a URI that uniquely identifies the referenced document, so two references MUST NOT specify the same URI. The URI SHOULD be a URL that locates the referenced document. If the URI is not dereferencable it SHOULD identify a well-known schema. The URI MAY be absolute or relative URI; relative URLs are relative to the URL of the document containing the reference, or relative to a base URL specified in a format-specific way.

        A reference MAY be annotated.

        The Core.SchemaVersion annotation, defined in OData-VocCore, MAY be used to indicate a particular version of the referenced document. If the Core.SchemaVersion annotation is present, the $schemaversion system query option, defined OData-Protocol, SHOULD be used when retrieving the referenced schema document.

        @@ -895,10 +895,10 @@

        $Alias

        4.3 Included Annotations

        In addition to including whole schemas with all model constructs defined within that schema, a reference may include annotations.

        -

        Annotations are selectively included by specifying the namespace of the annotations' term. Consumers can opt not to inspect the referenced document if none of the term namespaces is of interest for the consumer.

        +

        Annotations are selectively included by specifying the namespace of the annotations’ term. Consumers can opt not to inspect the referenced document if none of the term namespaces is of interest for the consumer.

        In addition, the qualifier of annotations to be included MAY be specified. For instance, a service author might want to supply a different set of annotations for various device form factors. If a qualifier is specified, only those annotations from the specified term namespace with the specified qualifier (applied to a model element of the target namespace, if present) SHOULD be included. If no qualifier is specified, all annotations within the referenced document from the specified term namespace (taking into account the target namespace, if present) SHOULD be included.

        The qualifier also provides consumers insight about what qualifiers are present in the referenced document. If the consumer is not interested in that particular qualifier, the consumer can opt not to inspect the referenced document.

        -

        In addition, the namespace of the annotations' target MAY be specified. If a target namespace is specified, only those annotations which apply a term form the specified term namespace to a model element of the target namespace (with the specified qualifier, if present) SHOULD be included. If no target namespace is specified, all annotations within the referenced document from the specified term namespace (taking into account the qualifier, if present) SHOULD be included.

        +

        In addition, the namespace of the annotations’ target MAY be specified. If a target namespace is specified, only those annotations which apply a term form the specified term namespace to a model element of the target namespace (with the specified qualifier, if present) SHOULD be included. If no target namespace is specified, all annotations within the referenced document from the specified term namespace (taking into account the qualifier, if present) SHOULD be included.

        The target namespace also provides consumers insight about what namespaces are present in the referenced document. If the consumer is not interested in that particular target namespace, the consumer can opt not to inspect the referenced document.

        $IncludeAnnotations

        @@ -952,7 +952,7 @@

        5 Schema

        One or more schemas describe the entity model exposed by an OData service. The schema acts as a namespace for elements of the entity model such as entity types, complex types, enumerations and terms.

        A schema is identified by a namespace. Schema namespaces MUST be unique within the scope of a document and SHOULD be globally unique. A schema cannot span more than one document.

        -

        The schema's namespace is combined with the name of elements in the schema to create unique qualified names, so identifiers that are used to name types MUST be unique within a namespace to prevent ambiguity.

        +

        The schema’s namespace is combined with the name of elements in the schema to create unique qualified names, so identifiers that are used to name types MUST be unique within a namespace to prevent ambiguity.

        Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

        The namespace MUST NOT be one of the reserved values Edm, odata, System, or Transient.

        @@ -1002,7 +1002,7 @@

        $Annotations

        6 Entity Type

        Entity types are nominal structured types with a key that consists of one or more references to structural properties. An entity type is the template for an entity: any uniquely identifiable record such as a customer or order.

        -

        The entity type's name is a simple identifier that MUST be unique within its schema.

        +

        The entity type’s name is a simple identifier that MUST be unique within its schema.

        An entity type can define two types of properties. A structural property is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A navigation property is a named reference to another entity type or collection of entity types.

        All properties MUST have a unique name within an entity type. Properties MUST NOT have the same name as the declaring entity type. They MAY have the same name as one of the direct or indirect base types or derived types.

        @@ -1085,8 +1085,8 @@

        6.5 Key

        An entity is uniquely identified within an entity set by its key. A key MAY be specified if the entity type does not specify a base type that already has a key declared.

        In order to be specified as the type of an entity set or a collection-valued containment navigation property, the entity type MUST either specify a key or inherit its key from its base type.

        In OData 4.01 responses entity types used for singletons or single-valued navigation properties do not require a key. In OData 4.0 responses entity types used for singletons or single-valued navigation properties MUST have a key defined.

        -

        An entity type (whether or not it is marked as abstract) MAY define a key only if it doesn't inherit one.

        -

        An entity type's key refers to the set of properties whose values uniquely identify an instance of the entity type within an entity set. The key MUST consist of at least one property.

        +

        An entity type (whether or not it is marked as abstract) MAY define a key only if it doesn’t inherit one.

        +

        An entity type’s key refers to the set of properties whose values uniquely identify an instance of the entity type within an entity set. The key MUST consist of at least one property.

        Key properties MUST NOT be nullable and MUST be typed with an enumeration type, one of the following primitive types, or a type definition based on one of these primitive types:

        • Edm.Boolean
        • @@ -1108,7 +1108,7 @@

          6.5 Key

          In OData 4.01 the key properties of a directly related entity type MAY also be part of the key if the navigation property is single-valued and not nullable. This includes navigation properties of non-nullable single-valued complex properties (recursively) of the entity type. If a key property of a related entity type is part of the key, all key properties of the related entity type MUST also be part of the key.

          If the key property is a property of a complex property (recursively) or of a directly related entity type, the key MUST specify an alias for that property that MUST be a simple identifier and MUST be unique within the set of aliases, structural and navigation properties of the declaring entity type and any of its base types.

          An alias MUST NOT be defined if the key property is a primitive property of the entity type itself.

          -

          For key properties that are a property of a complex or navigation property, the alias MUST be used in the key predicate of URLs instead of the path to the property because the required percent-encoding of the forward slash separating segments of the path to the property would make URL construction and parsing rather complicated. The alias MUST NOT be used in the query part of URLs, where paths to properties don't require special encoding and are a standard constituent of expressions anyway.

          +

          For key properties that are a property of a complex or navigation property, the alias MUST be used in the key predicate of URLs instead of the path to the property because the required percent-encoding of the forward slash separating segments of the path to the property would make URL construction and parsing rather complicated. The alias MUST NOT be used in the query part of URLs, where paths to properties don’t require special encoding and are a standard constituent of expressions anyway.

          $Key

          The value of $Key is an array with one item per key property.

          @@ -1192,7 +1192,7 @@

          type.

          -

          The property's name MUST be a simple identifier. It is used when referencing, serializing or deserializing the property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any navigation property in any of its base types. If a structural property with the same name is defined in any of this type's base types, then the property's type MUST be a type derived from the type specified for the property of the base type and constrains this property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type's base types for OData 4.0 responses.

          +

          The property’s name MUST be a simple identifier. It is used when referencing, serializing or deserializing the property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any navigation property in any of its base types. If a structural property with the same name is defined in any of this type’s base types, then the property’s type MUST be a type derived from the type specified for the property of the base type and constrains this property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type’s base types for OData 4.0 responses.

          Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

          Property Object

          @@ -1217,13 +1217,13 @@

          Property Object

          }

        7.1 Type

        -

        The property's type MUST be a primitive type, complex type, or enumeration type in scope, or a collection of one of these types.

        +

        The property’s type MUST be a primitive type, complex type, or enumeration type in scope, or a collection of one of these types.

        A collection-valued property MAY be annotated with the Core.Ordered term, defined in OData-VocCore, to specify that it supports a stable ordering.

        A collection-valued property MAY be annotated with the Core.PositionalInsert term, defined in OData-VocCore, to specify that it supports inserting items into a specific ordinal position.

        $Type and $Collection

        -

        For single-valued properties the value of $Type is the qualified name of the property's type.

        -

        For collection-valued properties the value of $Type is the qualified name of the property's item type, and the member $Collection MUST be present with the literal value true.

        +

        For single-valued properties the value of $Type is the qualified name of the property’s type.

        +

        For collection-valued properties the value of $Type is the qualified name of the property’s item type, and the member $Collection MUST be present with the literal value true.

        Absence of the $Type member means the type is Edm.String. This member SHOULD be omitted for string properties to reduce document size.

        @@ -1250,7 +1250,7 @@

        $DefaultValue

        8 Navigation Property

        A navigation property allows navigation to related entities. It MUST specify a unique name as well as a type.

        -

        The navigation property's name MUST be a simple identifier. It is used when referencing, serializing or deserializing the navigation property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any structural property in any of its base types. If a navigation property with the same name is defined in any of this type's base types, then the navigation property's type MUST be a type derived from the type specified for the navigation property of the base type, and constrains this navigation property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type's base types for OData 4.0 responses.

        +

        The navigation property’s name MUST be a simple identifier. It is used when referencing, serializing or deserializing the navigation property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any structural property in any of its base types. If a navigation property with the same name is defined in any of this type’s base types, then the navigation property’s type MUST be a type derived from the type specified for the navigation property of the base type, and constrains this navigation property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type’s base types for OData 4.0 responses.

        Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

        Navigation Property Object

        @@ -1291,7 +1291,7 @@

        Navig }

        8.1 Navigation Property Type

        -

        The navigation property's type MUST be an entity type in scope, the abstract type Edm.EntityType, or a collection of one of these types.

        +

        The navigation property’s type MUST be an entity type in scope, the abstract type Edm.EntityType, or a collection of one of these types.

        If the type is a collection, an arbitrary number of entities can be related. Otherwise there is at most one related entity.

        The related entities MUST be of the specified entity type or one of its subtypes.

        For a collection-valued containment navigation property the specified entity type MUST have a key defined.

        @@ -1299,8 +1299,8 @@

        Core.PositionalInsert term, defined in OData-VocCore, to specify that it supports inserting items into a specific ordinal position.

        $Type and $Collection

        -

        For single-valued navigation properties the value of $Type is the qualified name of the navigation property's type.

        -

        For collection-valued navigation properties the value of $Type is the qualified name of the navigation property's item type, and the member $Collection MUST be present with the literal value true.

        +

        For single-valued navigation properties the value of $Type is the qualified name of the navigation property’s type.

        +

        For collection-valued navigation properties the value of $Type is the qualified name of the navigation property’s item type, and the member $Collection MUST be present with the literal value true.

        8.2 Nullable Navigation Property

        A Boolean value specifying whether the declaring type MAY have no related entity. If false, instances of the declaring structured type MUST always have a related entity.

        @@ -1340,7 +1340,7 @@

        $ReferentialConstraint

        @@ -1410,7 +1410,7 @@

        $OnDelete


        9 Complex Type

        Complex types are keyless nominal structured types. The lack of a key means that instances of complex types cannot be referenced, created, updated or deleted independently of an entity type. Complex types allow entity models to group properties into common structures.

        -

        The complex type's name is a simple identifier that MUST be unique within its schema.

        +

        The complex type’s name is a simple identifier that MUST be unique within its schema.

        A complex type can define two types of properties. A structural property is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A navigation property is a named reference to an entity type or a collection of entity types.

        All properties MUST have a unique name within a complex type. Properties MUST NOT have the same name as the declaring complex type. They MAY have the same name as one of the direct or indirect base types or derived types.

        @@ -1480,7 +1480,7 @@

        $OpenType


        10 Enumeration Type

        Enumeration types are nominal types that represent a non-empty series of related values. Enumeration types expose these related values as members of the enumeration.

        -

        The enumeration type's name is a simple identifier that MUST be unique within its schema.

        +

        The enumeration type’s name is a simple identifier that MUST be unique within its schema.

        Although enumeration types have an underlying numeric value, the preferred representation for an enumeration value is the member name. Discrete sets of numeric values should be represented as numeric values annotated with the AllowedValues annotation defined in OData-VocCore.

        Enumeration types marked as flags allow values that consist of more than one enumeration member at a time.

        @@ -1566,7 +1566,7 @@

        Enume

        11 Type Definition

        A type definition defines a specialization of one of the primitive types or of the built-in abstract type Edm.PrimitiveType.

        -

        The type definition's name is a simple identifier that MUST be unique within its schema.

        +

        The type definition’s name is a simple identifier that MUST be unique within its schema.

        Type definitions can be used wherever a primitive type is used (other than as the underlying type in a new type definition) and are type-comparable with their underlying types and any type definitions defined using the same underlying type.

        It is up to the definition of a term to specify whether and how annotations with this term propagate to places where the annotated type definition is used, and whether they can be overridden.

        @@ -1612,7 +1612,7 @@

        $UnderlyingTy

        12 Action and Function

        12.1 Action

        Actions are service-defined operations that MAY have observable side effects and MAY return a single instance or a collection of instances of any type.

        -

        The action's name is a simple identifier that MUST be unique within its schema.

        +

        The action’s name is a simple identifier that MUST be unique within its schema.

        Actions cannot be composed with additional path segments.

        An action MAY specify a return type that MUST be a primitive, entity or complex type, or a collection of primitive, entity or complex types in scope.

        An action MAY define parameters used during the execution of the action.

        @@ -1628,7 +1628,7 @@

        Action Over

        12.3 Function

        Functions are service-defined operations that MUST NOT have observable side effects and MUST return a single instance or a collection of instances of any type.

        -

        The function's name is a simple identifier that MUST be unique within its schema.

        +

        The function’s name is a simple identifier that MUST be unique within its schema.

        Functions MAY be composable.

        The function MUST specify a return type which MUST be a primitive, entity or complex type, or a collection of primitive, entity or complex types in scope.

        A function MAY define parameters used during the execution of the function.

        @@ -1744,7 +1744,7 @@

        $Nullabl

        13 Entity Container

        Each metadata document used to describe an OData service MUST define exactly one entity container.

        -

        The entity container's name is a simple identifier that MUST be unique within its schema.

        +

        The entity container’s name is a simple identifier that MUST be unique within its schema.

        Entity containers define the entity sets, singletons, function and action imports exposed by the service.

        Entity set, singleton, action import, and function import names MUST be unique within an entity container.

        An entity set allows access to entity type instances. Simple entity models frequently have one entity set per entity type.

        @@ -1832,8 +1832,8 @@

        Entity Co }

        13.1 Extending an Entity Container

        -

        An entity container MAY specify that it extends another entity container in scope. All children of the "base" entity container are added to the "extending" entity container.

        -

        If the "extending" entity container defines an entity set with the same name as defined in any of its "base" containers, then the entity set's type MUST specify an entity type derived from the entity type specified for the identically named entity set in the "base" container. The same holds for singletons. Action imports and function imports cannot be redefined, nor can the "extending" container define a child with the same name as a child of a different kind in a "base" container.

        +

        An entity container MAY specify that it extends another entity container in scope. All children of the “base” entity container are added to the “extending” entity container.

        +

        If the “extending” entity container defines an entity set with the same name as defined in any of its “base” containers, then the entity set’s type MUST specify an entity type derived from the entity type specified for the identically named entity set in the “base” container. The same holds for singletons. Action imports and function imports cannot be redefined, nor can the “extending” container define a child with the same name as a child of a different kind in a “base” container.

        Note: services should not introduce cycles by extending entity containers. Clients should be prepared to process cycles introduced by extending entity containers.

        $Extends

        @@ -1886,7 +1886,7 @@

        An entity set or a singleton SHOULD contain a navigation property binding for each non-containment navigation property that can be reached from the entity type through a sequence of type casts, complex properties, or containment navigation properties.

        If omitted, clients MUST assume that the target entity set or singleton can vary per related entity.

        13.4.1 Navigation Property Path Binding

        -

        A navigation property binding MUST specify a path to a navigation property of the entity set's or singleton's declared entity type, or a navigation property reached through a chain of type casts, complex properties, or containment navigation properties. If the navigation property is defined on a subtype, the path MUST contain the qualified name of the subtype, followed by a forward slash, followed by the navigation property name. If the navigation property is defined on a complex type used in the definition of the entity set's entity type, the path MUST contain a forward-slash separated list of complex property names and qualified type names that describe the path leading to the navigation property.

        +

        A navigation property binding MUST specify a path to a navigation property of the entity set’s or singleton’s declared entity type, or a navigation property reached through a chain of type casts, complex properties, or containment navigation properties. If the navigation property is defined on a subtype, the path MUST contain the qualified name of the subtype, followed by a forward slash, followed by the navigation property name. If the navigation property is defined on a complex type used in the definition of the entity set’s entity type, the path MUST contain a forward-slash separated list of complex property names and qualified type names that describe the path leading to the navigation property.

        The path can traverse one or more containment navigation properties, but the last navigation property segment MUST be a non-containment navigation property and there MUST NOT be any non-containment navigation properties prior to the final navigation property segment.

        If the path traverses collection-valued complex properties or collection-valued containment navigation properties, the binding applies to all items of these collections.

        If the path contains a recursive sub-path (i.e. a path leading back to the same structured type, the binding applies recursively to any positive number of cycles through that sub-path.

        @@ -2018,8 +2018,8 @@

        14.1 Term

        A term allows annotating a model element or OData resource representation with additional data.

        -

        The term's name is a simple identifier that MUST be unique within its schema.

        -

        The term's type MUST be a type in scope, or a collection of a type in scope.

        +

        The term’s name is a simple identifier that MUST be unique within its schema.

        +

        The term’s type MUST be a type in scope, or a collection of a type in scope.

        Term Object

        A term is represented as a member of the schema object whose name is the unqualified name of the term and whose value is an object.

        @@ -2027,8 +2027,8 @@

        Term ObjectIt MAY contain the members $Type, $Collection, $Nullable, $DefaultValue, $BaseTerm, $AppliesTo, $MaxLength, $Precision, $Scale, and $SRID, as well as $Unicode for 4.01 and greater payloads.

        It MAY contain annotations.

        $Type and $Collection

        -

        For single-valued terms the value of $Type is the qualified name of the term's type.

        -

        For collection-valued terms the value of $Type is the qualified name of the term's item type, and the member $Collection MUST be present with the literal value true.

        +

        For single-valued terms the value of $Type is the qualified name of the term’s type.

        +

        For collection-valued terms the value of $Type is the qualified name of the term’s item type, and the member $Collection MUST be present with the literal value true.

        Absence of the $Type member means the type is Edm.String.

        $Nullable

        The value of $Nullable is one of the Boolean literals true or false. Absence of the member means false.

        @@ -2239,9 +2239,9 @@

        Annotation Member "$MaxLength": 3 }

        -

        If an entity type or complex type is annotated with a term that itself has a structured type, an instance of the annotated type may be viewed as an "instance" of the term, and the qualified term name may be used as a term-cast segment in path expressions.

        -

        Structured types "inherit" annotations from their direct or indirect base types. If both the type and one of its base types is annotated with the same term and qualifier, the annotation on the type completely replaces the annotation on the base type; structured or collection-valued annotation values are not merged. Similarly, properties of a structured type inherit annotations from identically named properties of a base type.

        -

        It is up to the definition of a term to specify whether and how annotations with this term propagate to places where the annotated model element is used, and whether they can be overridden. E.g. a "Label" annotation for a UI can propagate from a type definition to all properties using that type definition and may be overridden at each property with a more specific label, whereas an annotation marking a type definition as containing a phone number will propagate to all using properties but may not be overridden.

        +

        If an entity type or complex type is annotated with a term that itself has a structured type, an instance of the annotated type may be viewed as an “instance” of the term, and the qualified term name may be used as a term-cast segment in path expressions.

        +

        Structured types “inherit” annotations from their direct or indirect base types. If both the type and one of its base types is annotated with the same term and qualifier, the annotation on the type completely replaces the annotation on the base type; structured or collection-valued annotation values are not merged. Similarly, properties of a structured type inherit annotations from identically named properties of a base type.

        +

        It is up to the definition of a term to specify whether and how annotations with this term propagate to places where the annotated model element is used, and whether they can be overridden. E.g. a “Label” annotation for a UI can propagate from a type definition to all properties using that type definition and may be overridden at each property with a more specific label, whereas an annotation marking a type definition as containing a phone number will propagate to all using properties but may not be overridden.

        14.2.1 Qualifier

        A term can be applied multiple times to the same model element by providing a qualifier to distinguish the annotations. The qualifier is a simple identifier.

        The combination of target model element, term, and qualifier uniquely identifies an annotation.

        @@ -2253,7 +2253,7 @@

        14.2.1 Qualifier

        14.2.2 Target

        The target of an annotation is the model element the term is applied to.

        -

        The target of an annotation MAY be specified indirectly by "nesting" the annotation within the model element. Whether and how this is possible is described per model element in this specification.

        +

        The target of an annotation MAY be specified indirectly by “nesting” the annotation within the model element. Whether and how this is possible is described per model element in this specification.

        The target of an annotation MAY also be specified directly; this allows defining an annotation in a different schema than the targeted model element.

        This external targeting is only possible for model elements that are uniquely identified within their parent, and all their ancestor elements are uniquely identified within their parent.

        These are the direct children of a schema with a unique name (i.e. except actions and functions whose overloads to not possess a natural identifier), and all direct children of an entity container.

        @@ -2433,7 +2433,7 @@

        14.3.5 Decimal

        "@UI.Width": 3.14
        -

        Example 48: "safe" representation as a string

        +

        Example 48: “safe” representation as a string

        "@UI.Width": "3.14"

        14.3.6 Duration

        @@ -2484,7 +2484,7 @@

        14.3.10 Integer

        "@An.Int": 42
        -

        Example 55: "safe" representation as a string

        +

        Example 55: “safe” representation as a string

        "@A.Very.Long.Int": "9007199254740992"

        14.3.11 String

        @@ -2519,7 +2519,7 @@

        14.4.1.1 Path

        Example 58: absolute path to an entity set

        /My.Schema.MyEntityContainer/MyEntitySet
        -

        Paths not starting with a forward slash are interpreted relative to the annotation target, following the rules specified in section "Path Evaluation".

        +

        Paths not starting with a forward slash are interpreted relative to the annotation target, following the rules specified in section “Path Evaluation”.

        Example 59: relative path to a property

        Address/City
        @@ -2529,7 +2529,7 @@

        14.4.1.1 Path

        Example 60: type-cast segment

        .../self.Manager/...

        -

        If a path segment starts with an at (@) character, it represents a term cast. The at (@) character MUST be followed by a qualified name that MAY be followed by a hash (#) character and a simple identifier. The qualified name preceding the hash character MUST resolve to a term that is in scope, the simple identifier following the hash sign is interpreted as a qualifier for the term. If the model element or instance identified by the preceding path part has not been annotated with that term (and if present, with that qualifier), the term cast evaluates to the null value. Four special terms are implicitly "annotated" for media entities and stream properties:

        +

        If a path segment starts with an at (@) character, it represents a term cast. The at (@) character MUST be followed by a qualified name that MAY be followed by a hash (#) character and a simple identifier. The qualified name preceding the hash character MUST resolve to a term that is in scope, the simple identifier following the hash sign is interpreted as a qualifier for the term. If the model element or instance identified by the preceding path part has not been annotated with that term (and if present, with that qualifier), the term cast evaluates to the null value. Four special terms are implicitly “annotated” for media entities and stream properties:

        • odata.mediaEditLink
        • odata.mediaReadLink
        • @@ -3145,7 +3145,7 @@

          14

          A labeled element expression MUST provide a simple identifier value as its name that MUST be unique within the schema containing the expression.

          $LabeledElement

          -

          Labeled element expressions are represented as an object with a member $LabeledElement whose value is an annotation expression, and a member $Name whose value is a string containing the labeled element's name.

          +

          Labeled element expressions are represented as an object with a member $LabeledElement whose value is an annotation expression, and a member $Name whose value is a string containing the labeled element’s name.

          It MAY contain annotations.

          @@ -3191,8 +3191,8 @@

          $Null

          14.4.12 Record

          The record expression enables a new entity type or complex type instance to be constructed.

          -

          A record expression MAY specify the structured type of its result, which MUST be an entity type or complex type in scope. If not explicitly specified, the type is derived from the expression's context.

          -

          A record expression contains zero or more property value expressions. For each single-valued structural or navigation property of the record expression's type that is neither nullable nor specifies a default value a property value expression MUST be provided. The only exception is if the record expression is the value of an annotation for a term that has a base term whose type is structured and directly or indirectly inherits from the type of its base term. In this case, property values that already have been specified in the annotation for the base term or its base term etc. need not be specified again.

          +

          A record expression MAY specify the structured type of its result, which MUST be an entity type or complex type in scope. If not explicitly specified, the type is derived from the expression’s context.

          +

          A record expression contains zero or more property value expressions. For each single-valued structural or navigation property of the record expression’s type that is neither nullable nor specifies a default value a property value expression MUST be provided. The only exception is if the record expression is the value of an annotation for a term that has a base term whose type is structured and directly or indirectly inherits from the type of its base term. In this case, property values that already have been specified in the annotation for the base term or its base term etc. need not be specified again.

          For collection-valued properties the absence of a property value expression is equivalent to specifying an empty collection as its value.

          Record expressions are represented as objects with one member per property value expression. The member name is the property name, and the member value is the property value expression.

          @@ -3200,7 +3200,7 @@

          14.4.12 Record

          It MAY contain annotations for itself and its members. Annotations for record members are prefixed with the member name.

          -

          Example 87: this annotation "morphs" the entity type from example 13 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

          +

          Example 87: this annotation “morphs” the entity type from example 13 into a structured type with two structural properties GivenName and Surname and two navigation properties DirectSupervisor and CostCenter. The first three properties simply rename properties of the annotated entity type, the fourth adds a calculated navigation property that is pointing to a different service

        Non-normatively speaking it starts with a letter or underscore, followed by at most 127 letters, underscores or digits.

        15.3 Qualified Name

        @@ -3602,52 +3602,52 @@
        [EPSG]

        European Petroleum Survey Group (EPSG). http://www.epsg.org/.

        [OData-ABNF]

        OData ABNF Construction Rules Version 4.02.
        -See link in "Additional artifacts" section on cover page.

        +See link in “Additional artifacts” section on cover page.

        [OData-CSDL]

        OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02. This document.

        -

        OData Common Schema Definition Language (CSDL) XML Representation Version 4.02. See link in "Related work" section on cover page.

        +

        OData Common Schema Definition Language (CSDL) XML Representation Version 4.02. See link in “Related work” section on cover page.

        [OData-CSDL-Schema]

        OData CSDL JSON Schema.
        -See link in "Additional artifacts" section on cover page.

        +See link in “Additional artifacts” section on cover page.

        [OData-JSON]

        OData JSON Format Version 4.02.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-Protocol]

        OData Version 4.02 Part 1: Protocol.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-URL]

        OData Version 4.02 Part 2: URL Conventions.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-VocCore]

        OData Vocabularies Version 4.0: Core Vocabulary.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-VocMeasures]

        OData Vocabularies Version 4.0: Measures Vocabulary.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-VocValidation]

        OData Vocabularies Version 4.0: Validation Vocabulary.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [RFC2119]
        -

        Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
        +

        Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels”, BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
        https://www.rfc-editor.org/info/rfc2119.

        [RFC6570]

        Gregorio, J., Fielding, R., Hadley, M., Nottingham, M., and D. Orchard, “URI Template”, RFC 6570, March 2012.
        http://tools.ietf.org/html/rfc6570.

        [RFC7493]
        -

        Bray, T., Ed., "The I-JSON Message Format", RFC7493, March 2015.
        +

        Bray, T., Ed., “The I-JSON Message Format”, RFC7493, March 2015.
        https://tools.ietf.org/html/rfc7493.

        [RFC8174]
        -

        Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017.
        +

        Leiba, B., “Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words”, BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017.
        http://www.rfc-editor.org/info/rfc8174.

        [RFC8259]
        -

        Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", RFC 8259, December 2017.
        +

        Bray, T., Ed., “The JavaScript Object Notation (JSON) Data Interchange Format”, RFC 8259, December 2017.
        http://tools.ietf.org/html/rfc8259.

        [XML-Schema-2]

        W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes. D. Peterson, S. Gao, C. M. Sperberg-McQueen, H. S. Thompson, P. V. Biron, A. Malhotra, Editors, W3C Recommendation, 5 April 2012.
        http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/. Latest version available at http://www.w3.org/TR/xmlschema11-2/.

        A.2 Informative References

        [OpenUI5]
        -

        OpenUI5 Version 1.40.10 - OData V4 Metadata JSON Format.
        +

        OpenUI5 Version 1.40.10 — OData V4 Metadata JSON Format.
        https://openui5.hana.ondemand.com/1.40.10/#docs/guide/87aac894a40640f89920d7b2a414499b.html.


        Appendix B. Table of JSON Objects and Members

        @@ -3919,14 +3919,14 @@

        Appendix E. Notices

        Copyright © OASIS Open 2023. All Rights Reserved.

        -

        All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The full Policy may be found at the OASIS website.

        +

        All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the “OASIS IPR Policy”). The full Policy may be found at the OASIS website.

        This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to OASIS, except as needed for the purpose of developing any document or deliverable produced by an OASIS Technical Committee (in which case the rules applicable to copyrights, as set forth in the OASIS IPR Policy, must be followed) or as required to translate it into languages other than English.

        The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.

        -

        This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

        +

        This document and the information contained herein is provided on an “AS IS” basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

        As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, Candidate OASIS Standard, OASIS Standard, or Approved Errata).

        [OASIS requests that any OASIS Party or any other party that believes it has patent claims that would necessarily be infringed by implementations of this OASIS Standards Final Deliverable, to notify OASIS TC Administrator and provide an indication of its willingness to grant patent licenses to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this deliverable.]

        [OASIS invites any party to contact the OASIS TC Administrator if it is aware of a claim of ownership of any patent claims that would necessarily be infringed by implementations of this OASIS Standards Final Deliverable by a patent holder that is not willing to provide a license to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this OASIS Standards Final Deliverable. OASIS may include such claims on its website, but disclaims any obligation to do so.]

        -

        [OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this OASIS Standards Final Deliverable or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS' procedures with respect to rights in any document or deliverable produced by an OASIS Technical Committee can be found on the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this OASIS Standards Final Deliverable, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims.]

        -

        The name "OASIS" is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifications, while reserving the right to enforce its marks against misleading uses. Please see https://www.oasis-open.org/policies-guidelines/trademark/ for above guidance.

        +

        [OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this OASIS Standards Final Deliverable or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS’ procedures with respect to rights in any document or deliverable produced by an OASIS Technical Committee can be found on the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this OASIS Standards Final Deliverable, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims.]

        +

        The name “OASIS” is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifications, while reserving the right to enforce its marks against misleading uses. Please see https://www.oasis-open.org/policies-guidelines/trademark/ for above guidance.

        diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index f54551bbc..1728e1a2a 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -61,7 +61,7 @@ OData services are described by an Entity Model (EDM). The Common Schema Definit #### Status: This document was last revised or approved by the OASIS Open Data Protocol (OData) TC on the above date. The level of approval is also listed above. Check the "Latest stage" location noted above for possible later revisions of this document. Any other numbered Versions and other technical work produced by the Technical Committee (TC) are listed at https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata#technical. -TC members should send comments on this specification to the TC's email list. Others should send comments to the TC's public comment list, after subscribing to it by following the instructions at the "[Send A Comment](https://www.oasis-open.org/committees/comments/index.php?wg_abbrev=odata)" button on the TC's web page at https://www.oasis-open.org/committees/odata/. +TC members should send comments on this specification to the TC's email list. Others should send comments to the TC's public comment list, after subscribing to it by following the instructions at the "Send A Comment" button on the TC's web page at https://www.oasis-open.org/committees/odata/. This specification is provided under the [RF on RAND Terms Mode](https://www.oasis-open.org/policies-guidelines/ipr/#RF-on-RAND-Mode) of the [OASIS IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/), the mode chosen when the Technical Committee was established. For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC's web page (https://www.oasis-open.org/committees/odata/ipr.php). @@ -298,7 +298,7 @@ All other text is normative unless otherwise labeled. Here is a customized command line which will generate HTML from this markdown file (named `odata-csdl-json-v4.02-csd01.md`). Line breaks are added for readability only: ``` -pandoc -f gfm+tex_math_dollars+fenced_divs +pandoc -f gfm+tex_math_dollars+fenced_divs+smart -t html -o odata-csdl-json-v4.02-csd01.html -c styles/markdown-styles-v1.7.3b.css @@ -563,17 +563,17 @@ Type|Meaning `Edm.Date` |Date without a time-zone offset `Edm.DateTimeOffset` |Date and time with a time-zone offset, no leap seconds `Edm.Decimal` |Numeric values with decimal representation -`Edm.Double` |IEEE 754 binary64 floating-point number (15-17 decimal digits) +`Edm.Double` |IEEE 754 binary64 floating-point number (15--17 decimal digits) `Edm.Duration` |Signed duration in days, hours, minutes, and (sub)seconds `Edm.Guid` |16-byte (128-bit) unique identifier `Edm.Int16` |Signed 16-bit integer `Edm.Int32` |Signed 32-bit integer `Edm.Int64` |Signed 64-bit integer `Edm.SByte` |Signed 8-bit integer -`Edm.Single` |IEEE 754 binary32 floating-point number (6-9 decimal digits) +`Edm.Single` |IEEE 754 binary32 floating-point number (6--9 decimal digits) `Edm.Stream` |Binary data stream `Edm.String` |Sequence of characters -`Edm.TimeOfDay` |Clock time 00:00-23:59:59.999999999999 +`Edm.TimeOfDay` |Clock time 00:00--23:59:59.999999999999 `Edm.Geography` |Abstract base type for all Geography types `Edm.GeographyPoint` |A point in a round-earth coordinate system `Edm.GeographyLineString` |Line string in a round-earth coordinate system @@ -5952,7 +5952,7 @@ http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/. Latest version available ## A.2 Informative References ###### [OpenUI5] -_OpenUI5 Version 1.40.10 - OData V4 Metadata JSON Format_. +_OpenUI5 Version 1.40.10 --- OData V4 Metadata JSON Format_. https://openui5.hana.ondemand.com/1.40.10/#docs/guide/87aac894a40640f89920d7b2a414499b.html. ------- diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 8e564e705..a73b0e75c 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -142,12 +142,12 @@

        Abstract:

        OData services are described by an Entity Model (EDM). The Common Schema Definition Language (CSDL) defines specific representations of the entity data model exposed by an OData service, using XML, JSON, and other formats. This document (OData CSDL XML Representation) specifically defines the XML representation of CSDL.

        Status:

        -

        This document was last revised or approved by the OASIS Open Data Protocol (OData) TC on the above date. The level of approval is also listed above. Check the "Latest stage" location noted above for possible later revisions of this document. Any other numbered Versions and other technical work produced by the Technical Committee (TC) are listed at https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata#technical.

        -

        TC members should send comments on this specification to the TC's email list. Others should send comments to the TC's public comment list, after subscribing to it by following the instructions at the "Send A Comment" button on the TC's web page at https://www.oasis-open.org/committees/odata/.

        -

        This specification is provided under the RF on RAND Terms Mode of the OASIS IPR Policy, the mode chosen when the Technical Committee was established. For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC's web page (https://www.oasis-open.org/committees/odata/ipr.php).

        -

        Note that any machine-readable content (Computer Language Definitions) declared Normative for this Work Product is provided in separate plain text files. In the event of a discrepancy between any such plain text file and display content in the Work Product's prose narrative document(s), the content in the separate plain text file prevails.

        +

        This document was last revised or approved by the OASIS Open Data Protocol (OData) TC on the above date. The level of approval is also listed above. Check the “Latest stage” location noted above for possible later revisions of this document. Any other numbered Versions and other technical work produced by the Technical Committee (TC) are listed at https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata#technical.

        +

        TC members should send comments on this specification to the TC’s email list. Others should send comments to the TC’s public comment list, after subscribing to it by following the instructions at the “Send A Comment” button on the TC’s web page at https://www.oasis-open.org/committees/odata/.

        +

        This specification is provided under the RF on RAND Terms Mode of the OASIS IPR Policy, the mode chosen when the Technical Committee was established. For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC’s web page (https://www.oasis-open.org/committees/odata/ipr.php).

        +

        Note that any machine-readable content (Computer Language Definitions) declared Normative for this Work Product is provided in separate plain text files. In the event of a discrepancy between any such plain text file and display content in the Work Product’s prose narrative document(s), the content in the separate plain text file prevails.

        Key words:

        -

        The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 RFC2119 and RFC8174 when, and only when, they appear in all capitals, as shown here.

        +

        The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 RFC2119 and RFC8174 when, and only when, they appear in all capitals, as shown here.

        Citation format:

        When referencing this specification the following citation format should be used:

        [OData-CSDL-JSON-v4.02]

        @@ -155,7 +155,7 @@

        Citation format:

        Notices

        Copyright © OASIS Open 2023. All Rights Reserved.

        Distributed under the terms of the OASIS IPR Policy.

        -

        The name "OASIS" is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs.

        +

        The name “OASIS” is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs.

        For complete copyright information please see the full Notices section in an Appendix below.


        Table of Contents

        @@ -402,7 +402,7 @@

        Representation-Specific Headline

        All other text is normative unless otherwise labeled.

        Here is a customized command line which will generate HTML from this markdown file (named odata-csdl-xml-v4.02-csd01.md). Line breaks are added for readability only:

        -
        pandoc -f gfm+tex_math_dollars+fenced_divs
        +
        pandoc -f gfm+tex_math_dollars+fenced_divs+smart
                -t html
                -o odata-csdl-xml-v4.02-csd01.html
                -c styles/markdown-styles-v1.7.3b.css
        @@ -517,7 +517,7 @@ 

        3.3

        - + @@ -545,7 +545,7 @@

        3.3

        - + @@ -557,7 +557,7 @@

        3.3

        - + @@ -628,7 +628,7 @@

        3.3

        Edm.Date and Edm.DateTimeOffset follow XML-Schema-2 and use the proleptic Gregorian calendar, allowing the year 0000 (equivalent to 1 BCE) and negative years (year -0001 being equivalent to 2 BCE etc.). The supported date range is service-specific and typically depends on the underlying persistency layer, e.g. SQL only supports years 0001 to 9999.

        Edm.Decimal with a Scale value of floating, Edm.Double, and Edm.Single allow the special numeric values -INF, INF, and NaN.

        Edm.Stream is a primitive type that can be used as a property of an entity type or complex type, the underlying type for a type definition, or the binding parameter or return type of an action or function. Edm.Stream, or a type definition whose underlying type is Edm.Stream, cannot be used in collections or for non-binding parameters to functions or actions.

        -

        Some of these types allow facets, defined in section "Type Facets".

        +

        Some of these types allow facets, defined in section “Type Facets”.

        See rule primitiveLiteral in OData-ABNF for the representation of primitive type values in URLs and OData-JSON for the representation in requests and responses.

        3.4 Type Facets

        The facets in the following subsections modify or constrain the acceptable values of primitive typed model elements, for example a structural property, action or function parameter, action or function return type, or term.

        @@ -643,7 +643,7 @@

        3.4.2 Precision

        -

        For a decimal value: the maximum number of significant decimal digits of the model element's value; it MUST be a positive integer.

        +

        For a decimal value: the maximum number of significant decimal digits of the model element’s value; it MUST be a positive integer.

        For a temporal value (datetime-with-timezone-offset, duration, or time-of-day): the number of decimal places allowed in the seconds portion of the value; it MUST be a non-negative integer between zero and twelve.

        Note: service authors SHOULD be aware that some clients are unable to support a precision greater than 28 for decimal values and 7 for temporal values. Client developers MUST be aware of the potential for data loss when round-tripping values of greater precision. Updating via PATCH and exclusively specifying modified values will reduce the risk for unintended data loss.

        Note: model elements with duration values and a granularity less than seconds (e.g. minutes, hours, days) can be annotated with term Measures.DurationGranularity, see OData-VocMeasures.

        @@ -719,7 +719,7 @@

        Path Expressions" for details.

        +

        as the type of a primitive term, or the type of a property of a complex type (recursively) that is exclusively used as the type of a term. See section “Path Expressions” for details.

        3.7 Annotations

        Many parts of the model can be decorated with additional information using annotations. Annotations are identified by their term name and an optional qualifier that allows applying the same term multiple times to the same model element.

        A model element MUST NOT specify more than one annotation for a given combination of term and qualifier.

        @@ -788,7 +788,7 @@

        </edmx:Edmx>

        4.1 Reference

        -

        A reference to an external CSDL document allows to bring part of the referenced document's content into the scope of the referencing document.

        +

        A reference to an external CSDL document allows to bring part of the referenced document’s content into the scope of the referencing document.

        A reference MUST specify a URI that uniquely identifies the referenced document, so two references MUST NOT specify the same URI. The URI SHOULD be a URL that locates the referenced document. If the URI is not dereferencable it SHOULD identify a well-known schema. The URI MAY be absolute or relative URI; relative URLs are relative to the URL of the document containing the reference, or relative to a base URL specified in a format-specific way.

        A reference MAY be annotated.

        The Core.SchemaVersion annotation, defined in OData-VocCore, MAY be used to indicate a particular version of the referenced document. If the Core.SchemaVersion annotation is present, the $schemaversion system query option, defined OData-Protocol, SHOULD be used when retrieving the referenced schema document.

        @@ -857,10 +857,10 @@

        4.3 Included Annotations

        In addition to including whole schemas with all model constructs defined within that schema, a reference may include annotations.

        -

        Annotations are selectively included by specifying the namespace of the annotations' term. Consumers can opt not to inspect the referenced document if none of the term namespaces is of interest for the consumer.

        +

        Annotations are selectively included by specifying the namespace of the annotations’ term. Consumers can opt not to inspect the referenced document if none of the term namespaces is of interest for the consumer.

        In addition, the qualifier of annotations to be included MAY be specified. For instance, a service author might want to supply a different set of annotations for various device form factors. If a qualifier is specified, only those annotations from the specified term namespace with the specified qualifier (applied to a model element of the target namespace, if present) SHOULD be included. If no qualifier is specified, all annotations within the referenced document from the specified term namespace (taking into account the target namespace, if present) SHOULD be included.

        The qualifier also provides consumers insight about what qualifiers are present in the referenced document. If the consumer is not interested in that particular qualifier, the consumer can opt not to inspect the referenced document.

        -

        In addition, the namespace of the annotations' target MAY be specified. If a target namespace is specified, only those annotations which apply a term form the specified term namespace to a model element of the target namespace (with the specified qualifier, if present) SHOULD be included. If no target namespace is specified, all annotations within the referenced document from the specified term namespace (taking into account the qualifier, if present) SHOULD be included.

        +

        In addition, the namespace of the annotations’ target MAY be specified. If a target namespace is specified, only those annotations which apply a term form the specified term namespace to a model element of the target namespace (with the specified qualifier, if present) SHOULD be included. If no target namespace is specified, all annotations within the referenced document from the specified term namespace (taking into account the qualifier, if present) SHOULD be included.

        The target namespace also provides consumers insight about what namespaces are present in the referenced document. If the consumer is not interested in that particular target namespace, the consumer can opt not to inspect the referenced document.

        Element edmx:IncludeAnnotations

        @@ -904,7 +904,7 @@

        5 Schema

        One or more schemas describe the entity model exposed by an OData service. The schema acts as a namespace for elements of the entity model such as entity types, complex types, enumerations and terms.

        A schema is identified by a namespace. Schema namespaces MUST be unique within the scope of a document and SHOULD be globally unique. A schema cannot span more than one document.

        -

        The schema's namespace is combined with the name of elements in the schema to create unique qualified names, so identifiers that are used to name types MUST be unique within a namespace to prevent ambiguity.

        +

        The schema’s namespace is combined with the name of elements in the schema to create unique qualified names, so identifiers that are used to name types MUST be unique within a namespace to prevent ambiguity.

        Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

        The namespace MUST NOT be one of the reserved values Edm, odata, System, or Transient.

        @@ -950,7 +950,7 @@

        6 Entity Type

        Entity types are nominal structured types with a key that consists of one or more references to structural properties. An entity type is the template for an entity: any uniquely identifiable record such as a customer or order.

        -

        The entity type's name is a simple identifier that MUST be unique within its schema.

        +

        The entity type’s name is a simple identifier that MUST be unique within its schema.

        An entity type can define two types of properties. A structural property is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A navigation property is a named reference to another entity type or collection of entity types.

        All properties MUST have a unique name within an entity type. Properties MUST NOT have the same name as the declaring entity type. They MAY have the same name as one of the direct or indirect base types or derived types.

        @@ -960,7 +960,7 @@

        edm:Key element.

        It MAY contain edm:Annotation elements.

        Attribute Name

        -

        The value of Name is the entity type's name.

        +

        The value of Name is the entity type’s name.

        Example 13: a simple entity type

        @@ -1020,8 +1020,8 @@

        6.5 Key

        An entity is uniquely identified within an entity set by its key. A key MAY be specified if the entity type does not specify a base type that already has a key declared.

        In order to be specified as the type of an entity set or a collection-valued containment navigation property, the entity type MUST either specify a key or inherit its key from its base type.

        In OData 4.01 responses entity types used for singletons or single-valued navigation properties do not require a key. In OData 4.0 responses entity types used for singletons or single-valued navigation properties MUST have a key defined.

        -

        An entity type (whether or not it is marked as abstract) MAY define a key only if it doesn't inherit one.

        -

        An entity type's key refers to the set of properties whose values uniquely identify an instance of the entity type within an entity set. The key MUST consist of at least one property.

        +

        An entity type (whether or not it is marked as abstract) MAY define a key only if it doesn’t inherit one.

        +

        An entity type’s key refers to the set of properties whose values uniquely identify an instance of the entity type within an entity set. The key MUST consist of at least one property.

        Key properties MUST NOT be nullable and MUST be typed with an enumeration type, one of the following primitive types, or a type definition based on one of these primitive types:

        • Edm.Boolean
        • @@ -1043,7 +1043,7 @@

          6.5 Key

          In OData 4.01 the key properties of a directly related entity type MAY also be part of the key if the navigation property is single-valued and not nullable. This includes navigation properties of non-nullable single-valued complex properties (recursively) of the entity type. If a key property of a related entity type is part of the key, all key properties of the related entity type MUST also be part of the key.

          If the key property is a property of a complex property (recursively) or of a directly related entity type, the key MUST specify an alias for that property that MUST be a simple identifier and MUST be unique within the set of aliases, structural and navigation properties of the declaring entity type and any of its base types.

          An alias MUST NOT be defined if the key property is a primitive property of the entity type itself.

          -

          For key properties that are a property of a complex or navigation property, the alias MUST be used in the key predicate of URLs instead of the path to the property because the required percent-encoding of the forward slash separating segments of the path to the property would make URL construction and parsing rather complicated. The alias MUST NOT be used in the query part of URLs, where paths to properties don't require special encoding and are a standard constituent of expressions anyway.

          +

          For key properties that are a property of a complex or navigation property, the alias MUST be used in the key predicate of URLs instead of the path to the property because the required percent-encoding of the forward slash separating segments of the path to the property would make URL construction and parsing rather complicated. The alias MUST NOT be used in the query part of URLs, where paths to properties don’t require special encoding and are a standard constituent of expressions anyway.

          Element edm:Key

          The edm:Key element MUST contain at least one edm:PropertyRef element.

          @@ -1108,14 +1108,14 @@

          type.

          -

          The property's name MUST be a simple identifier. It is used when referencing, serializing or deserializing the property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any navigation property in any of its base types. If a structural property with the same name is defined in any of this type's base types, then the property's type MUST be a type derived from the type specified for the property of the base type and constrains this property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type's base types for OData 4.0 responses.

          +

          The property’s name MUST be a simple identifier. It is used when referencing, serializing or deserializing the property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any navigation property in any of its base types. If a structural property with the same name is defined in any of this type’s base types, then the property’s type MUST be a type derived from the type specified for the property of the base type and constrains this property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type’s base types for OData 4.0 responses.

          Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

          Element edm:Property

          The edm:Property element MUST contain the Name and the Type attribute, and it MAY contain the attributes Nullable, MaxLength, Unicode, Precision, Scale, SRID, and DefaultValue.

          It MAY contain edm:Annotation elements.

          Attribute Name

          -

          The value of Name is the property's name.

          +

          The value of Name is the property’s name.

          Example 20: complex type with two properties

          @@ -1127,13 +1127,13 @@

          </ComplexType>

          7.1 Type

          -

          The property's type MUST be a primitive type, complex type, or enumeration type in scope, or a collection of one of these types.

          +

          The property’s type MUST be a primitive type, complex type, or enumeration type in scope, or a collection of one of these types.

          A collection-valued property MAY be annotated with the Core.Ordered term, defined in OData-VocCore, to specify that it supports a stable ordering.

          A collection-valued property MAY be annotated with the Core.PositionalInsert term, defined in OData-VocCore, to specify that it supports inserting items into a specific ordinal position.

          Attribute Type

          -

          For single-valued properties the value of Type is the qualified name of the property's type.

          -

          For collection-valued properties the value of Type is the character sequence Collection( followed by the qualified name of the property's item type, followed by a closing parenthesis ).

          +

          For single-valued properties the value of Type is the qualified name of the property’s type.

          +

          For collection-valued properties the value of Type is the character sequence Collection( followed by the qualified name of the property’s item type, followed by a closing parenthesis ).

          Example 21: property Units that can have zero or more strings as its value

          @@ -1160,7 +1160,7 @@

          Attri

          8 Navigation Property

          A navigation property allows navigation to related entities. It MUST specify a unique name as well as a type.

          -

          The navigation property's name MUST be a simple identifier. It is used when referencing, serializing or deserializing the navigation property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any structural property in any of its base types. If a navigation property with the same name is defined in any of this type's base types, then the navigation property's type MUST be a type derived from the type specified for the navigation property of the base type, and constrains this navigation property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type's base types for OData 4.0 responses.

          +

          The navigation property’s name MUST be a simple identifier. It is used when referencing, serializing or deserializing the navigation property. It MUST be unique within the set of structural and navigation properties of the declaring structured type, and MUST NOT match the name of any structural property in any of its base types. If a navigation property with the same name is defined in any of this type’s base types, then the navigation property’s type MUST be a type derived from the type specified for the navigation property of the base type, and constrains this navigation property to be of the specified subtype for instances of this structured type. The name MUST NOT match the name of any structural or navigation property of any of this type’s base types for OData 4.0 responses.

          Names are case-sensitive, but service authors SHOULD NOT choose names that differ only in case.

          Element edm:NavigationProperty

          @@ -1168,7 +1168,7 @@

          It MAY contain child elements edm:ReferentialConstraint and at most one child element edm:OnDelete.

          It MAY contain edm:Annotation elements.

          Attribute Name

          -

          The value of Name is the navigation property's name.

          +

          The value of Name is the navigation property’s name.

          Example 22: the Product entity type has a navigation property to a Category, which has a navigation link back to one or more products

          @@ -1186,7 +1186,7 @@

          </EntityType>

          8.1 Navigation Property Type

          -

          The navigation property's type MUST be an entity type in scope, the abstract type Edm.EntityType, or a collection of one of these types.

          +

          The navigation property’s type MUST be an entity type in scope, the abstract type Edm.EntityType, or a collection of one of these types.

          If the type is a collection, an arbitrary number of entities can be related. Otherwise there is at most one related entity.

          The related entities MUST be of the specified entity type or one of its subtypes.

          For a collection-valued containment navigation property the specified entity type MUST have a key defined.

          @@ -1194,8 +1194,8 @@

          Core.PositionalInsert term, defined in OData-VocCore, to specify that it supports inserting items into a specific ordinal position.

          Attribute Type

          -

          For single-valued navigation properties the value of Type is the qualified name of the navigation property's type.

          -

          For collection-valued navigation properties the value of Type is the character sequence Collection( followed by the qualified name of the navigation property's item type, followed by a closing parenthesis ).

          +

          For single-valued navigation properties the value of Type is the qualified name of the navigation property’s type.

          +

          For collection-valued navigation properties the value of Type is the character sequence Collection( followed by the qualified name of the navigation property’s item type, followed by a closing parenthesis ).

          8.2 Nullable Navigation Property

          A Boolean value specifying whether the declaring type MAY have no related entity. If false, instances of the declaring structured type MUST always have a related entity.

          @@ -1235,7 +1235,7 @@

          Element edm:ReferentialConstraint

          @@ -1302,7 +1302,7 @@

          9 Complex Type

          Complex types are keyless nominal structured types. The lack of a key means that instances of complex types cannot be referenced, created, updated or deleted independently of an entity type. Complex types allow entity models to group properties into common structures.

          -

          The complex type's name is a simple identifier that MUST be unique within its schema.

          +

          The complex type’s name is a simple identifier that MUST be unique within its schema.

          A complex type can define two types of properties. A structural property is a named reference to a primitive, complex, or enumeration type, or a collection of primitive, complex, or enumeration types. A navigation property is a named reference to an entity type or a collection of entity types.

          All properties MUST have a unique name within a complex type. Properties MUST NOT have the same name as the declaring complex type. They MAY have the same name as one of the direct or indirect base types or derived types.

          @@ -1311,7 +1311,7 @@

          edm:Property and edm:NavigationProperty elements describing the properties of the complex type.

          It MAY contain edm:Annotation elements.

          Attribute Name

          -

          The value of Name is the complex type's name.

          +

          The value of Name is the complex type’s name.

          Example 25: a complex type used by two entity types

          @@ -1358,7 +1358,7 @@

          Attribute

          10 Enumeration Type

          Enumeration types are nominal types that represent a non-empty series of related values. Enumeration types expose these related values as members of the enumeration.

          -

          The enumeration type's name is a simple identifier that MUST be unique within its schema.

          +

          The enumeration type’s name is a simple identifier that MUST be unique within its schema.

          Although enumeration types have an underlying numeric value, the preferred representation for an enumeration value is the member name. Discrete sets of numeric values should be represented as numeric values annotated with the AllowedValues annotation defined in OData-VocCore.

          Enumeration types marked as flags allow values that consist of more than one enumeration member at a time.

          @@ -1367,7 +1367,7 @@

          edm:Member elements defining the members of the enumeration type.

          It MAY contain edm:Annotation elements.

          Attribute Name

          -

          The value of Name is the enumeration type's name.

          +

          The value of Name is the enumeration type’s name.

          Example 26: a simple flags-enabled enumeration

          @@ -1421,7 +1421,7 @@

          edm:Annotation elements.

          Attribute Name

          -

          The value of Name is the enumeration member's name.

          +

          The value of Name is the enumeration member’s name.

          Attribute Value

          If the IsFlags attribute has a value of false, either all members MUST specify an integer value for the Value attribute, or all members MUST NOT specify a value for the Value attribute. If no values are specified, the members are assigned consecutive integer values in the order of their appearance, starting with zero for the first member. Client libraries MUST preserve elements in document order.

          If the IsFlags attribute has a value of true, a non-negative integer value MUST be specified for the Value attribute. A combined value is equivalent to the bitwise OR of the discrete values.

          @@ -1446,7 +1446,7 @@

          11 Type Definition

          A type definition defines a specialization of one of the primitive types or of the built-in abstract type Edm.PrimitiveType.

          -

          The type definition's name is a simple identifier that MUST be unique within its schema.

          +

          The type definition’s name is a simple identifier that MUST be unique within its schema.

          Type definitions can be used wherever a primitive type is used (other than as the underlying type in a new type definition) and are type-comparable with their underlying types and any type definitions defined using the same underlying type.

          It is up to the definition of a term to specify whether and how annotations with this term propagate to places where the annotated type definition is used, and whether they can be overridden.

          @@ -1454,7 +1454,7 @@

          UnderlyingType attributes.

          It MAY contain edm:Annotation elements.

          Attribute Name

          -

          The value of Name is the type definition's name.

          +

          The value of Name is the type definition’s name.

          Example 29:

          @@ -1487,7 +1487,7 @@

          A

          12 Action and Function

          12.1 Action

          Actions are service-defined operations that MAY have observable side effects and MAY return a single instance or a collection of instances of any type.

          -

          The action's name is a simple identifier that MUST be unique within its schema.

          +

          The action’s name is a simple identifier that MUST be unique within its schema.

          Actions cannot be composed with additional path segments.

          An action MAY specify a return type that MUST be a primitive, entity or complex type, or a collection of primitive, entity or complex types in scope.

          An action MAY define parameters used during the execution of the action.

          @@ -1501,11 +1501,11 @@

          edm:ReturnType element and MAY contain edm:Parameter elements.

          It MAY contain edm:Annotation elements.

          Attribute Name

          -

          The value of Name is the action's name.

          +

          The value of Name is the action’s name.

          12.3 Function

          Functions are service-defined operations that MUST NOT have observable side effects and MUST return a single instance or a collection of instances of any type.

          -

          The function's name is a simple identifier that MUST be unique within its schema.

          +

          The function’s name is a simple identifier that MUST be unique within its schema.

          Functions MAY be composable.

          The function MUST specify a return type which MUST be a primitive, entity or complex type, or a collection of primitive, entity or complex types in scope.

          A function MAY define parameters used during the execution of the function.

          @@ -1530,7 +1530,7 @@

          edm:ReturnType element, and it MAY contain edm:Parameter elements.

          It MAY contain edm:Annotation elements.

          Attribute Name

          -

          The value of Name is the action's name.

          +

          The value of Name is the action’s name.

          12.5 Bound or Unbound Action or Function Overloads

          An action or function overload MAY indicate that it is bound. If not explicitly indicated, it is unbound.

          @@ -1586,10 +1586,10 @@

          MaxLength, Unicode, Precision, Scale, and SRID.

          It MAY contain edm:Annotation elements.

          Attribute Name

          -

          The value of Name is the parameter's name.

          +

          The value of Name is the parameter’s name.

          Attribute Type

          For single-valued parameters the value of Type is the qualified name of the parameter.

          -

          For collection-valued parameters the value of Type is the character sequence Collection( followed by the qualified name of the parameter's type, followed by a closing parenthesis ).

          +

          For collection-valued parameters the value of Type is the character sequence Collection( followed by the qualified name of the parameter’s type, followed by a closing parenthesis ).

          Attribute Nullable

          The value of Nullable is one of the Boolean literals true or false. Absence of the attribute means true.

          The value true means that the parameter accepts a null value.

          @@ -1604,7 +1604,7 @@

          13 Entity Container

          Each metadata document used to describe an OData service MUST define exactly one entity container.

          -

          The entity container's name is a simple identifier that MUST be unique within its schema.

          +

          The entity container’s name is a simple identifier that MUST be unique within its schema.

          Entity containers define the entity sets, singletons, function and action imports exposed by the service.

          Entity set, singleton, action import, and function import names MUST be unique within an entity container.

          An entity set allows access to entity type instances. Simple entity models frequently have one entity set per entity type.

          @@ -1633,7 +1633,7 @@

          The edm:EntityContainer MUST contain one or more edm:EntitySet, edm:Singleton, edm:ActionImport, or edm:FunctionImport elements.

          It MAY contain edm:Annotation elements.

          Attribute Name

          -

          The value of Name is the entity container's name.

          +

          The value of Name is the entity container’s name.

          Example 33: An entity container aggregates entity sets, singletons, action imports, and function imports.

          @@ -1655,8 +1655,8 @@

          </EntityContainer>

        13.1 Extending an Entity Container

        -

        An entity container MAY specify that it extends another entity container in scope. All children of the "base" entity container are added to the "extending" entity container.

        -

        If the "extending" entity container defines an entity set with the same name as defined in any of its "base" containers, then the entity set's type MUST specify an entity type derived from the entity type specified for the identically named entity set in the "base" container. The same holds for singletons. Action imports and function imports cannot be redefined, nor can the "extending" container define a child with the same name as a child of a different kind in a "base" container.

        +

        An entity container MAY specify that it extends another entity container in scope. All children of the “base” entity container are added to the “extending” entity container.

        +

        If the “extending” entity container defines an entity set with the same name as defined in any of its “base” containers, then the entity set’s type MUST specify an entity type derived from the entity type specified for the identically named entity set in the “base” container. The same holds for singletons. Action imports and function imports cannot be redefined, nor can the “extending” container define a child with the same name as a child of a different kind in a “base” container.

        Note: services should not introduce cycles by extending entity containers. Clients should be prepared to process cycles introduced by extending entity containers.

        Attribute Extends

        @@ -1681,7 +1681,7 @@

        edm:NavigationPropertyBinding elements.

        It MAY contain edm:Annotation elements.

        Attribute Name

        -

        The value of Name is the entity set's name.

        +

        The value of Name is the entity set’s name.

        Attribute EntityType

        The value of EntityType is the qualified name of an entity type in scope.

        Attribute IncludeInServiceDocument

        @@ -1698,7 +1698,7 @@

        edm:NavigationPropertyBinding elements.

        It MAY contain edm:Annotation elements.

        Attribute Name

        -

        The value of Name is the singleton's name.

        +

        The value of Name is the singleton’s name.

        Attribute Type

        The value of Type is whose value is the qualified name of an entity type in scope.

        Attribute Nullable

        @@ -1711,7 +1711,7 @@

        An entity set or a singleton SHOULD contain a navigation property binding for each non-containment navigation property that can be reached from the entity type through a sequence of type casts, complex properties, or containment navigation properties.

        If omitted, clients MUST assume that the target entity set or singleton can vary per related entity.

        13.4.1 Navigation Property Path Binding

        -

        A navigation property binding MUST specify a path to a navigation property of the entity set's or singleton's declared entity type, or a navigation property reached through a chain of type casts, complex properties, or containment navigation properties. If the navigation property is defined on a subtype, the path MUST contain the qualified name of the subtype, followed by a forward slash, followed by the navigation property name. If the navigation property is defined on a complex type used in the definition of the entity set's entity type, the path MUST contain a forward-slash separated list of complex property names and qualified type names that describe the path leading to the navigation property.

        +

        A navigation property binding MUST specify a path to a navigation property of the entity set’s or singleton’s declared entity type, or a navigation property reached through a chain of type casts, complex properties, or containment navigation properties. If the navigation property is defined on a subtype, the path MUST contain the qualified name of the subtype, followed by a forward slash, followed by the navigation property name. If the navigation property is defined on a complex type used in the definition of the entity set’s entity type, the path MUST contain a forward-slash separated list of complex property names and qualified type names that describe the path leading to the navigation property.

        The path can traverse one or more containment navigation properties, but the last navigation property segment MUST be a non-containment navigation property and there MUST NOT be any non-containment navigation properties prior to the final navigation property segment.

        If the path traverses collection-valued complex properties or collection-valued containment navigation properties, the binding applies to all items of these collections.

        If the path contains a recursive sub-path (i.e. a path leading back to the same structured type, the binding applies recursively to any positive number of cycles through that sub-path.

        @@ -1760,7 +1760,7 @@

        edm:Annotation elements.

        Attribute Name

        -

        The value of Name is the action import's name.

        +

        The value of Name is the action import’s name.

        Attribute Action

        The value of Action is the qualified name of an unbound action.

        Attribute EntitySet

        @@ -1776,7 +1776,7 @@

        13.

        Element edm:FunctionImport

        The edm:FunctionImport element MUST contain the attributes Name and Function, and it MAY contain the attributes EntitySet and IncludeInServiceDocument.

        Attribute Name

        -

        The value of Name is the function import's name.

        +

        The value of Name is the function import’s name.

        Attribute Function

        The value of Function is the qualified name of an unbound function.

        Attribute EntitySet

        @@ -1824,8 +1824,8 @@

        14.1 Term

        A term allows annotating a model element or OData resource representation with additional data.

        -

        The term's name is a simple identifier that MUST be unique within its schema.

        -

        The term's type MUST be a type in scope, or a collection of a type in scope.

        +

        The term’s name is a simple identifier that MUST be unique within its schema.

        +

        The term’s type MUST be a type in scope, or a collection of a type in scope.

        Element edm:Term

        The edm:Term element MUST contain the attributes Name and Type. It MAY contain the attributes Nullable, DefaultValue, BaseTerm and AppliesTo.

        @@ -1833,10 +1833,10 @@

        E

        A edm:Term element whose Type attribute specifies a primitive or enumeration type MAY define a value for the DefaultValue attribute.

        It MAY contain edm:Annotation elements.

        Attribute Name

        -

        The value of Name is the term's name.

        +

        The value of Name is the term’s name.

        Attribute Type

        -

        For single-valued terms the value of Type is the qualified name of the term's type.

        -

        For collection-valued properties the value of Type is the character sequence Collection( followed by the qualified name of the property's item type, followed by a closing parenthesis ).

        +

        For single-valued terms the value of Type is the qualified name of the term’s type.

        +

        For collection-valued properties the value of Type is the character sequence Collection( followed by the qualified name of the property’s item type, followed by a closing parenthesis ).

        Attribute Nullable

        The value of Nullable is one of the Boolean literals true or false.

        For single-valued terms the value true means that annotations may have the null value.

        @@ -2042,9 +2042,9 @@

        </Property> <Property Name="Currency" Type="Edm.String" MaxLength="3" />

        -

        If an entity type or complex type is annotated with a term that itself has a structured type, an instance of the annotated type may be viewed as an "instance" of the term, and the qualified term name may be used as a term-cast segment in path expressions.

        -

        Structured types "inherit" annotations from their direct or indirect base types. If both the type and one of its base types is annotated with the same term and qualifier, the annotation on the type completely replaces the annotation on the base type; structured or collection-valued annotation values are not merged. Similarly, properties of a structured type inherit annotations from identically named properties of a base type.

        -

        It is up to the definition of a term to specify whether and how annotations with this term propagate to places where the annotated model element is used, and whether they can be overridden. E.g. a "Label" annotation for a UI can propagate from a type definition to all properties using that type definition and may be overridden at each property with a more specific label, whereas an annotation marking a type definition as containing a phone number will propagate to all using properties but may not be overridden.

        +

        If an entity type or complex type is annotated with a term that itself has a structured type, an instance of the annotated type may be viewed as an “instance” of the term, and the qualified term name may be used as a term-cast segment in path expressions.

        +

        Structured types “inherit” annotations from their direct or indirect base types. If both the type and one of its base types is annotated with the same term and qualifier, the annotation on the type completely replaces the annotation on the base type; structured or collection-valued annotation values are not merged. Similarly, properties of a structured type inherit annotations from identically named properties of a base type.

        +

        It is up to the definition of a term to specify whether and how annotations with this term propagate to places where the annotated model element is used, and whether they can be overridden. E.g. a “Label” annotation for a UI can propagate from a type definition to all properties using that type definition and may be overridden at each property with a more specific label, whereas an annotation marking a type definition as containing a phone number will propagate to all using properties but may not be overridden.

        14.2.1 Qualifier

        A term can be applied multiple times to the same model element by providing a qualifier to distinguish the annotations. The qualifier is a simple identifier.

        The combination of target model element, term, and qualifier uniquely identifies an annotation.

        @@ -2059,7 +2059,7 @@

        Attribute <

        14.2.2 Target

        The target of an annotation is the model element the term is applied to.

        -

        The target of an annotation MAY be specified indirectly by "nesting" the annotation within the model element. Whether and how this is possible is described per model element in this specification.

        +

        The target of an annotation MAY be specified indirectly by “nesting” the annotation within the model element. Whether and how this is possible is described per model element in this specification.

        The target of an annotation MAY also be specified directly; this allows defining an annotation in a different schema than the targeted model element.

        This external targeting is only possible for model elements that are uniquely identified within their parent, and all their ancestor elements are uniquely identified within their parent.

        These are the direct children of a schema with a unique name (i.e. except actions and functions whose overloads to not possess a natural identifier), and all direct children of an entity container.

        @@ -2399,7 +2399,7 @@

        14.4.1.1 Path

        Example 58: absolute path to an entity set

        /My.Schema.MyEntityContainer/MyEntitySet
        -

        Paths not starting with a forward slash are interpreted relative to the annotation target, following the rules specified in section "Path Evaluation".

        +

        Paths not starting with a forward slash are interpreted relative to the annotation target, following the rules specified in section “Path Evaluation”.

        Example 59: relative path to a property

        Address/City
        @@ -2409,7 +2409,7 @@

        14.4.1.1 Path

        Example 60: type-cast segment

        .../self.Manager/...

        -

        If a path segment starts with an at (@) character, it represents a term cast. The at (@) character MUST be followed by a qualified name that MAY be followed by a hash (#) character and a simple identifier. The qualified name preceding the hash character MUST resolve to a term that is in scope, the simple identifier following the hash sign is interpreted as a qualifier for the term. If the model element or instance identified by the preceding path part has not been annotated with that term (and if present, with that qualifier), the term cast evaluates to the null value. Four special terms are implicitly "annotated" for media entities and stream properties:

        +

        If a path segment starts with an at (@) character, it represents a term cast. The at (@) character MUST be followed by a qualified name that MAY be followed by a hash (#) character and a simple identifier. The qualified name preceding the hash character MUST resolve to a term that is in scope, the simple identifier following the hash sign is interpreted as a qualifier for the term. If the model element or instance identified by the preceding path part has not been annotated with that term (and if present, with that qualifier), the term cast evaluates to the null value. Four special terms are implicitly “annotated” for media entities and stream properties:

        Non-normatively speaking it starts with a letter or underscore, followed by at most 127 letters, underscores or digits.

        15.3 Qualified Name

        @@ -3253,42 +3253,42 @@
        [EPSG]

        European Petroleum Survey Group (EPSG). http://www.epsg.org/.

        [OData-ABNF]

        OData ABNF Construction Rules Version 4.02.
        -See link in "Additional artifacts" section on cover page.

        +See link in “Additional artifacts” section on cover page.

        [OData-CSDL]
        -

        OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02. See link in "Related work" section on cover page.

        +

        OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02. See link in “Related work” section on cover page.

        OData Common Schema Definition Language (CSDL) XML Representation Version 4.02. This document.

        [OData-EDM]

        OData EDM XML Schema.
        -See link in "Additional artifacts" section on cover page.

        +See link in “Additional artifacts” section on cover page.

        [OData-EDMX]

        OData EDM XML Schema.
        -See link in "Additional artifacts" section on cover page.

        +See link in “Additional artifacts” section on cover page.

        [OData-JSON]

        OData JSON Format Version 4.02.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-Protocol]

        OData Version 4.02 Part 1: Protocol.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-URL]

        OData Version 4.02 Part 2: URL Conventions.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-VocCore]

        OData Vocabularies Version 4.0: Core Vocabulary.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-VocMeasures]

        OData Vocabularies Version 4.0: Measures Vocabulary.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-VocValidation]

        OData Vocabularies Version 4.0: Validation Vocabulary.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [RFC2119]
        -

        Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
        +

        Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels”, BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
        https://www.rfc-editor.org/info/rfc2119.

        [RFC6570]

        Gregorio, J., Fielding, R., Hadley, M., Nottingham, M., and D. Orchard, “URI Template”, RFC 6570, March 2012.
        http://tools.ietf.org/html/rfc6570.

        [RFC8174]
        -

        Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017.
        +

        Leiba, B., “Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words”, BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017.
        http://www.rfc-editor.org/info/rfc8174.

        [XML-1.1]

        Extensible Markup Language (XML) 1.1 (Second Edition). F. Yergeau, E. Maler, J. Cowan, T. Bray, C. M. Sperberg-McQueen, J. Paoli, Editors, W3C Recommendation, 16 August 2006.
        @@ -3304,7 +3304,7 @@

        [XML-Schema-2]
        http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/. Latest version available at http://www.w3.org/TR/xmlschema11-2/.

        A.2 Informative References

        [OpenUI5]
        -

        OpenUI5 Version 1.40.10 - OData V4 Metadata JSON Format.
        +

        OpenUI5 Version 1.40.10 — OData V4 Metadata JSON Format.
        https://openui5.hana.ondemand.com/1.40.10/#docs/guide/87aac894a40640f89920d7b2a414499b.html.


        Appendix B. Table of XML Elements and Attributes

        @@ -3658,14 +3658,14 @@

        Appendix E. Notices

        Copyright © OASIS Open 2023. All Rights Reserved.

        -

        All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The full Policy may be found at the OASIS website.

        +

        All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the “OASIS IPR Policy”). The full Policy may be found at the OASIS website.

        This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to OASIS, except as needed for the purpose of developing any document or deliverable produced by an OASIS Technical Committee (in which case the rules applicable to copyrights, as set forth in the OASIS IPR Policy, must be followed) or as required to translate it into languages other than English.

        The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.

        -

        This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

        +

        This document and the information contained herein is provided on an “AS IS” basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

        As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, Candidate OASIS Standard, OASIS Standard, or Approved Errata).

        [OASIS requests that any OASIS Party or any other party that believes it has patent claims that would necessarily be infringed by implementations of this OASIS Standards Final Deliverable, to notify OASIS TC Administrator and provide an indication of its willingness to grant patent licenses to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this deliverable.]

        [OASIS invites any party to contact the OASIS TC Administrator if it is aware of a claim of ownership of any patent claims that would necessarily be infringed by implementations of this OASIS Standards Final Deliverable by a patent holder that is not willing to provide a license to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this OASIS Standards Final Deliverable. OASIS may include such claims on its website, but disclaims any obligation to do so.]

        -

        [OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this OASIS Standards Final Deliverable or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS' procedures with respect to rights in any document or deliverable produced by an OASIS Technical Committee can be found on the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this OASIS Standards Final Deliverable, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims.]

        -

        The name "OASIS" is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifications, while reserving the right to enforce its marks against misleading uses. Please see https://www.oasis-open.org/policies-guidelines/trademark/ for above guidance.

        +

        [OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this OASIS Standards Final Deliverable or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS’ procedures with respect to rights in any document or deliverable produced by an OASIS Technical Committee can be found on the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this OASIS Standards Final Deliverable, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims.]

        +

        The name “OASIS” is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifications, while reserving the right to enforce its marks against misleading uses. Please see https://www.oasis-open.org/policies-guidelines/trademark/ for above guidance.

        diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index d7d112ac9..0e6c498a5 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -61,7 +61,7 @@ OData services are described by an Entity Model (EDM). The Common Schema Definit #### Status: This document was last revised or approved by the OASIS Open Data Protocol (OData) TC on the above date. The level of approval is also listed above. Check the "Latest stage" location noted above for possible later revisions of this document. Any other numbered Versions and other technical work produced by the Technical Committee (TC) are listed at https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata#technical. -TC members should send comments on this specification to the TC's email list. Others should send comments to the TC's public comment list, after subscribing to it by following the instructions at the "[Send A Comment](https://www.oasis-open.org/committees/comments/index.php?wg_abbrev=odata)" button on the TC's web page at https://www.oasis-open.org/committees/odata/. +TC members should send comments on this specification to the TC's email list. Others should send comments to the TC's public comment list, after subscribing to it by following the instructions at the "Send A Comment" button on the TC's web page at https://www.oasis-open.org/committees/odata/. This specification is provided under the [RF on RAND Terms Mode](https://www.oasis-open.org/policies-guidelines/ipr/#RF-on-RAND-Mode) of the [OASIS IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/), the mode chosen when the Technical Committee was established. For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC's web page (https://www.oasis-open.org/committees/odata/ipr.php). @@ -296,7 +296,7 @@ All other text is normative unless otherwise labeled. Here is a customized command line which will generate HTML from this markdown file (named `odata-csdl-xml-v4.02-csd01.md`). Line breaks are added for readability only: ``` -pandoc -f gfm+tex_math_dollars+fenced_divs +pandoc -f gfm+tex_math_dollars+fenced_divs+smart -t html -o odata-csdl-xml-v4.02-csd01.html -c styles/markdown-styles-v1.7.3b.css @@ -503,17 +503,17 @@ Type|Meaning `Edm.Date` |Date without a time-zone offset `Edm.DateTimeOffset` |Date and time with a time-zone offset, no leap seconds `Edm.Decimal` |Numeric values with decimal representation -`Edm.Double` |IEEE 754 binary64 floating-point number (15-17 decimal digits) +`Edm.Double` |IEEE 754 binary64 floating-point number (15--17 decimal digits) `Edm.Duration` |Signed duration in days, hours, minutes, and (sub)seconds `Edm.Guid` |16-byte (128-bit) unique identifier `Edm.Int16` |Signed 16-bit integer `Edm.Int32` |Signed 32-bit integer `Edm.Int64` |Signed 64-bit integer `Edm.SByte` |Signed 8-bit integer -`Edm.Single` |IEEE 754 binary32 floating-point number (6-9 decimal digits) +`Edm.Single` |IEEE 754 binary32 floating-point number (6--9 decimal digits) `Edm.Stream` |Binary data stream `Edm.String` |Sequence of characters -`Edm.TimeOfDay` |Clock time 00:00-23:59:59.999999999999 +`Edm.TimeOfDay` |Clock time 00:00--23:59:59.999999999999 `Edm.Geography` |Abstract base type for all Geography types `Edm.GeographyPoint` |A point in a round-earth coordinate system `Edm.GeographyLineString` |Line string in a round-earth coordinate system @@ -5659,7 +5659,7 @@ http://www.w3.org/TR/2012/REC-xmlschema11-2-20120405/. Latest version available ## A.2 Informative References ###### [OpenUI5] -_OpenUI5 Version 1.40.10 - OData V4 Metadata JSON Format_. +_OpenUI5 Version 1.40.10 --- OData V4 Metadata JSON Format_. https://openui5.hana.ondemand.com/1.40.10/#docs/guide/87aac894a40640f89920d7b2a414499b.html. ------- diff --git a/docs/odata-data-aggregation-ext/odata-data-aggregation-ext.html b/docs/odata-data-aggregation-ext/odata-data-aggregation-ext.html index fcc342831..bdddb4475 100644 --- a/docs/odata-data-aggregation-ext/odata-data-aggregation-ext.html +++ b/docs/odata-data-aggregation-ext/odata-data-aggregation-ext.html @@ -149,12 +149,12 @@

        Abstract:

        This specification adds basic grouping and aggregation functionality (e.g. sum, min, and max) to the Open Data Protocol (OData) without changing any of the base principles of OData.

        Status:

        -

        This document was last revised or approved by the OASIS Open Data Protocol (OData) TC on the above date. The level of approval is also listed above. Check the "Latest stage" location noted above for possible later revisions of this document. Any other numbered Versions and other technical work produced by the Technical Committee (TC) are listed at https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata#technical.

        -

        TC members should send comments on this specification to the TC's email list. Others should send comments to the TC's public comment list, after subscribing to it by following the instructions at the "Send A Comment" button on the TC's web page at https://www.oasis-open.org/committees/odata/.

        -

        This specification is provided under the RF on RAND Terms Mode of the OASIS IPR Policy, the mode chosen when the Technical Committee was established. For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC's web page (https://www.oasis-open.org/committees/odata/ipr.php).

        -

        Note that any machine-readable content (Computer Language Definitions) declared Normative for this Work Product is provided in separate plain text files. In the event of a discrepancy between any such plain text file and display content in the Work Product's prose narrative document(s), the content in the separate plain text file prevails.

        +

        This document was last revised or approved by the OASIS Open Data Protocol (OData) TC on the above date. The level of approval is also listed above. Check the “Latest stage” location noted above for possible later revisions of this document. Any other numbered Versions and other technical work produced by the Technical Committee (TC) are listed at https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata#technical.

        +

        TC members should send comments on this specification to the TC’s email list. Others should send comments to the TC’s public comment list, after subscribing to it by following the instructions at the “Send A Comment” button on the TC’s web page at https://www.oasis-open.org/committees/odata/.

        +

        This specification is provided under the RF on RAND Terms Mode of the OASIS IPR Policy, the mode chosen when the Technical Committee was established. For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC’s web page (https://www.oasis-open.org/committees/odata/ipr.php).

        +

        Note that any machine-readable content (Computer Language Definitions) declared Normative for this Work Product is provided in separate plain text files. In the event of a discrepancy between any such plain text file and display content in the Work Product’s prose narrative document(s), the content in the separate plain text file prevails.

        Key words:

        -

        The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 RFC2119 and RFC8174 when, and only when, they appear in all capitals, as shown here.

        +

        The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 RFC2119 and RFC8174 when, and only when, they appear in all capitals, as shown here.

        Citation format:

        When referencing this specification the following citation format should be used:

        [OData-Data-Agg-v4.0]

        @@ -162,7 +162,7 @@

        Citation format:

        Notices

        Copyright © OASIS Open 2023. All Rights Reserved.

        Distributed under the terms of the OASIS IPR Policy.

        -

        The name "OASIS" is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs.

        +

        The name “OASIS” is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs.

        For complete copyright information please see the full Notices section in an Appendix below.


        Table of Contents

        @@ -357,7 +357,7 @@

        Here is a customized command line which will generate HTML from this markdown file (named odata-data-aggregation-ext-v4.0-cs03.md). Line breaks are added for readability only:

        -
        pandoc -f gfm+tex_math_dollars+fenced_divs
        +
        pandoc -f gfm+tex_math_dollars+fenced_divs+smart
                -t html
                -o odata-data-aggregation-ext-v4.0-cs03.html
                -c styles/markdown-styles-v1.7.3b.css
        @@ -373,13 +373,13 @@ 

        2 Overview

        Open Data Protocol (OData) services expose a data model that describes the schema of the service in terms of the Entity Data Model (EDM, see OData-CSDL) and then allows for querying data in terms of this model. The responses returned by an OData service are based on that data model and retain the relationships between the entities in the model.

        -

        Extending the OData query features with simple aggregation capabilities avoids cluttering OData services with an exponential number of explicitly modeled "aggregation level entities" or else restricting the consumer to a small subset of predefined aggregations.

        +

        Extending the OData query features with simple aggregation capabilities avoids cluttering OData services with an exponential number of explicitly modeled “aggregation level entities” or else restricting the consumer to a small subset of predefined aggregations.

        Adding the notion of aggregation to OData without changing any of the base principles in OData has two aspects:

        1. Means for the consumer to query aggregated data on top of any given data model (for sufficiently capable data providers)
        2. Means for the provider to annotate what data can be aggregated, and in which way, allowing consumers to avoid asking questions that the provider cannot answer
        -

        Implementing any of these two aspects is valuable in itself independent of the other, and implementing both provides additional value for consumers. The provided aggregation annotations help a consumer understand more of the data structure looking at the service's exposed data model. The query extensions allow the consumers to explicitly express the desired aggregation behavior for a particular query. They also allow consumers to formulate queries that utilize the aggregation annotations.

        +

        Implementing any of these two aspects is valuable in itself independent of the other, and implementing both provides additional value for consumers. The provided aggregation annotations help a consumer understand more of the data structure looking at the service’s exposed data model. The query extensions allow the consumers to explicitly express the desired aggregation behavior for a particular query. They also allow consumers to formulate queries that utilize the aggregation annotations.

        2.1 Example Data Model

        Example 2: The following diagram depicts a simple model that is used throughout this document.

        @@ -881,7 +881,7 @@

        hierarchy based on Year, Month, and Date
      • SalesOrganization hierarchy based on the recursive association to itself
      • -

        In the context of Online Analytical Processing (OLAP), this model might be described in terms of a Sales "cube" with an Amount "measure" and three "dimensions". This document will avoid such terms, as they are heavily overloaded.

        +

        In the context of Online Analytical Processing (OLAP), this model might be described in terms of a Sales “cube” with an Amount “measure” and three “dimensions”. This document will avoid such terms, as they are heavily overloaded.

        Query extensions and descriptive annotations can be applied to normalized schemas as well as partly or fully denormalized schemas.

        @@ -1055,7 +1055,7 @@

        2.2 Example D

        - + @@ -1265,8 +1265,8 @@

        2.2 Example D

        2.3 Example Use Cases

        -

        Example 5: In the example model, one prominent use case is the relation of customers to products. The first question that is likely to be asked is: "Which customers bought which products?"

        -

        This leads to the second more quantitative question: "Who bought how much of what?"

        +

        Example 5: In the example model, one prominent use case is the relation of customers to products. The first question that is likely to be asked is: “Which customers bought which products?”

        +

        This leads to the second more quantitative question: “Who bought how much of what?”

        The answer to the second question typically is visualized as a cross-table:

        Edm.DoubleIEEE 754 binary64 floating-point number (15-17 decimal digits)IEEE 754 binary64 floating-point number (15–17 decimal digits)
        Edm.Duration
        Edm.SingleIEEE 754 binary32 floating-point number (6-9 decimal digits)IEEE 754 binary32 floating-point number (6–9 decimal digits)
        Edm.Stream
        Edm.TimeOfDayClock time 00:00-23:59:59.999999999999Clock time 00:00–23:59:59.999999999999
        Edm.Geography
        Edm.DoubleIEEE 754 binary64 floating-point number (15-17 decimal digits)IEEE 754 binary64 floating-point number (15–17 decimal digits)
        Edm.Duration
        Edm.SingleIEEE 754 binary32 floating-point number (6-9 decimal digits)IEEE 754 binary32 floating-point number (6–9 decimal digits)
        Edm.Stream
        Edm.TimeOfDayClock time 00:00-23:59:59.999999999999Clock time 00:00–23:59:59.999999999999
        Edm.Geography2022
        ...
        @@ -1593,7 +1593,7 @@

        \(B=γ(v,p_2)\).
      • Return \(B\).
      • -

        This notation is extended to the case of an empty path \(e\) by setting \(\Gamma(A,e)=A\) with null values removed. Note the collections returned by \(\Gamma\) and \(γ\) never contain the null value. Also, every instance \(u\) in \(\Gamma(A,p)\) occurs also in \(A\) or nested into \(A\), therefore an algorithmic step like "Add a dynamic property to each \(u\) in \(\Gamma(A,p)\)" effectively changes \(A\).

        +

        This notation is extended to the case of an empty path \(e\) by setting \(\Gamma(A,e)=A\) with null values removed. Note the collections returned by \(\Gamma\) and \(γ\) never contain the null value. Also, every instance \(u\) in \(\Gamma(A,p)\) occurs also in \(A\) or nested into \(A\), therefore an algorithmic step like “Add a dynamic property to each \(u\) in \(\Gamma(A,p)\)” effectively changes \(A\).

        3.2 Basic Aggregation

        3.2.1 Transformation aggregate

        3.2.1.1 Aggregation Algorithm

        @@ -2386,7 +2386,7 @@

        OData-URL for details.

        Where useful navigations exist it is beneficial to expose those as explicit navigation properties in the model, but the ability to pose queries that span entity sets not related by an association provides a mechanism for advanced consumers to use more flexible join conditions.

        -

        Example 47: if Sale had a string property ProductID instead of the navigation property Product, a "join" between Sales and Products could be accessed via the $crossjoin resource

        +

        Example 47: if Sale had a string property ProductID instead of the navigation property Product, a “join” between Sales and Products could be accessed via the $crossjoin resource

        GET /service/$crossjoin(Products,Sales)
                                  ?$expand=Products($select=Name),Sales($select=Amount)
                                  &$filter=Products/ID eq Sales/ProductID
        @@ -2551,7 +2551,7 @@

        </EntityContainer>

        5.5 Hierarchies

        -

        A hierarchy is an arrangement of entities whose values are represented as being "above", "below", or "at the same level as" one another. A hierarchy can be leveled or recursive.

        +

        A hierarchy is an arrangement of entities whose values are represented as being “above”, “below”, or “at the same level as” one another. A hierarchy can be leveled or recursive.

        5.5.1 Leveled Hierarchy

        A leveled hierarchy has a fixed number of levels each of which is represented by a grouping property. The values of a lower-level property depend on the property value of the level above.

        A leveled hierarchy can be defined for a collection of instances of an entity or complex type and is described with the term LeveledHierarchy that lists the properties used to form the hierarchy.

        @@ -2699,7 +2699,7 @@

        }
        -

        Example 57: the lowest-level organizations including their superordinate's ID

        +

        Example 57: the lowest-level organizations including their superordinate’s ID

        GET /service/SalesOrganizations?$filter=Aggregation.isleaf(
           HierarchyNodes=$root/SalesOrganizations,
           HierarchyQualifier='SalesOrgHierarchy',
        @@ -2842,7 +2842,7 @@ 

        \(o\) of expressions that could also be passed as a $orderby system query option. If \(o\) is present, the transformation stable-sorts \(H'\) by \(o\).

        The instances in the input set are related to one node (if \(p\) is single-valued) or multiple nodes (if \(p\) is collection-valued) in the recursive hierarchy. Given a node \(x\), denote by \(\hat F(x)\) the collection of all instances in the input set that are related to \(x\); these collections can overlap. For each \(u\) in \(\hat F(x)\), the output set contains one instance that comprises the properties of \(u\) and additional properties that identify the node \(x\). These additional properties are independent of \(u\) and are bundled into an instance called \(σ(x)\). For example, if a sale \(u\) is related to two sales organizations and hence contained in both \(\hat F(x_1)\) and \(\hat F(x_2)\), the output set will contain two instances \((u,σ(x_1))\) and \((u,σ(x_2))\) and \(σ(x_i)\) contributes a navigation property SalesOrganization.

        A transformation \(F(x)\) is defined below such that \(\hat F(x)\) is the output set of \(F(x)\) applied to the input set of the traverse transformation.

        -

        Given a node \(x\), the formulas below contain the transformation \(\Pi_G(σ(x))\) in order to inject the properties of \(σ(x)\) into the instances in \(\hat F(x)\); this uses the function \(\Pi_G\) that is defined in the simple grouping section. Further, \(G\) is a list of data aggregation paths that shall be present in the output set, and \(σ\) is a function that maps each hierarchy node \(x\) to an instance of the input type containing the paths from \(G\). As a consequence of the following definitions, only single-valued properties and "final segments from \(G\)" are nested into \(σ(x)\), therefore the behavior of \(\Pi_G(σ(x))\) is well-defined.

        +

        Given a node \(x\), the formulas below contain the transformation \(\Pi_G(σ(x))\) in order to inject the properties of \(σ(x)\) into the instances in \(\hat F(x)\); this uses the function \(\Pi_G\) that is defined in the simple grouping section. Further, \(G\) is a list of data aggregation paths that shall be present in the output set, and \(σ\) is a function that maps each hierarchy node \(x\) to an instance of the input type containing the paths from \(G\). As a consequence of the following definitions, only single-valued properties and “final segments from \(G\)” are nested into \(σ(x)\), therefore the behavior of \(\Pi_G(σ(x))\) is well-defined.

        The definition of \(σ(x)\) makes use of a function \(a(ε,t,x)\), which returns a sparsely populated instance \(u\) in which only the path \(t\) has a value, namely \(u[t]=x\).

        Three cases are distinguished:

          @@ -2940,7 +2940,7 @@

          \(S\) is not specified, then the result is effectively like in the standard case, except for the presence of the Aggregation.UpPath annotations.

          6.3 Grouping with rolluprecursive

          -

          Recall that simple grouping partitions the input set and applies a transformation sequence to each partition. By contrast, grouping with rolluprecursive, informally speaking, transforms the input set into overlapping portions (like "US" and "US East"), one for each node \(x\) of a recursive hierarchy. The transformation \(F(x)\), defined below, outputs the portion whose node identifiers are among the descendants of \(x\) (including \(x\) itself). A transformation sequence is then applied to each portion, and they are made distinguishable in the output set through injection of information about the node \(x\), which is achieved through the transformation \(\Pi_G(σ(x))\) defined in the traverse section.

          +

          Recall that simple grouping partitions the input set and applies a transformation sequence to each partition. By contrast, grouping with rolluprecursive, informally speaking, transforms the input set into overlapping portions (like “US” and “US East”), one for each node \(x\) of a recursive hierarchy. The transformation \(F(x)\), defined below, outputs the portion whose node identifiers are among the descendants of \(x\) (including \(x\) itself). A transformation sequence is then applied to each portion, and they are made distinguishable in the output set through injection of information about the node \(x\), which is achieved through the transformation \(\Pi_G(σ(x))\) defined in the traverse section.

          As defined above, \(H\), \(Q\) and \(p\) are the first three parameters of rolluprecursive, \(S\) is an optional fourth parameter. Let \(H'\) be the output set of the transformation sequence \(S\) applied to \(H\), or \(H'=H\) if \(S\) is not specified.

          Navigation properties specified in \(p\) are expanded by default.

          Let \(T\) be a transformation sequence, \(P_1\) stand in for zero or more property paths and \(P_2\) for zero or more rollup or rolluprecursive operators or property paths. The transformation \({\tt groupby}((P_1,{\tt rolluprecursive}(H,Q,p,S),P_2),T)\) is computed by the following algorithm, which invokes itself recursively if the number of rolluprecursive operators in the first argument of the groupby transformation, which is called \(M\), is greater than one. Let \(N\) be the recursion depth of the algorithm, starting with 1.

          @@ -3016,7 +3016,7 @@

          }

        -

        ⚠ Example 67: When requesting a sub-hierarchy consisting of the US East sales organization and its ancestors, the total sales amounts can either include the descendants outside this sub-hierarchy ("actual totals") or can exclude them ("visual totals").

        +

        ⚠ Example 67: When requesting a sub-hierarchy consisting of the US East sales organization and its ancestors, the total sales amounts can either include the descendants outside this sub-hierarchy (“actual totals”) or can exclude them (“visual totals”).

        Actual totals are computed when rolluprecursive is restricted to the sub-hierarchy by setting the optional parameter \(S\) to an ancestors transformation:

        GET /service/Sales?$apply=groupby((rolluprecursive(
             $root/SalesOrganizations,SalesOrgHierarchy,SalesOrganization/ID,
        @@ -3094,7 +3094,7 @@ 

        { "Name": "Sue" } ] }

        -

        Note that "Sue" appears only once although the customer base contains two different Sues.

        +

        Note that “Sue” appears only once although the customer base contains two different Sues.

        Aggregation is also possible across related entities.

        @@ -3109,8 +3109,8 @@

        ] }

        Since groupby expands navigation properties in grouping properties by default, this is the same result as if the request would include a $expand=Customer($select=Name). The groupby removes all other properties.

        -

        Note that "Luc" does not appear in the aggregated result as he hasn't bought anything and therefore there are no sales entities that refer/navigate to Luc.

        -

        However, even though both Sues bought products, only one "Sue" appears in the aggregate result. Including properties that guarantee the right level of uniqueness in the grouping can repair that.

        +

        Note that “Luc” does not appear in the aggregated result as he hasn’t bought anything and therefore there are no sales entities that refer/navigate to Luc.

        +

        However, even though both Sues bought products, only one “Sue” appears in the aggregate result. Including properties that guarantee the right level of uniqueness in the grouping can repair that.

        Example 71:

        @@ -3275,7 +3275,7 @@

        "TotalSales": { "Total@type": "Decimal", "Total": 4 } } ] }

        -

        Applying outerjoin instead would return an additional entity for product with ID "Pencil" and TotalSales having a null value.

        +

        Applying outerjoin instead would return an additional entity for product with ID “Pencil” and TotalSales having a null value.

        Example 80:

        @@ -3755,7 +3755,7 @@

        }

        -

        Example 103: concatenation of two different groupings "biggest sale per customer" and "biggest sale per product", made distinguishable by a dynamic property:

        +

        Example 103: concatenation of two different groupings “biggest sale per customer” and “biggest sale per product”, made distinguishable by a dynamic property:

        GET /service/Sales?$apply=concat(
             groupby((Customer),topcount(1,Amount))/compute('Customer' as per),
             groupby((Product),topcount(1,Amount))/compute('Product' as per))
        @@ -3869,7 +3869,7 @@ 

        7.9 Aggregation in Recursive Hierarchies

        If aggregation along a recursive hierarchy does not apply to the entire hierarchy, transformations ancestors and descendants may be used to restrict it as needed.

        7.10 Maintaining Recursive Hierarchies

        Besides changes to the structural properties of the entities in a hierarchical collection, hierarchy maintenance involves changes to the parent-child relationships.

        @@ -4324,12 +4324,12 @@

        }

        7.11 Transformation Sequences

        -

        Applying aggregation first covers the most prominent use cases. The slightly more sophisticated question "how much money is earned with small sales" requires filtering the base set before applying the aggregation. To enable this type of question several transformations can be specified in $apply in the order they are to be applied, separated by a forward slash.

        +

        Applying aggregation first covers the most prominent use cases. The slightly more sophisticated question “how much money is earned with small sales” requires filtering the base set before applying the aggregation. To enable this type of question several transformations can be specified in $apply in the order they are to be applied, separated by a forward slash.

        Example 119:

        GET /service/Sales?$apply=filter(Amount le 1)
             /aggregate(Amount with sum as Total)
        -

        means "filter first, then aggregate", and results in

        +

        means “filter first, then aggregate”, and results in

        {
           "@context": "$metadata#Sales(Total)",
           "value": [
        @@ -4467,35 +4467,35 @@ 

        [OData-ABNF]

        ABNF components: OData ABNF Construction Rules Version 4.01 and OData ABNF Test Cases.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-Agg-ABNF]

        OData Aggregation ABNF Construction Rules Version 4.0.
        -See link in "Additional artifacts" section on cover page.

        +See link in “Additional artifacts” section on cover page.

        [OData-CSDL]

        OData Common Schema Definition Language (CSDL) JSON Representation Version 4.01.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        OData Common Schema Definition Language (CSDL) XML Representation Version 4.01.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-JSON]

        OData JSON Format Version 4.01.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-Protocol]

        OData Version 4.01. Part 1: Protocol.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-URL]

        OData Version 4.01. Part 2: URL Conventions.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-VocAggr]

        OData Aggregation Vocabulary.
        -See link in "Additional artifacts" section on cover page.

        +See link in “Additional artifacts” section on cover page.

        [OData-VocCore]

        OData Core Vocabulary.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [RFC2119]
        -

        Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997
        +

        Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels”, BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997
        https://www.rfc-editor.org/info/rfc2119.

        [RFC8174]
        -

        Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017
        +

        Leiba, B., “Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words”, BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017
        https://www.rfc-editor.org/info/rfc8174.


        Appendix B. Acknowledgments

        @@ -4604,7 +4604,7 @@

        Remove actions and functions (except set transformations) on aggregated entities, adapted section "Actions and Functions on Aggregated Entities" +

        @@ -4617,14 +4617,14 @@

        Appendix D. Notices

        Copyright © OASIS Open 2023. All Rights Reserved.

        -

        All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The full Policy may be found at the OASIS website.

        +

        All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the “OASIS IPR Policy”). The full Policy may be found at the OASIS website.

        This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to OASIS, except as needed for the purpose of developing any document or deliverable produced by an OASIS Technical Committee (in which case the rules applicable to copyrights, as set forth in the OASIS IPR Policy, must be followed) or as required to translate it into languages other than English.

        The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.

        -

        This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

        +

        This document and the information contained herein is provided on an “AS IS” basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

        As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, Candidate OASIS Standard, OASIS Standard, or Approved Errata).

        [OASIS requests that any OASIS Party or any other party that believes it has patent claims that would necessarily be infringed by implementations of this OASIS Standards Final Deliverable, to notify OASIS TC Administrator and provide an indication of its willingness to grant patent licenses to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this deliverable.]

        [OASIS invites any party to contact the OASIS TC Administrator if it is aware of a claim of ownership of any patent claims that would necessarily be infringed by implementations of this OASIS Standards Final Deliverable by a patent holder that is not willing to provide a license to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this OASIS Standards Final Deliverable. OASIS may include such claims on its website, but disclaims any obligation to do so.]

        -

        [OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this OASIS Standards Final Deliverable or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS' procedures with respect to rights in any document or deliverable produced by an OASIS Technical Committee can be found on the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this OASIS Standards Final Deliverable, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims.]

        -

        The name "OASIS" is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifications, while reserving the right to enforce its marks against misleading uses. Please see https://www.oasis-open.org/policies-guidelines/trademark/ for above guidance.

        +

        [OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this OASIS Standards Final Deliverable or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS’ procedures with respect to rights in any document or deliverable produced by an OASIS Technical Committee can be found on the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this OASIS Standards Final Deliverable, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims.]

        +

        The name “OASIS” is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifications, while reserving the right to enforce its marks against misleading uses. Please see https://www.oasis-open.org/policies-guidelines/trademark/ for above guidance.

        diff --git a/docs/odata-data-aggregation-ext/odata-data-aggregation-ext.md b/docs/odata-data-aggregation-ext/odata-data-aggregation-ext.md index a2d9a7578..02e65d81f 100644 --- a/docs/odata-data-aggregation-ext/odata-data-aggregation-ext.md +++ b/docs/odata-data-aggregation-ext/odata-data-aggregation-ext.md @@ -67,7 +67,7 @@ This specification adds basic grouping and aggregation functionality (e.g. sum, #### Status: This document was last revised or approved by the OASIS Open Data Protocol (OData) TC on the above date. The level of approval is also listed above. Check the "Latest stage" location noted above for possible later revisions of this document. Any other numbered Versions and other technical work produced by the Technical Committee (TC) are listed at https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata#technical. -TC members should send comments on this specification to the TC's email list. Others should send comments to the TC's public comment list, after subscribing to it by following the instructions at the "[Send A Comment](https://www.oasis-open.org/committees/comments/index.php?wg_abbrev=odata)" button on the TC's web page at https://www.oasis-open.org/committees/odata/. +TC members should send comments on this specification to the TC's email list. Others should send comments to the TC's public comment list, after subscribing to it by following the instructions at the "Send A Comment" button on the TC's web page at https://www.oasis-open.org/committees/odata/. This specification is provided under the [RF on RAND Terms Mode](https://www.oasis-open.org/policies-guidelines/ipr/#RF-on-RAND-Mode) of the [OASIS IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/), the mode chosen when the Technical Committee was established. For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC's web page (https://www.oasis-open.org/committees/odata/ipr.php). @@ -256,7 +256,7 @@ All other text is normative unless otherwise labeled. Here is a customized command line which will generate HTML from this markdown file (named `odata-data-aggregation-ext-v4.0-cs03.md`). Line breaks are added for readability only: ``` -pandoc -f gfm+tex_math_dollars+fenced_divs +pandoc -f gfm+tex_math_dollars+fenced_divs+smart -t html -o odata-data-aggregation-ext-v4.0-cs03.html -c styles/markdown-styles-v1.7.3b.css diff --git a/docs/odata-json-format/odata-json-format.html b/docs/odata-json-format/odata-json-format.html index 231313fb6..0abeee3e8 100644 --- a/docs/odata-json-format/odata-json-format.html +++ b/docs/odata-json-format/odata-json-format.html @@ -138,12 +138,12 @@

        Abstract:

        The Open Data Protocol (OData) for representing and interacting with structured content is comprised of a set of specifications. The core specification for the protocol is in OData Version 4.02 Part 1: Protocol. This document extends the core specification by defining representations for OData requests and responses using a JSON format.

        Status:

        -

        This document was last revised or approved by the OASIS Open Data Protocol (OData) TC on the above date. The level of approval is also listed above. Check the "Latest stage" location noted above for possible later revisions of this document. Any other numbered Versions and other technical work produced by the Technical Committee (TC) are listed at https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata#technical.

        -

        TC members should send comments on this specification to the TC's email list. Others should send comments to the TC's public comment list, after subscribing to it by following the instructions at the "Send A Comment" button on the TC's web page at https://www.oasis-open.org/committees/odata/.

        -

        This specification is provided under the RF on RAND Terms Mode of the OASIS IPR Policy, the mode chosen when the Technical Committee was established. For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC's web page (https://www.oasis-open.org/committees/odata/ipr.php).

        -

        Note that any machine-readable content (Computer Language Definitions) declared Normative for this Work Product is provided in separate plain text files. In the event of a discrepancy between any such plain text file and display content in the Work Product's prose narrative document(s), the content in the separate plain text file prevails.

        +

        This document was last revised or approved by the OASIS Open Data Protocol (OData) TC on the above date. The level of approval is also listed above. Check the “Latest stage” location noted above for possible later revisions of this document. Any other numbered Versions and other technical work produced by the Technical Committee (TC) are listed at https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata#technical.

        +

        TC members should send comments on this specification to the TC’s email list. Others should send comments to the TC’s public comment list, after subscribing to it by following the instructions at the “Send A Comment” button on the TC’s web page at https://www.oasis-open.org/committees/odata/.

        +

        This specification is provided under the RF on RAND Terms Mode of the OASIS IPR Policy, the mode chosen when the Technical Committee was established. For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC’s web page (https://www.oasis-open.org/committees/odata/ipr.php).

        +

        Note that any machine-readable content (Computer Language Definitions) declared Normative for this Work Product is provided in separate plain text files. In the event of a discrepancy between any such plain text file and display content in the Work Product’s prose narrative document(s), the content in the separate plain text file prevails.

        Key words:

        -

        The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 RFC2119 and RFC8174 when, and only when, they appear in all capitals, as shown here.

        +

        The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 RFC2119 and RFC8174 when, and only when, they appear in all capitals, as shown here.

        Citation format:

        When referencing this specification the following citation format should be used:

        [OData-JSON-Format-v4.02]

        @@ -151,7 +151,7 @@

        Citation format:

        Notices

        Copyright © OASIS Open 2023. All Rights Reserved.

        Distributed under the terms of the OASIS IPR Policy.

        -

        The name "OASIS" is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs.

        +

        The name “OASIS” is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs.

        For complete copyright information please see the full Notices section in an Appendix below.


        Table of Contents

        @@ -318,7 +318,7 @@

        Here is a customized command line which will generate HTML from this markdown file (named odata-json-format-v4.02-csd01.md). Line breaks are added for readability only:

        -
        pandoc -f gfm+tex_math_dollars+fenced_divs
        +
        pandoc -f gfm+tex_math_dollars+fenced_divs+smart
                -t html
                -o odata-json-format-v4.02-csd01.html
                -c styles/markdown-styles-v1.7.3b.css
        @@ -335,8 +335,8 @@ 

        2 JSON Format Design

        JSON, as described in RFC8259 defines a text format for serializing structured data. Objects are serialized as an unordered collection of name/value pairs.

        JSON does not define any semantics around the name/value pairs that make up an object, nor does it define an extensibility mechanism for adding control information to a payload.

        -

        OData's JSON format extends JSON by defining general conventions for name/value pairs that annotate a JSON object, property or array. OData defines a set of canonical name/value pairs for control information such as ids, types, and links, and instance annotations MAY be used to add domain-specific information to the payload.

        -

        A key feature of OData's JSON format is to allow omitting predictable parts of the wire format from the actual payload. To reconstitute this data on the receiving end, expressions are used to compute missing links, type information, and other control data. These expressions (together with the data on the wire) can be used by the client to compute predictable payload pieces as if they had been included on the wire directly.

        +

        OData’s JSON format extends JSON by defining general conventions for name/value pairs that annotate a JSON object, property or array. OData defines a set of canonical name/value pairs for control information such as ids, types, and links, and instance annotations MAY be used to add domain-specific information to the payload.

        +

        A key feature of OData’s JSON format is to allow omitting predictable parts of the wire format from the actual payload. To reconstitute this data on the receiving end, expressions are used to compute missing links, type information, and other control data. These expressions (together with the data on the wire) can be used by the client to compute predictable payload pieces as if they had been included on the wire directly.

        Control information is used in JSON to capture instance metadata that cannot be predicted (e.g. the next link of a collection) as well as a mechanism to provide values where a computed value would be wrong (e.g. if the media read link of one particular entity does not follow the standard URL conventions). Computing values from metadata expressions is compute intensive and some clients might opt for a larger payload size to avoid computational complexity; to accommodate for this the Accept header allows the client to control the amount of control information added to the response.

        To optimize streaming scenarios, there are a few restrictions that MAY be imposed on the sequence in which name/value pairs appear within JSON objects. For details on the ordering requirements see Payload Ordering Constraints.


        @@ -389,7 +389,7 @@

        editLink: the link used to edit/update the entity, if the entity is updatable and the id does not represent a URL that can be used to edit the entity
      • navigationLink: the link used to retrieve the values of a navigation property
      • associationLink: the link used to describe the relationship between this entity and related entities
      • -
      • type: the type of the containing object or targeted property if the type of the object or targeted property cannot be heuristically determined from the data value, see section "Control Information: type (odata.type)".
      • +
      • type: the type of the containing object or targeted property if the type of the object or targeted property cannot be heuristically determined from the data value, see section “Control Information: type (odata.type)”.
      • Media entities and stream properties may in addition contain the following control information:

          @@ -419,7 +419,7 @@

          metadata parameter to specify the amount of metadata included in the response.

          Requests and responses MUST include the IEEE754Compatible parameter if Edm.Int64 and Edm.Decimal numbers are represented as strings.

          -

          Requests and responses MAY add the streaming parameter with a value of true or false, see section "Payload Ordering Constraints".

          +

          Requests and responses MAY add the streaming parameter with a value of true or false, see section “Payload Ordering Constraints”.

          4.2 Message Body

          Each message body is represented as a single JSON object. This object is either the representation of an entity, an entity reference or a complex type instance, or it contains a name/value pair whose name MUST be value and whose value is the correct representation for a primitive value, a collection of primitive values, a collection of complex values, a collection of entities, or a collection of objects that represent changes to a previous result.

          Client libraries MUST retain the order of objects within an array in JSON responses.

          @@ -479,7 +479,7 @@

          Note that in OData 4.0 the streaming format parameter was prefixed with odata.. Payloads with an OData-Version header equal to 4.0 MUST include the odata. prefix. Payloads with an OData-Version header equal to 4.01 or greater SHOULD NOT include the odata. prefix.

          4.5 Control Information

          -

          In addition to the "pure data" a message body MAY contain annotations and control information that is represented as name/value pairs whose names start with @.

          +

          In addition to the “pure data” a message body MAY contain annotations and control information that is represented as name/value pairs whose names start with @.

          In requests and responses with an OData-Version header with a value of 4.0 control information names are prefixed with @odata., e.g. @odata.context. In requests and responses without such a header the odata. prefix SHOULD be omitted, e.g. @context.

          In some cases, control information is required in request payloads; this is called out in the following subsections.

          Receivers that encounter unknown annotations in any namespace or unknown control information MUST NOT stop processing and MUST NOT signal an error.

          @@ -502,7 +502,7 @@

          OData-Protocol.

          4.5.3 Control Information: type (odata.type)

          The type control information specifies the type of a JSON object or name/value pair. Its value is a URI that identifies the type of the property or object. For built-in primitive types the value is the unqualified name of the primitive type. For payloads described by an OData-Version header with a value of 4.0, this name MUST be prefixed with the hash symbol (#); for non-OData 4.0 payloads, built-in primitive type values SHOULD be represented without the hash symbol, but consumers of 4.01 or greater payloads MUST support values with or without the hash symbol. For all other types, the URI may be absolute or relative to the type of the containing object. The root type may be absolute or relative to the root context URL.

          -

          If the URI references a metadata document (that is, it's not just a fragment), it MAY refer to a specific version of that metadata document using the $schemaversion system query option defined in OData-Protocol.

          +

          If the URI references a metadata document (that is, it’s not just a fragment), it MAY refer to a specific version of that metadata document using the $schemaversion system query option defined in OData-Protocol.

          For non-built in primitive types, the URI contains the namespace-qualified or alias-qualified type, specified as a URI fragment. For properties that represent a collection of values, the fragment is the namespace-qualified or alias-qualified element type enclosed in parentheses and prefixed with Collection. The namespace or alias MUST be defined or the namespace referenced in the metadata document of the service, see OData-CSDLJSON or OData-CSDLXML.

          The type control information MUST appear in requests and in responses with minimal or full metadata, if the type cannot be heuristically determined, as described below, and one of the following is true:

            @@ -592,7 +592,7 @@

            For media entities and stream properties at least one of the control information mediaEditLink and mediaReadLink MUST be included in responses if they don't follow standard URL conventions as defined in OData-URL, sections 4.6 Addressing a property and 4.14 Addressing the Media Stream of a Media Entity, or if metadata=full is requested.

            The mediaEditLink control information contains a URL that can be used to update the binary stream associated with the media entity or stream property. It MUST be included for updatable streams if it differs from standard URL conventions relative to the edit link of the entity.

            -

            The mediaReadLink control information contains a URL that can be used to read the binary stream associated with the media entity or stream property. It MUST be included if its value differs from the value of the associated mediaEditLink, if present, or if it doesn't follow standard URL conventions relative to the read link of the entity and the associated mediaEditLink is not present.

            +

            The mediaReadLink control information contains a URL that can be used to read the binary stream associated with the media entity or stream property. It MUST be included if its value differs from the value of the associated mediaEditLink, if present, or if it doesn’t follow standard URL conventions relative to the read link of the entity and the associated mediaEditLink is not present.

            The mediaContentType control information MAY be included; its value SHOULD match the media type of the binary stream represented by the mediaReadLink URL. This is only a hint; the actual media type will be included in the Content-Type header when the resource is requested.

            The mediaEtag control information MAY be included; its value is the ETag of the binary stream represented by this media entity or stream property.

            The media* control information is not written in responses if metadata=none is requested.

            @@ -822,7 +822,7 @@

            }

        7.5 Untyped Value

        -

        OData 4.01 adds the built-in abstract types Edm.Untyped and Collection(Edm.Untyped)that services can use to advertise in metadata that there is a property of a particular name present, but there is no type to describe the structure of the property's values.

        +

        OData 4.01 adds the built-in abstract types Edm.Untyped and Collection(Edm.Untyped)that services can use to advertise in metadata that there is a property of a particular name present, but there is no type to describe the structure of the property’s values.

        The value of an Edm.Untyped property MAY be a primitive value, a structural value, or a collection. If a collection, it may contain any combination of primitive values, structural values, and collections.

        The value of a property of type Collection(Edm.Untyped)MUST be a collection, and it MAY contain any combination of primitive values, structural values, and collections.

        Untyped values are the only place where a collection can directly contain a collection, or a collection can contain a mix of primitive values, structural values, and collections.

        @@ -924,7 +924,7 @@

        8.5 Bin
      • modify the name of an existing category
      • assign an existing product with the id 42 to the category
      • assign an existing product 57 to the category and update its name
      • -
      • create a new product named "Wedges" and assign it to the category
      • +
      • create a new product named Wedges and assign it to the category
      • At the end of the request, the updated category contains exactly the three specified products.

        PATCH http://host/service/Categories(6) HTTP/1.1
        @@ -1062,7 +1062,7 @@ 

        streaming=true content-type parameter is set, it MUST come before the value name/value pair. If the response represents a partial result, the count name/value pair MUST appear in the first partial response, and it MAY appear in subsequent partial responses (in which case it may vary from response to response).

        The value of the value name/value pair is a JSON array where each element is representation of an entity or a representation of an entity reference. An empty collection is represented as an empty JSON array.

        -

        Functions or actions that are bound to this collection of entities are advertised in the "wrapper object" in the same way as functions or actions are advertised in the object representing a single entity.

        +

        Functions or actions that are bound to this collection of entities are advertised in the “wrapper object” in the same way as functions or actions are advertised in the object representing a single entity.

        The nextLink control information MUST be included in a response that represents a partial result.

        Example 28:

        @@ -1101,7 +1101,7 @@

        1


        15 Delta Payload

        -

        The non-format specific aspects of the delta handling are described in the section "Requesting Changes" in OData-Protocol.

        +

        The non-format specific aspects of the delta handling are described in the section “Requesting Changes” in OData-Protocol.

        15.1 Delta Responses

        Responses from a delta request are returned as a JSON object.

        The JSON object for a delta response to a single entity is either an added, changed, or deleted entity.

        @@ -1113,11 +1113,11 @@

        15.

        Example 33: a 4.01 delta response with five changes, in order of occurrence

          -
        1. ContactName for customer 'BOTTM' was changed to "Susan Halvenstern"
        2. -
        3. Order 10643 was removed from customer 'ALFKI'
        4. -
        5. Order 10645 was added to customer 'BOTTM'
        6. +
        7. ContactName for customer BOTTM was changed to Susan Halvenstern
        8. +
        9. Order 10643 was removed from customer ALFKI
        10. +
        11. Order 10645 was added to customer BOTTM
        12. The shipping information for order 10643 was updated
        13. -
        14. Customer 'ANTON' was deleted
        15. +
        16. Customer ANTON was deleted
        {
           "@context": "http://host/service/$metadata#Customers/$delta",
        @@ -1173,16 +1173,16 @@ 

        Example 34: 4.01 delta response customers with expanded orders represented inline as a delta

          -
        1. Customer 'BOTTM': +
        2. Customer BOTTM:
            -
          1. ContactName was changed to "Susan Halvenstern"
          2. +
          3. ContactName was changed to Susan Halvenstern
          4. Order 10645 was added
        3. -
        4. Customer 'ALFKI': +
        5. Customer ALFKI:
          1. Order 10643 was removed
        6. -
        7. Customer 'ANTON' was deleted
        8. +
        9. Customer ANTON was deleted
        {
           "@context": "http://host/service/$metadata#Customers/$delta",
        @@ -1238,15 +1238,15 @@ 

        15.3 D

        The representation of deleted-entity objects differs between OData 4.0 and OData 4.01.

        In OData 4.0 payloads the deleted-entity object MUST include the following properties, regardless of the specified metadata value:

          -
        • Control information context - The context URL fragment MUST be #{entity-set}/$deletedEntity, where {entity-set} is the entity set of the deleted entity
        • -
        • id - The id of the deleted entity (same as the id returned or computed when calling GET on resource), which may be absolute or relative
        • +
        • Control information context — The context URL fragment MUST be #{entity-set}/$deletedEntity, where {entity-set} is the entity set of the deleted entity
        • +
        • id — The id of the deleted entity (same as the id returned or computed when calling GET on resource), which may be absolute or relative

        In OData 4.0 payloads the deleted-entity object MAY include the following optional property, regardless of the specified metadata value, and MAY include annotations:

          -
        • reason - either deleted, if the entity was deleted (destroyed), or changed if the entity was removed from membership in the result (i.e., due to a data change).
        • +
        • reason — either deleted, if the entity was deleted (destroyed), or changed if the entity was removed from membership in the result (i.e., due to a data change).
        -

        Example 36: deleted entity in OData 4.0 response - note that id is a property, not control information

        +

        Example 36: deleted entity in OData 4.0 response — note that id is a property, not control information

        {
           "@context":"#Customers/$deletedEntity",
           "reason":"deleted",
        @@ -1256,7 +1256,7 @@ 

        15.3 D

        In OData 4.01 payloads the deleted-entity object MUST include the following properties, regardless of the specified metadata value:

        • Control information removed, whose value is an object that MAY contain a property named reason. If present, the value of reason MUST be either deleted if the entity was deleted (destroyed), or changed if the entity was removed from membership in the result either due to change in value such that the entity no longer matches the defining query or because the entity was removed from the collection. The object MAY include annotations, and clients SHOULD NOT error due to the presence of additional properties that MAY be defined by future versions of this specification. For ordered payloads, the control information removed MUST immediately follow the context control information, if present, otherwise it MUST be the first property in the deleted entity.

        • -
        • Control information id or all of the entity's key fields. The id control information MUST appear if any of the entity's key fields are omitted from the response or the entity-id is not identical to the canonical URL of the entity. For ordered payloads, the control information id, if present, MUST immediately follow the control information removed.

        • +
        • Control information id or all of the entity’s key fields. The id control information MUST appear if any of the entity’s key fields are omitted from the response or the entity-id is not identical to the canonical URL of the entity. For ordered payloads, the control information id, if present, MUST immediately follow the control information removed.

        For full metadata the context control information MUST be included. It also MUST be included if the entity set of the deleted entity cannot be determined from the surrounding context.

        The deleted-entity object MAY include additional properties of the entity, as well as annotations, and MAY include related entities, related deleted entities, or a delta or full representation of a related collection of entities, to represent related entities that have been modified or deleted.

        @@ -1284,9 +1284,9 @@

        Deleted links within a delta response are represented as deleted-link objects.

        @@ -1297,28 +1297,28 @@

        15.6 Update a Collection of Entities

        The body of a PATCH request to a URL identifying a collection of entities is a JSON object. It MUST contain the context control information with a string value of #$delta, and it MUST contain an array-valued property named value containing all added, changed, or deleted entities, as well as added or deleted links between entities.

        Example 39: 4.01 delta response customers with expanded orders represented inline as a delta

          -
        1. Add customer 'EASTC'
        2. -
        3. Change ContactName of customer 'AROUT'
        4. -
        5. Delete customer 'ANTON'
        6. -
        7. Change customer 'ALFKI': +
        8. Add customer EASTC
        9. +
        10. Change ContactName of customer AROUT
        11. +
        12. Delete customer ANTON
        13. +
        14. Change customer ALFKI:
          1. Create order 11011
          2. Add link to existing order 10692
          3. Change ShippedDate of related order 10835
          4. Delete link to order 10643
        15. -
        16. Add link between customer 'ANATR' and order 10643
        17. -
        18. Delete link between customer 'DUMON' and order 10311
        19. +
        20. Add link between customer ANATR and order 10643
        21. +
        22. Delete link between customer DUMON and order 10311
        {
           "@context": "#$delta",
        @@ -1583,7 +1583,7 @@ 

        19.1 Batc }

        19.2 Referencing New Entities

        -

        The entity returned by a preceding request can be referenced in the request URL of subsequent requests. If the Location header in the response contains a relative URL, clients MUST be able to resolve it relative to the request's URL even if that contains such a reference.

        +

        The entity returned by a preceding request can be referenced in the request URL of subsequent requests. If the Location header in the response contains a relative URL, clients MUST be able to resolve it relative to the request’s URL even if that contains such a reference.

        Example 49: a batch request that contains the following operations in the order listed:

        19.6 Asynchronous Batch Requests

        -

        A batch request that specifies the respond-async preference MAY be executed asynchronously. This means that the "outer" batch request is executed asynchronously; this preference does not automatically cascade down to the individual requests within the batch. After successful execution of the batch request the response to the batch request is returned in the body of a response to an interrogation request against the status monitor resource URL, see section "Asynchronous Requests" in OData-Protocol.

        +

        A batch request that specifies the respond-async preference MAY be executed asynchronously. This means that the “outer” batch request is executed asynchronously; this preference does not automatically cascade down to the individual requests within the batch. After successful execution of the batch request the response to the batch request is returned in the body of a response to an interrogation request against the status monitor resource URL, see section “Asynchronous Requests” in OData-Protocol.

        A service MAY return interim results to an asynchronously executing batch. It does this by responding with 200 OK to a GET request to the monitor resource and including a nextLink control information in the JSON batch response, thus signaling that the response is only a partial result. A subsequent GET request to the next link MAY result in a 202 Accepted response with a location header pointing to a new status monitor resource.

        Example 52: referencing the example 47 above again, assume that the request is sent with the respond-async preference. This results in a 202 response pointing to a status monitor resource:

        HTTP/1.1 202 Accepted
         Location: http://service-root/async-monitor-0
         Retry-After: ###
        -

        When interrogating the monitor URL only the first request in the batch has finished processing and all the remaining requests are still being processed. The service signals that asynchronous processing is "finished" and returns a partial result with the first response and a next link. The client did not explicitly accept application/http, so the response is "unwrapped" and only indicates with the AsyncResult header that it is a response to a status monitor resource:

        +

        When interrogating the monitor URL only the first request in the batch has finished processing and all the remaining requests are still being processed. The service signals that asynchronous processing is “finished” and returns a partial result with the first response and a next link. The client did not explicitly accept application/http, so the response is “unwrapped” and only indicates with the AsyncResult header that it is a response to a status monitor resource:

        HTTP/1.1 200 OK
         AsyncResult: 200
         OData-Version: 4.01
        @@ -1782,7 +1782,7 @@ 

        20 Instance Annotations

        Annotations are an extensibility mechanism that allows services and clients to include information other than the raw data in the request or response.

        -

        Annotations are name/value pairs that have an at (@) and a dot (.) as part of the name. The part after the "at" sign (@) is the annotation identifier. It consists of the namespace or alias of the schema that defines the term, followed by a dot (.), followed by the name of the term, optionally followed by a hash (#) and a qualifier. The namespace or alias MUST be defined in the metadata document, see OData-CSDLJSON or OData-CSDLXML

        +

        Annotations are name/value pairs that have an at (@) and a dot (.) as part of the name. The part after the “at” sign (@) is the annotation identifier. It consists of the namespace or alias of the schema that defines the term, followed by a dot (.), followed by the name of the term, optionally followed by a hash (#) and a qualifier. The namespace or alias MUST be defined in the metadata document, see OData-CSDLJSON or OData-CSDLXML

        The annotation identifier odata is reserved for future extensions of the protocol and format. Instance annotations MUST have a namespace or alias that is different from odata.

        Annotations can be applied to any name/value pair in a JSON payload that represents a value of any type from the entity data model. Clients should never error due to an unexpected annotation in a JSON payload.

        Annotations are always expressed as name/value pairs. For entity data model constructs represented as JSON objects the annotation name/value pairs are placed within the object; for constructs represented as JSON arrays or primitives they are placed next to the annotated model construct. When annotating a payload that represents a single primitive or collection value, the annotations for the value appear next to the value property and are not prefixed with a property name.

        @@ -1804,15 +1804,15 @@

        20.1 Annotate a JSON Object

        When annotating a name/value pair for which the value is represented as a JSON object, each annotation is placed within the object and represented as a single name/value pair.

        -

        The name always starts with the "at" sign (@), followed by the annotation identifier.

        +

        The name always starts with the “at” sign (@), followed by the annotation identifier.

        The value MUST be an appropriate value for the annotation.

        20.2 Annotate a JSON Array or Primitive

        When annotating a name/value pair for which the value is represented as a JSON array or primitive value, each annotation that applies to this name/value pair MUST be represented as a single name/value pair and placed immediately prior to the annotated name/value pair, with the exception of the nextLink or collectionAnnotations control information, which can appear immediately before or after the annotated collection.

        -

        The name is the same as the name of the property or name/value pair being annotated, followed by the "at" sign (@), followed by the annotation identifier.

        +

        The name is the same as the name of the property or name/value pair being annotated, followed by the “at” sign (@), followed by the annotation identifier.

        The value MUST be an appropriate value for the annotation.

        20.3 Annotate a Primitive Value within a JSON Array

        Individual primitive elements within a JSON array can be annotated by applying the collectionAnnotations control information to the array containing the primitive member.

        -

        The control information must come with other annotations or control information immediately before or after the collection valued property. The name of the property representing the control information is the same as the name of the collection-valued property, followed by the "at" sign (@), followed by the collectionAnnotations identifier.

        +

        The control information must come with other annotations or control information immediately before or after the collection valued property. The name of the property representing the control information is the same as the name of the collection-valued property, followed by the “at” sign (@), followed by the collectionAnnotations identifier.


        21 Error Handling

        OData requests may return a well formed error response, an in-stream error, or error information within a success payload.

        @@ -1970,49 +1970,49 @@

        [OData-ABNF]

        ABNF components: OData ABNF Construction Rules Version 4.02 and OData ABNF Test Cases.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-CSDL]

        OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        OData Common Schema Definition Language (CSDL) XML Representation Version 4.02.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-Protocol]

        OData Version 4.02. Part 1: Protocol.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-URL]

        OData Version 4.02. Part 2: URL Conventions.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-VocCap]

        OData Vocabularies Version 4.0: Capabilities Vocabulary.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [OData-VocCore]

        OData Vocabularies Version 4.0: Core Vocabulary.
        -See link in "Related work" section on cover page.

        +See link in “Related work” section on cover page.

        [RFC2119]
        -

        Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997
        +

        Bradner, S., “Key words for use in RFCs to Indicate Requirement Levels”, BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997
        https://www.rfc-editor.org/info/rfc2119.

        [RFC3986]
        -

        Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", IETF RFC3986, January 2005 https://tools.ietf.org/html/rfc3986.

        +

        Berners-Lee, T., Fielding, R., and L. Masinter, “Uniform Resource Identifier (URI): Generic Syntax”, IETF RFC3986, January 2005 https://tools.ietf.org/html/rfc3986.

        [RFC3987]
        -

        Duerst, M. and, M. Suignard, "Internationalized Resource Identifiers (IRIs)", RFC 3987, January 2005 https://tools.ietf.org/html/rfc3987.

        +

        Duerst, M. and, M. Suignard, “Internationalized Resource Identifiers (IRIs)”, RFC 3987, January 2005 https://tools.ietf.org/html/rfc3987.

        [RFC4648]
        -

        Josefsson, S,, "The Base16, Base32, and Base64 Data Encodings", RFC 4648, October 2006 https://tools.ietf.org/html/rfc4648.

        +

        Josefsson, S,, “The Base16, Base32, and Base64 Data Encodings”, RFC 4648, October 2006 https://tools.ietf.org/html/rfc4648.

        [RFC5646]
        -

        Phillips, A., Ed., and M. Davis, Ed., "Tags for Identifying Languages", BCP 47, RFC 5646, September 2009 http://tools.ietf.org/html/rfc5646.

        +

        Phillips, A., Ed., and M. Davis, Ed., “Tags for Identifying Languages”, BCP 47, RFC 5646, September 2009 http://tools.ietf.org/html/rfc5646.

        [RFC7493]
        -

        Bray, T., Ed., "The I-JSON Message Format", RFC7493, March 2015 https://tools.ietf.org/html/rfc7493.

        +

        Bray, T., Ed., “The I-JSON Message Format”, RFC7493, March 2015 https://tools.ietf.org/html/rfc7493.

        [RFC7946]
        -

        Howard Butler, Martin Daly, Alan Doyle, Sean Gillies, Stefan Hagen and Tim Schaub, "The GeoJSON Format", RFC 7946, August 2016. http://tools.ietf.org/html/rfc7946.

        +

        Howard Butler, Martin Daly, Alan Doyle, Sean Gillies, Stefan Hagen and Tim Schaub, “The GeoJSON Format”, RFC 7946, August 2016. http://tools.ietf.org/html/rfc7946.

        [RFC8174]
        -

        Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017
        +

        Leiba, B., “Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words”, BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017
        https://www.rfc-editor.org/info/rfc8174.

        [RFC8259]
        -

        Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", RFC 8259, December 2017 http://tools.ietf.org/html/rfc8259.

        +

        Bray, T., Ed., “The JavaScript Object Notation (JSON) Data Interchange Format”, RFC 8259, December 2017 http://tools.ietf.org/html/rfc8259.

        A.2 Informative References

        [ECMAScript]

        ECMAScript 2023 Language Specification, 14th Edition, June 2023. Standard ECMA-262. https://www.ecma-international.org/publications-and-standards/standards/ecma-262/.

        [GeoJSON-2008]
        -

        Butler, H., Daly, M., Doyle, A., Gillies, S., Schaub, T., and C. Schmidt, "The GeoJSON Format Specification", June 2008 http://geojson.org/geojson-spec.html.

        +

        Butler, H., Daly, M., Doyle, A., Gillies, S., Schaub, T., and C. Schmidt, “The GeoJSON Format Specification”, June 2008 http://geojson.org/geojson-spec.html.


        Appendix B. Safety, Security and Privacy Considerations

        This specification raises no security issues.

        @@ -2115,14 +2115,14 @@

        Appendix E. Notice

        Copyright © OASIS Open 2023. All Rights Reserved.

        -

        All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The full Policy may be found at the OASIS website.

        +

        All capitalized terms in the following text have the meanings assigned to them in the OASIS Intellectual Property Rights Policy (the “OASIS IPR Policy”). The full Policy may be found at the OASIS website.

        This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to OASIS, except as needed for the purpose of developing any document or deliverable produced by an OASIS Technical Committee (in which case the rules applicable to copyrights, as set forth in the OASIS IPR Policy, must be followed) or as required to translate it into languages other than English.

        The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.

        -

        This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

        +

        This document and the information contained herein is provided on an “AS IS” basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

        As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, Candidate OASIS Standard, OASIS Standard, or Approved Errata).

        [OASIS requests that any OASIS Party or any other party that believes it has patent claims that would necessarily be infringed by implementations of this OASIS Standards Final Deliverable, to notify OASIS TC Administrator and provide an indication of its willingness to grant patent licenses to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this deliverable.]

        [OASIS invites any party to contact the OASIS TC Administrator if it is aware of a claim of ownership of any patent claims that would necessarily be infringed by implementations of this OASIS Standards Final Deliverable by a patent holder that is not willing to provide a license to such patent claims in a manner consistent with the IPR Mode of the OASIS Technical Committee that produced this OASIS Standards Final Deliverable. OASIS may include such claims on its website, but disclaims any obligation to do so.]

        -

        [OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this OASIS Standards Final Deliverable or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS' procedures with respect to rights in any document or deliverable produced by an OASIS Technical Committee can be found on the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this OASIS Standards Final Deliverable, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims.]

        -

        The name "OASIS" is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifications, while reserving the right to enforce its marks against misleading uses. Please see https://www.oasis-open.org/policies-guidelines/trademark/ for above guidance.

        +

        [OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this OASIS Standards Final Deliverable or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS’ procedures with respect to rights in any document or deliverable produced by an OASIS Technical Committee can be found on the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this OASIS Standards Final Deliverable, can be obtained from the OASIS TC Administrator. OASIS makes no representation that any information or list of intellectual property rights will at any time be complete, or that any claims in such list are, in fact, Essential Claims.]

        +

        The name “OASIS” is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs. OASIS welcomes reference to, and implementation and use of, specifications, while reserving the right to enforce its marks against misleading uses. Please see https://www.oasis-open.org/policies-guidelines/trademark/ for above guidance.

        diff --git a/docs/odata-json-format/odata-json-format.md b/docs/odata-json-format/odata-json-format.md index 4eb96a011..5c77e4c8c 100644 --- a/docs/odata-json-format/odata-json-format.md +++ b/docs/odata-json-format/odata-json-format.md @@ -58,7 +58,7 @@ The Open Data Protocol (OData) for representing and interacting with structured #### Status: This document was last revised or approved by the OASIS Open Data Protocol (OData) TC on the above date. The level of approval is also listed above. Check the "Latest stage" location noted above for possible later revisions of this document. Any other numbered Versions and other technical work produced by the Technical Committee (TC) are listed at https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata#technical. -TC members should send comments on this specification to the TC's email list. Others should send comments to the TC's public comment list, after subscribing to it by following the instructions at the "[Send A Comment](https://www.oasis-open.org/committees/comments/index.php?wg_abbrev=odata)" button on the TC's web page at https://www.oasis-open.org/committees/odata/. +TC members should send comments on this specification to the TC's email list. Others should send comments to the TC's public comment list, after subscribing to it by following the instructions at the "Send A Comment" button on the TC's web page at https://www.oasis-open.org/committees/odata/. This specification is provided under the [RF on RAND Terms Mode](https://www.oasis-open.org/policies-guidelines/ipr/#RF-on-RAND-Mode) of the [OASIS IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/), the mode chosen when the Technical Committee was established. For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC's web page (https://www.oasis-open.org/committees/odata/ipr.php). @@ -239,7 +239,7 @@ All other text is normative unless otherwise labeled. Here is a customized command line which will generate HTML from this markdown file (named `odata-json-format-v4.02-csd01.md`). Line breaks are added for readability only: ``` -pandoc -f gfm+tex_math_dollars+fenced_divs +pandoc -f gfm+tex_math_dollars+fenced_divs+smart -t html -o odata-json-format-v4.02-csd01.html -c styles/markdown-styles-v1.7.3b.css @@ -1714,7 +1714,7 @@ Example 22: submit a partial update request to: - modify the name of an existing category - assign an existing product with the id 42 to the category - assign an existing product 57 to the category and update its name -- create a new product named "Wedges" and assign it to the category +- create a new product named `Wedges` and assign it to the category At the end of the request, the updated category contains exactly the three specified products. @@ -2120,11 +2120,11 @@ or deleted links. Example 33: a 4.01 delta response with five changes, in order of occurrence - 1. `ContactName` for customer 'BOTTM' was changed to "Susan Halvenstern" - 2. Order 10643 was removed from customer 'ALFKI' - 3. Order 10645 was added to customer 'BOTTM' + 1. `ContactName` for customer `BOTTM` was changed to `Susan Halvenstern` + 2. Order 10643 was removed from customer `ALFKI` + 3. Order 10645 was added to customer `BOTTM` 4. The shipping information for order 10643 was updated - 5. Customer 'ANTON' was deleted + 5. Customer `ANTON` was deleted ```json { @@ -2232,12 +2232,12 @@ links](#DeletedLink). Example 34: 4.01 delta response customers with expanded orders represented inline as a delta - 1. Customer 'BOTTM': - 1. `ContactName` was changed to "Susan Halvenstern" + 1. Customer `BOTTM`: + 1. `ContactName` was changed to `Susan Halvenstern` 2. Order 10645 was added - 2. Customer 'ALFKI': + 2. Customer `ALFKI`: 1. Order 10643 was removed - 3. Customer 'ANTON' was deleted + 3. Customer `ANTON` was deleted ```json { @@ -2325,10 +2325,10 @@ In OData 4.0 payloads the deleted-entity object MUST include the following properties, regardless of the specified [`metadata`](#ControllingtheAmountofControlInformationinResponses) value: -- Control information [`context`](#ControlInformationcontextodatacontext) - The context URL fragment MUST be +- Control information [`context`](#ControlInformationcontextodatacontext) --- The context URL fragment MUST be `#{entity-set}/$deletedEntity`, where `{entity-set}` is the entity set of the deleted entity -- `id` - The [id](#ControlInformationidodataid) of the deleted entity +- `id` --- The [id](#ControlInformationidodataid) of the deleted entity (same as the [id](#ControlInformationidodataid) returned or computed when calling GET on resource), which may be absolute or [relative](#RelativeURLs) @@ -2338,12 +2338,12 @@ following optional property, regardless of the specified [`metadata`](#ControllingtheAmountofControlInformationinResponses) value, and MAY include [annotations](#InstanceAnnotations): -- `reason` - either `deleted`, if the entity was deleted (destroyed), +- `reason` --- either `deleted`, if the entity was deleted (destroyed), or `changed` if the entity was removed from membership in the result (i.e., due to a data change). ::: example -Example 36: deleted entity in OData 4.0 response - note that `id` is +Example 36: deleted entity in OData 4.0 response --- note that `id` is a property, not control information ```json { @@ -2438,13 +2438,13 @@ The link object MUST include the following properties, regardless of the specifi the context URL fragment MUST be `#{entity-set}/$link`, where `{entity-set}` is the entity set containing the source entity -- `source` - The [id](#ControlInformationidodataid) of the entity from which +- `source` --- The [id](#ControlInformationidodataid) of the entity from which the relationship is defined, which may be absolute or [relative](#RelativeURLs) -- `relationship` - The path from the source object to the navigation property which MAY +- `relationship` --- The path from the source object to the navigation property which MAY traverse one or more complex properties, type cast segments, or members of ordered collections -- `target` - The [id](#ControlInformationidodataid) of the related entity, +- `target` --- The [id](#ControlInformationidodataid) of the related entity, which may be absolute or [relative](#RelativeURLs) ## 15.5 Deleted Link @@ -2462,16 +2462,16 @@ path in the initial request, unless either of the following is true: `source` and `relationship`. The deleted-link object MUST include the following properties, regardless of the specified [`metadata`](#ControllingtheAmountofControlInformationinResponses) value, and MAY include [annotations](#InstanceAnnotations): -- [`context`](#ControlInformationcontextodatacontext) - the context URL fragment MUST be +- [`context`](#ControlInformationcontextodatacontext) --- the context URL fragment MUST be `#{entity-set}/$deletedLink`, where `{entity-set}` is the entity set containing the source entity -- `source` - The [id](#ControlInformationidodataid) of the entity from which +- `source` --- The [id](#ControlInformationidodataid) of the entity from which the relationship is defined, which may be absolute or [relative](#RelativeURLs) -- `relationship` - The path from the source object to the navigation property which MAY +- `relationship` --- The path from the source object to the navigation property which MAY traverse one or more complex properties, type cast segments, or members of ordered collections -- `target` - The [id](#ControlInformationidodataid) of the related entity for +- `target` --- The [id](#ControlInformationidodataid) of the related entity for multi-valued navigation properties, which may be absolute or [relative](#RelativeURLs). For delta payloads that do not specify an `OData-Version` header value of `4.0`, @@ -2492,16 +2492,16 @@ entities, as well as [added](#AddedLink) or ::: example Example 39: 4.01 delta response customers with expanded orders represented inline as a delta - 1. Add customer 'EASTC' - 2. Change `ContactName` of customer 'AROUT' - 3. Delete customer 'ANTON' - 4. Change customer 'ALFKI': + 1. Add customer `EASTC` + 2. Change `ContactName` of customer `AROUT` + 3. Delete customer `ANTON` + 4. Change customer `ALFKI`: 1. Create order 11011 2. Add link to existing order 10692 3. Change `ShippedDate` of related order 10835 4. Delete link to order 10643 - 5. Add link between customer 'ANATR' and order 10643 - 6. Delete link between customer 'DUMON' and order 10311 + 5. Add link between customer `ANATR` and order 10643 + 6. Delete link between customer `DUMON` and order 10311 ```json { "@context": "#$delta", diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index a2ec11f21..4a2ba23ef 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -141,12 +141,12 @@

        Abstract:

        The Open Data Protocol (OData) enables the creation of REST-based data services, which allow resources, identified using Uniform Resource Locators (URLs) and defined in an Entity Data Model (EDM), to be published and edited by Web clients using simple HTTP messages. This document defines the core semantics and facilities of the protocol.

        Status:

        -

        This document was last revised or approved by the OASIS Open Data Protocol (OData) TC on the above date. The level of approval is also listed above. Check the "Latest stage" location noted above for possible later revisions of this document. Any other numbered Versions and other technical work produced by the Technical Committee (TC) are listed at https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata#technical.

        -

        TC members should send comments on this specification to the TC's email list. Others should send comments to the TC's public comment list, after subscribing to it by following the instructions at the "Send A Comment" button on the TC's web page at https://www.oasis-open.org/committees/odata/.

        -

        This specification is provided under the RF on RAND Terms Mode of the OASIS IPR Policy, the mode chosen when the Technical Committee was established. For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC's web page (https://www.oasis-open.org/committees/odata/ipr.php).

        -

        Note that any machine-readable content (Computer Language Definitions) declared Normative for this Work Product is provided in separate plain text files. In the event of a discrepancy between any such plain text file and display content in the Work Product's prose narrative document(s), the content in the separate plain text file prevails.

        +

        This document was last revised or approved by the OASIS Open Data Protocol (OData) TC on the above date. The level of approval is also listed above. Check the “Latest stage” location noted above for possible later revisions of this document. Any other numbered Versions and other technical work produced by the Technical Committee (TC) are listed at https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata#technical.

        +

        TC members should send comments on this specification to the TC’s email list. Others should send comments to the TC’s public comment list, after subscribing to it by following the instructions at the “Send A Comment” button on the TC’s web page at https://www.oasis-open.org/committees/odata/.

        +

        This specification is provided under the RF on RAND Terms Mode of the OASIS IPR Policy, the mode chosen when the Technical Committee was established. For information on whether any patents have been disclosed that may be essential to implementing this specification, and any offers of patent licensing terms, please refer to the Intellectual Property Rights section of the TC’s web page (https://www.oasis-open.org/committees/odata/ipr.php).

        +

        Note that any machine-readable content (Computer Language Definitions) declared Normative for this Work Product is provided in separate plain text files. In the event of a discrepancy between any such plain text file and display content in the Work Product’s prose narrative document(s), the content in the separate plain text file prevails.

        Key words:

        -

        The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 RFC2119 and RFC8174 when, and only when, they appear in all capitals, as shown here.

        +

        The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 RFC2119 and RFC8174 when, and only when, they appear in all capitals, as shown here.

        Citation format:

        When referencing this specification the following citation format should be used:

        [OData-v4.02-Part1]

        @@ -154,7 +154,7 @@

        Citation format:

        Notices

        Copyright © OASIS Open 2023. All Rights Reserved.

        Distributed under the terms of the OASIS IPR Policy.

        -

        The name "OASIS" is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs.

        +

        The name “OASIS” is a trademark of OASIS, the owner and developer of this specification, and should be used only to refer to the organization and its official outputs.

        For complete copyright information please see the full Notices section in an Appendix below.


        Table of Contents

        @@ -307,7 +307,7 @@

        Table of Contents

      • 11.2.4 Requesting Individual Properties
      • 11.2.5 Specifying Properties to Return

        3 Data Model

        -

        This section provides a high-level description of the Entity Data Model (EDM): the abstract data model that is used to describe the data exposed by an OData service. An OData Metadata Document is a representation of a service's data model exposed for client consumption.

        +

        This section provides a high-level description of the Entity Data Model (EDM): the abstract data model that is used to describe the data exposed by an OData service. An OData Metadata Document is a representation of a service’s data model exposed for client consumption.

        The central concepts in the EDM are entities, relationships, entity sets, actions, and functions.

        Entities are instances of entity types (e.g. Customer, Employee, etc.).

        Entity types are named structured types with a key. They define the named properties and relationships of an entity. Entity types may derive by single inheritance from other entity types.

        The key of an entity type is formed from a subset of the primitive properties (e.g. CustomerId, OrderId, LineId, etc.) of the entity type.

        Complex types are keyless named structured types consisting of a set of properties. These are value types whose instances cannot be referenced outside of their containing entity. Complex types are commonly used as property values in an entity or as parameters to operations.

        -

        Properties declared as part of a structured type's definition are called declared properties. Instances of structured types may contain additional undeclared dynamic properties. A dynamic property cannot have the same name as a declared property. Entity or complex types which allow clients to persist additional undeclared properties are called open types.

        +

        Properties declared as part of a structured type’s definition are called declared properties. Instances of structured types may contain additional undeclared dynamic properties. A dynamic property cannot have the same name as a declared property. Entity or complex types which allow clients to persist additional undeclared properties are called open types.

        Relationships from one entity to another are represented as navigation properties. Navigation properties are generally defined as part of an entity type, but can also appear on entity instances as undeclared dynamic navigation properties. Each relationship has a cardinality.

        Enumeration types are named primitive types whose values are named constants with underlying integer values.

        Type definitions are named primitive types with fixed facet values such as maximum length or precision. Type definitions can be used in place of primitive typed properties, for example, within property definitions.

        -

        Entity sets are named collections of entities (e.g. Customers is an entity set containing Customer entities). An entity's key uniquely identifies the entity within an entity set. If multiple entity sets use the same entity type, the same combination of key values can appear in more than one entity set and identifies different entities, one per entity set where this key combination appears. Each of these entities has a different entity-id. Entity sets provide entry points into the data model.

        +

        Entity sets are named collections of entities (e.g. Customers is an entity set containing Customer entities). An entity’s key uniquely identifies the entity within an entity set. If multiple entity sets use the same entity type, the same combination of key values can appear in more than one entity set and identifies different entities, one per entity set where this key combination appears. Each of these entities has a different entity-id. Entity sets provide entry points into the data model.

        Operations allow the execution of custom logic on parts of a data model. Functions are operations that do not have side effects and may support further composition, for example, with additional filter operations, functions or an action. Actions are operations that allow side effects, such as data modification, and cannot be further composed in order to avoid non-deterministic behavior. Actions and functions are either bound to a type, enabling them to be called as members of an instance of that type, or unbound, in which case they are called as static operations. Action imports and function imports enable unbound actions and functions to be called from the service root.

        Singletons are named entities which can be accessed as direct children of the entity container. A singleton may also be a member of an entity set.

        An OData resource is anything in the model that can be addressed (an entity set, entity, property, or operation).

        @@ -565,20 +565,20 @@

        4 Service M

        An OData service exposes two well-defined resources that describe its data model; a service document and a metadata document.

        The service document lists entity sets, functions, and singletons that can be retrieved. Clients can use the service document to navigate the model in a hypermedia-driven fashion.

        The metadata document describes the types, sets, functions and actions understood by the OData service. Clients can use the metadata document to understand how to query and interact with entities in the service.

        -

        In addition to these two "fixed" resources, an OData service consists of dynamic resources. The URLs for many of these resources can be computed from the information in the metadata document.

        +

        In addition to these two “fixed” resources, an OData service consists of dynamic resources. The URLs for many of these resources can be computed from the information in the metadata document.

        See Requesting Data and Data Modification for details.

        4.1 Entity-Ids and Entity References

        Whereas entities within an entity set are uniquely identified by their key values, entities are also uniquely identified by a durable, opaque, globally unique entity-id. The entity-id MUST be an IRI as defined in RFC3987 and MAY be expressed in payloads, headers, and URLs as a relative reference as appropriate. While the client MUST be prepared to accept any IRI, services MUST use valid URIs in this version of the specification since there is currently no lossless representation of an IRI in the EntityId header.

        Services are strongly encouraged to use the canonical URL for an entity as defined in OData-URL as its entity-id, but clients cannot assume the entity-id can be used to locate the entity unless the Core.DereferenceableIDs term is applied to the entity container, nor can the client assume any semantics from the structure of the entity-id. The canonical resource $entity provides a general mechanism for resolving an entity-id into an entity representation.

        Services that use the standard URL conventions for entity-ids annotate their entity container with the term Core.ConventionalIDs, see OData-VocCore.

        -

        Entity references refer to an entity using the entity's entity-id.

        +

        Entity references refer to an entity using the entity’s entity-id.

        4.2 Read URLs and Edit URLs

        The read URL of an entity is the URL that can be used to read the entity.

        The edit URL of an entity is the URL that can be used to update or delete the entity.

        The edit URL of a property is the edit URL of the entity with appended segment(s) containing the path to the property.

        Services are strongly encouraged to use the canonical URL for an entity as defined in OData-URL for both the read URL and the edit URL of an entity, with a cast segment to the type of the entity appended to the canonical URL if the type of the entity is derived from the declared type of the entity set. However, clients cannot assume this convention and must use the links specified in the payload according to the appropriate format as the two URLs may be different from one another, or one or both of them may differ from convention.

        4.3 Transient Entities

        -

        Transient entities are instances of an entity type that are "calculated on the fly" and only exist within a single payload. They cannot be reread or updated and consequently possess neither a stable entity-id nor a read URL or an update URL.

        +

        Transient entities are instances of an entity type that are “calculated on the fly” and only exist within a single payload. They cannot be reread or updated and consequently possess neither a stable entity-id nor a read URL or an update URL.

        4.4 Default Namespaces

        References to actions, functions, and types within a URL typically requires prefixing the name of the action, function, or type with the namespace or alias in which it is defined. This namespace qualification enables differentiating between similarly named elements across schema, or between properties and bound functions, actions, or types with the same name.

        Services MAY define one or more default namespaces through the Core.DefaultNamespace term defined in OData-VocCore. Functions, actions and types in a default namespace can be referenced in URLs with or without namespace or alias qualification.

        @@ -618,7 +618,7 @@

        6 Extensi

        The OData protocol supports both user- and version-driven extensibility through a combination of versioning, convention, and explicit extension points.

        6.1 Query Option Extensibility

        Query options within the request URL can control how a particular request is processed by the service.

        -

        OData-defined system query options are optionally prefixed with "$". Services may support additional custom query options not defined in the OData specification, but they MUST NOT begin with the "$" or "@" character and MUST NOT conflict with any OData-defined system query options defined in the OData version supported by the service.

        +

        OData-defined system query options are optionally prefixed with “$”. Services may support additional custom query options not defined in the OData specification, but they MUST NOT begin with the “$” or “@” character and MUST NOT conflict with any OData-defined system query options defined in the OData version supported by the service.

        OData services SHOULD NOT require any query options to be specified in a request. Services SHOULD fail any request that contains query options that they do not understand and MUST fail any request that contains unsupported OData query options defined in the version of this specification supported by the service.

        In many cases OData services return URLs to identify resources that are later requested by clients. Where possible, interoperability is enhanced by providing all identifying information in the path portion of the URL. However, clients should be prepared for such URLs to include custom query options and propagate any such custom query options in future requests to the identified resource.

        6.2 Payload Extensibility

        @@ -646,7 +646,7 @@

        7 Formats

        In the case that both the Accept header and the $format system query option are specified on a request, the value specified in the $format query option MUST be used.

        If the service does not support the requested format, it replies with a 406 Not Acceptable error response.

        Services SHOULD advertise their supported formats in the metadata document by annotating their entity container with the term Capabilities.SupportedFormats, as defined in OData-VocCap, listing all available formats and combinations of supported format parameters.

        -

        The media types for the JSON and XML representation of the metadata document are described in section "Metadata Document Request".

        +

        The media types for the JSON and XML representation of the metadata document are described in section “Metadata Document Request”.

        The format specification OData-JSON describes the media type and the format parameters for non-metadata requests and responses.

        For non-metadata requests, if neither the Accept header nor the $format query option are specified, the service MAY respond to requests in any format.

        Client libraries MUST retain the order of objects within an array in JSON responses, and elements in document order for XML responses, including CSDL documents.

        @@ -657,16 +657,16 @@

        8.1 Com

        The following headers are common between OData requests and responses.

        8.1.1 Header Content-Type

        The format of a non-empty individual request or response body, alone or within a batch, MUST be specified in the Content-Type header of a request or response. The exception to this is if the body represents the media stream of a media entity or stream property, in which case the Content-Type header SHOULD be present.

        -

        The specified format MAY include format parameters. Clients MUST be prepared for the service to return custom format parameters not defined in OData and SHOULD NOT expect that such format parameters can be ignored. Custom format parameters MUST NOT start with "odata" and services MUST NOT require generic OData consumers to understand custom format parameters in order to correctly interpret the payload.

        +

        The specified format MAY include format parameters. Clients MUST be prepared for the service to return custom format parameters not defined in OData and SHOULD NOT expect that such format parameters can be ignored. Custom format parameters MUST NOT start with odata and services MUST NOT require generic OData consumers to understand custom format parameters in order to correctly interpret the payload.

        See OData-JSON for format-specific details about format parameters within the Content-Type header.

        8.1.2 Header Content-Encoding

        As defined in RFC7231, the Content-Encoding header field is used as a modifier to the media-type (as indicated in the Content-Type). When present, its value indicates what additional content codings have been applied to the entity-body. A service MAY specify a list of acceptable content codings using an annotation with term Capabilities.AcceptableEncodings, see OData-VocCap.

        -

        If the Content-Encoding header is specified on an individual request or response within a batch, then it specifies the encoding for that individual request or response. Individual requests or responses that don't include the Content-Encoding header inherit the encoding of the overall batch request or response.

        +

        If the Content-Encoding header is specified on an individual request or response within a batch, then it specifies the encoding for that individual request or response. Individual requests or responses that don’t include the Content-Encoding header inherit the encoding of the overall batch request or response.

        8.1.3 Header Content-Language

        As defined in RFC7231, a request or response can include a Content-Language header to indicate the natural language of the intended audience for the enclosed message body. OData does not add any additional requirements over HTTP for including Content-Language. OData services can annotate model elements whose content depends on the content language with the term Core.IsLanguageDependent, see OData-VocCore.

        -

        If the Content-Language header is specified on an individual request or response within a batch, then it specifies the language for that individual request or response. Individual requests or responses that don't include the Content-Language header inherit the language of the overall batch request or response.

        +

        If the Content-Language header is specified on an individual request or response within a batch, then it specifies the language for that individual request or response. Individual requests or responses that don’t include the Content-Language header inherit the language of the overall batch request or response.

        8.1.4 Header Content-Length

        -

        As defined in RFC7230, a request or response SHOULD include a Content-Length header when the message's length can be determined prior to being transferred. OData does not add any additional requirements over HTTP for writing Content-Length.

        +

        As defined in RFC7230, a request or response SHOULD include a Content-Length header when the message’s length can be determined prior to being transferred. OData does not add any additional requirements over HTTP for writing Content-Length.

        If the Content-Length header is specified on an individual request or response within a batch, then it specifies the length for that individual request or response.

        8.1.5 Header OData-Version

        OData clients SHOULD use the OData-Version header on a request to specify the version of the protocol used to generate the request payload.

        @@ -674,7 +674,7 @@

        OData-MaxVersion, if specified, and the maximum version of the protocol that the service understands.

        OData services MUST include the OData-Version header on a response to specify the version of the protocol used to generate the response payload. The client MUST interpret the response payload according to the rules defined in the specified version of the protocol. Request and response payloads are independent and may have different OData-Version headers according to the above rules.

        For more details, see Versioning.

        -

        If the OData-Version header is specified on an individual request or response within a batch, then it specifies the OData version for that individual request or response. Individual requests or responses that don't include the OData-Version header inherit the OData version of the overall batch request or response. This OData version does not typically vary within a batch.

        +

        If the OData-Version header is specified on an individual request or response within a batch, then it specifies the OData version for that individual request or response. Individual requests or responses that don’t include the OData-Version header inherit the OData version of the overall batch request or response. This OData version does not typically vary within a batch.

        8.2 Request Headers

        In addition to the Common Headers, the client may specify any combination of the following request headers.

        8.2.1 Header Accept

        @@ -683,13 +683,13 @@

        8.2.1 Hea

        If a media type specified in the Accept header includes a charset format parameter and the request also contains an Accept-Charset header, then the Accept-Charset header MUST be used.

        If the media type specified in the Accept header does not include a charset format parameter, then the Content-Type header of the response MUST NOT contain a charset format parameter.

        The service SHOULD NOT add any format parameters to the Content-Type parameter not specified in the Accept header.

        -

        If the Accept header is specified on an individual request within a batch, then it specifies the acceptable formats for that individual request. Requests within a batch that don't include the Accept header inherit the acceptable formats of the overall batch request.

        +

        If the Accept header is specified on an individual request within a batch, then it specifies the acceptable formats for that individual request. Requests within a batch that don’t include the Accept header inherit the acceptable formats of the overall batch request.

        8.2.2 Header Accept-Charset

        As defined in RFC7231, the client MAY specify the set of accepted character sets with the Accept-Charset header.

        -

        If the Accept-Charset header is specified on an individual request within a batch, then it specifies the acceptable character sets for that individual request. Requests within a batch that don't include the Accept-Charset header inherit the acceptable character sets of the overall batch request.

        +

        If the Accept-Charset header is specified on an individual request within a batch, then it specifies the acceptable character sets for that individual request. Requests within a batch that don’t include the Accept-Charset header inherit the acceptable character sets of the overall batch request.

        8.2.3 Header Accept-Language

        As defined in RFC7231, the client MAY specify the set of accepted natural languages with the Accept-Language header.

        -

        If the Accept-Language header is specified on an individual request within a batch, then it specifies the acceptable languages for that individual request. Requests within a batch that don't include the Accept-Language header inherit the acceptable languages of the overall batch request.

        +

        If the Accept-Language header is specified on an individual request within a batch, then it specifies the acceptable languages for that individual request. Requests within a batch that don’t include the Accept-Language header inherit the acceptable languages of the overall batch request.

        8.2.4 Header If-Match

        As defined in RFC7232, a client MAY include an If-Match header in a request to GET, POST, PUT, PATCH or DELETE. The value of the If-Match request header MUST be an ETag value previously retrieved for the resource, or * to match any value.

        If an operation on an existing resource requires an ETag, (see term Core.OptimisticConcurrency in OData-VocCore and property OptimisticConcurrencyControl of type Capabilities.NavigationPropertyRestriction in OData-VocCap) and the client does not specify an If-Match request header in a Data Modification Request or in an Action Request invoking an action bound to the resource, the service responds with a 428 Precondition Required and MUST ensure that no observable change occurs as a result of the request.

        @@ -704,8 +704,8 @@

        8.2.6 Header Isolation (OData-Isolation)

        The Isolation header specifies the isolation of the current request from external changes. The only supported value for this header is snapshot.

        -

        If the service doesn't support Isolation:snapshot and this header was specified on the request, the service MUST NOT process the request and MUST respond with 412 Precondition Failed.

        -

        Snapshot isolation guarantees that all data returned for a request, including multiple requests within a batch or results retrieved across multiple pages, will be consistent as of a single point in time. Only data modifications made within the request (for example, by a data modification request within the same batch) are visible. The effect is as if the request generates a "snapshot" of the committed data as it existed at the start of the request.

        +

        If the service doesn’t support Isolation:snapshot and this header was specified on the request, the service MUST NOT process the request and MUST respond with 412 Precondition Failed.

        +

        Snapshot isolation guarantees that all data returned for a request, including multiple requests within a batch or results retrieved across multiple pages, will be consistent as of a single point in time. Only data modifications made within the request (for example, by a data modification request within the same batch) are visible. The effect is as if the request generates a “snapshot” of the committed data as it existed at the start of the request.

        The Isolation header may be specified on a single or batch request. If it is specified on a batch then the value is applied to all statements within the batch.

        Next links returned within a snapshot return results within the same snapshot as the initial request; the client is not required to repeat the header on each individual page request.

        The Isolation header has no effect on links other than the next link. Navigation links, read links, and edit links return the current version of the data.

        @@ -717,7 +717,7 @@

        OData-Version less than or equal to the specified OData-MaxVersion.

        If OData-MaxVersion is not specified, then the service SHOULD return responses with the same OData version over time and interpret the request as having an OData-MaxVersion equal to the maximum OData version supported by the service at its initial publication.

        -

        If the OData-MaxVersion header is specified on an individual request within a batch, then it specifies the maximum OData version for that individual request. Individual requests that don't include the OData-MaxVersion header inherit the maximum OData version of the overall batch request or response. The maximum OData version does not typically vary within a batch.

        +

        If the OData-MaxVersion header is specified on an individual request within a batch, then it specifies the maximum OData version for that individual request. Individual requests that don’t include the OData-MaxVersion header inherit the maximum OData version of the overall batch request or response. The maximum OData version does not typically vary within a batch.

        For more details, see Versioning.

        8.2.8 Header Prefer

        The Prefer header, as defined in RFC7240, allows clients to request certain behavior from the service. The service MUST ignore preference values that are either not supported or not known by the service.

        @@ -726,7 +726,7 @@

        8.2.8 Hea

        8.2.8.1 Preference allow-entityreferences (odata.allow-entityreferences)

        The allow-entityreferences preference indicates that the service is allowed to return entity references in place of entities that have previously been returned, with at least the properties requested, in the same response (for example, when serializing the expanded results of many-to-many relationships). The service MUST NOT return entity references in place of requested entities if allow-entityreferences has not been specified in the request, unless explicitly defined by other rules in this document. The syntax of the allow-entityreferences preference is defined in OData-ABNF.

        In the case the service applies the allow-entityreferences preference it MUST include a Preference-Applied response header containing the allow-entityreferences preference to indicate that entity references MAY be returned in place of entities that have previously been returned.

        -

        If the allow-entityreferences preference is specified on an individual request within a batch, then it specifies the preference for that individual request. Individual requests within a batch that don't include the allow-entityreferences preference inherit the preference of the overall batch request.

        +

        If the allow-entityreferences preference is specified on an individual request within a batch, then it specifies the preference for that individual request. Individual requests within a batch that don’t include the allow-entityreferences preference inherit the preference of the overall batch request.

        Note: The allow-entityreferences preference was named odata.allow-entityreferences in OData version 4.0. Services that support the allow-entityreferences preference SHOULD also support odata.allow-entityreferences for OData 4.0 clients and clients SHOULD use odata.allow-entityreferences for compatibility with OData 4.0 services.

        8.2.8.2 Preference callback (odata.callback)

        For scenarios in which links returned by the service are used by the client to poll for additional information, the client can specify the callback preference to request that the service notify the client when data is available.

        @@ -772,7 +772,7 @@

        -

        Example 5: a Prefer header requesting that all annotations defined under the "display" namespace (recursively) be returned

        +

        Example 5: a Prefer header requesting that all annotations defined under the display namespace (recursively) be returned

        Prefer: include-annotations="display.*"

      • The include-annotations preference is only a hint to the service. The service MAY ignore the preference and is free to decide whether or not to return annotations not specified in the include-annotations preference.

        In the case that the client has specified the include-annotations preference in the request, the service SHOULD include a Preference-Applied response header containing the include-annotations preference to specify the annotations actually included, where applicable, in the response. This value may differ from the annotations requested in the Prefer header of the request.

        -

        If the include-annotations preference is specified on an individual request within a batch, then it specifies the preference for that individual request. Individual requests within a batch that don't include the include-annotations preference inherit the preference of the overall batch request.

        +

        If the include-annotations preference is specified on an individual request within a batch, then it specifies the preference for that individual request. Individual requests within a batch that don’t include the include-annotations preference inherit the preference of the overall batch request.

        Note: The include-annotations preference was named odata.include-annotations in OData version 4.0. Services that support theinclude-annotationspreference SHOULD also support odata.include-annotations for OData 4.0 clients and clients SHOULD use odata.include-annotations for compatibility with OData 4.0 services. If both include-annotations and odata.include-annotations preferences are specified in the same request, the value of the include-annotations preference SHOULD be used.

        8.2.8.5 Preference maxpagesize (odata.maxpagesize)

        The maxpagesize preference is used to request that each collection within the response contain no more than the number of items specified as the positive integer value of this preference. The syntax of the maxpagesize preference is defined in OData-ABNF.

        @@ -886,7 +886,7 @@

        Data Service Request has been accepted and has not yet completed executing asynchronously. The asynchronous handling of requests is defined in the sections on Asynchronous Requests and Asynchronous Batch Requests.

        9.1.4 Response Code 204 No Content

        A request returns 204 No Content if the requested resource has the null value, or if the service applies a return=minimal preference. In this case, the response body MUST be empty.

        -

        As defined in RFC7231, a Data Modification Request that responds with 204 No Content MAY include an ETag header with a value reflecting the result of the data modification if and only if the client can reasonably "know" the new representation of the resource without actually receiving it. For a PUT request this means that the response body of a corresponding 200 OK or 201 Created response would have been identical to the request body, i.e. no server-side modification of values sent in the request body, no server-calculated values etc. For a PATCH request this means that the response body of a corresponding 200 OK or 201 Created response would have consisted of all values sent in the request body, plus (for values not sent in the request body) server-side values corresponding to the ETag value sent in the If-Match header of the PATCH request, i.e. the previous values "known" to the client.

        +

        As defined in RFC7231, a Data Modification Request that responds with 204 No Content MAY include an ETag header with a value reflecting the result of the data modification if and only if the client can reasonably “know” the new representation of the resource without actually receiving it. For a PUT request this means that the response body of a corresponding 200 OK or 201 Created response would have been identical to the request body, i.e. no server-side modification of values sent in the request body, no server-calculated values etc. For a PATCH request this means that the response body of a corresponding 200 OK or 201 Created response would have consisted of all values sent in the request body, plus (for values not sent in the request body) server-side values corresponding to the ETag value sent in the If-Match header of the PATCH request, i.e. the previous values “known” to the client.

        9.1.5 Response Code 3xx Redirection

        As per RFC7231, a 3xx Redirection indicates that further action needs to be taken by the client in order to fulfill the request. In this case, the response SHOULD include a Location header, as appropriate, with the URL from which the result can be obtained; it MAY include a Retry-After header.

        9.1.6 Response Code 304 Not Modified

        @@ -927,7 +927,7 @@

        9.5

        Services MAY include the header OData-Error as a trailing header if supported by the transport protocol (e.g. HTTP/1.1 with chunked transfer encoding, or HTTP/2).


        10 Context URL

        -

        The context URL describes the content of the payload. It consists of the canonical metadata document URL and a fragment identifying the relevant portion of the metadata document. The context URL makes response payloads "self-contained", allowing a recipient to retrieve metadata, resolve references, and construct canonical links omitted from response payloads in certain optimized formats.

        +

        The context URL describes the content of the payload. It consists of the canonical metadata document URL and a fragment identifying the relevant portion of the metadata document. The context URL makes response payloads “self-contained”, allowing a recipient to retrieve metadata, resolve references, and construct canonical links omitted from response payloads in certain optimized formats.

        Request payloads generally do not require context URLs as the type of the payload can generally be determined from the request URL.

        For details on how the context URL is used to describe a payload, see the relevant sections in the particular format.

        The following subsections describe how the context URL is constructed for each category of payload by providing a context URL template. The context URL template uses the following terms:

        @@ -1052,17 +1052,17 @@

        -

        Example 20: resource URL and corresponding context URL - select and expand

        +

        Example 20: resource URL and corresponding context URL — select and expand

        http://host/service/Customers?$select=Name&$expand=Address/Country
         http://host/service/$metadata#Customers(Name,Address/Country())

        -

        Example 21: resource URL and corresponding context URL -- expand $ref

        +

        Example 21: resource URL and corresponding context URL — expand $ref

        http://host/service/Customers?$expand=Orders/$ref
         http://host/service/$metadata#Customers
        -

        Example 22: resource URL and corresponding context URL -- expand with $levels

        +

        Example 22: resource URL and corresponding context URL — expand with $levels

        http://host/service/Employees/Sales.Manager?$select=DirectReports
                 &$expand=DirectReports($select=FirstName,LastName;$levels=4)
         http://host/service/$metadata
        @@ -1238,7 +1238,7 @@ 

        server-driven paging:

          -
        • $apply -- defined in OData-Aggregation
        • +
        • $apply — defined in OData-Aggregation
        • $compute
        • $search
        • $filter
        • @@ -1255,7 +1255,7 @@

          11.2.2 Requesting Individual Entities

          To retrieve an individual entity, the client makes a GET request to a URL that identifies the entity, e.g. its read URL.

          -

          The read URL can be obtained from a response payload containing that instance, for example as a readLink or editLink in an OData-JSON payload. In addition, services MAY support conventions for constructing a read URL using the entity's key value(s), as described in OData-URL.

          +

          The read URL can be obtained from a response payload containing that instance, for example as a readLink or editLink in an OData-JSON payload. In addition, services MAY support conventions for constructing a read URL using the entity’s key value(s), as described in OData-URL.

          The set of structural or navigation properties to return may be specified through $select or $expandsystem query options.

          Clients MUST be prepared to receive additional properties in an entity or complex type instance that are not advertised in metadata, even for types not marked as open.

          Properties that are not available, for example due to permissions, are not returned. In this case, the Core.Permissions annotation, defined in OData-VocCore MUST be returned for the property with a value of None.

          @@ -1267,7 +1267,7 @@

          Appending /$value to an entity that is not a media entity returns 400 Bad Request.

          Attempting to retrieve the media stream from a single-valued navigation property referencing a media entity whose value is null returns 404 Not Found.

          11.2.4 Requesting Individual Properties

          -

          To retrieve an individual property, the client issues a GET request to the property URL. The property URL is the entity read URL with "/" and the property name appended.

          +

          To retrieve an individual property, the client issues a GET request to the property URL. The property URL is the entity read URL with / and the property name appended.

          For complex typed properties, the path can be further extended with the name of an individual property of the complex type.

          See OData-URL for details.

          If the property is single-valued and has the null value, the service responds with 204 No Content.

          @@ -1279,7 +1279,7 @@

          11.2.4.1 Requesting Stream Properties

          If the property being requested has type Edm.Stream (see OData-URL, section 9), the media type of the response is the media type of the stream, subject to content type negotiation based on the Accept header of the request. The response body is the octet-stream that represents the raw value of the stream property with that media type.

          Note this response format disregards any $format system query option.

          -

          11.2.4.2 Requesting a Property's Raw Value using $value

          +

          11.2.4.2 Requesting a Property’s Raw Value using $value

          To retrieve the raw value of a primitive type property, the client sends a GET request to the property value URL. See the OData-URL document for details.

          The Content-Type of the response is determined using the Accept header and the $format system query option.

          The default format for Edm.Binary is the format specified by the Core.MediaType annotation of this property (see OData-VocCore) if this annotation is present. If not annotated, the format cannot be predicted by the client.

          @@ -1483,7 +1483,7 @@
          function parameters, or within a $compute, $filter or $orderby expression. Parameters aliases are names beginning with an at sign (@).

          Actual parameter values are specified as query options in the query part of the request URL. The query option name is the name of the parameter alias, and the query option value is the value to be used for the specified parameter alias.

          -

          Example 48: returns all employees whose Region property matches the string parameter value "WA"

          +

          Example 48: returns all employees whose Region property matches the string parameter value WA

          GET http://host/service.svc/Employees?$filter=Region eq @p1&@p1='WA'

          Parameter aliases allow the same value to be used multiple times in a request and may be used to reference primitive, structured, or collection values.

          @@ -1554,32 +1554,32 @@

          11.2.6.6 System Query Option $search

          The $search system query option restricts the result to include only those items matching the specified search expression. The definition of what it means to match is dependent upon the implementation.

          -

          Example 58: return all Products that match the search term "bike"

          +

          Example 58: return all Products that match the search term bike

          GET http://host/service/Products?$search=bike

          The search expression can contain phrases, enclosed in double-quotes.

          -

          Example 59: return all Products that match the phrase "mountain bike"

          +

          Example 59: return all Products that match the phrase mountain bike

          GET http://host/service/Products?$search="mountain bike"

          The upper-case keyword NOT restricts the set of entities to those that do not match the specified term.

          -

          Example 60: return all Products that do not match "clothing"

          +

          Example 60: return all Products that do not match clothing

          GET http://host/service/Products?$search=NOT clothing

          Multiple terms within a search expression are separated by a space (implicit AND) or the upper-case keyword AND, indicating that all such terms must be matched.

          -

          Example 61: return all Products that match both "mountain" and "bike"

          +

          Example 61: return all Products that match both mountain and bike

          GET http://host/service/Products?$search=mountain AND bike

          The upper-case keyword OR is used to return entities that satisfy either the immediately preceding or subsequent expression.

          -

          Example 62: return all Products that match either "mountain" or "bike"

          +

          Example 62: return all Products that match mountain or bike

          GET http://host/service/Products?$search=mountain OR bike

          Parentheses within the search expression group together multiple expressions.

          -

          Example 63: return all Products that match either "mountain" or "bike" and do not match clothing

          +

          Example 63: return all Products that match mountain or bike and do not match clothing

          GET http://host/service/Products?$search=(mountain OR bike) AND NOT clothing

          The operations within a search expression MUST be evaluated in the following order: grouping operator, NOT operator, AND operator, OR operator

          @@ -1598,7 +1598,7 @@

          GET http://host/service/Suppliers(MainSupplier)/Addresses/0

        -

        To request related entities according to a particular relationship, the client issues a GET request to the source entity's request URL, followed by a forward slash and the name of the navigation property representing the relationship.

        +

        To request related entities according to a particular relationship, the client issues a GET request to the source entity’s request URL, followed by a forward slash and the name of the navigation property representing the relationship.

        If the navigation property does not exist on the entity indicated by the request URL, the service returns 404 Not Found.

        If the relationship terminates on a collection, the response MUST be the format-specific representation of the collection of related entities. If no entities are related, the response is the format-specific representation of an empty collection.

        If the relationship terminates on a single entity, the response MUST be the format-specific representation of the related single entity. If no entity is related, the service returns 204 No Content.

        @@ -1679,9 +1679,9 @@

        Core.SchemaVersion annotation, defined in OData-VocCore, of a previous request to the metadata document, or * in order to specify the current version of the metadata.

        If specified, the service MUST process the request according to the specified version of the metadata.

        Clients can retrieve the current version of the metadata by making a metadata document request with a $schemaversion system query option value of *, and SHOULD include the value from the returned Core.SchemaVersion annotation in the $schemaversion system query option of subsequent requests.

        -

        If the $schemaversion system query option is not specified in a request for the metadata document, the service MUST return a version of the metadata with no breaking changes over time, and the processing of all other requests that omit the $schemaversion system query option MUST be compatible with that "unversioned" schema. For more information on breaking changes, see Model Versioning.

        -

        If the $schemaversion system query option is specified on an individual request within a batch, then it specifies the version of the schema to apply to that individual request. Individual requests within a batch that don't include the $schemaversion system query option inherit the schema version of the overall batch request.

        -

        If the $schemaversion system query option is specified, but the version of the schema doesn't exist, the request is answered with a response code 404 Not Found. The response body SHOULD provide additional information.

        +

        If the $schemaversion system query option is not specified in a request for the metadata document, the service MUST return a version of the metadata with no breaking changes over time, and the processing of all other requests that omit the $schemaversion system query option MUST be compatible with that “unversioned” schema. For more information on breaking changes, see Model Versioning.

        +

        If the $schemaversion system query option is specified on an individual request within a batch, then it specifies the version of the schema to apply to that individual request. Individual requests within a batch that don’t include the $schemaversion system query option inherit the schema version of the overall batch request.

        +

        If the $schemaversion system query option is specified, but the version of the schema doesn’t exist, the request is answered with a response code 404 Not Found. The response body SHOULD provide additional information.

        11.3 Requesting Changes

        Services advertise their change-tracking capabilities by annotating entity sets with the Capabilities.ChangeTracking term defined in OData-VocCap.

        Any GET request to retrieve one or more entities MAY allow change-tracking.

        @@ -1738,7 +1738,7 @@

        Preference-Applied header if it does not return a representation.

        If one or more of these query options are present and the service returns a representation, then the service MUST apply the specified query options. If it cannot apply the specified query options appropriately, it MUST NOT fail the request solely due to the presence of these query options and instead MUST return 204 No Content.

        11.4.2 Create an Entity

        -

        To create an entity in a collection, the client sends a POST request to that collection's URL. The POST body MUST contain a single valid entity representation.

        +

        To create an entity in a collection, the client sends a POST request to that collection’s URL. The POST body MUST contain a single valid entity representation.

        The entity representation MAY include references to existing entities as well as content for new related entities, but MUST NOT contain content for existing related entities. The result of the operation is the entity with relationships to all included references to existing entities as well as all related entities created inline. If the key properties for an entity include key properties of a directly related entity, those related entities MUST be included either as references to existing entities or as content for new related entities.

        An entity may also be created as the result of an Upsert operation.

        If the target URL for the collection is a navigation link, the new entity is automatically linked to the entity containing the navigation link.

        @@ -1784,17 +1784,17 @@ -

        A request to create an entity that includes related entities, represented using the appropriate inline representation, is referred to as a "deep insert".

        +

        A request to create an entity that includes related entities, represented using the appropriate inline representation, is referred to as a “deep insert”.

        Media entities MUST contain the base64url-encoded representation of their media stream as a virtual property $value when nested within a deep insert.

        Each included related entity is processed observing the rules for creating an entity as if it was posted against the original target URL extended with the navigation path to this related entity.

        On success, the service MUST create all entities and relate them. If the service responds with 201 Created, the response MUST be expanded to at least the level that was present in the deep-insert request.

        -

        Clients MAY associate an id with individual nested entities in the request by applying the Core.ContentID term using the namespace or alias defined for the OData-VocCore vocabulary in the service's $metadata document. Services that respond with 201 Created SHOULD annotate the entities in the response using the same Core.ContentID value as specified in the request. Services SHOULD advertise support for deep inserts, including support for returning the Core.ContentID, through the Capabilities.DeepInsertSupport term, defined in OData-VocCap; services that advertise support through Capabilities.DeepInsertSupport MUST return the Core.ContentID for the inserted or updated entities.

        +

        Clients MAY associate an id with individual nested entities in the request by applying the Core.ContentID term using the namespace or alias defined for the OData-VocCore vocabulary in the service’s $metadata document. Services that respond with 201 Created SHOULD annotate the entities in the response using the same Core.ContentID value as specified in the request. Services SHOULD advertise support for deep inserts, including support for returning the Core.ContentID, through the Capabilities.DeepInsertSupport term, defined in OData-VocCap; services that advertise support through Capabilities.DeepInsertSupport MUST return the Core.ContentID for the inserted or updated entities.

        The continue-on-error preference is not supported for deep insert operations.

        On failure, the service MUST NOT create any of the entities.

        11.4.3 Update an Entity

        To update an individual entity, the client makes a PATCH or PUT request to a URL that identifies the entity. Services MAY restrict updates only to requests addressing the edit URL of the entity.

        Services SHOULD support PATCH as the preferred means of updating an entity. PATCH provides more resiliency between clients and services by directly modifying only those values specified by the client.

        -

        The semantics of PATCH, as defined in RFC5789, is to merge the content in the request payload with the entity's current state, applying the update only to those components specified in the request body. Collection properties and primitive properties provided in the payload corresponding to updatable properties MUST replace the value of the corresponding property in the entity or complex type. Complex properties are updated by applying PATCH semantics recursively, see also section 11.4.9.3. Missing properties of the containing entity or complex property, including dynamic properties, MUST NOT be directly altered unless as a side effect of changes resulting from the provided properties.

        +

        The semantics of PATCH, as defined in RFC5789, is to merge the content in the request payload with the entity’s current state, applying the update only to those components specified in the request body. Collection properties and primitive properties provided in the payload corresponding to updatable properties MUST replace the value of the corresponding property in the entity or complex type. Complex properties are updated by applying PATCH semantics recursively, see also section 11.4.9.3. Missing properties of the containing entity or complex property, including dynamic properties, MUST NOT be directly altered unless as a side effect of changes resulting from the provided properties.

        Services MAY additionally support PUT but should be aware of the potential for data-loss in round-tripping properties that the client may not know about in advance, such as open or added properties, or properties not specified in metadata. Services that support PUT MUST replace all values of structural properties with those specified in the request body. Missing non-key, updatable structural properties not defined as dependent properties within a referential constraint MUST be set to their default values. Omitting a non-nullable property with no service-generated or default value from a PUT request results in a 400 Bad Request error. Missing dynamic structural properties MUST be removed or set to null.

        For requests with an OData-Version header with a value of 4.01 or greater, the media stream of a media entity can be updated by specifying the base64url-encoded representation of the media stream as a virtual property $value.

        Updating a dependent property that is tied to a key property of the principal entity through a referential constraint updates the relationship to point to the entity with the specified key value. If there is no such entity, the update fails.

        @@ -1808,7 +1808,7 @@

        1

        Upon successful completion the service responds with either 200 OK and a representation of the updated entity, or 204 No Content. The client may request that the response SHOULD include a body by specifying a Prefer header with a value of return=representation, or by specifying the system query options $select or $expand. If the service uses ETags for optimistic concurrency control, the entities in the response MUST include ETags.

        Update requests with an OData-Version header with a value of 4.0 MUST NOT contain related entities as inline content. Such requests MAY contain binding information for navigation properties. For single-valued navigation properties this replaces the relationship. For collection-valued navigation properties this adds to the relationship.

        -

        Payloads with an OData-Version header with a value of 4.01 or greater MAY include nested entities and entity references that specify the full set of to be related entities, or a nested delta payload representing the related entities that have been added, removed, or changed. Such a request is referred to as a "deep update". If the nested collection is represented identical to an expanded navigation property, then the set of nested entities and entity references specified in a successful update request represents the full set of entities to be related according to that relationship and MUST NOT include added links, deleted links, or deleted entities.

        +

        Payloads with an OData-Version header with a value of 4.01 or greater MAY include nested entities and entity references that specify the full set of to be related entities, or a nested delta payload representing the related entities that have been added, removed, or changed. Such a request is referred to as a “deep update”. If the nested collection is represented identical to an expanded navigation property, then the set of nested entities and entity references specified in a successful update request represents the full set of entities to be related according to that relationship and MUST NOT include added links, deleted links, or deleted entities.

        Example 78: using the JSON format, a 4.01 PATCH request can update a manager entity. Following the update, the manager has three direct reports; two existing employees and one new employee named Suzanne Brown. The LastName of employee 6 is updated to Smith.

        {
        @@ -1838,7 +1838,7 @@ 

        16.2 Annotations for Products and Categories Example

        diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 220543111..1da732d4a 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -5574,7 +5574,6 @@ Example 90: "@Core.DefaultNamespace": true, "Product": { "$Kind": "EntityType", - "$HasStream": true, "$Key": [ "ID" ], diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index fbf026f33..e13b8ebe9 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -3082,7 +3082,7 @@

        </edmx:Reference> <edmx:DataServices> <Schema Namespace="ODataDemo"> - <EntityType Name="Product" HasStream="true"> + <EntityType Name="Product"> <Key> <PropertyRef Name="ID" /> </Key> diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index e400a4654..fb739c2cd 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -5376,7 +5376,7 @@ Example 90: - + diff --git a/odata-csdl/15 Identifier and Path Values.md b/odata-csdl/15 Identifier and Path Values.md index a3b68dc6f..dab58f78c 100644 --- a/odata-csdl/15 Identifier and Path Values.md +++ b/odata-csdl/15 Identifier and Path Values.md @@ -108,7 +108,6 @@ Example ##ex: "@Core.DefaultNamespace": true, "Product": { "$Kind": "EntityType", - "$HasStream": true, "$Key": [ "ID" ], @@ -311,7 +310,7 @@ Example ##ex: - + From 0ec47cd67807b695aaf3728cecc7f1e614503745 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 8 Nov 2023 18:43:24 +0100 Subject: [PATCH 68/74] ODATA-1495 (#145) https://issues.oasis-open.org/browse/ODATA-1495 Co-authored-by: D024504 --- docs/odata-protocol/odata-protocol.html | 4 ++-- docs/odata-protocol/odata-protocol.md | 4 ++-- odata-protocol/11.4 Data Modification.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index c2e72949c..d5cdaf899 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1785,7 +1785,7 @@

        A request to create an entity that includes related entities, represented using the appropriate inline representation, is referred to as a “deep insert”.

        -

        Media entities MUST contain the base64url-encoded representation of their media stream as a virtual property $value when nested within a deep insert.

        +

        Media entities MUST contain the format-specific representation of their media stream as a virtual property $value when nested within a deep insert.

        Each included related entity is processed observing the rules for creating an entity as if it was posted against the original target URL extended with the navigation path to this related entity.

        On success, the service MUST create all entities and relate them. If the service responds with 201 Created, the response MUST be expanded to at least the level that was present in the deep-insert request.

        Clients MAY associate an id with individual nested entities in the request by applying the Core.ContentID term using the namespace or alias defined for the OData-VocCore vocabulary in the service’s $metadata document. Services that respond with 201 Created SHOULD annotate the entities in the response using the same Core.ContentID value as specified in the request. Services SHOULD advertise support for deep inserts, including support for returning the Core.ContentID, through the Capabilities.DeepInsertSupport term, defined in OData-VocCap; services that advertise support through Capabilities.DeepInsertSupport MUST return the Core.ContentID for the inserted or updated entities.

        @@ -1796,7 +1796,7 @@

        1

        Services SHOULD support PATCH as the preferred means of updating an entity. PATCH provides more resiliency between clients and services by directly modifying only those values specified by the client.

        The semantics of PATCH, as defined in RFC5789, is to merge the content in the request payload with the entity’s current state, applying the update only to those components specified in the request body. Collection properties and primitive properties provided in the payload corresponding to updatable properties MUST replace the value of the corresponding property in the entity or complex type. Complex properties are updated by applying PATCH semantics recursively, see also section 11.4.9.3. Missing properties of the containing entity or complex property, including dynamic properties, MUST NOT be directly altered unless as a side effect of changes resulting from the provided properties.

        Services MAY additionally support PUT but should be aware of the potential for data-loss in round-tripping properties that the client may not know about in advance, such as open or added properties, or properties not specified in metadata. Services that support PUT MUST replace all values of structural properties with those specified in the request body. Missing non-key, updatable structural properties not defined as dependent properties within a referential constraint MUST be set to their default values. Omitting a non-nullable property with no service-generated or default value from a PUT request results in a 400 Bad Request error. Missing dynamic structural properties MUST be removed or set to null.

        -

        For requests with an OData-Version header with a value of 4.01 or greater, the media stream of a media entity can be updated by specifying the base64url-encoded representation of the media stream as a virtual property $value.

        +

        For requests with an OData-Version header with a value of 4.01 or greater, the media stream of a media entity can be updated by specifying the format-specific representation of the media stream as a virtual property $value.

        Updating a dependent property that is tied to a key property of the principal entity through a referential constraint updates the relationship to point to the entity with the specified key value. If there is no such entity, the update fails.

        Updating a principal property that is tied to a dependent entity through a referential constraint on the dependent entity updates the dependent property.

        Key and other properties marked as read-only in metadata (including computed properties), as well as dependent properties that are not tied to key properties of the principal entity, can be omitted from the request. If the request contains a value for one of these properties, the service MUST ignore that value when applying the update. Services MUST return an error if an insert or update contains a new value for a property marked as updatable that cannot currently be changed by the user (i.e., given the state of the object or permissions of the user). The service MAY return success in this case if the specified value matches the value of the property. Clients SHOULD use PATCH and specify only those properties intended to be changed.

        diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index 4718bda93..5e1aecd72 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -4211,7 +4211,7 @@ A request to create an entity that includes related entities, represented using the appropriate inline representation, is referred to as a "deep insert". -Media entities MUST contain the base64url-encoded representation of +Media entities MUST contain the format-specific representation of their media stream as a virtual property `$value` when nested within a deep insert. @@ -4285,7 +4285,7 @@ removed or set to `null`. For requests with an `OData-Version` header with a value of `4.01` or greater, the media stream of a media entity can be updated by specifying -the base64url-encoded representation of the media stream as a virtual +the format-specific representation of the media stream as a virtual property `$value`. Updating a dependent property that is tied to a key property of the diff --git a/odata-protocol/11.4 Data Modification.md b/odata-protocol/11.4 Data Modification.md index 3af494884..c5908be0a 100644 --- a/odata-protocol/11.4 Data Modification.md +++ b/odata-protocol/11.4 Data Modification.md @@ -262,7 +262,7 @@ A request to create an entity that includes related entities, represented using the appropriate inline representation, is referred to as a "deep insert". -Media entities MUST contain the base64url-encoded representation of +Media entities MUST contain the format-specific representation of their media stream as a virtual property `$value` when nested within a deep insert. @@ -336,7 +336,7 @@ removed or set to `null`. For requests with an `OData-Version` header with a value of `4.01` or greater, the media stream of a media entity can be updated by specifying -the base64url-encoded representation of the media stream as a virtual +the format-specific representation of the media stream as a virtual property `$value`. Updating a dependent property that is tied to a key property of the From d577e9caf34243f764a8da8325c1c6f56f3548dc Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 8 Nov 2023 18:45:06 +0100 Subject: [PATCH 69/74] ODATA-1497 (#99) --- docs/odata-csdl-xml/odata-csdl-xml.html | 1 + docs/odata-csdl-xml/odata-csdl-xml.md | 2 ++ odata-csdl/13 Entity Container.md | 2 ++ 3 files changed, 5 insertions(+) diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index e13b8ebe9..80f6c44bc 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -1775,6 +1775,7 @@

        13.

        Element edm:FunctionImport

        The edm:FunctionImport element MUST contain the attributes Name and Function, and it MAY contain the attributes EntitySet and IncludeInServiceDocument.

        +

        It MAY contain edm:Annotation elements.

        Attribute Name

        The value of Name is the function import’s name.

        Attribute Function

        diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index fb739c2cd..fa889f3d0 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -3236,6 +3236,8 @@ The `edm:FunctionImport` element MUST contain the attributes `Name` and `Function`, and it MAY contain the attributes `EntitySet` and `IncludeInServiceDocument`. +It MAY contain [`edm:Annotation`](#Annotation) elements. + ### Attribute `Name` The value of `Name` is the function import's name. diff --git a/odata-csdl/13 Entity Container.md b/odata-csdl/13 Entity Container.md index 89fda7b92..956f807e1 100644 --- a/odata-csdl/13 Entity Container.md +++ b/odata-csdl/13 Entity Container.md @@ -690,6 +690,8 @@ The `edm:FunctionImport` element MUST contain the attributes `Name` and `Function`, and it MAY contain the attributes `EntitySet` and `IncludeInServiceDocument`. +It MAY contain [`edm:Annotation`](#Annotation) elements. + ### ##subisec Attribute `Name` The value of `Name` is the function import's name. From a9998a0c2c592d1436a7783025a956b45dc20a87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Wed, 8 Nov 2023 18:53:39 +0100 Subject: [PATCH 70/74] ODATA-1498 (#62) --- docs/odata-csdl-json/odata-csdl-json.html | 3 +-- docs/odata-csdl-json/odata-csdl-json.md | 4 +--- docs/odata-csdl-xml/odata-csdl-xml.html | 3 +-- docs/odata-csdl-xml/odata-csdl-xml.md | 4 +--- docs/odata-json-format/odata-json-format.html | 2 ++ docs/odata-json-format/odata-json-format.md | 7 +++++++ odata-csdl/1 Introduction.md | 4 +--- odata-json-format/4 Common Characteristics.md | 3 +++ odata-json-format/7 Structural Property.md | 4 ++++ 9 files changed, 21 insertions(+), 13 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index cc4964828..a7b177eda 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -765,8 +765,7 @@

        type control information to specify the numeric type of the property.
      • String values do have a first class representation in JSON, but there is an obvious collision: OData also encodes a number of other primitive types as strings, e.g. DateTimeOffset, Int64 in the presence of the IEEE754Compatible format parameter etc. If a property appears in JSON string format, it should be treated as a string value unless the property is known (from the metadata document) to have a different type.
      • +

        The type control information can be absent in properties nested in an instance of type Edm.Untyped. In particular, individual primitive values within a collection cannot have type control information.

        For more information on namespace- and alias-qualified names, see OData-CSDLJSON or OData-CSDLXML.

        Example 5: entity of type Model.VipCustomer defined in the metadata document of the same service with a dynamic property of type Edm.Date

        @@ -801,6 +802,7 @@

        "EmailAddresses@nextLink": "..." }

        +

        A collection of primitive values that occurs in a property of type Edm.Untyped is interpreted as a collection of Edm.Boolean, Edm.String, and Edm.Decimal values, depending on the JavaScript type.

        7.4 Collection of Complex Values

        A collection of complex values is represented as a JSON array; each element in the array is the representation of a complex value. A JSON literal null represents a null value within the collection. An empty collection is represented as an empty array.

        diff --git a/docs/odata-json-format/odata-json-format.md b/docs/odata-json-format/odata-json-format.md index 0f95ab685..4a71f489f 100644 --- a/docs/odata-json-format/odata-json-format.md +++ b/docs/odata-json-format/odata-json-format.md @@ -854,6 +854,9 @@ information: should be treated as a string value unless the property is known (from the metadata document) to have a different type. +The `type` control information can be absent in properties nested in an instance of type `Edm.Untyped`. +In particular, individual primitive values within a collection cannot have `type` control information. + For more information on namespace- and alias-qualified names, see [OData-CSDLJSON](#ODataCSDL) or [OData-CSDLXML](#ODataCSDL). @@ -1477,6 +1480,10 @@ Example 14: partial collection of strings with next link ``` ::: +A collection of primitive values that occurs in a property of type `Edm.Untyped` +is interpreted as a collection of `Edm.Boolean`, `Edm.String`, and `Edm.Decimal` values, +depending on the JavaScript type. + ## 7.4 Collection of Complex Values A collection of complex values is represented as a JSON array; each diff --git a/odata-csdl/1 Introduction.md b/odata-csdl/1 Introduction.md index 5def64312..8ea5a1033 100644 --- a/odata-csdl/1 Introduction.md +++ b/odata-csdl/1 Introduction.md @@ -831,9 +831,7 @@ be used anywhere a corresponding concrete type can be used, except: - cannot be used as the underlying type of a type definition or enumeration type. - `Collection(Edm.PrimitiveType)` - - cannot be used as the type of a property or term. - - cannot be used as the type of a parameter or the return type of - an action or function. + - cannot be used. - `Collection(Edm.Untyped)` - cannot be returned in a payload with an `OData-Version` header of `4.0`. Services should treat untyped properties as dynamic diff --git a/odata-json-format/4 Common Characteristics.md b/odata-json-format/4 Common Characteristics.md index 497573ee5..22f0494ff 100644 --- a/odata-json-format/4 Common Characteristics.md +++ b/odata-json-format/4 Common Characteristics.md @@ -319,6 +319,9 @@ information: should be treated as a string value unless the property is known (from the metadata document) to have a different type. +The `type` control information can be absent in properties nested in an instance of type `Edm.Untyped`. +In particular, individual primitive values within a collection cannot have `type` control information. + For more information on namespace- and alias-qualified names, see [OData-CSDLJSON](#ODataCSDL) or [OData-CSDLXML](#ODataCSDL). diff --git a/odata-json-format/7 Structural Property.md b/odata-json-format/7 Structural Property.md index e033003d9..b98aae8cf 100644 --- a/odata-json-format/7 Structural Property.md +++ b/odata-json-format/7 Structural Property.md @@ -146,6 +146,10 @@ Example ##ex: partial collection of strings with next link ``` ::: +A collection of primitive values that occurs in a property of type `Edm.Untyped` +is interpreted as a collection of `Edm.Boolean`, `Edm.String`, and `Edm.Decimal` values, +depending on the JavaScript type. + ## ##subsec Collection of Complex Values A collection of complex values is represented as a JSON array; each From f8cbdd41104128a6a4fdec09e0914754b9d655cf Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Wed, 8 Nov 2023 18:55:33 +0100 Subject: [PATCH 71/74] ODATA-1500 (#146) --- .vscode/settings.json | 1 + docs/odata-protocol/odata-protocol.html | 2 +- docs/odata-protocol/odata-protocol.md | 2 +- .../odata-url-conventions/odata-url-conventions.html | 12 ++++++------ docs/odata-url-conventions/odata-url-conventions.md | 12 ++++++------ odata-protocol/11 Data Service Requests.md | 2 +- odata-url-conventions/5 Query Options.md | 10 +++++----- 7 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 84e8e54ef..8ff1b738e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,6 +4,7 @@ "asec", "CSDL", "ETag", + "matchespattern", "odata", "pandoc", "subasec", diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index d5cdaf899..89e711567 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -1444,7 +1444,7 @@
        String Functions

        - + diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index 5e1aecd72..2525bba86 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -3175,7 +3175,7 @@ a `null` literal that can be used in comparisons. - + diff --git a/docs/odata-url-conventions/odata-url-conventions.html b/docs/odata-url-conventions/odata-url-conventions.html index e6ad8ba69..a939a6207 100644 --- a/docs/odata-url-conventions/odata-url-conventions.html +++ b/docs/odata-url-conventions/odata-url-conventions.html @@ -258,7 +258,7 @@

        Table of Contents

      • 5.1.1.7 String Functions
          -
        • 5.1.1.7.1 matchesPattern
        • +
        • 5.1.1.7.1 matchespattern
        • 5.1.1.7.2 tolower
        • 5.1.1.7.3 toupper
        • 5.1.1.7.4 trim
        • @@ -1192,13 +1192,13 @@
          5. hassubsequence([1,2],[1,1,2])

          5.1.1.7 String Functions

          -
          5.1.1.7.1 matchesPattern
          -

          The matchesPattern function has the following signature:

          -
          Edm.Boolean matchesPattern(Edm.String,Edm.String)
          -

          The second parameter MUST evaluate to a string containing an [ECMAScript] (JavaScript) regular expression. The matchesPattern function returns true if the first parameter evaluates to a string matching that regular expression, using syntax and semantics of [ECMAScript] regular expressions, otherwise it returns false.

          +
          5.1.1.7.1 matchespattern
          +

          The matchespattern function has the following signature:

          +
          Edm.Boolean matchespattern(Edm.String,Edm.String)
          +

          The second parameter MUST evaluate to a string containing an [ECMAScript] (JavaScript) regular expression. The matchespattern function returns true if the first parameter evaluates to a string matching that regular expression, using syntax and semantics of [ECMAScript] regular expressions, otherwise it returns false.

          Example 81: all customers with a CompanyName that match the (percent-encoded) regular expression ^A.*e$

          -
          http://host/service/Customers?$filter=matchesPattern(CompanyName,'%5EA.*e$')
          +
          http://host/service/Customers?$filter=matchespattern(CompanyName,'%5EA.*e$')
          5.1.1.7.2 tolower

          The tolower function has the following signature:

          diff --git a/docs/odata-url-conventions/odata-url-conventions.md b/docs/odata-url-conventions/odata-url-conventions.md index 22ba664ef..bc585dfda 100644 --- a/docs/odata-url-conventions/odata-url-conventions.md +++ b/docs/odata-url-conventions/odata-url-conventions.md @@ -169,7 +169,7 @@ For complete copyright information please see the full Notices section in an App - [5.1.1.6.1 `hassubset`](#hassubset) - [5.1.1.6.2 `hassubsequence`](#hassubsequence) - [5.1.1.7 String Functions](#StringFunctions) - - [5.1.1.7.1 `matchesPattern`](#matchesPattern) + - [5.1.1.7.1 `matchespattern`](#matchespattern) - [5.1.1.7.2 `tolower`](#tolower) - [5.1.1.7.3 `toupper`](#toupper) - [5.1.1.7.4 `trim`](#trim) @@ -2247,17 +2247,17 @@ hassubsequence([1,2],[1,1,2]) #### 5.1.1.7 String Functions -##### 5.1.1.7.1 `matchesPattern` +##### 5.1.1.7.1 `matchespattern` -The `matchesPattern` function has the following signature: +The `matchespattern` function has the following signature: ``` -Edm.Boolean matchesPattern(Edm.String,Edm.String) +Edm.Boolean matchespattern(Edm.String,Edm.String) ``` The second parameter MUST evaluate to a string containing an [**[ECMAScript]**](#ECMAScript) (JavaScript) regular expression. The -`matchesPattern` function returns true if the first parameter evaluates +`matchespattern` function returns true if the first parameter evaluates to a string matching that regular expression, using syntax and semantics of [**[ECMAScript]**](#ECMAScript) regular expressions, otherwise it returns false. @@ -2266,7 +2266,7 @@ returns false. Example 81: all customers with a `CompanyName` that match the (percent-encoded) regular expression `^A.*e$` ``` -http://host/service/Customers?$filter=matchesPattern(CompanyName,'%5EA.*e$') +http://host/service/Customers?$filter=matchespattern(CompanyName,'%5EA.*e$') ``` ::: diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index 909335753..933597829 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -647,7 +647,7 @@ a `null` literal that can be used in comparisons.
      • - + diff --git a/odata-url-conventions/5 Query Options.md b/odata-url-conventions/5 Query Options.md index cadd7577d..a71a06031 100644 --- a/odata-url-conventions/5 Query Options.md +++ b/odata-url-conventions/5 Query Options.md @@ -853,17 +853,17 @@ hassubsequence([1,2],[1,1,2]) #### ##subsubsubsec String Functions -##### ##subsubsubsubsec `matchesPattern` +##### ##subsubsubsubsec `matchespattern` -The `matchesPattern` function has the following signature: +The `matchespattern` function has the following signature: ``` -Edm.Boolean matchesPattern(Edm.String,Edm.String) +Edm.Boolean matchespattern(Edm.String,Edm.String) ``` The second parameter MUST evaluate to a string containing an [**[ECMAScript]**](#ECMAScript) (JavaScript) regular expression. The -`matchesPattern` function returns true if the first parameter evaluates +`matchespattern` function returns true if the first parameter evaluates to a string matching that regular expression, using syntax and semantics of [**[ECMAScript]**](#ECMAScript) regular expressions, otherwise it returns false. @@ -872,7 +872,7 @@ returns false. Example ##ex: all customers with a `CompanyName` that match the (percent-encoded) regular expression `^A.*e$` ``` -http://host/service/Customers?$filter=matchesPattern(CompanyName,'%5EA.*e$') +http://host/service/Customers?$filter=matchespattern(CompanyName,'%5EA.*e$') ``` ::: From 75c073c8bc3249b9cbf0284d1d401c42cd5ce553 Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Thu, 9 Nov 2023 15:57:00 +0100 Subject: [PATCH 72/74] Consistent formatting of references to headers and preferences (#213) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Consistently reference headers and preferences --------- Co-authored-by: Heiko Theißen --- docs/odata-json-format/odata-json-format.html | 4 +- docs/odata-json-format/odata-json-format.md | 4 +- docs/odata-protocol/odata-protocol.html | 68 +++++------ docs/odata-protocol/odata-protocol.md | 111 +++++++++--------- .../odata-url-conventions.html | 6 +- .../odata-url-conventions.md | 6 +- odata-json-format/10 Media Entity.md | 2 +- odata-json-format/4 Common Characteristics.md | 2 +- odata-protocol/11 Data Service Requests.md | 14 +-- odata-protocol/11.4 Data Modification.md | 44 +++---- odata-protocol/11.5 Operations.md | 22 ++-- odata-protocol/8 Header Fields.md | 30 ++--- odata-url-conventions/4 Resource Path.md | 2 +- odata-url-conventions/5 Query Options.md | 4 +- 14 files changed, 154 insertions(+), 165 deletions(-) diff --git a/docs/odata-json-format/odata-json-format.html b/docs/odata-json-format/odata-json-format.html index 39cd77bac..bc33d3f42 100644 --- a/docs/odata-json-format/odata-json-format.html +++ b/docs/odata-json-format/odata-json-format.html @@ -467,7 +467,7 @@

        Content-Type: application/json;metadata=minimal

        cannot be assumed to support streaming.

        -

        JSON producers are encouraged to follow the payload ordering constraints whenever possible (and include the streaming=true content-type parameter) to support the maximum set of client scenarios.

        +

        JSON producers are encouraged to follow the payload ordering constraints whenever possible (and include the streaming=true media type parameter) to support the maximum set of client scenarios.

        To support streaming scenarios the following payload ordering constraints have to be met:

        • If present, the context control information MUST be the first property in the JSON object.
        • @@ -1062,7 +1062,7 @@

          13 Collection of Entities

          A collection of entities is represented as a JSON object containing a name/value pair named value. It MAY contain context, type, count, nextLink, or deltaLink control information.

          If present, the context control information MUST be the first name/value pair in the response.

          -

          The count name/value pair represents the number of entities in the collection. If present and the streaming=true content-type parameter is set, it MUST come before the value name/value pair. If the response represents a partial result, the count name/value pair MUST appear in the first partial response, and it MAY appear in subsequent partial responses (in which case it may vary from response to response).

          +

          The count name/value pair represents the number of entities in the collection. If present and the streaming=true media type parameter is set, it MUST come before the value name/value pair. If the response represents a partial result, the count name/value pair MUST appear in the first partial response, and it MAY appear in subsequent partial responses (in which case it may vary from response to response).

          The value of the value name/value pair is a JSON array where each element is representation of an entity or a representation of an entity reference. An empty collection is represented as an empty JSON array.

          Functions or actions that are bound to this collection of entities are advertised in the “wrapper object” in the same way as functions or actions are advertised in the object representing a single entity.

          The nextLink control information MUST be included in a response that represents a partial result.

          diff --git a/docs/odata-json-format/odata-json-format.md b/docs/odata-json-format/odata-json-format.md index 4a71f489f..d19c44307 100644 --- a/docs/odata-json-format/odata-json-format.md +++ b/docs/odata-json-format/odata-json-format.md @@ -688,7 +688,7 @@ cannot be assumed to support streaming. JSON producers are encouraged to follow the payload ordering constraints whenever possible (and include the `streaming=true` -content-type parameter) to support the maximum set of client scenarios. +media type parameter) to support the maximum set of client scenarios. To support streaming scenarios the following payload ordering constraints have to be met: @@ -1995,7 +1995,7 @@ first name/value pair in the response. The `count` name/value pair represents the number of entities in the collection. If present and the [`streaming=true`](#PayloadOrderingConstraints) -content-type parameter is set, it MUST come before the +media type parameter is set, it MUST come before the `value` name/value pair. If the response represents a partial result, the `count` name/value pair MUST appear in the first partial response, and it MAY appear in subsequent partial responses (in diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index 89e711567..6802647c6 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -660,7 +660,7 @@

          OData-JSON for format-specific details about format parameters within the Content-Type header.

          8.1.2 Header Content-Encoding

          -

          As defined in RFC7231, the Content-Encoding header field is used as a modifier to the media-type (as indicated in the Content-Type). When present, its value indicates what additional content codings have been applied to the entity-body. A service MAY specify a list of acceptable content codings using an annotation with term Capabilities.AcceptableEncodings, see OData-VocCap.

          +

          As defined in RFC7231, the Content-Encoding header field is used as a modifier to the media-type (as indicated in the Content-Type header). When present, its value indicates what additional content codings have been applied to the entity-body. A service MAY specify a list of acceptable content codings using an annotation with term Capabilities.AcceptableEncodings, see OData-VocCap.

          If the Content-Encoding header is specified on an individual request or response within a batch, then it specifies the encoding for that individual request or response. Individual requests or responses that don’t include the Content-Encoding header inherit the encoding of the overall batch request or response.

          8.1.3 Header Content-Language

          As defined in RFC7231, a request or response can include a Content-Language header to indicate the natural language of the intended audience for the enclosed message body. OData does not add any additional requirements over HTTP for including Content-Language. OData services can annotate model elements whose content depends on the content language with the term Core.IsLanguageDependent, see OData-VocCore.

          @@ -682,7 +682,7 @@

          8.2.1 Hea

          Services MUST reject formats that specify unknown or unsupported format parameters.

          If a media type specified in the Accept header includes a charset format parameter and the request also contains an Accept-Charset header, then the Accept-Charset header MUST be used.

          If the media type specified in the Accept header does not include a charset format parameter, then the Content-Type header of the response MUST NOT contain a charset format parameter.

          -

          The service SHOULD NOT add any format parameters to the Content-Type parameter not specified in the Accept header.

          +

          The service SHOULD NOT add any format parameters to the Content-Type header not specified in the Accept header.

          If the Accept header is specified on an individual request within a batch, then it specifies the acceptable formats for that individual request. Requests within a batch that don’t include the Accept header inherit the acceptable formats of the overall batch request.

          8.2.2 Header Accept-Charset

          As defined in RFC7231, the client MAY specify the set of accepted character sets with the Accept-Charset header.

          @@ -693,7 +693,7 @@

          8.2.4 Header If-Match

          As defined in RFC7232, a client MAY include an If-Match header in a request to GET, POST, PUT, PATCH or DELETE. The value of the If-Match request header MUST be an ETag value previously retrieved for the resource, or * to match any value.

          If an operation on an existing resource requires an ETag, (see term Core.OptimisticConcurrency in OData-VocCore and property OptimisticConcurrencyControl of type Capabilities.NavigationPropertyRestriction in OData-VocCap) and the client does not specify an If-Match request header in a Data Modification Request or in an Action Request invoking an action bound to the resource, the service responds with a 428 Precondition Required and MUST ensure that no observable change occurs as a result of the request.

          -

          If present, the request MUST only be processed if the specified ETag value matches the current ETag value of the target resource. Services sending ETag headers with weak ETags that only depend on the representation-independent entity state MUST use the weak comparison function because it is sufficient to prevent accidental overwrites. This is a deviation from RFC7232.

          +

          If present, the request MUST only be processed if the specified ETag value matches the current ETag value of the target resource. Services sending ETag headers with weak ETags that only depend on the representation-independent entity state MUST use the weak comparison function because it is sufficient to prevent accidental overwrites. This is a deviation from RFC7232.

          If the value does not match the current ETag value of the resource for a Data Modification Request or Action Request, the service MUST respond with 412 Precondition Failed and MUST ensure that no observable change occurs as a result of the request. In the case of an upsert, if the addressed entity does not exist the provided ETag value is considered not to match.

          An If-Match header with a value of * in a PUT or PATCH request results in an upsert request being processed as an update and not an insert.

          The If-Match header MUST NOT be specified on a batch request, but MAY be specified on individual requests within the batch.

          @@ -739,8 +739,8 @@

          Capabilities.CallbackSupported annotation term defined in OData-VocCap.

          If the service applies the callback preference it MUST include the callback preference in the Preference-Applied response header.

          -

          When the callback preference is applied to asynchronous requests, the OData service invokes the callback endpoint once it has finished processing the request. The status monitor resource, returned in the Location header of the previously returned 202 Accepted response, can then be used to retrieve the results of the asynchronously executed request.

          -

          When the callback preference is specified on a GET request to a delta link and there are no changes available, the OData service returns a 202 Accepted response with a Location header specifying the delta link to be used to check for future updates. The OData service then invokes the specified callback endpoint once new changes become available.

          +

          When the callback preference is applied to asynchronous requests, the OData service invokes the callback endpoint once it has finished processing the request. The status monitor resource, returned in the Location header of the previously returned 202 Accepted response, can then be used to retrieve the results of the asynchronously executed request.

          +

          When the callback preference is specified on a GET request to a delta link and there are no changes available, the OData service returns a 202 Accepted response with a Location header specifying the delta link to be used to check for future updates. The OData service then invokes the specified callback endpoint once new changes become available.

          Combining respond-async, callback and track-changes preferences on a GET request to a delta-link might influence the response in a couple of ways.

          • If the service processes the request synchronously, and no updates are available, then the response is the same as if the respond-async hadn’t been specified and results in a response as described above.
          • @@ -867,7 +867,7 @@

            8.3.7 Header Retry-After

            A service MAY include a Retry-After header, as defined in RFC7231, in 202 Accepted and in 3xx Redirect responses

            -

            The Retry-After header specifies the duration of time, in seconds, that the client is asked to wait before retrying the request or issuing a request to the resource returned as the value of the Location header.

            +

            The Retry-After header specifies the duration of time, in seconds, that the client is asked to wait before retrying the request or issuing a request to the resource returned as the value of the Location header.

            8.3.8 Header Vary

            If a response varies depending on the OData-Version of the response, the service MUST include a Vary header listing the OData-MaxVersion request header field to allow correct caching of the response.

            If a response varies depending on the applied preferences (allow-entityreferences, include-annotations, omit-values, return), the service MUST include a Vary header listing the Prefer request header field to allow correct caching of the response.

            @@ -885,10 +885,10 @@

            9.1.3 Response Code 202 Accepted

            202 Accepted indicates that the Data Service Request has been accepted and has not yet completed executing asynchronously. The asynchronous handling of requests is defined in the sections on Asynchronous Requests and Asynchronous Batch Requests.

            9.1.4 Response Code 204 No Content

            -

            A request returns 204 No Content if the requested resource has the null value, or if the service applies a return=minimal preference. In this case, the response body MUST be empty.

            +

            A request returns 204 No Content if the requested resource has the null value, or if the service applies a return=minimal preference. In this case, the response body MUST be empty.

            As defined in RFC7231, a Data Modification Request that responds with 204 No Content MAY include an ETag header with a value reflecting the result of the data modification if and only if the client can reasonably “know” the new representation of the resource without actually receiving it. For a PUT request this means that the response body of a corresponding 200 OK or 201 Created response would have been identical to the request body, i.e. no server-side modification of values sent in the request body, no server-calculated values etc. For a PATCH request this means that the response body of a corresponding 200 OK or 201 Created response would have consisted of all values sent in the request body, plus (for values not sent in the request body) server-side values corresponding to the ETag value sent in the If-Match header of the PATCH request, i.e. the previous values “known” to the client.

            9.1.5 Response Code 3xx Redirection

            -

            As per RFC7231, a 3xx Redirection indicates that further action needs to be taken by the client in order to fulfill the request. In this case, the response SHOULD include a Location header, as appropriate, with the URL from which the result can be obtained; it MAY include a Retry-After header.

            +

            As per RFC7231, a 3xx Redirection indicates that further action needs to be taken by the client in order to fulfill the request. In this case, the response SHOULD include a Location header, as appropriate, with the URL from which the result can be obtained; it MAY include a Retry-After header.

            9.1.6 Response Code 304 Not Modified

            As per RFC7232, a 304 Not Modified is returned when the client performs a GET request containing an If-None-Match header and the content has not changed. In this case the response SHOULD NOT include other headers in order to prevent inconsistencies between cached entity-bodies and updated headers.

            The service MUST ensure that no observable change has occurred to the state of the service as a result of any request that returns a 304 Not Modified.

            @@ -923,7 +923,7 @@

            9.5 In-Stream Errors

            -

            In the case that the service encounters an error after sending a success status to the client, the service MUST leave the response malformed according to its content-type. Clients MUST treat the entire response as being in error.

            +

            In the case that the service encounters an error after sending a success status to the client, the service MUST leave the response malformed according to its Content-Type. Clients MUST treat the entire response as being in error.

            Services MAY include the header OData-Error as a trailing header if supported by the transport protocol (e.g. HTTP/1.1 with chunked transfer encoding, or HTTP/2).


            10 Context URL

            @@ -1223,13 +1223,13 @@

            OData-CSDLJSON describes a JSON representation for OData metadata documents and provides a JSON schema to validate their contents. The media type of the JSON representation of an OData metadata document is application/json.

            OData-CSDLXML describes an XML representation for OData metadata documents and provides an XML schema to validate their contents. The media type of the XML representation of an OData metadata document is application/xml.

            OData services can expose a metadata document that describes the data model exposed by the service. The metadata document URL MUST be the root URL of the service with $metadata appended. To retrieve this document the client issues a GET request to the metadata document URL.

            -

            If a request for metadata does not specify a format preference (via Accept header or $format) then the XML representation MUST be returned.

            +

            If a request for metadata does not specify a format preference (via Accept header or $format) then the XML representation MUST be returned.

            11.2 Requesting Data

            OData services support requests for data via HTTP GET requests.

            The path of the URL specifies the target of the request (for example; the collection of entities, entity, navigation property, structural property, or operation). Additional query operators, such as filter, sort, page, and projection operations are specified through query options.

            This section describes the types of data requests defined by OData. For complete details on the syntax for building requests, see OData-URL.

            OData services are hypermedia driven services that return URLs to the client. If a client subsequently requests the advertised resource and the URL has expired, then the service SHOULD respond with 410 Gone. If this is not feasible, the service MUST respond with 404 Not Found.

            -

            The format of the returned data is dependent upon the request and the format specified by the client, either in the Accept header or using the $format query option. If the client specifies neither an Accept header nor the $format query option, the service is allowed to return the response in any format.

            +

            The format of the returned data is dependent upon the request and the format specified by the client, either in the Accept header or using the $format query option. If the client specifies neither an Accept header nor the $format query option, the service is allowed to return the response in any format.

            11.2.1 System Query Options

            OData defines a number of system query options that allow refining the request. System query options are prefixed with the dollar ($) character, which is optional in OData 4.01. 4.01 services MUST support case-insensitive system query option names specified with or without the $ prefix. Clients that want to work with 4.0 services MUST use lower case names and specify the $ prefix.

            The result of the request MUST be as if the system query options were evaluated in the following order.

            @@ -1501,7 +1501,7 @@

            Null values come before non-null values when sorting in ascending order and after non-null values when sorting in descending order.

            Items are sorted by the result values of the first expression, and then items with the same value for the first expression are sorted by the result value of the second expression, and so on.

            The Boolean value false comes before the value true in ascending order.

            -

            Services SHOULD order language-dependent strings according to the content-language of the response, and SHOULD annotate string properties with language-dependent order with the term Core.IsLanguageDependent, see OData-VocCore.

            +

            Services SHOULD order language-dependent strings according to the Content-Language of the response, and SHOULD annotate string properties with language-dependent order with the term Core.IsLanguageDependent, see OData-VocCore.

            Values of type Edm.Stream or any of the Geo types cannot be sorted.

            Example 50: return all Products ordered by release date in ascending order, then by rating in descending order

            @@ -1609,8 +1609,8 @@

            To request entity references in place of the actual entities, the client issues a GET request with /$ref appended to the resource path.

            If the resource path does not identify an entity or a collection of entities, the service returns 404 Not Found.

            -

            If the resource path identifies a collection, the response MUST be the format-specific representation of a collection of entity references pointing to the related entities. If no entities are related, the response is the format-specific representation of an empty collection. The response MAY contain an ETag header for the collection whose value changes if the collection of references changes, i.e. a reference is added or removed.

            -

            If the resource path identifies a single existing entity, the response MUST be the format-specific representation of an entity reference. The response MAY contain an ETag header which represents the identity of the referenced entity. If the resource path terminates in a single-valued navigation path, the ETag value changes if the relationship is changed and points to a different OData entity. If the resource path is the canonical path for a single entity, the returned ETag can never change.

            +

            If the resource path identifies a collection, the response MUST be the format-specific representation of a collection of entity references pointing to the related entities. If no entities are related, the response is the format-specific representation of an empty collection. The response MAY contain an ETag header for the collection whose value changes if the collection of references changes, i.e. a reference is added or removed.

            +

            If the resource path identifies a single existing entity, the response MUST be the format-specific representation of an entity reference. The response MAY contain an ETag header which represents the identity of the referenced entity. If the resource path terminates in a single-valued navigation path, the ETag value changes if the relationship is changed and points to a different OData entity. If the resource path is the canonical path for a single entity, the returned ETag can never change.

            If the resource path terminates on a single entity and no such entity exists, the service returns either 204 No Content or 404 Not Found.

            Example 66: collection with an entity reference for each Order related to the Product with ID=0

            @@ -1711,15 +1711,15 @@

            11.3.

            11.4 Data Modification

            Updatable OData services support Create, Update, and Delete operations for some or all exposed entities. Additionally, Actions supported by a service can affect the state of the system.

            A successfully completed Data Modification Request must not violate the integrity of the data.

            -

            The client may request whether content be returned from a Create, Update, or Delete request, or the invocation of an Action, by specifying the return Prefer header.

            +

            The client may request whether content be returned from a Create, Update, or Delete request, or the invocation of an Action, by specifying the return preference.

            11.4.1 Common Data Modification Semantics

            Data Modification Requests share the following semantics.

            11.4.1.1 Use of ETags for Avoiding Update Conflicts

            Each entity has its own ETag value that MUST change when structural properties or links from that entity have changed. In addition, modifying, adding, or deleting a contained entity MAY change the ETag of the parent entity.

            Collections of entities (including collections of related entities) MAY have their own ETag value whose semantics is service-specific. It typically changes if entities are added to or removed from the collection, or if an entity in the collection is changed. The ETag of a collection of related entities reached via a navigation property MAY differ from the ETag of the entity containing the navigation property.

            A Data Modification Request on an existing resource or an Action Request invoking an action bound to an existing resource MAY require optimistic concurrency control. Services SHOULD announce this via annotations with the terms Core.OptimisticConcurrency in OData-VocCore and Capabilities.NavigationRestrictions (nested property OptimisticConcurrencyControl) in OData-VocCap.

            -

            If optimistic concurrency control is required for a resource, the service MUST include an ETag header in a response to a GET request to the resource, and MAY include the ETag in a format-specific manner in responses containing that resource.

            -

            The presence of an ETag header in a response does not imply in itself that the resource requires optimistic concurrency control; the ETag may just be used for caching and/or conditional GET requests.

            +

            If optimistic concurrency control is required for a resource, the service MUST include an ETag header in a response to a GET request to the resource, and MAY include the ETag in a format-specific manner in responses containing that resource.

            +

            The presence of an ETag header in a response does not imply in itself that the resource requires optimistic concurrency control; the ETag may just be used for caching and/or conditional GET requests.

            If an ETag value is specified in an If-Match or If-None-Match header of a Data Modification Request or Action Request, the operation MUST only be invoked if the If-Match or If-None-Match condition is satisfied.

            If the client does not specify an If-Match request header in a Data Modification Request or Action Request on a resource that requires optimistic concurrency control, the service responds with a 428 Precondition Required and MUST ensure that no observable change occurs as a result of the request. Clients can attempt to disable optimistic concurrency control by specifying If-Match with a value of *. Services MAY reject such requests.

            For requests including an OData-Version header value of 4.01, any ETag values specified in the request body of an update request MUST be * or match the current value for the record being updated.

            @@ -1747,8 +1747,8 @@

            1

            If the entity being created is not an open entity, additional property values beyond those specified in the metadata SHOULD NOT be sent in the request body. The service MUST fail if unable to persist all property values specified in the request.

            Properties computed by the service (annotated with the term Core.Computed, see OData-VocCore) and properties that are tied to properties of the principal entity by a referential constraint, can be omitted and MUST be ignored if included in the request.

            Properties with a defined default value, nullable properties, and collection-valued properties omitted from the request are set to the default value, null, or an empty collection, respectively.

            -

            Upon successful completion, the response MUST contain a Location header that contains the edit URL or read URL of the created entity.

            -

            Upon successful completion the service MUST respond with either 201 Created and a representation of the created entity, or 204 No Content if the request included a Prefer header with a value of return=minimal and did not include the system query options $select and $expand.

            +

            Upon successful completion, the response MUST contain a Location header that contains the edit URL or read URL of the created entity.

            +

            Upon successful completion the service MUST respond with either 201 Created and a representation of the created entity, or 204 No Content if the request included a return=minimal preference and did not include the system query options $select and $expand.

            To create a new entity with links to existing entities in a single request, the client includes references to the related entities in the request body.

            The representation for referencing related entities is format-specific.

            @@ -1805,7 +1805,7 @@

            1

            If an update specifies both a binding to a single-valued navigation property and a dependent property that is tied to a key property of the principal entity according to the same navigation property, then the dependent property is ignored, and the relationship is updated according to the value specified in the binding.

            If the entity being updated is open, then additional values for properties beyond those specified in the metadata or returned in a previous request MAY be sent in the request body. The service MUST treat these as dynamic properties.

            If the entity being updated is not open, then additional values for properties beyond those specified in the metadata or returned in a previous request SHOULD NOT be sent in the request body. The service MUST fail if it is unable to persist all updatable property values specified in the request.

            -

            Upon successful completion the service responds with either 200 OK and a representation of the updated entity, or 204 No Content. The client may request that the response SHOULD include a body by specifying a Prefer header with a value of return=representation, or by specifying the system query options $select or $expand. If the service uses ETags for optimistic concurrency control, the entities in the response MUST include ETags.

            +

            Upon successful completion the service responds with either 200 OK and a representation of the updated entity, or 204 No Content. The client may request that the response SHOULD include a body by specifying a return=representation preference, or by specifying the system query options $select or $expand. If the service uses ETags for optimistic concurrency control, the entities in the response MUST include ETags.

            Update requests with an OData-Version header with a value of 4.0 MUST NOT contain related entities as inline content. Such requests MAY contain binding information for navigation properties. For single-valued navigation properties this replaces the relationship. For collection-valued navigation properties this adds to the relationship.

            Payloads with an OData-Version header with a value of 4.01 or greater MAY include nested entities and entity references that specify the full set of to be related entities, or a nested delta payload representing the related entities that have been added, removed, or changed. Such a request is referred to as a “deep update”. If the nested collection is represented identical to an expanded navigation property, then the set of nested entities and entity references specified in a successful update request represents the full set of entities to be related according to that relationship and MUST NOT include added links, deleted links, or deleted entities.

            @@ -1878,8 +1878,8 @@

            1

            Upserts are not supported against media entities, single-valued non-containment navigation properties, or entities whose keys values are generated by the service. Services MUST fail an update request to a URL that would identify such an entity and the entity does not yet exist.

            Singleton entities can be upserted if they are nullable. Services supporting this SHOULD advertise it by annotating the singleton with the term Capabilities.UpdateRestrictions (nested property Upsertable with value true) defined in OData-VocCap.

            Key and other non-updatable properties, as well as dependent properties that are not tied to key properties of the principal entity, MUST be ignored by the service in processing the Upsert request.

            -

            To ensure that an update request is not treated as an insert, the client MAY specify an If-Match header in the update request. The service MUST NOT treat an update request containing an If-Match header as an insert.

            -

            A PUT or PATCH request MUST NOT be treated as an update if an If-None-Match header is specified with a value of *.

            +

            To ensure that an update request is not treated as an insert, the client MAY specify an If-Match header in the update request. The service MUST NOT treat an update request containing an If-Match header as an insert.

            +

            A PUT or PATCH request MUST NOT be treated as an update if an If-None-Match header is specified with a value of *.

            11.4.5 Delete an Entity

            To delete an individual entity, the client makes a DELETE request to a URL that identifies the entity. Services MAY restrict deletes only to requests addressing the edit URL of the entity.

            The request body SHOULD be empty. Top-level singleton entities can be deleted if they are nullable. Services supporting this MAY advertise it by annotating the singleton with the term Capabilities.DeleteRestrictions (nested property Deletable with value true) defined in OData-VocCap.

            @@ -1912,8 +1912,8 @@

            11.4.7.1 Create a Media Entity

            A POST request to a media entity’s entity set creates a new media entity. The request body MUST contain the media value (for example, the photograph) whose media type MUST be specified in a Content-Type header. The request body is always interpreted as the media value, even if it has the media type of an OData format supported by the service. It is not possible to set the structural properties of the media entity when creating the media entity.

            -

            Upon successful completion, the response MUST contain Location header that contains the edit URL of the created media entity.

            -

            Upon successful completion the service responds with either 201 Created, or 204 No Content if the request included a Prefer header with a value of return=minimal.

            +

            Upon successful completion, the response MUST contain Location header that contains the edit URL of the created media entity.

            +

            Upon successful completion the service responds with either 201 Created, or 204 No Content if the request included a return=minimal preference.

            11.4.7.2 Update a Media Entity Stream

            A successful PUT request to the media edit URL of a media entity changes the media stream of the entity.

            If the entity includes an ETag value for the media stream, the client MUST include an If-Match header with the ETag value.

            @@ -1966,7 +1966,7 @@

            A successful PUT request to the edit URL for a primitive property updates the value of the property. The message body MUST contain the new value, formatted as a single property according to the specified format.

            A successful PUT request to the edit URL for the raw value of a primitive property updates the property with the raw value specified in the payload. The payload MUST be formatted as an appropriate content type for the raw value of the property.

            The same rules apply whether this is a regular property or a dynamic property.

            -

            Upon successful completion the service responds with either 200 OK or 204 No Content. The client may request that the response SHOULD include a body by specifying a Prefer header with a value of return=representation.

            +

            Upon successful completion the service responds with either 200 OK or 204 No Content. The client may request that the response SHOULD include a body by specifying a return=representation preference.

            Services MUST return an error if the property is not updatable.

            11.4.9.2 Set a Value to Null

            A successful DELETE request to the edit URL for a structural property, or to the edit URL of the raw value of a primitive property, sets the property to null. The request body is ignored and should be empty.

            @@ -1980,7 +1980,7 @@

            200 OK or 204 No Content. The client may request that the response SHOULD include a body by specifying a Prefer header with a value of return=representation.

            +

            Upon successful completion the service responds with either 200 OK or 204 No Content. The client may request that the response SHOULD include a body by specifying a return=representation preference.

            Services MUST return an error if the property is not updatable.

            11.4.9.4 Update a Collection Property

            A successful PUT request to the edit URL of a collection property updates that collection. The message body MUST contain the desired new value, formatted as a collection property according to the specified format.

            @@ -1988,7 +1988,7 @@

            A successful POST request to the edit URL of a collection property adds an item to the collection. The body of the request MUST be a single item to be added to the collection. If the collection is ordered, the item is added to the end of the collection, and if the collection supports positional insert $index MAY be used to specify the insert position.

            A successful DELETE request to the edit URL of a collection property deletes all items in that collection.

            Since collection members have no individual identity, PATCH is not supported for collection properties.

            -

            Upon successful completion the service responds with either 200 OK and a representation of the updated collection, or 204 No Content. The client may request that the response SHOULD include a body by specifying a Prefer header with a value of return=representation.

            +

            Upon successful completion the service responds with either 200 OK and a representation of the updated collection, or 204 No Content. The client may request that the response SHOULD include a body by specifying a return=representation preference.

            Services MUST return an error if the property is not updatable.

            11.4.10 Managing Members of an Ordered Collection

            Collections annotated with the Core.Ordered term (see OData-VocCore) have a stable order. Members of an ordered collection of primitive and complex types can be individually updated or deleted by invoking an update operation against the URL of the collection appended by a segment containing the zero-based ordinal of the item within the collection. A negative ordinal number indexes from the end of the collection, with -1 representing the last item in the collection.

            @@ -2179,11 +2179,11 @@

            Core.OptionalParameter defined in OData-VocCore MAY be omitted from the request body. If an omitted parameter is not annotated (and thus nullable), it MUST be interpreted as having the null value. If it is annotated and the annotation specifies a DefaultValue, the omitted parameter is interpreted as having that default value. If omitted and the annotation does not specify a default value, the service is free on how to interpret the omitted parameter. Note: a nullable non-binding parameter is equivalent to being annotated as optional with a default value of null.

            4.01 services MUST support invoking actions with no non-binding parameters and parameterless action imports both without a request body and with a request body representing no parameters, according to the particular format. Interoperable clients SHOULD always include a request body, even when invoking actions with no non-binding parameters and parameterless action imports.

            If the action returns results, the client SHOULD use content type negotiation to request the results in the desired format, otherwise the default content type will be used.

            -

            The client can request whether any results from the action be returned using the return Prefer header.

            -

            Actions that create and return a single entity follow the rules for entity creation and return a Location header that contains the edit URL or read URL of the created entity.

            +

            The client can request whether any results from the action be returned using the return preference.

            +

            Actions that create and return a single entity follow the rules for entity creation and return a Location header that contains the edit URL or read URL of the created entity.

            If the action returns a value of type Edm.Stream, the response to the POST request follows the rules for requesting stream properties.

            Actions without a return type respond with 204 No Content on success.

            -

            To request processing of the action only if the binding parameter value, an entity or collection of entities, is unmodified, the client includes the If-Match header with the latest known ETag value for the entity or collection of entities. The ETag value for a collection as a whole is transported in the ETag header of a collection response.

            +

            To request processing of the action only if the binding parameter value, an entity or collection of entities, is unmodified, the client includes the If-Match header with the latest known ETag value for the entity or collection of entities. The ETag value for a collection as a whole is transported in the ETag header of a collection response.

            Example 98: invoke the SampleEntities.CreateOrder action using Customers('ALFKI') as the customer (or binding parameter). The values 2 for the quantity parameter and BLACKFRIDAY for the discountCode parameter are passed in the body of the request. Invoke the action only if the customer’s ETag still matches.

            POST http://host/service/Customers('ALFKI')/SampleEntities.CreateOrder
            @@ -2202,12 +2202,12 @@ 

            The same action name may be used multiple times within a schema provided there is at most one unbound overload, and each bound overload specifies a different binding parameter type.

            If the action is bound and the binding parameter type is part of an inheritance hierarchy, the action overload is selected based on the type of the URL segment preceding the action name. A type-cast segment can be used to select an action defined on a particular type in the hierarchy, see OData-URL.

            11.6 Asynchronous Requests

            -

            A Prefer header with a respond-async preference allows clients to request that the service process a Data Service Request asynchronously.

            +

            A Prefer header with a respond-async preference allows clients to request that the service process a Data Service Request asynchronously.

            If the client has specified respond-async in the request, the service MAY process the request asynchronously and return a 202 Accepted response. A service MUST NOT reply to a Data Service Request with 202 Accepted if the request has not included the respond-async preference.

            -

            Responses that return 202 Accepted MUST include a Location header pointing to a status monitor resource that represents the current state of the asynchronous processing in addition to an optional Retry-After header indicating the time, in seconds, the client should wait before querying the service for status. Services MAY include a response body, for example, to provide additional status information.

            -

            A GET request to the status monitor resource again returns 202 Accepted response if the asynchronous processing has not finished. This response MUST again include a Location header and MAY include a Retry-After header to be used for a subsequent request. The Location header and optional Retry-After header may or may not contain the same values as returned by the previous request.

            +

            Responses that return 202 Accepted MUST include a Location header pointing to a status monitor resource that represents the current state of the asynchronous processing in addition to an optional Retry-After header indicating the time, in seconds, the client should wait before querying the service for status. Services MAY include a response body, for example, to provide additional status information.

            +

            A GET request to the status monitor resource again returns 202 Accepted response if the asynchronous processing has not finished. This response MUST again include a Location header and MAY include a Retry-After header to be used for a subsequent request. The Location header and optional Retry-After header may or may not contain the same values as returned by the previous request.

            A GET request to the status monitor resource returns 200 OK once the asynchronous processing has completed. For OData 4.01 and greater responses, or OData 4.0 requests that include an Accept header that does not specify application/http, the response MUST include the AsyncResult response header. Any other headers, along with the response body, represent the result of the completed asynchronous operation. If the GET request to the status monitor includes an OData-MaxVersion header with a value of 4.0 and no Accept header, or an Accept header that includes application/http, then the body of the final 200 OK response MUST be represented as an HTTP message, as described in RFC7230, which is the full HTTP response to the completed asynchronous operation.

            -

            A DELETE request sent to the status monitor resource requests that the asynchronous processing be canceled. A 200 OK or a 204 No Content response indicates that the asynchronous processing has been successfully canceled. A client can request that the DELETE should be executed asynchronously. A 202 Accepted response indicates that the cancellation is being processed asynchronously; the client can use the returned Location header (which MUST be different from the status monitor resource of the initial request) to query for the status of the cancellation. If a delete request is not supported by the service, the service returns 405 Method Not Allowed.

            +

            A DELETE request sent to the status monitor resource requests that the asynchronous processing be canceled. A 200 OK or a 204 No Content response indicates that the asynchronous processing has been successfully canceled. A client can request that the DELETE should be executed asynchronously. A 202 Accepted response indicates that the cancellation is being processed asynchronously; the client can use the returned Location header (which MUST be different from the status monitor resource of the initial request) to query for the status of the cancellation. If a delete request is not supported by the service, the service returns 405 Method Not Allowed.

            After a successful DELETE request against the status monitor resource, any subsequent GET requests for the same status monitor resource returns 404 Not Found.

            If an asynchronous request is cancelled for reasons other than the consumers issuing a DELETE request against the status monitor resource, a GET request to the status monitor resource returns 200 OK with a response body containing a single HTTP response with a status code in the 5xx Server Error range indicating that the operation was cancelled.

            The service MUST ensure that no observable change has occurred as a result of a canceled request.

            diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md index 2525bba86..8e43e236c 100644 --- a/docs/odata-protocol/odata-protocol.md +++ b/docs/odata-protocol/odata-protocol.md @@ -912,7 +912,7 @@ parameters within the `Content-Type` header. As defined in [RFC7231](#rfc7231), the `Content-Encoding` header field is used as a modifier to the media-type (as indicated in the -`Content-Type`). When present, its value indicates what additional +`Content-Type` header). When present, its value indicates what additional content codings have been applied to the entity-body. A service MAY specify a list of acceptable content codings using an annotation with term @@ -1008,7 +1008,7 @@ If the media type specified in the `Accept` header does not include a contain a `charset` format parameter. The service SHOULD NOT add any format parameters to the `Content-Type` -parameter not specified in the `Accept` header. +header not specified in the `Accept` header. If the `Accept` header is specified on an individual request within a batch, then it specifies the acceptable formats for that individual @@ -1058,7 +1058,7 @@ occurs as a result of the request. If present, the request MUST only be processed if the specified ETag value matches the current ETag value of the target resource. Services -sending [`ETag` headers](#HeaderETag) with weak ETags that only depend +sending [`ETag`](#HeaderETag) headers with weak ETags that only depend on the representation-independent entity state MUST use the weak comparison function because it is sufficient to prevent accidental overwrites. This is a deviation from [RFC7232](#rfc7232). @@ -1255,14 +1255,14 @@ If the service applies the `callback` preference it MUST include the When the `callback` preference is applied to asynchronous requests, the OData service invokes the callback endpoint once it has finished processing the request. The status monitor resource, returned in the -[`Location` header](#HeaderLocation) of the previously returned +[`Location`](#HeaderLocation) header of the previously returned [`202 Accepted`](#ResponseCode202Accepted) response, can then be used to retrieve the results of the asynchronously executed request. When the `callback` preference is specified on a `GET` request to a delta link and there are no changes available, the OData service returns -a [`202 Accepted`](#ResponseCode202Accepted) response with a [`Location` -header](#HeaderLocation) specifying the delta link to be used to check +a [`202 Accepted`](#ResponseCode202Accepted) response with a +[`Location`](#HeaderLocation) header specifying the delta link to be used to check for future updates. The OData service then invokes the specified callback endpoint once new changes become available. @@ -1736,8 +1736,8 @@ and in [`3xx Redirect`](#ResponseCode3xxRedirection) responses The `Retry-After` header specifies the duration of time, in seconds, that the client is asked to wait before retrying the request or issuing -a request to the resource returned as the value of the [`Location` -header](#HeaderLocation). +a request to the resource returned as the value of the +[`Location`](#HeaderLocation) header. ### 8.3.8 Header `Vary` @@ -1801,8 +1801,9 @@ Requests](#AsynchronousBatchRequests). ### 9.1.4 Response Code `204 No Content` A request returns `204 No Content` if the requested resource has the -`null` value, or if the service applies a [`return=minimal` -preference](#Preferencereturnrepresentationandreturnminimal). In this case, the response body MUST be empty. +`null` value, or if the service applies a +[`return=minimal`](#Preferencereturnrepresentationandreturnminimal) preference. +In this case, the response body MUST be empty. As defined in [RFC7231](#rfc7231), a [Data Modification Request](#DataModification) that responds with @@ -1824,10 +1825,10 @@ server-side values corresponding to the `ETag` value sent in the As per [RFC7231](#rfc7231), a `3xx Redirection` indicates that further action needs to be taken by the client in order to fulfill the -request. In this case, the response SHOULD include a [`Location` -header](#HeaderLocation), as appropriate, with the URL from which the -result can be obtained; it MAY include a [`Retry-After` -header](#HeaderRetryAfter). +request. In this case, the response SHOULD include a +[`Location`](#HeaderLocation) header, as appropriate, with the URL from which the +result can be obtained; it MAY include a +[`Retry-After`](#HeaderRetryAfter) header. ### 9.1.6 Response Code `304 Not Modified` @@ -1941,7 +1942,7 @@ concerns around information disclosure. In the case that the service encounters an error after sending a success status to the client, the service MUST leave the response malformed -according to its [content-type](#HeaderContentType). Clients MUST treat +according to its [`Content-Type`](#HeaderContentType). Clients MUST treat the entire response as being in error. Services MAY include the header [`OData-Error`](#HeaderODataError) as a @@ -2607,7 +2608,7 @@ root URL of the service with `$metadata` appended. To retrieve this document the client issues a `GET` request to the metadata document URL. If a request for metadata does not specify a format preference (via -[`Accept` header](#HeaderAccept) or +[`Accept`](#HeaderAccept) header or [`$format`](#SystemQueryOptionformat)) then the XML representation MUST be returned. @@ -2632,10 +2633,10 @@ the URL has expired, then the service SHOULD respond with MUST respond with [`404 Not Found`](#ResponseCode404NotFound). The format of the returned data is dependent upon the request and the -format specified by the client, either in the [`Accept` -header](#HeaderAccept) or using the +format specified by the client, either in the +[`Accept`](#HeaderAccept) header or using the [`$format`](#SystemQueryOptionformat) query option. If -the client specifies neither an [`Accept` header](#HeaderAccept) nor the +the client specifies neither an [`Accept`](#HeaderAccept) header nor the [`$format`](#SystemQueryOptionformat) query option, the service is allowed to return the response in any format. @@ -3291,7 +3292,7 @@ result value of the second expression, and so on. The Boolean value false comes before the value true in ascending order. Services SHOULD order language-dependent strings according to the -[content-language](#HeaderContentLanguage) of the response, and SHOULD +[`Content-Language`](#HeaderContentLanguage) of the response, and SHOULD annotate string properties with language-dependent order with the term [`Core.IsLanguageDependent`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#IsLanguageDependent), see [OData-VocCore](#ODataVocCore). @@ -3583,13 +3584,13 @@ If the resource path identifies a collection, the response MUST be the format-specific representation of a collection of entity references pointing to the related entities. If no entities are related, the response is the format-specific representation of an empty collection. -The response MAY contain an [ETag header](#HeaderETag) for the +The response MAY contain an [`ETag`](#HeaderETag) header for the collection whose value changes if the collection of references changes, i.e. a reference is added or removed. If the resource path identifies a single existing entity, the response MUST be the format-specific representation of an entity reference. The -response MAY contain an [ETag header](#HeaderETag) which represents the +response MAY contain an [`ETag`](#HeaderETag) header which represents the identity of the referenced entity. If the resource path terminates in a single-valued navigation path, the ETag value changes if the relationship is changed and points to a different OData entity. If the @@ -3958,7 +3959,7 @@ must not violate the integrity of the data. The client may request whether content be returned from a Create, Update, or Delete request, or the invocation of an Action, by specifying -the [`return` Prefer header](#Preferencereturnrepresentationandreturnminimal). +the [`return`](#Preferencereturnrepresentationandreturnminimal) preference. ### 11.4.1 Common Data Modification Semantics @@ -3990,11 +3991,11 @@ announce this via annotations with the terms [OData-VocCap](#ODataVocCap). If optimistic concurrency control is required for a resource, the -service MUST include an [ETag header](#HeaderETag) in a response to a +service MUST include an [`ETag`](#HeaderETag) header in a response to a `GET` request to the resource, and MAY include the ETag in a format-specific manner in responses containing that resource. -The presence of an [ETag header](#HeaderETag) in a response does not +The presence of an [`ETag`](#HeaderETag) header in a response does not imply in itself that the resource requires optimistic concurrency control; the ETag may just be used for caching and/or conditional `GET` requests. @@ -4134,16 +4135,15 @@ Properties with a defined default value, nullable properties, and collection-valued properties omitted from the request are set to the default value, null, or an empty collection, respectively. -Upon successful completion, the response MUST contain a [`Location` -header](#HeaderLocation) that contains the edit URL or read URL of the +Upon successful completion, the response MUST contain a +[`Location`](#HeaderLocation) header that contains the edit URL or read URL of the created entity. Upon successful completion the service MUST respond with either [`201 Created`](#ResponseCode201Created) and a representation of the created entity, or [`204 No Content`](#ResponseCode204NoContent) if the -request included a [Prefer -header](#Preferencereturnrepresentationandreturnminimal) with a value of -[`return=minimal`](#Preferencereturnrepresentationandreturnminimal) and did not +request included a +[`return=minimal`](#Preferencereturnrepresentationandreturnminimal) preference and did not include the system query options [`$select`](#SystemQueryOptionselect) and [`$expand`](#SystemQueryOptionexpand). @@ -4343,8 +4343,7 @@ Upon successful completion the service responds with either [`200 OK`](#ResponseCode200OK) and a representation of the updated entity, or [`204 No Content`](#ResponseCode204NoContent). The client may request that the response SHOULD include a body by specifying a -[`Prefer` header](#Preferencereturnrepresentationandreturnminimal) with a value of -[`return=representation`](#Preferencereturnrepresentationandreturnminimal), or by +[`return=representation`](#Preferencereturnrepresentationandreturnminimal) preference, or by specifying the system query options [`$select`](#SystemQueryOptionselect) or [`$expand`](#SystemQueryOptionexpand). If the service uses ETags for @@ -4508,12 +4507,12 @@ that are not tied to key properties of the principal entity, MUST be ignored by the service in processing the Upsert request. To ensure that an update request is not treated as an insert, the client -MAY specify an [`If-Match` header](#HeaderIfMatch) in the update +MAY specify an [`If-Match`](#HeaderIfMatch) header in the update request. The service MUST NOT treat an update request containing an `If-Match` header as an insert. A `PUT` or `PATCH` request MUST NOT be treated as an update if an -[`If-None-Match` header](#HeaderIfNoneMatch) is specified with a value +[`If-None-Match`](#HeaderIfNoneMatch) header is specified with a value of `*`. ### 11.4.5 Delete an Entity @@ -4638,15 +4637,14 @@ OData format supported by the service. It is not possible to set the structural properties of the media entity when creating the media entity. -Upon successful completion, the response MUST contain [`Location` -header](#HeaderLocation) that contains the edit URL of the created media +Upon successful completion, the response MUST contain +[`Location`](#HeaderLocation) header that contains the edit URL of the created media entity. Upon successful completion the service responds with either [`201 Created`](#ResponseCode201Created), or [`204 No Content`](#ResponseCode204NoContent) if the request included a -[`Prefer` header](#Preferencereturnrepresentationandreturnminimal) with a value of -[`return=minimal`](#Preferencereturnrepresentationandreturnminimal). +[`return=minimal`](#Preferencereturnrepresentationandreturnminimal) preference. #### 11.4.7.2 Update a Media Entity Stream @@ -4793,9 +4791,8 @@ property. Upon successful completion the service responds with either [`200 OK`](#ResponseCode200OK) or [`204 No Content`](#ResponseCode204NoContent). The client may request -that the response SHOULD include a body by specifying a [Prefer -header](#Preferencereturnrepresentationandreturnminimal) with a value of -[`return=representation`](#Preferencereturnrepresentationandreturnminimal). +that the response SHOULD include a body by specifying a +[`return=representation`](#Preferencereturnrepresentationandreturnminimal) preference. Services MUST return an error if the property is not updatable. @@ -4845,9 +4842,8 @@ request body and set all unspecified properties to their default value. Upon successful completion the service responds with either [`200 OK`](#ResponseCode200OK) or [`204 No Content`](#ResponseCode204NoContent). The client may request -that the response SHOULD include a body by specifying a [Prefer -header](#Preferencereturnrepresentationandreturnminimal) with a value of -[`return=representation`](#Preferencereturnrepresentationandreturnminimal). +that the response SHOULD include a body by specifying a +[`return=representation`](#Preferencereturnrepresentationandreturnminimal) preference. Services MUST return an error if the property is not updatable. @@ -4877,9 +4873,8 @@ supported for collection properties. Upon successful completion the service responds with either [`200 OK`](#ResponseCode200OK) and a representation of the updated collection, or [`204 No Content`](#ResponseCode204NoContent). The client may request -that the response SHOULD include a body by specifying a [Prefer -header](#Preferencereturnrepresentationandreturnminimal) with a value of -[`return=representation`](#Preferencereturnrepresentationandreturnminimal). +that the response SHOULD include a body by specifying a +[`return=representation`](#Preferencereturnrepresentationandreturnminimal) preference. Services MUST return an error if the property is not updatable. @@ -5511,11 +5506,11 @@ negotiation to request the results in the desired format, otherwise the default content type will be used. The client can request whether any results from the action be returned -using the [`return Prefer` header](#Preferencereturnrepresentationandreturnminimal). +using the [`return`](#Preferencereturnrepresentationandreturnminimal) preference. Actions that create and return a single entity follow the rules for -[entity creation](#CreateanEntity) and return a [`Location` -header](#HeaderLocation) that contains the edit URL or read URL of the +[entity creation](#CreateanEntity) and return a +[`Location`](#HeaderLocation) header that contains the edit URL or read URL of the created entity. If the action returns a value of type `Edm.Stream`, the response to the `POST` request @@ -5528,7 +5523,7 @@ To request processing of the action only if the binding parameter value, an entity or collection of entities, is unmodified, the client includes the [`If-Match`](#HeaderIfMatch) header with the latest known ETag value for the entity or collection of entities. The ETag value for a -collection as a whole is transported in the `ETag` header of a +collection as a whole is transported in the [`ETag`](#HeaderETag) header of a collection response. ::: example @@ -5566,7 +5561,7 @@ see [OData-URL](#ODataURL). ## 11.6 Asynchronous Requests -A [Prefer](#HeaderPrefer) header with a +A [`Prefer`](#HeaderPrefer) header with a [`respond-async`](#Preferencerespondasync) preference allows clients to request that the service process a [Data Service Request](#DataServiceRequests) asynchronously. @@ -5578,18 +5573,18 @@ NOT reply to a [Data Service Request](#DataServiceRequests) with `202 Accepted` if the request has not included the `respond-async` preference. -Responses that return `202 Accepted` MUST include a [`Location` -header](#HeaderLocation) pointing to a *status monitor resource* that +Responses that return `202 Accepted` MUST include a +[`Location`](#HeaderLocation) header pointing to a *status monitor resource* that represents the current state of the asynchronous processing in addition -to an optional [`Retry-After` header](#HeaderRetryAfter) indicating the +to an optional [`Retry-After`](#HeaderRetryAfter) header indicating the time, in seconds, the client should wait before querying the service for status. Services MAY include a response body, for example, to provide additional status information. A `GET` request to the status monitor resource again returns `202 Accepted` response if the asynchronous processing has not finished. -This response MUST again include a [`Location` header](#HeaderLocation) -and MAY include a [`Retry-After` header](#HeaderRetryAfter) to be used for a subsequent request. The +This response MUST again include a [`Location`](#HeaderLocation) header +and MAY include a [`Retry-After`](#HeaderRetryAfter) header to be used for a subsequent request. The `Location` header and optional `Retry-After` header may or may not contain the same values as returned by the previous request. @@ -5612,7 +5607,7 @@ asynchronous processing be canceled. A `200 OK` or a been successfully canceled. A client can request that the `DELETE` should be executed asynchronously. A `202 Accepted` response indicates that the cancellation is being processed asynchronously; the client can -use the returned [`Location` header](#HeaderLocation) (which MUST be +use the returned [`Location`](#HeaderLocation) header (which MUST be different from the status monitor resource of the initial request) to query for the status of the cancellation. If a delete request is not supported by the service, the service returns diff --git a/docs/odata-url-conventions/odata-url-conventions.html b/docs/odata-url-conventions/odata-url-conventions.html index a939a6207..1e6b5a6fc 100644 --- a/docs/odata-url-conventions/odata-url-conventions.html +++ b/docs/odata-url-conventions/odata-url-conventions.html @@ -840,7 +840,7 @@

            Example 49: passing a filter condition in the request body

            POST http://host/service/People/$query
            @@ -898,7 +898,7 @@ 
            5.1.1.1.3

            The gt operator returns true if the left operand is greater than the right operand, otherwise it returns false.

            The special value INF is greater than any number, and any number is greater than -INF.

            The Boolean value true is greater than false.

            -

            Services SHOULD order language-dependent strings according to the content-language of the response, and SHOULD annotate string properties with language-dependent order with the term Core.IsLanguageDependent, see OData-VocCore.

            +

            Services SHOULD order language-dependent strings according to the Content-Language of the response, and SHOULD annotate string properties with language-dependent order with the term Core.IsLanguageDependent, see OData-VocCore.

            If any operand is null, the operator returns false.

            5.1.1.1.4 Greater Than or Equal

            The ge operator returns true if the left operand is greater than or equal to the right operand, otherwise it returns false.

            @@ -907,7 +907,7 @@
            5.1.1.1.5 Less Than

            The lt operator returns true if the left operand is less than the right operand, otherwise it returns false.

            The special value -INF is less than any number, and any number is less than INF.

            The Boolean value false is less than true.

            -

            Services SHOULD order language-dependent strings according to the content-language of the response, and SHOULD annotate string properties with language-dependent order with the term Core.IsLanguageDependent, see OData-VocCore.

            +

            Services SHOULD order language-dependent strings according to the Content-Language of the response, and SHOULD annotate string properties with language-dependent order with the term Core.IsLanguageDependent, see OData-VocCore.

            If any operand is null, the operator returns false.

            5.1.1.1.6 Less Than or Equal

            The le operator returns true if the left operand is less than or equal to the right operand, otherwise it returns false.

            diff --git a/docs/odata-url-conventions/odata-url-conventions.md b/docs/odata-url-conventions/odata-url-conventions.md index bc585dfda..ff5a8cb5f 100644 --- a/docs/odata-url-conventions/odata-url-conventions.md +++ b/docs/odata-url-conventions/odata-url-conventions.md @@ -1380,7 +1380,7 @@ Requests to paths ending in `/$query` MUST use the `POST` verb. Query options specified in the request body and query options specified in the request URL are processed together. -The request body MUST use the content-type `text/plain`. It contains the +The request body MUST use `Content-Type: text/plain`. It contains the query portion of the URL and MUST use the same percent-encoding as in URLs (especially: no spaces, tabs, or line breaks allowed) and MUST follow the syntax rules described in chapter Query Options. @@ -1559,7 +1559,7 @@ greater than `-INF`. The Boolean value `true` is greater than `false`. Services SHOULD order language-dependent strings according to the -content-language of the response, and SHOULD annotate string properties +`Content-Language` of the response, and SHOULD annotate string properties with language-dependent order with the term [`Core.IsLanguageDependent`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#IsLanguageDependent), see [OData-VocCore](#ODataVocCore). @@ -1584,7 +1584,7 @@ than `INF`. The Boolean value `false` is less than `true`. Services SHOULD order language-dependent strings according to the -content-language of the response, and SHOULD annotate string properties +`Content-Language` of the response, and SHOULD annotate string properties with language-dependent order with the term [`Core.IsLanguageDependent`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#IsLanguageDependent), see [OData-VocCore](#ODataVocCore). diff --git a/odata-json-format/10 Media Entity.md b/odata-json-format/10 Media Entity.md index 1b8322cc3..ac05f3e0e 100644 --- a/odata-json-format/10 Media Entity.md +++ b/odata-json-format/10 Media Entity.md @@ -153,7 +153,7 @@ first name/value pair in the response. The `count` name/value pair represents the number of entities in the collection. If present and the [`streaming=true`](#PayloadOrderingConstraints) -content-type parameter is set, it MUST come before the +media type parameter is set, it MUST come before the `value` name/value pair. If the response represents a partial result, the `count` name/value pair MUST appear in the first partial response, and it MAY appear in subsequent partial responses (in diff --git a/odata-json-format/4 Common Characteristics.md b/odata-json-format/4 Common Characteristics.md index 22f0494ff..03e2e2c22 100644 --- a/odata-json-format/4 Common Characteristics.md +++ b/odata-json-format/4 Common Characteristics.md @@ -153,7 +153,7 @@ cannot be assumed to support streaming. JSON producers are encouraged to follow the payload ordering constraints whenever possible (and include the `streaming=true` -content-type parameter) to support the maximum set of client scenarios. +media type parameter) to support the maximum set of client scenarios. To support streaming scenarios the following payload ordering constraints have to be met: diff --git a/odata-protocol/11 Data Service Requests.md b/odata-protocol/11 Data Service Requests.md index 933597829..956e733d9 100644 --- a/odata-protocol/11 Data Service Requests.md +++ b/odata-protocol/11 Data Service Requests.md @@ -78,7 +78,7 @@ root URL of the service with `$metadata` appended. To retrieve this document the client issues a `GET` request to the metadata document URL. If a request for metadata does not specify a format preference (via -[`Accept` header](#HeaderAccept) or +[`Accept`](#HeaderAccept) header or [`$format`](#SystemQueryOptionformat)) then the XML representation MUST be returned. @@ -103,10 +103,10 @@ the URL has expired, then the service SHOULD respond with MUST respond with [`404 Not Found`](#ResponseCode404NotFound). The format of the returned data is dependent upon the request and the -format specified by the client, either in the [`Accept` -header](#HeaderAccept) or using the +format specified by the client, either in the +[`Accept`](#HeaderAccept) header or using the [`$format`](#SystemQueryOptionformat) query option. If -the client specifies neither an [`Accept` header](#HeaderAccept) nor the +the client specifies neither an [`Accept`](#HeaderAccept) header nor the [`$format`](#SystemQueryOptionformat) query option, the service is allowed to return the response in any format. @@ -763,7 +763,7 @@ result value of the second expression, and so on. The Boolean value false comes before the value true in ascending order. Services SHOULD order language-dependent strings according to the -[content-language](#HeaderContentLanguage) of the response, and SHOULD +[`Content-Language`](#HeaderContentLanguage) of the response, and SHOULD annotate string properties with language-dependent order with the term [`Core.IsLanguageDependent`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#IsLanguageDependent), see [OData-VocCore](#ODataVocCore). @@ -1055,13 +1055,13 @@ If the resource path identifies a collection, the response MUST be the format-specific representation of a collection of entity references pointing to the related entities. If no entities are related, the response is the format-specific representation of an empty collection. -The response MAY contain an [ETag header](#HeaderETag) for the +The response MAY contain an [`ETag`](#HeaderETag) header for the collection whose value changes if the collection of references changes, i.e. a reference is added or removed. If the resource path identifies a single existing entity, the response MUST be the format-specific representation of an entity reference. The -response MAY contain an [ETag header](#HeaderETag) which represents the +response MAY contain an [`ETag`](#HeaderETag) header which represents the identity of the referenced entity. If the resource path terminates in a single-valued navigation path, the ETag value changes if the relationship is changed and points to a different OData entity. If the diff --git a/odata-protocol/11.4 Data Modification.md b/odata-protocol/11.4 Data Modification.md index c5908be0a..4e55d3564 100644 --- a/odata-protocol/11.4 Data Modification.md +++ b/odata-protocol/11.4 Data Modification.md @@ -9,7 +9,7 @@ must not violate the integrity of the data. The client may request whether content be returned from a Create, Update, or Delete request, or the invocation of an Action, by specifying -the [`return` Prefer header](#Preferencereturnrepresentationandreturnminimal). +the [`return`](#Preferencereturnrepresentationandreturnminimal) preference. ### ##subsubsec Common Data Modification Semantics @@ -41,11 +41,11 @@ announce this via annotations with the terms [OData-VocCap](#ODataVocCap). If optimistic concurrency control is required for a resource, the -service MUST include an [ETag header](#HeaderETag) in a response to a +service MUST include an [`ETag`](#HeaderETag) header in a response to a `GET` request to the resource, and MAY include the ETag in a format-specific manner in responses containing that resource. -The presence of an [ETag header](#HeaderETag) in a response does not +The presence of an [`ETag`](#HeaderETag) header in a response does not imply in itself that the resource requires optimistic concurrency control; the ETag may just be used for caching and/or conditional `GET` requests. @@ -185,16 +185,15 @@ Properties with a defined default value, nullable properties, and collection-valued properties omitted from the request are set to the default value, null, or an empty collection, respectively. -Upon successful completion, the response MUST contain a [`Location` -header](#HeaderLocation) that contains the edit URL or read URL of the +Upon successful completion, the response MUST contain a +[`Location`](#HeaderLocation) header that contains the edit URL or read URL of the created entity. Upon successful completion the service MUST respond with either [`201 Created`](#ResponseCode201Created) and a representation of the created entity, or [`204 No Content`](#ResponseCode204NoContent) if the -request included a [Prefer -header](#Preferencereturnrepresentationandreturnminimal) with a value of -[`return=minimal`](#Preferencereturnrepresentationandreturnminimal) and did not +request included a +[`return=minimal`](#Preferencereturnrepresentationandreturnminimal) preference and did not include the system query options [`$select`](#SystemQueryOptionselect) and [`$expand`](#SystemQueryOptionexpand). @@ -394,8 +393,7 @@ Upon successful completion the service responds with either [`200 OK`](#ResponseCode200OK) and a representation of the updated entity, or [`204 No Content`](#ResponseCode204NoContent). The client may request that the response SHOULD include a body by specifying a -[`Prefer` header](#Preferencereturnrepresentationandreturnminimal) with a value of -[`return=representation`](#Preferencereturnrepresentationandreturnminimal), or by +[`return=representation`](#Preferencereturnrepresentationandreturnminimal) preference, or by specifying the system query options [`$select`](#SystemQueryOptionselect) or [`$expand`](#SystemQueryOptionexpand). If the service uses ETags for @@ -559,12 +557,12 @@ that are not tied to key properties of the principal entity, MUST be ignored by the service in processing the Upsert request. To ensure that an update request is not treated as an insert, the client -MAY specify an [`If-Match` header](#HeaderIfMatch) in the update +MAY specify an [`If-Match`](#HeaderIfMatch) header in the update request. The service MUST NOT treat an update request containing an `If-Match` header as an insert. A `PUT` or `PATCH` request MUST NOT be treated as an update if an -[`If-None-Match` header](#HeaderIfNoneMatch) is specified with a value +[`If-None-Match`](#HeaderIfNoneMatch) header is specified with a value of `*`. ### ##subsubsec Delete an Entity @@ -689,15 +687,14 @@ OData format supported by the service. It is not possible to set the structural properties of the media entity when creating the media entity. -Upon successful completion, the response MUST contain [`Location` -header](#HeaderLocation) that contains the edit URL of the created media +Upon successful completion, the response MUST contain +[`Location`](#HeaderLocation) header that contains the edit URL of the created media entity. Upon successful completion the service responds with either [`201 Created`](#ResponseCode201Created), or [`204 No Content`](#ResponseCode204NoContent) if the request included a -[`Prefer` header](#Preferencereturnrepresentationandreturnminimal) with a value of -[`return=minimal`](#Preferencereturnrepresentationandreturnminimal). +[`return=minimal`](#Preferencereturnrepresentationandreturnminimal) preference. #### ##subsubsubsec Update a Media Entity Stream @@ -844,9 +841,8 @@ property. Upon successful completion the service responds with either [`200 OK`](#ResponseCode200OK) or [`204 No Content`](#ResponseCode204NoContent). The client may request -that the response SHOULD include a body by specifying a [Prefer -header](#Preferencereturnrepresentationandreturnminimal) with a value of -[`return=representation`](#Preferencereturnrepresentationandreturnminimal). +that the response SHOULD include a body by specifying a +[`return=representation`](#Preferencereturnrepresentationandreturnminimal) preference. Services MUST return an error if the property is not updatable. @@ -897,9 +893,8 @@ request body and set all unspecified properties to their default value. Upon successful completion the service responds with either [`200 OK`](#ResponseCode200OK) or [`204 No Content`](#ResponseCode204NoContent). The client may request -that the response SHOULD include a body by specifying a [Prefer -header](#Preferencereturnrepresentationandreturnminimal) with a value of -[`return=representation`](#Preferencereturnrepresentationandreturnminimal). +that the response SHOULD include a body by specifying a +[`return=representation`](#Preferencereturnrepresentationandreturnminimal) preference. Services MUST return an error if the property is not updatable. @@ -929,9 +924,8 @@ supported for collection properties. Upon successful completion the service responds with either [`200 OK`](#ResponseCode200OK) and a representation of the updated collection, or [`204 No Content`](#ResponseCode204NoContent). The client may request -that the response SHOULD include a body by specifying a [Prefer -header](#Preferencereturnrepresentationandreturnminimal) with a value of -[`return=representation`](#Preferencereturnrepresentationandreturnminimal). +that the response SHOULD include a body by specifying a +[`return=representation`](#Preferencereturnrepresentationandreturnminimal) preference. Services MUST return an error if the property is not updatable. diff --git a/odata-protocol/11.5 Operations.md b/odata-protocol/11.5 Operations.md index 9be53635c..37e7c2e4a 100644 --- a/odata-protocol/11.5 Operations.md +++ b/odata-protocol/11.5 Operations.md @@ -402,11 +402,11 @@ negotiation to request the results in the desired format, otherwise the default content type will be used. The client can request whether any results from the action be returned -using the [`return Prefer` header](#Preferencereturnrepresentationandreturnminimal). +using the [`return`](#Preferencereturnrepresentationandreturnminimal) preference. Actions that create and return a single entity follow the rules for -[entity creation](#CreateanEntity) and return a [`Location` -header](#HeaderLocation) that contains the edit URL or read URL of the +[entity creation](#CreateanEntity) and return a +[`Location`](#HeaderLocation) header that contains the edit URL or read URL of the created entity. If the action returns a value of type `Edm.Stream`, the response to the `POST` request @@ -419,7 +419,7 @@ To request processing of the action only if the binding parameter value, an entity or collection of entities, is unmodified, the client includes the [`If-Match`](#HeaderIfMatch) header with the latest known ETag value for the entity or collection of entities. The ETag value for a -collection as a whole is transported in the `ETag` header of a +collection as a whole is transported in the [`ETag`](#HeaderETag) header of a collection response. ::: example @@ -457,7 +457,7 @@ see [OData-URL](#ODataURL). ## ##subsec Asynchronous Requests -A [Prefer](#HeaderPrefer) header with a +A [`Prefer`](#HeaderPrefer) header with a [`respond-async`](#Preferencerespondasync) preference allows clients to request that the service process a [Data Service Request](#DataServiceRequests) asynchronously. @@ -469,18 +469,18 @@ NOT reply to a [Data Service Request](#DataServiceRequests) with `202 Accepted` if the request has not included the `respond-async` preference. -Responses that return `202 Accepted` MUST include a [`Location` -header](#HeaderLocation) pointing to a *status monitor resource* that +Responses that return `202 Accepted` MUST include a +[`Location`](#HeaderLocation) header pointing to a *status monitor resource* that represents the current state of the asynchronous processing in addition -to an optional [`Retry-After` header](#HeaderRetryAfter) indicating the +to an optional [`Retry-After`](#HeaderRetryAfter) header indicating the time, in seconds, the client should wait before querying the service for status. Services MAY include a response body, for example, to provide additional status information. A `GET` request to the status monitor resource again returns `202 Accepted` response if the asynchronous processing has not finished. -This response MUST again include a [`Location` header](#HeaderLocation) -and MAY include a [`Retry-After` header](#HeaderRetryAfter) to be used for a subsequent request. The +This response MUST again include a [`Location`](#HeaderLocation) header +and MAY include a [`Retry-After`](#HeaderRetryAfter) header to be used for a subsequent request. The `Location` header and optional `Retry-After` header may or may not contain the same values as returned by the previous request. @@ -503,7 +503,7 @@ asynchronous processing be canceled. A `200 OK` or a been successfully canceled. A client can request that the `DELETE` should be executed asynchronously. A `202 Accepted` response indicates that the cancellation is being processed asynchronously; the client can -use the returned [`Location` header](#HeaderLocation) (which MUST be +use the returned [`Location`](#HeaderLocation) header (which MUST be different from the status monitor resource of the initial request) to query for the status of the cancellation. If a delete request is not supported by the service, the service returns diff --git a/odata-protocol/8 Header Fields.md b/odata-protocol/8 Header Fields.md index 58d4a050f..c7c174615 100644 --- a/odata-protocol/8 Header Fields.md +++ b/odata-protocol/8 Header Fields.md @@ -34,7 +34,7 @@ parameters within the `Content-Type` header. As defined in [RFC7231](#rfc7231), the `Content-Encoding` header field is used as a modifier to the media-type (as indicated in the -`Content-Type`). When present, its value indicates what additional +`Content-Type` header). When present, its value indicates what additional content codings have been applied to the entity-body. A service MAY specify a list of acceptable content codings using an annotation with term @@ -130,7 +130,7 @@ If the media type specified in the `Accept` header does not include a contain a `charset` format parameter. The service SHOULD NOT add any format parameters to the `Content-Type` -parameter not specified in the `Accept` header. +header not specified in the `Accept` header. If the `Accept` header is specified on an individual request within a batch, then it specifies the acceptable formats for that individual @@ -180,7 +180,7 @@ occurs as a result of the request. If present, the request MUST only be processed if the specified ETag value matches the current ETag value of the target resource. Services -sending [`ETag` headers](#HeaderETag) with weak ETags that only depend +sending [`ETag`](#HeaderETag) headers with weak ETags that only depend on the representation-independent entity state MUST use the weak comparison function because it is sufficient to prevent accidental overwrites. This is a deviation from [RFC7232](#rfc7232). @@ -377,14 +377,14 @@ If the service applies the `callback` preference it MUST include the When the `callback` preference is applied to asynchronous requests, the OData service invokes the callback endpoint once it has finished processing the request. The status monitor resource, returned in the -[`Location` header](#HeaderLocation) of the previously returned +[`Location`](#HeaderLocation) header of the previously returned [`202 Accepted`](#ResponseCode202Accepted) response, can then be used to retrieve the results of the asynchronously executed request. When the `callback` preference is specified on a `GET` request to a delta link and there are no changes available, the OData service returns -a [`202 Accepted`](#ResponseCode202Accepted) response with a [`Location` -header](#HeaderLocation) specifying the delta link to be used to check +a [`202 Accepted`](#ResponseCode202Accepted) response with a +[`Location`](#HeaderLocation) header specifying the delta link to be used to check for future updates. The OData service then invokes the specified callback endpoint once new changes become available. @@ -861,8 +861,8 @@ and in [`3xx Redirect`](#ResponseCode3xxRedirection) responses The `Retry-After` header specifies the duration of time, in seconds, that the client is asked to wait before retrying the request or issuing -a request to the resource returned as the value of the [`Location` -header](#HeaderLocation). +a request to the resource returned as the value of the +[`Location`](#HeaderLocation) header. ### ##subsubsec Header `Vary` @@ -926,8 +926,8 @@ Requests](#AsynchronousBatchRequests). ### ##subsubsec Response Code `204 No Content` A request returns `204 No Content` if the requested resource has the -`null` value, or if the service applies a [`return=minimal` -preference](#Preferencereturnrepresentationandreturnminimal). +`null` value, or if the service applies a +[`return=minimal`](#Preferencereturnrepresentationandreturnminimal) preference. In this case, the response body MUST be empty. As defined in [RFC7231](#rfc7231), a [Data Modification @@ -950,10 +950,10 @@ server-side values corresponding to the `ETag` value sent in the As per [RFC7231](#rfc7231), a `3xx Redirection` indicates that further action needs to be taken by the client in order to fulfill the -request. In this case, the response SHOULD include a [`Location` -header](#HeaderLocation), as appropriate, with the URL from which the -result can be obtained; it MAY include a [`Retry-After` -header](#HeaderRetryAfter). +request. In this case, the response SHOULD include a +[`Location`](#HeaderLocation) header, as appropriate, with the URL from which the +result can be obtained; it MAY include a +[`Retry-After`](#HeaderRetryAfter) header. ### ##subsubsec Response Code `304 Not Modified` @@ -1067,7 +1067,7 @@ concerns around information disclosure. In the case that the service encounters an error after sending a success status to the client, the service MUST leave the response malformed -according to its [content-type](#HeaderContentType). Clients MUST treat +according to its [`Content-Type`](#HeaderContentType). Clients MUST treat the entire response as being in error. Services MAY include the header [`OData-Error`](#HeaderODataError) as a diff --git a/odata-url-conventions/4 Resource Path.md b/odata-url-conventions/4 Resource Path.md index 5138d0866..977ff2f3f 100644 --- a/odata-url-conventions/4 Resource Path.md +++ b/odata-url-conventions/4 Resource Path.md @@ -946,7 +946,7 @@ Requests to paths ending in `/$query` MUST use the `POST` verb. Query options specified in the request body and query options specified in the request URL are processed together. -The request body MUST use the content-type `text/plain`. It contains the +The request body MUST use `Content-Type: text/plain`. It contains the query portion of the URL and MUST use the same percent-encoding as in URLs (especially: no spaces, tabs, or line breaks allowed) and MUST follow the syntax rules described in chapter Query Options. diff --git a/odata-url-conventions/5 Query Options.md b/odata-url-conventions/5 Query Options.md index a71a06031..4420143ae 100644 --- a/odata-url-conventions/5 Query Options.md +++ b/odata-url-conventions/5 Query Options.md @@ -162,7 +162,7 @@ greater than `-INF`. The Boolean value `true` is greater than `false`. Services SHOULD order language-dependent strings according to the -content-language of the response, and SHOULD annotate string properties +`Content-Language` of the response, and SHOULD annotate string properties with language-dependent order with the term [`Core.IsLanguageDependent`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#IsLanguageDependent), see [OData-VocCore](#ODataVocCore). @@ -187,7 +187,7 @@ than `INF`. The Boolean value `false` is less than `true`. Services SHOULD order language-dependent strings according to the -content-language of the response, and SHOULD annotate string properties +`Content-Language` of the response, and SHOULD annotate string properties with language-dependent order with the term [`Core.IsLanguageDependent`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#IsLanguageDependent), see [OData-VocCore](#ODataVocCore). From 447e6899a04bb54b9728cc0314943451fad915cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Heiko=20Thei=C3=9Fen?= Date: Fri, 10 Nov 2023 16:07:23 +0100 Subject: [PATCH 73/74] More backtick errors (#214) --- docs/odata-csdl-json/odata-csdl-json.html | 10 +++--- docs/odata-csdl-json/odata-csdl-json.md | 10 +++--- docs/odata-csdl-xml/odata-csdl-xml.html | 12 +++---- docs/odata-csdl-xml/odata-csdl-xml.md | 12 +++---- docs/odata-json-format/odata-json-format.html | 6 ++-- docs/odata-json-format/odata-json-format.md | 8 ++--- docs/odata-protocol/odata-protocol.html | 30 ++++++++--------- docs/odata-protocol/odata-protocol.md | 32 +++++++++---------- .../odata-temporal-ext.html | 2 +- docs/odata-temporal-ext/odata-temporal-ext.md | 4 +-- .../odata-url-conventions.html | 10 +++--- .../odata-url-conventions.md | 12 +++---- odata-csdl/13 Entity Container.md | 2 +- odata-csdl/14 Vocabulary and Annotation.md | 8 ++--- odata-csdl/4 CSDL Document.md | 2 +- odata-csdl/5 Schema.md | 2 +- odata-json-format/4 Common Characteristics.md | 8 ++--- odata-protocol/10 Context URL.md | 8 ++--- odata-protocol/11 Data Service Requests.md | 8 ++--- odata-protocol/12 Conformance.md | 2 +- odata-protocol/8 Header Fields.md | 14 ++++---- odata-temporal-ext/3 Vocabulary.md | 4 +-- odata-url-conventions/4 Resource Path.md | 6 ++-- odata-url-conventions/5 Query Options.md | 6 ++-- 24 files changed, 109 insertions(+), 109 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index a7b177eda..f14e05fab 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -1078,7 +1078,7 @@

            Media entity types MAY specify a list of acceptable media types using an annotation with term Core.AcceptableMediaTypes, see OData-VocCore.

            $HasStream

            -

            The value of $HasStream is one of the Boolean literals true or false. Absence of the member means false.

            +

            The value of $HasStream is one of the Boolean literals true or false. Absence of the member means false.

            6.5 Key

            An entity is uniquely identified within an entity set by its key. A key MAY be specified if the entity type does not specify a base type that already has a key declared.

            @@ -2666,7 +2666,7 @@

            1 ]

            14.4.1.4 Model Element Path

            -

            The model element path expression provides a value for terms or term properties that specify the built-in type Edm.ModelElementPath. Its argument is a model path.

            +

            The model element path expression provides a value for terms or term properties that specify the built-in type Edm.ModelElementPath. Its argument is a model path.

            The value of the model element path expression is the path itself, not the instance(s) identified by the path.

            Model element path expressions are represented as a string containing a path.

            @@ -2676,7 +2676,7 @@

            "@org.example.MyFavoriteModelElement": "/self.someAction"

            14.4.1.5 Navigation Property Path

            -

            The navigation property path expression provides a value for terms or term properties that specify the built-in types Edm.NavigationPropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

            +

            The navigation property path expression provides a value for terms or term properties that specify the built-in types Edm.NavigationPropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

            • A non-null path MUST resolve to a model element whose type is an entity type, or a collection of entity types, e.g. a navigation property.
            @@ -2696,7 +2696,7 @@

            }

            14.4.1.6 Property Path

            -

            The property path expression provides a value for terms or term properties that specify one of the built-in types Edm.PropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

            +

            The property path expression provides a value for terms or term properties that specify one of the built-in types Edm.PropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

            • A non-null path MUST resolve to a model element whose type is a primitive or complex type, an enumeration type, a type definition, or a collection of one of these types.
            @@ -3047,7 +3047,7 @@

            }

            14.4.4.4 Function odata.uriEncode

            -

            The odata.uriEncode client-side function takes one argument of primitive type and returns the URL-encoded OData literal that can be used as a key value in OData URLs or in the query part of OData URLs.

            +

            The odata.uriEncode client-side function takes one argument of primitive type and returns the URL-encoded OData literal that can be used as a key value in OData URLs or in the query part of OData URLs.

            Note: string literals are surrounded by single quotes as required by the paren-style key syntax.

            Example 78:

            diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index 6d83f0998..c86850343 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -1497,7 +1497,7 @@ see [OData-VocCore](#ODataVocCore). ::: {.varjson .rep} ### `$HasStream` -The value of `$HasStream `is one of the Boolean literals `true` or +The value of `$HasStream` is one of the Boolean literals `true` or `false`. Absence of the member means `false`. ::: @@ -4502,7 +4502,7 @@ Example 68: The model element path expression provides a value for terms or term properties that specify the [built-in -type](#BuiltInTypesfordefiningVocabularyTerms)` Edm.ModelElementPath`. Its +type](#BuiltInTypesfordefiningVocabularyTerms) `Edm.ModelElementPath`. Its argument is a [model path](#PathExpressions). The value of the model element path expression is the path itself, not @@ -4527,7 +4527,7 @@ Example 69: The navigation property path expression provides a value for terms or term properties that specify the [built-in types](#BuiltInTypesfordefiningVocabularyTerms) -`Edm.NavigationPropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath`. +`Edm.NavigationPropertyPath`, `Edm.AnyPropertyPath`, or `Edm.ModelElementPath`. Its argument is a [model path](#PathExpressions) with the following restriction: - A non-null path MUST resolve to a model @@ -4563,7 +4563,7 @@ Example 70: The property path expression provides a value for terms or term properties that specify one of the [built-in types](#BuiltInTypesfordefiningVocabularyTerms) -`Edm.PropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath`. Its +`Edm.PropertyPath`, `Edm.AnyPropertyPath`, or `Edm.ModelElementPath`. Its argument is a [model path](#PathExpressions) with the following restriction: - A non-null path MUST resolve to a model @@ -5047,7 +5047,7 @@ Example 77: all non-empty `FirstName` values not containing the letters #### 14.4.4.4 Function `odata.uriEncode` -The `odata.uriEncode `client-side function takes one argument of +The `odata.uriEncode` client-side function takes one argument of primitive type and returns the URL-encoded OData literal that can be used as a key value in OData URLs or in the query part of OData URLs. diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html index 497847b76..c359dead1 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.html +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -773,7 +773,7 @@

            The edmx:Edmx element is the root element of a CSDL XML document. It MUST contain the Version attribute and it MUST contain exactly one edmx:DataServices element.

            It MAY contain edmx:Reference elements to reference other CSDL documents.

            Attribute Version

            -

            The Version attribute specifies the OData protocol version of the service. For OData 4.0 responses the value of this attribute MUST be 4.0. For OData 4.01 responses the value of this attribute MUST be 4.01. Services MUST return an OData 4.0 response if the request was made with an OData-MaxVersion header with a value of 4.0.

            +

            The Version attribute specifies the OData protocol version of the service. For OData 4.0 responses the value of this attribute MUST be 4.0. For OData 4.01 responses the value of this attribute MUST be 4.01. Services MUST return an OData 4.0 response if the request was made with an OData-MaxVersion header with a value of 4.0.

            Element edmx:DataServices

            The edmx:DataServices element MUST contain one or more edm:Schema elements which define the schemas exposed by the OData service.

            @@ -1743,7 +1743,7 @@

            </EntitySet>
            -

            Example 37: binding Supplier on Products contained within Categories – binding applies to all suppliers of all products of all categories

            +

            Example 37: binding Supplier on Products contained within Categories – binding applies to all suppliers of all products of all categories

            <EntitySet Name="Categories" EntityType="self.Category">
               <NavigationPropertyBinding Path="Products/Supplier"
                                          Target="Suppliers" />
            @@ -2532,7 +2532,7 @@ 

            </Annotation>

            14.4.1.4 Model Element Path

            -

            The model element path expression provides a value for terms or term properties that specify the built-in type Edm.ModelElementPath. Its argument is a model path.

            +

            The model element path expression provides a value for terms or term properties that specify the built-in type Edm.ModelElementPath. Its argument is a model path.

            The value of the model element path expression is the path itself, not the instance(s) identified by the path.

            Expression edm:ModelElementPath

            @@ -2548,7 +2548,7 @@

            </Annotation>

            14.4.1.5 Navigation Property Path

            -

            The navigation property path expression provides a value for terms or term properties that specify the built-in types Edm.NavigationPropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

            +

            The navigation property path expression provides a value for terms or term properties that specify the built-in types Edm.NavigationPropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

            • A non-null path MUST resolve to a model element whose type is an entity type, or a collection of entity types, e.g. a navigation property.
            @@ -2573,7 +2573,7 @@

            </Annotation>

            14.4.1.6 Property Path

            -

            The property path expression provides a value for terms or term properties that specify one of the built-in types Edm.PropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

            +

            The property path expression provides a value for terms or term properties that specify one of the built-in types Edm.PropertyPath, Edm.AnyPropertyPath, or Edm.ModelElementPath. Its argument is a model path with the following restriction:

            • A non-null path MUST resolve to a model element whose type is a primitive or complex type, an enumeration type, a type definition, or a collection of one of these types.
            @@ -2825,7 +2825,7 @@

            </Apply>

            14.4.4.4 Function odata.uriEncode

            -

            The odata.uriEncode client-side function takes one argument of primitive type and returns the URL-encoded OData literal that can be used as a key value in OData URLs or in the query part of OData URLs.

            +

            The odata.uriEncode client-side function takes one argument of primitive type and returns the URL-encoded OData literal that can be used as a key value in OData URLs or in the query part of OData URLs.

            Note: string literals are surrounded by single quotes as required by the paren-style key syntax.

            Example 78:

            diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md index be85d2dfc..fa239840d 100644 --- a/docs/odata-csdl-xml/odata-csdl-xml.md +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -852,7 +852,7 @@ The `Version` attribute specifies the OData protocol version of the service. For OData 4.0 responses the value of this attribute MUST be `4.0`. For OData 4.01 responses the value of this attribute MUST be `4.01`. Services MUST return an OData 4.0 response if the request was -made with an `OData-MaxVersion `header with a value of `4.0`. +made with an `OData-MaxVersion` header with a value of `4.0`. ### Element `edmx:DataServices` @@ -3150,7 +3150,7 @@ Example 36: for an entity set in any container in scope ::: {.varxml .example} Example 37: binding `Supplier` on `Products` contained within -`Categories – binding applies to all suppliers of all products of all categories` +`Categories` – binding applies to all suppliers of all products of all categories ```xml 14.4.4.4 Function `odata.uriEncode` -The `odata.uriEncode `client-side function takes one argument of +The `odata.uriEncode` client-side function takes one argument of primitive type and returns the URL-encoded OData literal that can be used as a key value in OData URLs or in the query part of OData URLs. diff --git a/docs/odata-json-format/odata-json-format.html b/docs/odata-json-format/odata-json-format.html index bc33d3f42..a65181d62 100644 --- a/docs/odata-json-format/odata-json-format.html +++ b/docs/odata-json-format/odata-json-format.html @@ -514,7 +514,7 @@

            type control information unless their type is Double. -
          • The special floating-point values -INF, INF, and NaN are serialized as strings and MUST have a type control information to specify the numeric type of the property.
          • +
          • The special floating-point values -INF, INF, and NaN are serialized as strings and MUST have a type control information to specify the numeric type of the property.
          • String values do have a first class representation in JSON, but there is an obvious collision: OData also encodes a number of other primitive types as strings, e.g. DateTimeOffset, Int64 in the presence of the IEEE754Compatible format parameter etc. If a property appears in JSON string format, it should be treated as a string value unless the property is known (from the metadata document) to have a different type.

          The type control information can be absent in properties nested in an instance of type Edm.Untyped. In particular, individual primitive values within a collection cannot have type control information.

          @@ -550,7 +550,7 @@

          4.5.8 Control Information: id (odata.id)

          The id control information contains the entity-id, see OData-Protocol. By convention the entity-id is identical to the canonical URL of the entity, as defined in OData-URL.

          -

          The id control information MUST appear in responses if metadata=full is requested, or if metadata=minimal is requested and any of a non-transient entity's key fields are omitted from the response or the entity-id is not identical to the canonical URL of the entity after

          +

          The id control information MUST appear in responses if metadata=full is requested, or if metadata=minimal is requested and any of a non-transient entity’s key fields are omitted from the response or the entity-id is not identical to the canonical URL of the entity after

        • SupportedActions is a collection of qualified names of temporal actions that may be bound to the annotated entity set. These can be the standard actions defined in this specification, or service-specific actions.
        • diff --git a/docs/odata-temporal-ext/odata-temporal-ext.md b/docs/odata-temporal-ext/odata-temporal-ext.md index 885e29c74..d95622a5b 100644 --- a/docs/odata-temporal-ext/odata-temporal-ext.md +++ b/docs/odata-temporal-ext/odata-temporal-ext.md @@ -1302,8 +1302,8 @@ structured type with the following properties: - If the period end property does not specify a default value, a default value of "ad infinitum" is assumed. - Records of type `TimelineVisible` MAY specify the property `ObjectKey`. - - `ObjectKey` is the “sub-key” or “alternate key” that identifies time slices for a single temporal object. It is only necessary if the annotated entity set can contain time slices - for more than one temporal object. `The object key is `a collection of + - `ObjectKey` is the "sub-key" or "alternate key" that identifies time slices for a single temporal object. It is only necessary if the annotated entity set can contain time slices + for more than one temporal object. The object key is a collection of property paths whose value combination uniquely identifies a temporal object. - `SupportedActions` is a collection of diff --git a/docs/odata-url-conventions/odata-url-conventions.html b/docs/odata-url-conventions/odata-url-conventions.html index 1e6b5a6fc..ef4c7a179 100644 --- a/docs/odata-url-conventions/odata-url-conventions.html +++ b/docs/odata-url-conventions/odata-url-conventions.html @@ -702,7 +702,7 @@

          Properties of type Edm.Stream already return the raw value of the media stream and do not support appending the /$value segment.

          4.8 Addressing the Count of a Collection

          To address the raw value of the number of items in a collection, clients append /$count to the resource path of the URL identifying the entity set or collection.

          -

          The /$count path suffix identifies the integer count of records in the collection and SHOULD NOT be combined with the system query options $top, $skip, $orderby, $expand, and $format. The count MUST NOT be affected by $top, $skip, $orderby, or $expand.

          +

          The /$count path suffix identifies the integer count of records in the collection and SHOULD NOT be combined with the system query options $top, $skip, $orderby, $expand, and $format. The count MUST NOT be affected by $top, $skip, $orderby, or $expand.

          The count is calculated after applying any /$filter path segments, or $filter or $search system query options to the collection.

          Example 30: the number of related entities

          @@ -726,7 +726,7 @@

          4.9 Addressing a Member within an Entity Collection

          Collections of entities are modeled as entity sets, collection-valued navigation properties, or operation results.

          -

          For entity sets, results of operations associated with an entity set through an EntitySet or EntitySetPath declaration, or collection-valued navigation properties with a NavigationPropertyBinding or ContainsTarget=true specification, members of the collection can be addressed by convention by appending the parenthesized key to the URL specifying the collection of entities, or by using the key-as-segment convention if supported by the service.

          +

          For entity sets, results of operations associated with an entity set through an EntitySet or EntitySetPath declaration, or collection-valued navigation properties with a NavigationPropertyBinding or ContainsTarget=true specification, members of the collection can be addressed by convention by appending the parenthesized key to the URL specifying the collection of entities, or by using the key-as-segment convention if supported by the service.

          For collection-valued navigation properties with navigation property bindings that end in a type-cast segment, a type-cast segment MUST be appended to the collection URL before appending the key segment.

          Note: entity sets or collection-valued navigation properties annotated with term Capabilities.IndexableByKey defined in OData-VocCap and a value of false do not support addressing their members by key.

          4.10 Addressing a Member of an Ordered Collection

          @@ -852,7 +852,7 @@

          5 Query Options

          The query options part of an OData URL specifies three types of information: system query options, custom query options, and parameter aliases. All OData services MUST follow the query string parsing and construction rules defined in this section and its subsections.

          5.1 System Query Options

          -

          System query options are query string parameters that control the amount and order of the data returned for the resource identified by the URL. The names of all system query options are optionally prefixed with a dollar ($) character. 4.01 Services MUST support case-insensitive system query option names specified with or without the $ prefix. Clients that want to work with 4.0 services MUST use lower case names and specify the $ prefix.

          +

          System query options are query string parameters that control the amount and order of the data returned for the resource identified by the URL. The names of all system query options are optionally prefixed with a dollar ($) character. 4.01 Services MUST support case-insensitive system query option names specified with or without the $ prefix. Clients that want to work with 4.0 services MUST use lower case names and specify the $ prefix.

          For GET, PATCH, and PUT requests the following rules apply:

          • Resource paths identifying a single entity, a complex type instance, a collection of entities, or a collection of complex type instances allow $compute, $expand and $select.
          • @@ -1864,14 +1864,14 @@

            5.1.5 System Query Option $orderby

            The $orderby system query option allows clients to request resources in a particular order.

            The semantics of $orderby are covered in the OData-Protocol document.

            The OData-ABNF orderby syntax rule defines the formal grammar of the $orderby query option.

            5.1.6 System Query Options $top and $skip

            The $top system query option requests the number of items in the queried collection to be included in the result. The $skip query option requests the number of items in the queried collection that are to be skipped and not included in the result. A client can request a particular page of items by combining $top and $skip.

            -

            The semantics of $top and $skip are covered in the OData-Protocol document. The OData-ABNF top and skip syntax rules define the formal grammar of the $top and $skip query options respectively.

            +

            The semantics of $top and $skip are covered in the OData-Protocol document. The OData-ABNF top and skip syntax rules define the formal grammar of the $top and $skip query options respectively.

            5.1.7 System Query Option $count

            The $count system query option allows clients to request a count of the matching resources included with the resources in the response. The $count query option has a Boolean value of true or false.

            The semantics of $count is covered in the OData-Protocol document.

            diff --git a/docs/odata-url-conventions/odata-url-conventions.md b/docs/odata-url-conventions/odata-url-conventions.md index ff5a8cb5f..f8e8d399e 100644 --- a/docs/odata-url-conventions/odata-url-conventions.md +++ b/docs/odata-url-conventions/odata-url-conventions.md @@ -997,7 +997,7 @@ To address the raw value of the number of items in a collection, clients append `/$count` to the resource path of the URL identifying the entity set or collection. -The `/$count `path suffix identifies the integer count of records in the +The `/$count` path suffix identifies the integer count of records in the collection and SHOULD NOT be combined with the system query options [`$top`](#SystemQueryOptionstopandskip), [`$skip`](#SystemQueryOptionstopandskip), @@ -1055,9 +1055,9 @@ Collections of entities are modeled as entity sets, collection-valued navigation properties, or operation results. For entity sets, results of operations associated with an entity set -through an `EntitySet `or `EntitySetPath` declaration, or +through an `EntitySet` or `EntitySetPath` declaration, or collection-valued navigation properties with a -`NavigationPropertyBinding `or `ContainsTarget=true `specification, +`NavigationPropertyBinding` or `ContainsTarget=true` specification, members of the collection can be addressed by convention by appending the parenthesized key to the URL specifying the collection of entities, or by using the [key-as-segment convention](#KeyasSegmentConvention) if @@ -1413,7 +1413,7 @@ System query options are query string parameters that control the amount and order of the data returned for the resource identified by the URL. The names of all system query options are optionally prefixed with a dollar (`$`) character. 4.01 Services MUST support case-insensitive -system query option names specified with or without the `$ `prefix. +system query option names specified with or without the `$` prefix. Clients that want to work with 4.0 services MUST use lower case names and specify the `$` prefix. @@ -3634,7 +3634,7 @@ http://host/service/Products?$select=ID,Model.ActionName,Model2.* ``` ::: -When multiple select item exist in a `select clause`, then the total set +When multiple select item exist in a `$select` clause, then the total set of properties, open properties, navigation properties, actions and functions to be returned is equal to the union of the set of those identified by each select item. @@ -3661,7 +3661,7 @@ particular page of items by combining `$top` and `$skip`. The semantics of `$top` and `$skip` are covered in the [OData-Protocol](#ODataProtocol) document. The [OData-ABNF](#ODataABNF) `top` and `skip` syntax rules define the formal grammar of the `$top` and -`$skip `query options respectively. +`$skip` query options respectively. ### 5.1.7 System Query Option `$count` diff --git a/odata-csdl/13 Entity Container.md b/odata-csdl/13 Entity Container.md index 956f807e1..7a826a547 100644 --- a/odata-csdl/13 Entity Container.md +++ b/odata-csdl/13 Entity Container.md @@ -553,7 +553,7 @@ Example ##ex: for an entity set in any container in scope ::: {.varxml .example} Example ##ex: binding `Supplier` on `Products` contained within -`Categories – binding applies to all suppliers of all products of all categories` +`Categories` – binding applies to all suppliers of all products of all categories ```xml Date: Sat, 11 Nov 2023 12:14:43 +0100 Subject: [PATCH 74/74] Yet more backtick errors (#215) --- docs/odata-csdl-json/odata-csdl-json.html | 4 ++-- docs/odata-csdl-json/odata-csdl-json.md | 6 ++++-- docs/odata-protocol/odata-protocol.html | 18 +++++++++--------- docs/odata-protocol/odata-protocol.md | 19 ++++++++++--------- .../odata-temporal-ext.html | 2 +- docs/odata-temporal-ext/odata-temporal-ext.md | 2 +- .../odata-url-conventions.html | 8 ++++---- .../odata-url-conventions.md | 8 ++++---- odata-csdl/14 Vocabulary and Annotation.md | 2 +- odata-csdl/15 Identifier and Path Values.md | 2 +- odata-protocol/10 Context URL.md | 12 ++++++------ odata-protocol/11.5 Operations.md | 2 +- odata-protocol/11.7 Batch Requests.md | 4 ++-- odata-temporal-ext/4 Temporal Requests.md | 2 +- odata-url-conventions/4 Resource Path.md | 6 +++--- odata-url-conventions/5 Query Options.md | 2 +- 16 files changed, 51 insertions(+), 48 deletions(-) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html index f14e05fab..4eb79932b 100644 --- a/docs/odata-csdl-json/odata-csdl-json.html +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -2857,7 +2857,7 @@

            < "S" ] ] -} ```

          +}

          14.4.3 Arithmetic Operators

          Annotations MAY use the following arithmetic expressions which evaluate to a numeric value. These expressions MAY be combined, and they MAY be used anywhere instead of a numeric expression of the appropriate type. The semantics and evaluation rules for each arithmetic expression is identical to the corresponding arithmetic operator defined in OData-URL.

          @@ -3563,7 +3563,7 @@

          } } } -} ``` +}

          17 Conformance

          diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md index c86850343..40502e256 100644 --- a/docs/odata-csdl-json/odata-csdl-json.md +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -4778,7 +4778,8 @@ Example 73: "S" ] ] -} ``` +} +``` ::: @@ -5814,7 +5815,8 @@ Example 91: } } } -} ``` +} +``` ::: diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html index b9442c6c4..d560641ad 100644 --- a/docs/odata-protocol/odata-protocol.html +++ b/docs/odata-protocol/odata-protocol.html @@ -991,8 +991,8 @@

          10.4 Singleton<

          If a response or response part is a singleton, its name is the context URL fragment.

          Example 15: resource URL and corresponding context URL

          -
          http://host/service/MainSupplier`
          -http://host/service/$metadata#`MainSupplier
          +
          http://host/service/MainSupplier
          +http://host/service/$metadata#MainSupplier

          10.5 Collection of Derived Entities

          Context URL template:

          @@ -1009,7 +1009,7 @@

          10.6 D

          If a response or response part is a single entity of a type derived from the declared type of an entity set, a type-cast segment is appended to the entity set name.

          Example 17: resource URL and corresponding context URL

          -
          http://host/service/Customers(2)/Model.VipCustomer`
          +
          http://host/service/Customers(2)/Model.VipCustomer
           http://host/service/$metadata#Customers/Model.VipCustomer/$entity

          10.7 Collection of Projected Entities

          @@ -1024,7 +1024,7 @@

          $select.

          Example 18: resource URL and corresponding context URL

          -
          http://host/service/Customers?$`select`=Address,Orders
          +
          http://host/service/Customers?$select=Address,Orders
           http://host/service/$metadata#Customers(Address,Orders)

          10.8 Projected Entity

          @@ -1135,7 +1135,7 @@

          Context URL templates:

          {context-url}#{entity-set}{/type-name}{select-list}
           {context-url}#{entity-set}{/type-name}{select-list}/$entity
          -{context-url}#{entity}/{property-path}`{select-list}
          +{context-url}#{entity}/{property-path}{select-list}
           {context-url}#Collection({type-name}){select-list}
           {context-url}#{type-name}{select-list}

          If the response from an action or function is a collection of entities or a single entity that is a member of an entity set, the context URL identifies the entity set. If the response from an action or function is a property of a single entity, the context URL identifies the entity and property. Otherwise, the context URL identifies the type returned by the operation. The context URL will correspond to one of the former examples.

          @@ -1154,7 +1154,7 @@

          Example 30: resource URL and corresponding context URL

          -
          http://host/service/Customers`?$deltatoken=1234
          +
          http://host/service/Customers?$deltatoken=1234
           http://host/service/$metadata#Customers/$delta

          The context URL of an update request body for a collection of entities is simply the fragment #$delta.

          @@ -2187,7 +2187,7 @@

          Example 98: invoke the SampleEntities.CreateOrder action using Customers('ALFKI') as the customer (or binding parameter). The values 2 for the quantity parameter and BLACKFRIDAY for the discountCode parameter are passed in the body of the request. Invoke the action only if the customer’s ETag still matches.

          POST http://host/service/Customers('ALFKI')/SampleEntities.CreateOrder
          -If-Match: W/"MjAxOS0wMy0yMVQxMzowNVo="`
          +If-Match: W/"MjAxOS0wMy0yMVQxMzowNVo="
           Content-Type: application/json
           
           {
          @@ -2222,7 +2222,7 @@ 

          multipart batch format MUST contain a Content-Type header specifying a content type of multipart/mixed and a boundary parameter as defined in RFC2046.

          Example 99: multipart batch request

          -
          POST /service/$batch HTTP/1.1`
          +
          POST /service/$batch HTTP/1.1
           Host: odata.org
           OData-Version: 4.0
           Content-Type: multipart/mixed; boundary=batch_36522ad7-fc75-4b56-8c71-56071383e77b
          @@ -2274,7 +2274,7 @@ 

          Example 101:

          -
          GET https://host:1234/path/service/People(1) HTTP/1.1 ```
          +
          GET https://host:1234/path/service/People(1) HTTP/1.1

        Added section about fundamentals of input and output sets
        Algorithmic descriptions of transformations
        Added join and outerjoin transformations, replaced expand by addnested
        Added transformations orderby, skip, top, nest
        Added transformations for recursive hierarchies, updated related filter functions
        Added functions evaluable on a collection, introduced keyword $these
        Merged section 4 “Representation of Aggregated Instances” into section 3
        Remove actions and functions (except set transformations) on aggregated entities, adapted section “Actions and Functions on Aggregated Entities”
        Committee Specification 03
        matchesPattern
        matchesPattern(CompanyName,'%5EA.*e$')
        matchespattern
        matchespattern(CompanyName,'%5EA.*e$')
        tolower
        tolower(CompanyName) eq 'alfreds futterkiste'
        toupper
        toupper(CompanyName) eq 'ALFREDS FUTTERKISTE'
        trim
        trim(CompanyName) eq 'Alfreds Futterkiste'
        hassubset
        hassubset([4,1,3],[3,1])
        hassubsequence
        hassubsequence([4,1,3,1],[1,1])
        String Functions
        matchesPattern
        matchesPattern(CompanyName,'%5EA.*e$')
        matchespattern
        matchespattern(CompanyName,'%5EA.*e$')
        tolower
        tolower(CompanyName) eq 'alfreds futterkiste'
        toupper
        toupper(CompanyName) eq 'ALFREDS FUTTERKISTE'
        trim
        trim(CompanyName) eq 'Alfreds Futterkiste'
        hassubset
        hassubset([4,1,3],[3,1])
        hassubsequence
        hassubsequence([4,1,3,1],[1,1])
        String Functions
        matchesPattern
        matchesPattern(CompanyName,'%5EA.*e$')
        matchespattern
        matchespattern(CompanyName,'%5EA.*e$')
        tolower
        tolower(CompanyName) eq 'alfreds futterkiste'
        toupper
        toupper(CompanyName) eq 'ALFREDS FUTTERKISTE'
        trim
        trim(CompanyName) eq 'Alfreds Futterkiste'