diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..df08e8581 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,9 @@ +{ + "cSpell.words": [ + "ETag", + "odata", + "pandoc", + "subsec", + "subsubsec" + ] +} diff --git a/docs/index.md b/docs/index.md index 1bf2ffd61..9b169d959 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,4 +2,9 @@ This repository contains working drafts for OData specifications: -* [OData Extension for Data Aggregation Working Draft for CS03](odata-data-aggregation-ext/odata-data-aggregation-ext.html) +* [OData Version 4.02 Part 1: Protocol - Working Draft for CS01](odata-protocol/odata-protocol.html) +* [OData Version 4.02 Part 2: URL Conventions - Working Draft for CS01](odata-url-conventions/odata-url-conventions.html) +* [OData CSDL JSON Version 4.02 - Working Draft for CS01](odata-csdl-json/odata-csdl-json.html) +* [OData CSDL JSON Version 4.02 - Working Draft for CS01](odata-csdl-xml/odata-csdl-xml.html) +* [OData JSON Format Version 4.02 - Working Draft for CS01](odata-json-format/odata-json-format.html) +* [OData Extension for Data Aggregation Version 4.0 - Working Draft for CS03](odata-data-aggregation-ext/odata-data-aggregation-ext.html) diff --git a/docs/odata-csdl-json/odata-csdl-json.html b/docs/odata-csdl-json/odata-csdl-json.html new file mode 100644 index 000000000..ffc701f79 --- /dev/null +++ b/docs/odata-csdl-json/odata-csdl-json.html @@ -0,0 +1,290 @@ + + + + + + + OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02 + + + + + + + + +

OASIS Logo

+
+

OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02

+

Committee Specification Draft 01

+

14 July 2023

+

 

+

This stage:

+

https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/csd01/odata-csdl-json-v4.02-csd01.md (Authoritative)
+https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/csd01/odata-csdl-json-v4.02-csd01.html
+https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/csd01/odata-csdl-json-v4.02-csd01.pdf

+

Previous stage:

+

N/A

+

Latest stage:

+

https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.md (Authoritative)
+https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.html
+https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.pdf

+

Technical Committee:

+

OASIS Open Data Protocol (OData) TC

+

Chairs:

+

Ralf Handl (ralf.handl@sap.com), SAP SE
+Michael Pizzo (mikep@microsoft.com), Microsoft

+

Editors:

+

Ralf Handl (ralf.handl@sap.com), SAP SE
+Michael Pizzo (mikep@microsoft.com), Microsoft
+Heiko Theißen (heiko.theissen@sap.com), SAP SE

+

Additional artifacts:

+

This prose specification is one component of a Work Product that also includes:

+ + +

This specification replaces or supersedes:

+ +

This specification is related to:

+ +

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 JSON Representation) specifically defines the JSON 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.

+

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.

+

Citation format:

+

When referencing this specification the following citation format should be used:

+

[OData-CSDL-JSON-v4.02]

+

OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02. Edited by Ralf Handl, Michael Pizzo, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/csd01/odata-csdl-json-v4.02-csd01.html. Latest stage: https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.html.

+

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.

+

For complete copyright information please see the full Notices section in an Appendix below.

+
+

Table of Contents

+
+ +
+
+

1 Introduction

+ + +

1.1 Changes from earlier Versions

+ + + + +

1.2 Glossary

+

1.2.1 Definitions of terms

+ + +

TODO: find out why we need a \(dummy\) formula to get monospace look as we want it.

+

1.2.2 Acronyms and abbreviations

+ + +

1.2.3 Document conventions

+

Keywords defined by this specification use this monospaced font.

+

Some sections of this specification are illustrated with non-normative examples.

+
+

Example 1: text describing an example uses this paragraph style

+
Non-normative examples use this paragraph style.
+
+

All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading.

+

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
+       -t html
+       -o odata-csdl-json-v4.02-csd01.html
+       -c styles/markdown-styles-v1.7.3b.css
+       -c styles/odata.css
+       -s
+       --mathjax
+       --eol=lf
+       --wrap=none
+       --metadata pagetitle="OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02"
+       odata-csdl-json-v4.02-csd01.md
+

This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2.

+
+
+

2 Section Heading

+

text.

+

2.1 Level 2 Heading

+

text.

+

2.1.1 Level 3 Heading

+

text.

+

2.1.1.1 Level 4 Heading

+

text.

+
2.1.1.1.1 Level 5 Heading
+

This is the deepest level, because six # gets transformed into a Reference tag.

+

2.2 Next Heading

+

text.

+
+

3 Conformance

+ + +

(Note: The [OASIS TC Process](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsConfClause) requires that a specification approved by the TC at the Committee Specification Public Review Draft, Committee Specification or OASIS Standard level must include a separate section, listing a set of numbered conformance clauses, to which any implementation of the specification must adhere in order to claim conformance to the specification (or any optional portion thereof). This is done by listing the conformance clauses here. For the definition of "conformance clause," see [OASIS Defined Terms](https://www.oasis-open.org/policies-guidelines/oasis-defined-terms-2018-05-22/#dConformanceClause).

+

See "Guidelines to Writing Conformance Clauses": https://docs.oasis-open.org/templates/TCHandbook/ConformanceGuidelines.html.

+

Remove this note before submitting for publication.)

+
+

Appendix A. References

+ + +

This appendix contains the normative and informative references that are used in this document.

+

While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity.

+

A.1 Normative References

+

The following documents are referenced in such a way that some or all of their content constitutes requirements of this document.

+

(Reference sources: For references to IETF RFCs, use the approved citation formats at: https://docs.oasis-open.org/templates/ietf-rfc-list/ietf-rfc-list.html. For references to W3C Recommendations, use the approved citation formats at: https://docs.oasis-open.org/templates/w3c-recommendations-list/w3c-recommendations-list.html. Remove this note before submitting for publication.)

+
[OData-v4.02]
+ +
[RFC2119]
+

Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997 http://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 http://www.rfc-editor.org/info/rfc8174.

+

A.2 Informative References

+
[RFC3552]
+

Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003 https://www.rfc-editor.org/info/rfc3552.

+
+

Appendix B. Safety, Security and Privacy Considerations

+ + +

(Note: OASIS strongly recommends that Technical Committees consider issues that might affect safety, security, privacy, and/or data protection in implementations of their specification and document them for implementers and adopters. For some purposes, you may find it required, e.g. if you apply for IANA registration.

+

While it may not be immediately obvious how your specification might make systems vulnerable to attack, most specifications, because they involve communications between systems, message formats, or system settings, open potential channels for exploit. For example, IETF [[RFC3552](#rfc3552)] lists “eavesdropping, replay, message insertion, deletion, modification, and man-in-the-middle” as well as potential denial of service attacks as threats that must be considered and, if appropriate, addressed in IETF RFCs.

+

In addition to considering and describing foreseeable risks, this section should include guidance on how implementers and adopters can protect against these risks.

+

We encourage editors and TC members concerned with this subject to read _Guidelines for Writing RFC Text on Security Considerations_, IETF [[RFC3552](#rfc3552)], for more information.

+

Remove this note before submitting for publication.)

+
+

Appendix C. Acknowledgments

+ + +

Note: A Work Product approved by the TC must include a list of people who participated in the development of the Work Product. This is generally done by collecting the list of names in this appendix. This list shall be initially compiled by the Chair, and any Member of the TC may add or remove their names from the list by request. Remove this note before submitting for publication.

+

C.1 Special Thanks

+ + +

Substantial contributions to this document from the following individuals are gratefully acknowledged:

+

Participant Name, Affiliation or "Individual Member"

+

C.2 Participants

+ + +

The following individuals have participated in the creation of this specification and are gratefully acknowledged:

+

OpenC2 TC Members:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
First NameLast NameCompany
PhilippeAlmanSomething Networks
AlexAmirnovmanCompany B
KrisAndermanMini Micro
DarrenAnstmanBig Networks
+
+

Appendix D. Revision History

+ + + + + + + + + + + + + + + + + + + +
RevisionDateEditorChanges Made
specname-v1.0-wd01yyyy-mm-ddEditor NameInitial working draft
+
+

Appendix E. Example Appendix with subsections

+

E.1 Subsection title

+

E.1.1 Sub-subsection

+
+

Appendix F. 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.

+

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.

+

As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, 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.

+ + diff --git a/docs/odata-csdl-json/odata-csdl-json.md b/docs/odata-csdl-json/odata-csdl-json.md new file mode 100644 index 000000000..fd96cb301 --- /dev/null +++ b/docs/odata-csdl-json/odata-csdl-json.md @@ -0,0 +1,327 @@ + +![OASIS Logo](https://docs.oasis-open.org/templates/OASISLogo-v3.0.png) + +------- + +# OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02 + +## Committee Specification Draft 01 + +## 14 July 2023 + +  + +#### This stage: +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/csd01/odata-csdl-json-v4.02-csd01.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/csd01/odata-csdl-json-v4.02-csd01.html \ +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/csd01/odata-csdl-json-v4.02-csd01.pdf + +#### Previous stage: +N/A + +#### Latest stage: +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.html \ +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.pdf + +#### Technical Committee: +[OASIS Open Data Protocol (OData) TC](https://www.oasis-open.org/committees/odata/) + +#### Chairs: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) + +#### Editors: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) \ +Heiko Theißen (heiko.theissen@sap.com), [SAP SE](http://www.sap.com/) + +#### Additional artifacts: +This prose specification is one component of a Work Product that also includes: +* XML schemas: (list file names or directory name) +* Other parts (list titles and/or file names) +* `(Note: Any normative computer language definitions that are part of the Work Product, such as XML instances, schemas and Java(TM) code, including fragments of such, must be (a) well formed and valid, (b) provided in separate plain text files, (c) referenced from the Work Product; and (d) where any definition in these separate files disagrees with the definition found in the specification, the definition in the separate file prevails. Remove this note before submitting for publication.)` + +#### Related work: +This specification replaces or supersedes: +* _OData Common Schema Definition Language (CSDL) JSON Representation Version 4.01_. Edited by Michael Pizzo, Ralf Handl, and Martin Zurmuehl. OASIS Standard. Latest stage: https://docs.oasis-open.org/odata/odata-csdl-json/v4.01/odata-csdl-json-v4.01.html. + +This specification is related to: +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + +#### 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 JSON Representation) specifically defines the JSON 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](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/. + +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). + +Note that any machine-readable content ([Computer Language Definitions](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsCompLang)) 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](#rfc2119)] and [[RFC8174](#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]** + +_OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02_. +Edited by Ralf Handl, Michael Pizzo, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/csd01/odata-csdl-json-v4.02-csd01.html. +Latest stage: https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.html. + +#### Notices +Copyright © OASIS Open 2023. All Rights Reserved. + +Distributed under the terms of the OASIS [IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/). + +The name "OASIS" is a trademark of [OASIS](https://www.oasis-open.org/), 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 + +::: toc +- [1 Introduction](#Introduction) + - [1.1 Changes from earlier Versions](#ChangesfromearlierVersions) + - [1.2 Glossary](#Glossary) + - [1.2.1 Definitions of terms](#Definitionsofterms) + - [1.2.2 Acronyms and abbreviations](#Acronymsandabbreviations) + - [1.2.3 Document conventions](#Documentconventions) +::: + +------- + +# 1 Introduction + + + +## 1.1 Changes from earlier Versions + + + + +## 1.2 Glossary + +### 1.2.1 Definitions of terms + + +TODO: find out why we need a $dummy$ formula to get `monospace` look as we want it. + +### 1.2.2 Acronyms and abbreviations + + + +### 1.2.3 Document conventions + +Keywords defined by this specification use `this monospaced font`. + +Some sections of this specification are illustrated with non-normative examples. + +::: example +Example 1: text describing an example uses this paragraph style +``` +Non-normative examples use this paragraph style. +``` +::: + +All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading. + +All other text is normative unless otherwise labeled. + +::: example +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 + -t html + -o odata-csdl-json-v4.02-csd01.html + -c styles/markdown-styles-v1.7.3b.css + -c styles/odata.css + -s + --mathjax + --eol=lf + --wrap=none + --metadata pagetitle="OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02" + odata-csdl-json-v4.02-csd01.md +``` + +This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2. +::: + +------- + +# 2 Section Heading +text. + +## 2.1 Level 2 Heading +text. + +### 2.1.1 Level 3 Heading +text. + +#### 2.1.1.1 Level 4 Heading +text. + +##### 2.1.1.1.1 Level 5 Heading +This is the deepest level, because six # gets transformed into a Reference tag. + + +## 2.2 Next Heading +text. + +------- + +# 3 Conformance + + +`(Note: The [OASIS TC Process](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsConfClause) requires that a specification approved by the TC at the Committee Specification Public Review Draft, Committee Specification or OASIS Standard level must include a separate section, listing a set of numbered conformance clauses, to which any implementation of the specification must adhere in order to claim conformance to the specification (or any optional portion thereof). This is done by listing the conformance clauses here.` +`For the definition of "conformance clause," see [OASIS Defined Terms](https://www.oasis-open.org/policies-guidelines/oasis-defined-terms-2018-05-22/#dConformanceClause).` + +`See "Guidelines to Writing Conformance Clauses": +https://docs.oasis-open.org/templates/TCHandbook/ConformanceGuidelines.html.` + +`Remove this note before submitting for publication.)` + + +------- + +# Appendix A. References + + + +This appendix contains the normative and informative references that are used in this document. + +While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity. + +## A.1 Normative References + +The following documents are referenced in such a way that some or all of their content constitutes requirements of this document. + +`(Reference sources: +For references to IETF RFCs, use the approved citation formats at: +https://docs.oasis-open.org/templates/ietf-rfc-list/ietf-rfc-list.html. +For references to W3C Recommendations, use the approved citation formats at: +https://docs.oasis-open.org/templates/w3c-recommendations-list/w3c-recommendations-list.html. +Remove this note before submitting for publication.)` + +###### [OData-v4.02] +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + +##### [RFC2119] +_Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997_ +http://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_ +http://www.rfc-editor.org/info/rfc8174. + +## A.2 Informative References + +###### [RFC3552] +_Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003_ +https://www.rfc-editor.org/info/rfc3552. + +------- + +# Appendix B. Safety, Security and Privacy Considerations + + + +`(Note: OASIS strongly recommends that Technical Committees consider issues that might affect safety, security, privacy, and/or data protection in implementations of their specification and document them for implementers and adopters. For some purposes, you may find it required, e.g. if you apply for IANA registration.` + +`While it may not be immediately obvious how your specification might make systems vulnerable to attack, most specifications, because they involve communications between systems, message formats, or system settings, open potential channels for exploit. For example, IETF [[RFC3552](#rfc3552)] lists “eavesdropping, replay, message insertion, deletion, modification, and man-in-the-middle” as well as potential denial of service attacks as threats that must be considered and, if appropriate, addressed in IETF RFCs.` + +`In addition to considering and describing foreseeable risks, this section should include guidance on how implementers and adopters can protect against these risks.` + +`We encourage editors and TC members concerned with this subject to read _Guidelines for Writing RFC Text on Security Considerations_, IETF [[RFC3552](#rfc3552)], for more information.` + +`Remove this note before submitting for publication.)` + +------- + +# Appendix C. Acknowledgments + + + +`Note: A Work Product approved by the TC must include a list of people who participated in the development of the Work Product. This is generally done by collecting the list of names in this appendix. This list shall be initially compiled by the Chair, and any Member of the TC may add or remove their names from the list by request. Remove this note before submitting for publication.` + +## C.1 Special Thanks + + + +Substantial contributions to this document from the following individuals are gratefully acknowledged: + +Participant Name, Affiliation or "Individual Member" + +## C.2 Participants + + + +The following individuals have participated in the creation of this specification and are gratefully acknowledged: + +**OpenC2 TC Members:** + +| First Name | Last Name | Company | +| :--- | :--- | :--- | +Philippe | Alman | Something Networks +Alex | Amirnovman | Company B +Kris | Anderman | Mini Micro +Darren | Anstman | Big Networks + +------- + +# Appendix D. Revision History + + + +| Revision | Date | Editor | Changes Made | +| :--- | :--- | :--- | :--- | +| specname-v1.0-wd01 | yyyy-mm-dd | Editor Name | Initial working draft | + +------- + +# Appendix E. Example Appendix with subsections + +## E.1 Subsection title + +### E.1.1 Sub-subsection + +------- + +# Appendix F. 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](https://www.oasis-open.org/policies-guidelines/ipr/) 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. + +As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, 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](https://www.oasis-open.org/), 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/styles/markdown-styles-v1.7.3b.css b/docs/odata-csdl-json/styles/markdown-styles-v1.7.3b.css new file mode 100644 index 000000000..f102f0ace --- /dev/null +++ b/docs/odata-csdl-json/styles/markdown-styles-v1.7.3b.css @@ -0,0 +1,91 @@ +/* OASIS specification styles for HTML generated from Markdown or similar sources */ +/* usually used after basic w3.css */ +/* Paul Knight 2018-09-27 */ +/* pk 2018-10-01 - v1.2 reduced section header and title (h*) font sizes */ +/* pk 2018-10-02 - v1.3 added right margin; allowed text wrapping in code blocks and scrolling for overflowing text */ +/* pk 2018-10-19 - v1.4 added display:inline to avoid page-wide background coloring */ +/* pk 2018-10-25 - v1.5 added use of
as citation tag for References section or elsewhere */ +/* pk 2018-10-26 - v1.5.1 (experimental) and v1.6 added use of
as a page break when generating PDF from the HTML */ +/* pk 2018-11-14 - v1.6.1 - lighter gray background color for code blocks */ +/* pk 2019-02-18 - v1.7 - Use Liberation Sans and Liberation Mono fonts if possible */ +/* pk 2019-02-18 - v1.7.1 (experimental) changed px to pt (and reduced numbers) for fonts and tables; added bigtitle style */ +/* pk 2019-05-23 - v1.7.2 (based on 1.7.1) changed monospace "code" font to Courier New */ +/* pk 2019-08-01 - v1.7.3 substitute PostScript name for fonts (LiberationSans for "Liberation Sans" and CourierNew for "Courier New") to address a flaw in "wkhtmltopdf" which rendered all text as bold. Changed "bigtitle" to "h1big"*/ +/* dk 2020-10-21 - v1.7.3a (unofficial for jadn, based on 1.7.3) update block quotes and code blocks */ +/* Heiko Theißen 2023-06-02 - v1.7.3b (unofficial for odata-data-aggregation-ext, based on v1.7.3a) include local font names "Liberation Sans" and "Courier New" */ + +body { + margin-left: 3pc; + margin-right: 3pc; + font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif; + font-size:12pt; + line-height:1.2; + } + +html{overflow-x:auto} + + /* styles for section headings - levels 1-5 (maybe include heading1, etc. later) */ +h1{font-size:18pt}h2{font-size:14pt}h3{font-size:13pt}h4{font-size:12pt}h5{font-size:11pt} +h1big{font-size: 24pt} +h1,h2,h3,h4,h5,h1big{font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif;font-weight: bold;margin:8pt 0;color: #446CAA} + /* style for h6, for use as Reference tag */ +h6{font-size:12pt; line-height:1.0} +h6{font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif;font-weight: bold;margin:0pt;} + /* not needed - can just use brackets in the label itself */ + /* h6::before {content: "["} */ + /* h6::after {content: "]"} */ + + /* style for hr to insert a page break before each ruled line (generated in markdown by 3 or more hyphens alone on a line) */ +hr{page-break-before: always;} + + +/* Table styles - bordered with option for striped */ +table { + border-collapse: collapse; +} + +table { + border-collapse:collapse; + border-spacing:0; + width:100%; + display:table; + font-size:12pt; + margin-top: 6pt; + } + +table, th, td { + border: 1pt solid black; + padding:6pt 6pt; + text-align:left; + vertical-align:top; +} +th { + color:#ffffff; + background-color: #446CAA; + } + /* "table-striped" tag is not generated by pandoc - add manually in HTML if wanted */ +.table-striped tbody tr:nth-child(even){background-color:#d6f3ff} + +/* style for code blocks */ +pre { + background-color:#f0f0f0; + padding: 6px; +} + +code,kbd,samp{ + font-family:CourierNew, "Courier New", monospace; + white-space: pre-wrap; + font-size: 10pt; +} + +/* offset block quote */ +blockquote { + background-color:#f0f0f0; + padding-left: 10px; + border-left: solid lightgray 6px; +} + +/* space bullets a bit */ +li { + margin: 3px 0; +} diff --git a/docs/odata-csdl-json/styles/odata.css b/docs/odata-csdl-json/styles/odata.css new file mode 100644 index 000000000..4efa4b885 --- /dev/null +++ b/docs/odata-csdl-json/styles/odata.css @@ -0,0 +1,188 @@ +a:target { + background-color: yellow; +} + +a[href^="#OData"], +a[href^="#RFC"], +a[href^="#SQL"] { + font-weight: bold; +} + +a[href^="#OData"]::before, +a[href^="#RFC"]::before, +a[href^="#SQL"]::before { + content: "["; + font-weight: bold; +} + +a[href^="#OData"]::after, +a[href^="#RFC"]::after, +a[href^="#SQL"]::after { + content: "]"; + font-weight: bold; +} + +.toc li { + list-style-type: none; +} + +.example, +.example table { + font-size: smaller; +} + +.example p, +.example li { + font-style: italic; +} + +table { + width: auto; +} + +.example table, +.example th, +.example td { + padding: 2pt 6pt; + white-space: nowrap; +} + +.example td[rowspan] { + text-align: right; + vertical-align: middle; + border-style: dotted; +} + +.example th[colspan] { + text-align: center; +} + +.example-data { + position: relative; +} + +.example-data div { + position: absolute; +} + +.example-data p { + font-style: unset !important; +} + +.example-data svg { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; +} + +.cross tbody tr:first-of-type, +.cross tbody tr:nth-of-type(2), +.cross td:first-of-type, +.cross td:nth-of-type(2) { + font-weight: bold; + color: white; + background-color: #446CAA +} + +.cross tbody tr:first-of-type td:first-of-type, +.cross tbody tr:nth-of-type(2) td:first-of-type, +.cross tbody tr:first-of-type td:nth-of-type(2), +.cross tbody tr:nth-of-type(2) td:nth-of-type(2) { + border: none; + background-color: white; +} + +.example-data th:first-of-type:not(:last-of-type), +.legend tbody tr:first-of-type { + background-color: green; +} + +.nav th:nth-of-type(2), +.nav-2 th:nth-of-type(3), +.nav-2 th:nth-of-type(4), +.nav-2 th:nth-of-type(5), +.legend tbody tr:last-of-type { + background-color: rgb(255, 128, 0); +} + +.legend td { + font-weight: bold; + color: white; +} + +.example-data svg>path { + fill: none; + stroke: black; + stroke-width: 2; +} + +p code, +li code, +h1 code, +h2 code, +h3 code, +h4 code, +h5 code, +h6 code { + font-family: MJXZERO, MJXTEX-T; + font-size: 1em; + line-height: 0; +} + +.example p code, +.example li code { + font-style: initial; +} + +.example pre { + margin-left: 40px; +} + +h1 code, +h2 code, +h3 code, +h4 code, +h5 code, +h6 code { + font-size: unset; +} + +mjx-container { + font-size: unset !important; +} + +mjx-container[display=true] { + text-align: left !important; + margin-left: 40px !important; +} + +/* The following rule enables typewriter single quotes in maths, like $\hbox{\tt{'$Q$'}}$ */ +mjx-c.mjx-c2019::before { + content: "\27" !important; + padding-right: 0.525em !important; + font-family: MJXZERO, MJXTEX-T; +} + +code .er { + color: unset !important; + font-weight: unset !important; +} + +hr:first-of-type { + page-break-before: avoid; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + page-break-after: avoid; +} + +h2[id="22-example-data"] { + page-break-before: always; +} \ No newline at end of file diff --git a/docs/odata-csdl-xml/odata-csdl-xml.html b/docs/odata-csdl-xml/odata-csdl-xml.html new file mode 100644 index 000000000..5d9db0923 --- /dev/null +++ b/docs/odata-csdl-xml/odata-csdl-xml.html @@ -0,0 +1,290 @@ + + + + + + + OData Common Schema Definition Language (CSDL) XML Representation Version 4.02 + + + + + + + + +

OASIS Logo

+
+

OData Common Schema Definition Language (CSDL) XML Representation Version 4.02

+

Committee Specification Draft 01

+

14 July 2023

+

 

+

This stage:

+

https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/csd01/odata-csdl-xml-v4.02-csd01.md (Authoritative)
+https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/csd01/odata-csdl-xml-v4.02-csd01.html
+https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/csd01/odata-csdl-xml-v4.02-csd01.pdf

+

Previous stage:

+

N/A

+

Latest stage:

+

https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.md (Authoritative)
+https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.html
+https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.pdf

+

Technical Committee:

+

OASIS Open Data Protocol (OData) TC

+

Chairs:

+

Ralf Handl (ralf.handl@sap.com), SAP SE
+Michael Pizzo (mikep@microsoft.com), Microsoft

+

Editors:

+

Ralf Handl (ralf.handl@sap.com), SAP SE
+Michael Pizzo (mikep@microsoft.com), Microsoft
+Heiko Theißen (heiko.theissen@sap.com), SAP SE

+

Additional artifacts:

+

This prose specification is one component of a Work Product that also includes:

+ + +

This specification replaces or supersedes:

+ +

This specification is related to:

+ +

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.

+

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.

+

Citation format:

+

When referencing this specification the following citation format should be used:

+

[OData-CSDL-XML-v4.02]

+

OData Common Schema Definition Language (CSDL) XML Representation Version 4.02. Edited by Ralf Handl, Michael Pizzo, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/csd01/odata-csdl-xml-v4.02-csd01.html. Latest stage: https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.html.

+

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.

+

For complete copyright information please see the full Notices section in an Appendix below.

+
+

Table of Contents

+
+ +
+
+

1 Introduction

+ + +

1.1 Changes from earlier Versions

+ + + + +

1.2 Glossary

+

1.2.1 Definitions of terms

+ + +

TODO: find out why we need a \(dummy\) formula to get monospace look as we want it.

+

1.2.2 Acronyms and abbreviations

+ + +

1.2.3 Document conventions

+

Keywords defined by this specification use this monospaced font.

+

Some sections of this specification are illustrated with non-normative examples.

+
+

Example 1: text describing an example uses this paragraph style

+
Non-normative examples use this paragraph style.
+
+

All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading.

+

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
+       -t html
+       -o odata-csdl-xml-v4.02-csd01.html
+       -c styles/markdown-styles-v1.7.3b.css
+       -c styles/odata.css
+       -s
+       --mathjax
+       --eol=lf
+       --wrap=none
+       --metadata pagetitle="OData Common Schema Definition Language (CSDL) XML Representation Version 4.02"
+       odata-csdl-xml-v4.02-csd01.md
+

This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2.

+
+
+

2 Section Heading

+

text.

+

2.1 Level 2 Heading

+

text.

+

2.1.1 Level 3 Heading

+

text.

+

2.1.1.1 Level 4 Heading

+

text.

+
2.1.1.1.1 Level 5 Heading
+

This is the deepest level, because six # gets transformed into a Reference tag.

+

2.2 Next Heading

+

text.

+
+

3 Conformance

+ + +

(Note: The [OASIS TC Process](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsConfClause) requires that a specification approved by the TC at the Committee Specification Public Review Draft, Committee Specification or OASIS Standard level must include a separate section, listing a set of numbered conformance clauses, to which any implementation of the specification must adhere in order to claim conformance to the specification (or any optional portion thereof). This is done by listing the conformance clauses here. For the definition of "conformance clause," see [OASIS Defined Terms](https://www.oasis-open.org/policies-guidelines/oasis-defined-terms-2018-05-22/#dConformanceClause).

+

See "Guidelines to Writing Conformance Clauses": https://docs.oasis-open.org/templates/TCHandbook/ConformanceGuidelines.html.

+

Remove this note before submitting for publication.)

+
+

Appendix A. References

+ + +

This appendix contains the normative and informative references that are used in this document.

+

While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity.

+

A.1 Normative References

+

The following documents are referenced in such a way that some or all of their content constitutes requirements of this document.

+

(Reference sources: For references to IETF RFCs, use the approved citation formats at: https://docs.oasis-open.org/templates/ietf-rfc-list/ietf-rfc-list.html. For references to W3C Recommendations, use the approved citation formats at: https://docs.oasis-open.org/templates/w3c-recommendations-list/w3c-recommendations-list.html. Remove this note before submitting for publication.)

+
[OData-v4.02]
+ +
[RFC2119]
+

Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997 http://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 http://www.rfc-editor.org/info/rfc8174.

+

A.2 Informative References

+
[RFC3552]
+

Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003 https://www.rfc-editor.org/info/rfc3552.

+
+

Appendix B. Safety, Security and Privacy Considerations

+ + +

(Note: OASIS strongly recommends that Technical Committees consider issues that might affect safety, security, privacy, and/or data protection in implementations of their specification and document them for implementers and adopters. For some purposes, you may find it required, e.g. if you apply for IANA registration.

+

While it may not be immediately obvious how your specification might make systems vulnerable to attack, most specifications, because they involve communications between systems, message formats, or system settings, open potential channels for exploit. For example, IETF [[RFC3552](#rfc3552)] lists “eavesdropping, replay, message insertion, deletion, modification, and man-in-the-middle” as well as potential denial of service attacks as threats that must be considered and, if appropriate, addressed in IETF RFCs.

+

In addition to considering and describing foreseeable risks, this section should include guidance on how implementers and adopters can protect against these risks.

+

We encourage editors and TC members concerned with this subject to read _Guidelines for Writing RFC Text on Security Considerations_, IETF [[RFC3552](#rfc3552)], for more information.

+

Remove this note before submitting for publication.)

+
+

Appendix C. Acknowledgments

+ + +

Note: A Work Product approved by the TC must include a list of people who participated in the development of the Work Product. This is generally done by collecting the list of names in this appendix. This list shall be initially compiled by the Chair, and any Member of the TC may add or remove their names from the list by request. Remove this note before submitting for publication.

+

C.1 Special Thanks

+ + +

Substantial contributions to this document from the following individuals are gratefully acknowledged:

+

Participant Name, Affiliation or "Individual Member"

+

C.2 Participants

+ + +

The following individuals have participated in the creation of this specification and are gratefully acknowledged:

+

OpenC2 TC Members:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
First NameLast NameCompany
PhilippeAlmanSomething Networks
AlexAmirnovmanCompany B
KrisAndermanMini Micro
DarrenAnstmanBig Networks
+
+

Appendix D. Revision History

+ + + + + + + + + + + + + + + + + + + +
RevisionDateEditorChanges Made
specname-v1.0-wd01yyyy-mm-ddEditor NameInitial working draft
+
+

Appendix E. Example Appendix with subsections

+

E.1 Subsection title

+

E.1.1 Sub-subsection

+
+

Appendix F. 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.

+

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.

+

As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, 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.

+ + diff --git a/docs/odata-csdl-xml/odata-csdl-xml.md b/docs/odata-csdl-xml/odata-csdl-xml.md new file mode 100644 index 000000000..6816e32dd --- /dev/null +++ b/docs/odata-csdl-xml/odata-csdl-xml.md @@ -0,0 +1,327 @@ + +![OASIS Logo](https://docs.oasis-open.org/templates/OASISLogo-v3.0.png) + +------- + +# OData Common Schema Definition Language (CSDL) XML Representation Version 4.02 + +## Committee Specification Draft 01 + +## 14 July 2023 + +  + +#### This stage: +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/csd01/odata-csdl-xml-v4.02-csd01.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/csd01/odata-csdl-xml-v4.02-csd01.html \ +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/csd01/odata-csdl-xml-v4.02-csd01.pdf + +#### Previous stage: +N/A + +#### Latest stage: +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.html \ +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.pdf + +#### Technical Committee: +[OASIS Open Data Protocol (OData) TC](https://www.oasis-open.org/committees/odata/) + +#### Chairs: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) + +#### Editors: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) \ +Heiko Theißen (heiko.theissen@sap.com), [SAP SE](http://www.sap.com/) + +#### Additional artifacts: +This prose specification is one component of a Work Product that also includes: +* XML schemas: (list file names or directory name) +* Other parts (list titles and/or file names) +* `(Note: Any normative computer language definitions that are part of the Work Product, such as XML instances, schemas and Java(TM) code, including fragments of such, must be (a) well formed and valid, (b) provided in separate plain text files, (c) referenced from the Work Product; and (d) where any definition in these separate files disagrees with the definition found in the specification, the definition in the separate file prevails. Remove this note before submitting for publication.)` + +#### Related work: +This specification replaces or supersedes: +* _OData Common Schema Definition Language (CSDL) XML Representation Version 4.01_. Edited by Michael Pizzo, Ralf Handl, and Martin Zurmuehl. OASIS Standard. Latest stage: https://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html. + +This specification is related to: +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + +#### 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](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/. + +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). + +Note that any machine-readable content ([Computer Language Definitions](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsCompLang)) 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](#rfc2119)] and [[RFC8174](#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-XML-v4.02]** + +_OData Common Schema Definition Language (CSDL) XML Representation Version 4.02_. +Edited by Ralf Handl, Michael Pizzo, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/csd01/odata-csdl-xml-v4.02-csd01.html. +Latest stage: https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.html. + +#### Notices +Copyright © OASIS Open 2023. All Rights Reserved. + +Distributed under the terms of the OASIS [IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/). + +The name "OASIS" is a trademark of [OASIS](https://www.oasis-open.org/), 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 + +::: toc +- [1 Introduction](#Introduction) + - [1.1 Changes from earlier Versions](#ChangesfromearlierVersions) + - [1.2 Glossary](#Glossary) + - [1.2.1 Definitions of terms](#Definitionsofterms) + - [1.2.2 Acronyms and abbreviations](#Acronymsandabbreviations) + - [1.2.3 Document conventions](#Documentconventions) +::: + +------- + +# 1 Introduction + + + +## 1.1 Changes from earlier Versions + + + + +## 1.2 Glossary + +### 1.2.1 Definitions of terms + + +TODO: find out why we need a $dummy$ formula to get `monospace` look as we want it. + +### 1.2.2 Acronyms and abbreviations + + + +### 1.2.3 Document conventions + +Keywords defined by this specification use `this monospaced font`. + +Some sections of this specification are illustrated with non-normative examples. + +::: example +Example 1: text describing an example uses this paragraph style +``` +Non-normative examples use this paragraph style. +``` +::: + +All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading. + +All other text is normative unless otherwise labeled. + +::: example +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 + -t html + -o odata-csdl-xml-v4.02-csd01.html + -c styles/markdown-styles-v1.7.3b.css + -c styles/odata.css + -s + --mathjax + --eol=lf + --wrap=none + --metadata pagetitle="OData Common Schema Definition Language (CSDL) XML Representation Version 4.02" + odata-csdl-xml-v4.02-csd01.md +``` + +This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2. +::: + +------- + +# 2 Section Heading +text. + +## 2.1 Level 2 Heading +text. + +### 2.1.1 Level 3 Heading +text. + +#### 2.1.1.1 Level 4 Heading +text. + +##### 2.1.1.1.1 Level 5 Heading +This is the deepest level, because six # gets transformed into a Reference tag. + + +## 2.2 Next Heading +text. + +------- + +# 3 Conformance + + +`(Note: The [OASIS TC Process](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsConfClause) requires that a specification approved by the TC at the Committee Specification Public Review Draft, Committee Specification or OASIS Standard level must include a separate section, listing a set of numbered conformance clauses, to which any implementation of the specification must adhere in order to claim conformance to the specification (or any optional portion thereof). This is done by listing the conformance clauses here.` +`For the definition of "conformance clause," see [OASIS Defined Terms](https://www.oasis-open.org/policies-guidelines/oasis-defined-terms-2018-05-22/#dConformanceClause).` + +`See "Guidelines to Writing Conformance Clauses": +https://docs.oasis-open.org/templates/TCHandbook/ConformanceGuidelines.html.` + +`Remove this note before submitting for publication.)` + + +------- + +# Appendix A. References + + + +This appendix contains the normative and informative references that are used in this document. + +While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity. + +## A.1 Normative References + +The following documents are referenced in such a way that some or all of their content constitutes requirements of this document. + +`(Reference sources: +For references to IETF RFCs, use the approved citation formats at: +https://docs.oasis-open.org/templates/ietf-rfc-list/ietf-rfc-list.html. +For references to W3C Recommendations, use the approved citation formats at: +https://docs.oasis-open.org/templates/w3c-recommendations-list/w3c-recommendations-list.html. +Remove this note before submitting for publication.)` + +###### [OData-v4.02] +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + +##### [RFC2119] +_Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997_ +http://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_ +http://www.rfc-editor.org/info/rfc8174. + +## A.2 Informative References + +###### [RFC3552] +_Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003_ +https://www.rfc-editor.org/info/rfc3552. + +------- + +# Appendix B. Safety, Security and Privacy Considerations + + + +`(Note: OASIS strongly recommends that Technical Committees consider issues that might affect safety, security, privacy, and/or data protection in implementations of their specification and document them for implementers and adopters. For some purposes, you may find it required, e.g. if you apply for IANA registration.` + +`While it may not be immediately obvious how your specification might make systems vulnerable to attack, most specifications, because they involve communications between systems, message formats, or system settings, open potential channels for exploit. For example, IETF [[RFC3552](#rfc3552)] lists “eavesdropping, replay, message insertion, deletion, modification, and man-in-the-middle” as well as potential denial of service attacks as threats that must be considered and, if appropriate, addressed in IETF RFCs.` + +`In addition to considering and describing foreseeable risks, this section should include guidance on how implementers and adopters can protect against these risks.` + +`We encourage editors and TC members concerned with this subject to read _Guidelines for Writing RFC Text on Security Considerations_, IETF [[RFC3552](#rfc3552)], for more information.` + +`Remove this note before submitting for publication.)` + +------- + +# Appendix C. Acknowledgments + + + +`Note: A Work Product approved by the TC must include a list of people who participated in the development of the Work Product. This is generally done by collecting the list of names in this appendix. This list shall be initially compiled by the Chair, and any Member of the TC may add or remove their names from the list by request. Remove this note before submitting for publication.` + +## C.1 Special Thanks + + + +Substantial contributions to this document from the following individuals are gratefully acknowledged: + +Participant Name, Affiliation or "Individual Member" + +## C.2 Participants + + + +The following individuals have participated in the creation of this specification and are gratefully acknowledged: + +**OpenC2 TC Members:** + +| First Name | Last Name | Company | +| :--- | :--- | :--- | +Philippe | Alman | Something Networks +Alex | Amirnovman | Company B +Kris | Anderman | Mini Micro +Darren | Anstman | Big Networks + +------- + +# Appendix D. Revision History + + + +| Revision | Date | Editor | Changes Made | +| :--- | :--- | :--- | :--- | +| specname-v1.0-wd01 | yyyy-mm-dd | Editor Name | Initial working draft | + +------- + +# Appendix E. Example Appendix with subsections + +## E.1 Subsection title + +### E.1.1 Sub-subsection + +------- + +# Appendix F. 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](https://www.oasis-open.org/policies-guidelines/ipr/) 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. + +As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, 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](https://www.oasis-open.org/), 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/styles/markdown-styles-v1.7.3b.css b/docs/odata-csdl-xml/styles/markdown-styles-v1.7.3b.css new file mode 100644 index 000000000..f102f0ace --- /dev/null +++ b/docs/odata-csdl-xml/styles/markdown-styles-v1.7.3b.css @@ -0,0 +1,91 @@ +/* OASIS specification styles for HTML generated from Markdown or similar sources */ +/* usually used after basic w3.css */ +/* Paul Knight 2018-09-27 */ +/* pk 2018-10-01 - v1.2 reduced section header and title (h*) font sizes */ +/* pk 2018-10-02 - v1.3 added right margin; allowed text wrapping in code blocks and scrolling for overflowing text */ +/* pk 2018-10-19 - v1.4 added display:inline to avoid page-wide background coloring */ +/* pk 2018-10-25 - v1.5 added use of
as citation tag for References section or elsewhere */ +/* pk 2018-10-26 - v1.5.1 (experimental) and v1.6 added use of
as a page break when generating PDF from the HTML */ +/* pk 2018-11-14 - v1.6.1 - lighter gray background color for code blocks */ +/* pk 2019-02-18 - v1.7 - Use Liberation Sans and Liberation Mono fonts if possible */ +/* pk 2019-02-18 - v1.7.1 (experimental) changed px to pt (and reduced numbers) for fonts and tables; added bigtitle style */ +/* pk 2019-05-23 - v1.7.2 (based on 1.7.1) changed monospace "code" font to Courier New */ +/* pk 2019-08-01 - v1.7.3 substitute PostScript name for fonts (LiberationSans for "Liberation Sans" and CourierNew for "Courier New") to address a flaw in "wkhtmltopdf" which rendered all text as bold. Changed "bigtitle" to "h1big"*/ +/* dk 2020-10-21 - v1.7.3a (unofficial for jadn, based on 1.7.3) update block quotes and code blocks */ +/* Heiko Theißen 2023-06-02 - v1.7.3b (unofficial for odata-data-aggregation-ext, based on v1.7.3a) include local font names "Liberation Sans" and "Courier New" */ + +body { + margin-left: 3pc; + margin-right: 3pc; + font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif; + font-size:12pt; + line-height:1.2; + } + +html{overflow-x:auto} + + /* styles for section headings - levels 1-5 (maybe include heading1, etc. later) */ +h1{font-size:18pt}h2{font-size:14pt}h3{font-size:13pt}h4{font-size:12pt}h5{font-size:11pt} +h1big{font-size: 24pt} +h1,h2,h3,h4,h5,h1big{font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif;font-weight: bold;margin:8pt 0;color: #446CAA} + /* style for h6, for use as Reference tag */ +h6{font-size:12pt; line-height:1.0} +h6{font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif;font-weight: bold;margin:0pt;} + /* not needed - can just use brackets in the label itself */ + /* h6::before {content: "["} */ + /* h6::after {content: "]"} */ + + /* style for hr to insert a page break before each ruled line (generated in markdown by 3 or more hyphens alone on a line) */ +hr{page-break-before: always;} + + +/* Table styles - bordered with option for striped */ +table { + border-collapse: collapse; +} + +table { + border-collapse:collapse; + border-spacing:0; + width:100%; + display:table; + font-size:12pt; + margin-top: 6pt; + } + +table, th, td { + border: 1pt solid black; + padding:6pt 6pt; + text-align:left; + vertical-align:top; +} +th { + color:#ffffff; + background-color: #446CAA; + } + /* "table-striped" tag is not generated by pandoc - add manually in HTML if wanted */ +.table-striped tbody tr:nth-child(even){background-color:#d6f3ff} + +/* style for code blocks */ +pre { + background-color:#f0f0f0; + padding: 6px; +} + +code,kbd,samp{ + font-family:CourierNew, "Courier New", monospace; + white-space: pre-wrap; + font-size: 10pt; +} + +/* offset block quote */ +blockquote { + background-color:#f0f0f0; + padding-left: 10px; + border-left: solid lightgray 6px; +} + +/* space bullets a bit */ +li { + margin: 3px 0; +} diff --git a/docs/odata-csdl-xml/styles/odata.css b/docs/odata-csdl-xml/styles/odata.css new file mode 100644 index 000000000..4efa4b885 --- /dev/null +++ b/docs/odata-csdl-xml/styles/odata.css @@ -0,0 +1,188 @@ +a:target { + background-color: yellow; +} + +a[href^="#OData"], +a[href^="#RFC"], +a[href^="#SQL"] { + font-weight: bold; +} + +a[href^="#OData"]::before, +a[href^="#RFC"]::before, +a[href^="#SQL"]::before { + content: "["; + font-weight: bold; +} + +a[href^="#OData"]::after, +a[href^="#RFC"]::after, +a[href^="#SQL"]::after { + content: "]"; + font-weight: bold; +} + +.toc li { + list-style-type: none; +} + +.example, +.example table { + font-size: smaller; +} + +.example p, +.example li { + font-style: italic; +} + +table { + width: auto; +} + +.example table, +.example th, +.example td { + padding: 2pt 6pt; + white-space: nowrap; +} + +.example td[rowspan] { + text-align: right; + vertical-align: middle; + border-style: dotted; +} + +.example th[colspan] { + text-align: center; +} + +.example-data { + position: relative; +} + +.example-data div { + position: absolute; +} + +.example-data p { + font-style: unset !important; +} + +.example-data svg { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; +} + +.cross tbody tr:first-of-type, +.cross tbody tr:nth-of-type(2), +.cross td:first-of-type, +.cross td:nth-of-type(2) { + font-weight: bold; + color: white; + background-color: #446CAA +} + +.cross tbody tr:first-of-type td:first-of-type, +.cross tbody tr:nth-of-type(2) td:first-of-type, +.cross tbody tr:first-of-type td:nth-of-type(2), +.cross tbody tr:nth-of-type(2) td:nth-of-type(2) { + border: none; + background-color: white; +} + +.example-data th:first-of-type:not(:last-of-type), +.legend tbody tr:first-of-type { + background-color: green; +} + +.nav th:nth-of-type(2), +.nav-2 th:nth-of-type(3), +.nav-2 th:nth-of-type(4), +.nav-2 th:nth-of-type(5), +.legend tbody tr:last-of-type { + background-color: rgb(255, 128, 0); +} + +.legend td { + font-weight: bold; + color: white; +} + +.example-data svg>path { + fill: none; + stroke: black; + stroke-width: 2; +} + +p code, +li code, +h1 code, +h2 code, +h3 code, +h4 code, +h5 code, +h6 code { + font-family: MJXZERO, MJXTEX-T; + font-size: 1em; + line-height: 0; +} + +.example p code, +.example li code { + font-style: initial; +} + +.example pre { + margin-left: 40px; +} + +h1 code, +h2 code, +h3 code, +h4 code, +h5 code, +h6 code { + font-size: unset; +} + +mjx-container { + font-size: unset !important; +} + +mjx-container[display=true] { + text-align: left !important; + margin-left: 40px !important; +} + +/* The following rule enables typewriter single quotes in maths, like $\hbox{\tt{'$Q$'}}$ */ +mjx-c.mjx-c2019::before { + content: "\27" !important; + padding-right: 0.525em !important; + font-family: MJXZERO, MJXTEX-T; +} + +code .er { + color: unset !important; + font-weight: unset !important; +} + +hr:first-of-type { + page-break-before: avoid; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + page-break-after: avoid; +} + +h2[id="22-example-data"] { + page-break-before: always; +} \ No newline at end of file diff --git a/docs/odata-json-format/odata-json-format.html b/docs/odata-json-format/odata-json-format.html new file mode 100644 index 000000000..98928d872 --- /dev/null +++ b/docs/odata-json-format/odata-json-format.html @@ -0,0 +1,873 @@ + + + + + + + OData JSON Format Version 4.02 + + + + + + + + +

OASIS Logo

+
+

OData JSON Format Version 4.02

+

Committee Specification Draft 01

+

14 July 2023

+

 

+

This stage:

+

https://docs.oasis-open.org/odata/odata-json-format/v4.02/csd01/odata-json-format-v4.02-csd01.md (Authoritative)
+https://docs.oasis-open.org/odata/odata-json-format/v4.02/csd01/odata-json-format-v4.02-csd01.html
+https://docs.oasis-open.org/odata/odata-json-format/v4.02/csd01/odata-json-format-v4.02-csd01.pdf

+

Previous stage:

+

N/A

+

Latest stage:

+

https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.md (Authoritative)
+https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html
+https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.pdf

+

Technical Committee:

+

OASIS Open Data Protocol (OData) TC

+

Chairs:

+

Ralf Handl (ralf.handl@sap.com), SAP SE
+Michael Pizzo (mikep@microsoft.com), Microsoft

+

Editors:

+

Ralf Handl (ralf.handl@sap.com), SAP SE
+Michael Pizzo (mikep@microsoft.com), Microsoft
+Heiko Theißen (heiko.theissen@sap.com), SAP SE

+ +

This specification replaces or supersedes:

+ +

This specification is related to:

+ +

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.

+

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.

+

Citation format:

+

When referencing this specification the following citation format should be used:

+

[OData-JSON-Format-v4.02]

+

OData JSON Format Version 4.02. Edited by Ralf Handl, Michael Pizzo, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. https://docs.oasis-open.org/odata/odata-json-format/v4.02/csd01/odata-json-format-v4.02-csd01.html. Latest stage: https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html.

+

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.

+

For complete copyright information please see the full Notices section in an Appendix below.

+
+

Table of Contents

+
+ +
+
+

1 Introduction

+

The OData protocol is comprised of a set of specifications for representing and interacting with structured content. The core specification for the protocol is in OData-Protocol; this document is an extension of the core protocol. This document defines representations for the OData requests and responses using the JavaScript Object Notation (JSON), see [RFC8259].

+

An OData JSON payload may represent:

+ +

1.1 Changes from earlier Versions

+ + + + +

1.2 Glossary

+

1.2.1 Definitions of terms

+ + +

TODO: find out why we need a \(dummy\) formula to get monospace look as we want it.

+

1.2.2 Acronyms and abbreviations

+ + +

1.2.3 Document conventions

+

Keywords defined by this specification use this monospaced font.

+

Some sections of this specification are illustrated with non-normative examples.

+
+

Example 1: text describing an example uses this paragraph style

+
Non-normative examples use this paragraph style.
+
+

All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading.

+

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
+       -t html
+       -o odata-json-format-v4.02-csd01.html
+       -c styles/markdown-styles-v1.7.3b.css
+       -c styles/odata.css
+       -s
+       --mathjax
+       --eol=lf
+       --wrap=none
+       --metadata pagetitle="OData JSON Format Version 4.02"
+       odata-json-format-v4.02-csd01.md
+

This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2.

+
+
+

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.

+

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.

+
+

3 Requesting the JSON Format

+

The OData JSON format can be requested using the $format query option in the request URL with the media type application/json, optionally followed by format parameters, or the case-insensitive abbreviation json which MUST NOT be followed by format parameters.

+

Alternatively, this format can be requested using the Accept header with the media type application/json, optionally followed by format parameters.

+

If specified, $format overrides any value specified in the Accept header.

+

Possible format parameters are:

+ +

The names and values of these format parameters are case-insensitive.

+

Services SHOULD advertise the supported media types by annotating the entity container with the term Capabilities.SupportedFormats defined in OData-VocCap, listing all available formats and combinations of supported format parameters.

+

3.1 Controlling the Amount of Control Information in Responses

+

The amount of control information needed (or desired) in the payload depends on the client application and device. The metadata parameter can be applied to the Accept header of an OData request to influence how much control information will be included in the response.

+

Other Accept header parameters (e.g., streaming) are orthogonal to the metadata parameter and are therefore not mentioned in this section.

+

If a client prefers a very small wire size and is intelligent enough to compute data using metadata expressions, the Accept header should include metadata=minimal. If computation is more critical than wire size or the client is incapable of computing control information, metadata=full directs the service to inline the control information that normally would be computed from metadata expressions in the payload. metadata=none is an option for clients that have out-of-band knowledge or don't require control information.

+

In addition, the client may use the include-annotations preference in the Prefer header to request additional control information. Services supporting this MUST NOT omit control information required by the chosen metadata parameter, and services MUST NOT exclude the nextLink, deltaLink, and count if they are required by the response type.

+

If the client includes the OData-MaxVersion header in a request and does not specify the metadata format parameter in either the Accept header or $format query option, the service MUST return at least the minimal control information.

+

Note that in OData 4.0 the metadata 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.

+

3.1.1 metadata=minimal (odata.metadata=minimal)

+

The metadata=minimal format parameter indicates that the service SHOULD remove computable control information from the payload wherever possible. The response payload MUST contain at least the following control information:

+ +

In addition, control information MUST appear in the payload for cases where actual values are not the same as the computed values and MAY appear otherwise. When control information appears in the payload, it is treated as exceptions to the computed values.

+

Media entities and stream properties MAY in addition contain the following control information:

+ +

3.1.2 metadata=full (odata.metadata=full)

+

The metadata=full format parameter indicates that the service MUST include all control information explicitly in the payload.

+

The full list of control information that may appear in a metadata=full response is as follows:

+ +

Media entities and stream properties may in addition contain the following control information:

+ +

3.1.3 metadata=none (odata.metadata=none)

+

The metadata=none format parameter indicates that the service SHOULD omit control information other than nextLink and count. This control information MUST continue to be included, as applicable, even in the metadata=none case.

+

It is not valid to specify metadata=none on a delta request.

+

3.2 Controlling the Representation of Numbers

+

The IEEE754Compatible=true format parameter indicates that the service MUST serialize Edm.Int64 and Edm.Decimal numbers (including the count, if requested) as strings. This is in conformance with RFC7493.

+

If not specified, or specified as IEEE754Compatible=false, all numbers MUST be serialized as JSON numbers.

+

This enables support for JavaScript numbers that are defined to be 64-bit binary format IEEE 754 values (see [ECMAScript, section 4.3.1.9]) resulting in integers losing precision past 15 digits, and decimals losing precision due to the conversion from base 10 to base 2.

+

OData JSON request and response payloads that format Edm.Int64 and Edm.Decimal values as strings MUST specify this format parameter in the media type sent in the Content-Type header.

+

Services producing responses without format parameter IEEE754Compatible=true which are unable to produce exact JSON numbers MAY serialize Edm.Int64 and Edm.Decimal numbers with a rounded/inexact value as a JSON number and annotate that value with an instance annotation with term Core.ValueException defined in OData-VocCore containing the exact value as a string. This situation can for example happen if the client only accepts application/json without any format parameters and the service is written in JavaScript.

+

For payloads with an OData-Version header equal to 4.0 the ExponentialDecimals=true format parameter indicates that the service MAY serialize Edm.Decimal numbers in exponential notation (e.g. 1e-6 instead of 0.000001).

+

The sender of a request MUST specify ExponentialDecimals=true in the Content-Type header if the request body contains Edm.Decimal values in exponential notation.

+

If not specified, or specified as ExponentialDecimals=false, all Edm.Decimal values MUST be serialized in long notation, using only an optional sign, digits, and an optional decimal point followed by digits.

+

Payloads with an OData-Version header equal to 4.01 or greater always allow exponential notation for numbers and the ExponentialDecimals format parameter is not needed or used.

+
+

4 Common Characteristics

+

This section describes common characteristics of the representation for OData values in JSON. A request or response body consists of several parts. It contains OData values as part of a larger document. Requests and responses are structured almost identical; the few existing differences will be explicitly called out in the respective subsections.

+

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.

+

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.

+

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.

+

4.3 Relative URLs

+

URLs present in a payload (whether request or response) MAY be represented as relative URLs.

+

Relative URLs, other than those in type, are relative to their base URL, which is

+ +

For context URLs, these rules apply starting with the second bullet point.

+

Within the type control information, relative URLs are relative to the base type URL, which is

+ +

Processors expanding the URLs MUST use normal URL expansion rules as defined in RFC3986. This means that if the base URL is a context URL, the part starting with $metadata# is ignored when resolving the relative URL.

+

Clients that receive relative URLs in response payloads SHOULD use the same relative URLs, where appropriate, in request payloads (such as bind operations and batch requests) and in system query options (such as $id).

+

URLs represented as a string within a JSON payload, including batch requests, must follow standard OData encoding rules. For relative URLs this means that colons in the path part, especially within key values, MUST be percent-encoded to avoid confusion with the scheme separator. Colons within the query part, i.e. after the question mark character (?), need not be percent-encoded.

+
+

Example 2:

+
{
+  "@context": "http://host/service/$metadata#Customers/$entity",
+  ...
+  "@editLink": "Customers('ALFKI')",
+  ...
+  "Orders@navigationLink": "Customers('ALFKI')/Orders",
+  ...
+}
+
+

The resulting absolute URLs are http://host/service/Customers('ALFKI') and http://host/service/Customers('ALFKI')/Orders.

+

4.4 Payload Ordering Constraints

+

Ordering constraints MAY be imposed on the JSON payload in order to support streaming scenarios. These ordering constraints MUST only be assumed if explicitly specified as some clients (and services) might not be able to control, or might not care about, the order of the JSON properties in the payload.

+

Clients can request that a JSON response conform to these ordering constraints by specifying a media type of [application/json]{style="font-family: "Courier New""} with the streaming=true parameter in the Accept header or $format query option. Services MUST return 406 Not Acceptable if the client only requests streaming and the service does not support it.

+

Clients may specify the streaming=true parameter in the Content-Type header of requests to indicate that the request body follows the payload ordering constraints. In the absence of this parameter, the service must assume that the JSON properties in the request are unordered.

+

Processors MUST only assume streaming support if it is explicitly indicated in the Content-Type header via the streaming=true parameter.

+
+

Example 3: a payload with

+
Content-Type: application/json;metadata=minimal;streaming=true
+

can be assumed to support streaming, whereas a payload with

+
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.

+

To support streaming scenarios the following payload ordering constraints have to be met:

+ +

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 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.

+

4.5.1 Control Information: context (odata.context)

+

The context control information returns the context URL (see OData-Protocol) for the payload. This URL can be absolute or relative.

+

The context control information is not returned if metadata=none[ ]{.MsoHyperlink}is requested. Otherwise[ ]{.MsoHyperlink}it MUST be the first property of any JSON response[. ]{.MsoHyperlink}

+

The context control information MUST also be included in requests and responses for entities whose entity set cannot be determined from the context URL[ ]{.MsoHyperlink}of the collection.

+

For more information on the format of the context URL, see OData-Protocol.

+

Request payloads MAY include a context URL as a base URL for relative URLs in the request payload.

+
+

Example 4:

+
{
+  "@context": "http://host/service/$metadata#Customers/$entity",
+  "@metadataEtag": "W/\"A1FF3E230954908F\"",
+  ...
+}
+
+

4.5.2 Control Information: metadataEtag (odata.metadataEtag)

+

The metadataEtag control information MAY appear in a response in order to specify the entity tag (ETag) that can be used to determine the version of the metadata of the response. If an ETag is returned when requesting the metadata document, then the service SHOULD set the metadataEtag control information to the metadata document's ETag in all responses when using metadata=minimal or metadata=full. If no ETag is returned when requesting the metadata document, then the service SHOULD NOT set the metadataEtag control information in any responses.

+

For details on how ETags are used, see 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.

+

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:

+ +

The following heuristics are used to determine the primitive type of a dynamic property in the absence of the 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

+
{
+  "@context": "http://host/service/$metadata#Customers/$entity",
+  "@type": "#Model.VipCustomer",
+  "ID": 2,
+  "DynamicValue@type": "Date",
+  "DynamicValue": "2016-09-22",
+  ...
+}
+
+
+

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",
+  "ID": 2,
+  ...
+}
+
+

4.5.4 Control Information: count (odata.count)

+

4.5.5 Control Information: nextLink (odata.nextLink)

+

4.5.6 Control Information: delta (odata.delta)

+

4.5.7 Control Information: deltaLink (odata.deltaLink)

+

4.5.8 Control Information: id (odata.id)

+

4.5.9 Control Information: editLink and readLink (odata.editLink and odata.readLink)

+

4.5.10 Control Information: etag (odata.etag)

+

4.5.11 Control Information: navigationLink and associationLink (odata.navigationLink and odata.associationLink)

+

4.5.12 Control Information: media* (odata.media*)

+

4.5.13 Control Information: removed (odata.removed)

+

4.5.14 Control Information: collectionAnnotations (odata.collectionAnnotations)

+
+

5 Service Document

+
+

6 Entity

+
+

7 Structural Property

+

7.1 Primitive Value

+

7.2 Complex Value

+

7.3 Collection of Primitive Values

+

7.4 Collection of Complex Values

+

7.5 Untyped Value

+
+

8 Navigation Property

+

8.1 Navigation Link

+

8.2 Association Link

+

8.3 Expanded Navigation Property

+

8.4 Deep Insert

+

8.5 Bind Operation

+

8.6 Collection ETag

+
+

9 Stream Property

+
+

10 Media Entity

+
+

11 Individual Property or Operation Response

+
+

12 Collection of Operation Responses

+
+

13 Collection of Entities

+
+

14 Entity Reference

+
+

15 Delta Payload

+

15.1 Delta Responses

+

15.2 Added/Changed Entity

+

15.3 Deleted Entity

+

15.4 Added Link

+

15.5 Deleted Link

+

15.6 Update a Collection of Entities

+
+

16 Bound Function

+
+

17 Bound Action

+
+

18 Action Invocation

+
+

19 Batch Requests and Responses

+

19.1 Batch Request

+

19.2 Referencing New Entities

+

19.3 Referencing an ETag

+

19.4 Processing a Batch Request

+

19.5 Batch Response

+

19.6 Asynchronous Batch Requests

+
+

20 Instance Annotations

+

20.1 Annotate a JSON Object

+

20.2 Annotate a JSON Array or Primitive

+

20.3 Annotate a Primitive Value within a JSON Array

+
+

21 Error Handling

+

21.1 Error Response

+

21.2 In-Stream Error

+

21.3 Error Information in a Success Payload

+

21.3.1 Primitive Value Errors

+

21.3.2 Structured Type Errors

+

21.3.3 Collection Errors

+
+

22 Extensibility

+
+

23 Conformance

+

Conforming clients MUST be prepared to consume a service that uses any or all of the constructs defined in this specification. The exception to this are the constructs defined in Delta Response, which are only required for clients that request changes.

+ + +

In order to be a conforming consumer of the OData JSON format, a client or service:

+
    +
  1. MUST either: +
      +
    1. understand metadata=minimal (section 3.1.1) or
    2. +
    3. explicitly specify metadata=none (section 3.1.3) or metadata=full (section 3.1.2) in the request (client)
    4. +
  2. +
  3. MUST be prepared to consume a response with full metadata
  4. +
  5. MUST be prepared to receive all data types (section 7.1) +
      +
    1. defined in this specification (client)
    2. +
    3. exposed by the service (service)
    4. +
  6. +
  7. MUST interpret all odata control information defined according to the OData-Version header of the payload (section 4.5)
  8. +
  9. MUST be prepared to receive any annotations and control information not defined in the OData-Version header of the payload (section 20)
  10. +
  11. MUST NOT require streaming=true in the Content-Type header (section 4.4)
  12. +
  13. MUST be a conforming consumer of the OData 4.0 JSON format, for payloads with an OData-Version header value of 4.0. +
      +
    1. MUST accept the odata. prefix, where defined, on format parameters and control information
    2. +
    3. MUST accept the # prefix in @odata.type values
    4. +
    5. MUST be prepared to handle binding through the use of the @odata.bind property in payloads to a PATCH, PUT, or POST request
    6. +
    7. MUST accept TargetId within in a deleted link for a relationship with a maximum cardinality of one
    8. +
    9. MUST accept the string values -INF, INF, and NaN for single and double values
    10. +
    11. MUST support property annotations that appear immediately before or after the property they annotate
    12. +
  14. +
  15. MAY be a conforming consumer of the OData 4.01 JSON format, for payloads with an OData-Version header value of 4.01. +
      +
    1. MUST be prepared to interpret control information with or without the odata. prefix
    2. +
    3. MUST be prepared for @odata.type primitive values with or without the # prefix
    4. +
    5. MUST be prepared to handle binding through inclusion of an entity reference within a collection-valued navigation property in the body of a PATCH, PUT, or POST request
    6. +
    7. MUST be prepared for TargetId to be included or omitted in a deleted link for a relationship with a maximum cardinality of one
    8. +
    9. MUST accept the string values -INF, INF, and NaN for decimal values with floating scale
    10. +
    11. MUST be prepared to handle related entities inline within a delta payload as well as a nested delta representation for the collection
    12. +
    13. MUST be prepared to handle decimal values written in exponential notation
    14. +
  16. +
+

In order to be a conforming producer of the OData JSON format, a client or service:

+
    +
  1. MUST support generating OData 4.0 JSON compliant payloads with an OData-Version header value of 4.0. +
      +
    1. MUST NOT omit the odata. prefix from format parameters or control information
    2. +
    3. MUST NOT omit the # prefix from @odata.type values
    4. +
    5. MUST NOT include entity values or entity references within a collection-valued navigation property in the body of a PATCH, PUT, or POST request
    6. +
    7. MUST NOT return decimal values written in exponential notation unless the ExponentialDecimals format parameter is specified.
    8. +
    9. MUST NOT advertise available actions or functions using name/value pairs prefixed with a property name
    10. +
    11. MUST NOT return a null value for name/value pairs representing actions or functions that are not available
    12. +
    13. MUST NOT represent numeric value exceptions for values other than single and double values using the string values -INF, INF, and NaN
    14. +
  2. +
  3. MAY support generating OData 4.01 JSON compliant payloads for requests with an OData-Version header value of 4.01. +
      +
    1. MUST return property annotations immediately before the property they annotate
    2. +
    3. SHOULD omit the odata. prefix from format parameters and control information
    4. +
    5. SHOULD omit the # prefix from @type primitive values
    6. +
    7. MAY include inline related entities or nested delta collections within a delta payload
    8. +
    9. MAY include TargetId within a deleted link for a relationship with a maximum cardinality of 1
    10. +
    11. MAY return decimal values written in exponential notation
    12. +
    13. MAY represent numeric value exceptions for decimal values with floating scale using the string values -INF, INF, and NaN
    14. +
  4. +
+

In addition, in order to conform to the OData JSON format, a service:

+
    +
  1. MUST comply with one of the conformance levels defined in OData-Protocol
  2. +
  3. MUST support the application/json media type in the Accept header (section 3)
  4. +
  5. MUST return well-formed JSON payloads
  6. +
  7. MUST support odata.metadata=full (section 3.1.2)
  8. +
  9. MUST include the odata.nextLink control information in partial results for entity collections (section 4.5.5)
  10. +
  11. MUST support entity instances with external metadata (section 4.5.1)
  12. +
  13. MUST support properties with externally defined data types (section 4.5.3)
  14. +
  15. MUST NOT violate any other aspects of this OData JSON specification
  16. +
  17. SHOULD support the $format system query option (section 3)
  18. +
  19. MAY support the odata.streaming=true parameter in the Accept header (section 4.4)
  20. +
  21. MAY return full metadata regardless of odata.metadata (section 3.1.2)
  22. +
  23. MUST NOT omit null or default values unless the omit-values preference is specified in the Prefer request header and the omit-values preference is included in the Preference-Applied response header
  24. +
  25. MUST return OData JSON 4.0-compliant responses for requests with an OData-MaxVersion header value of 4.0
  26. +
  27. MUST support OData JSON 4.0-compliant payloads in requests with an OData-Version header value of 4.0
  28. +
  29. MUST support returning, in the final response to an asynchronous request, the application/json payload that would have been returned had the operation completed synchronously, wrapped in an application/http message
  30. +
+

In addition, in order to comply with the OData 4.01 JSON format, a service:

+
    +
  1. SHOULD return the OData JSON 4.01 format for requests with an OData-MaxVersion header value of 4.01
  2. +
  3. MUST support the OData JSON 4.01 format in request payloads for requests with an OData-Version header value of 4.01
  4. +
  5. MUST honor the odata.etag control information within PUT, PATCH or DELETE payloads, if specified
  6. +
  7. MUST support returning, in the final response to an asynchronous request, the application/json payload that would have been returned had the operation completed synchronously
  8. +
+
+

Appendix A. References

+

This appendix contains the normative and informative references that are used in this document.

+

While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity.

+

A.1 Normative References

+

The following documents are referenced in such a way that some or all of their content constitutes requirements of this document.

+
[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.

+
[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) XML Representation Version 4.02.
+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.

+
[OData-URL]
+

OData Version 4.02. Part 2: URL Conventions.
+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.

+
[OData-VocCore]
+

OData Vocabularies Version 4.0: Core Vocabulary.
+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
+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.

+
[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.

+
[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.

+
[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
+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.

+

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/.

+
+

Appendix B. Safety, Security and Privacy Considerations

+

This specification raises no security issues.

+

This section is provided as a service to the application developers, information providers, and users of OData version 4.0 giving some references to starting points for securing OData services as specified. OData is a REST-full multi-format service that depends on other services and thus inherits both sides of the coin, security enhancements and concerns alike from the latter.

+

For JSON-relevant security implications please cf. at least the relevant subsections of RFC8259 as starting point.

+
+

Appendix C. Acknowledgments

+

C.1 Special Thanks

+

The contributions of the OASIS OData Technical Committee members, enumerated in OData-Protocol are gratefully acknowledged.

+

C.2 Participants

+

OData TC Members:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
First NameLast NameCompany
GeorgeEricsonDell
HubertHeijkersIBM
LingJinIBM
StefanHagenIndividual
MichaelPizzoMicrosoft
ChristofSprengerMicrosoft
RalfHandlSAP SE
GeraldKrauseSAP SE
HeikoTheißenSAP SE
MarkBiamonteProgress Software
MartinZurmühlSAP SE
+
+

Appendix D. Revision History

+ + + + + + + + + + + + + + + + + + + +
RevisionDateEditorChanges Made
Working Draft 012023-07-20Ralf HandlImport material from OData JSON Format Version 4.01
+
+

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.

+

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.

+

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.

+ + diff --git a/docs/odata-json-format/odata-json-format.md b/docs/odata-json-format/odata-json-format.md new file mode 100644 index 000000000..97242b4cf --- /dev/null +++ b/docs/odata-json-format/odata-json-format.md @@ -0,0 +1,1287 @@ + +![OASIS Logo](https://docs.oasis-open.org/templates/OASISLogo-v3.0.png) + +------- + +# OData JSON Format Version 4.02 + +## Committee Specification Draft 01 + +## 14 July 2023 + +  + +#### This stage: +https://docs.oasis-open.org/odata/odata-json-format/v4.02/csd01/odata-json-format-v4.02-csd01.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata-json-format/v4.02/csd01/odata-json-format-v4.02-csd01.html \ +https://docs.oasis-open.org/odata/odata-json-format/v4.02/csd01/odata-json-format-v4.02-csd01.pdf + +#### Previous stage: +N/A + +#### Latest stage: +https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html \ +https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.pdf + +#### Technical Committee: +[OASIS Open Data Protocol (OData) TC](https://www.oasis-open.org/committees/odata/) + +#### Chairs: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) + +#### Editors: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) \ +Heiko Theißen (heiko.theissen@sap.com), [SAP SE](http://www.sap.com/) + +#### Related work: +This specification replaces or supersedes: +* OData JSON Format Version 4.01. Edited by Michael Pizzo, Ralf Handl, and Mark Biamonte. OASIS Standard. Latest stage: https://docs.oasis-open.org/odata/odata-json-format/v4.01/odata-json-format-v4.01.html. +* OData JSON Format Version 4.0. Edited by Ralf Handl, Michael Pizzo, and Mark Biamonte. OASIS Standard. Latest stage: http://docs.oasis-open.org/odata/odata-json-format/v4.0/odata-json-format-v4.0.html. + +This specification is related to: +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + * _ABNF components: OData ABNF Construction Rules Version 4.02 and OData ABNF Test Cases_. https://docs.oasis-open.org/odata/odata/v4.02/csd01/abnf/ +* _OData Vocabularies Version 4.0_. Edited by Michael Pizzo, Ralf Handl, and Ram Jeyaraman. Latest stage: https://docs.oasis-open.org/odata/odata-vocabularies/v4.0/odata-vocabularies-v4.0.html +* _OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. Latest stage: https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.html +* _OData Common Schema Definition Language (CSDL) XML Representation Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. Latest stage: https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.html + +#### 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](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/. + +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). + +Note that any machine-readable content ([Computer Language Definitions](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsCompLang)) 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](#rfc2119)] and [[RFC8174](#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]** + +_OData JSON Format Version 4.02_. +Edited by Ralf Handl, Michael Pizzo, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. +https://docs.oasis-open.org/odata/odata-json-format/v4.02/csd01/odata-json-format-v4.02-csd01.html. +Latest stage: https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html. + +#### Notices +Copyright © OASIS Open 2023. All Rights Reserved. + +Distributed under the terms of the OASIS [IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/). + +The name "OASIS" is a trademark of [OASIS](https://www.oasis-open.org/), 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](#Notices). + +------- + +# Table of Contents + +::: toc +- [1 Introduction](#Introduction) + - [1.1 Changes from earlier Versions](#ChangesfromearlierVersions) + - [1.2 Glossary](#Glossary) + - [1.2.1 Definitions of terms](#Definitionsofterms) + - [1.2.2 Acronyms and abbreviations](#Acronymsandabbreviations) + - [1.2.3 Document conventions](#Documentconventions) +- [2 JSON Format Design](#JSONFormatDesign) +- [3 Requesting the JSON Format](#RequestingtheJSONFormat) + - [3.1 Controlling the Amount of Control Information in Responses](#ControllingtheAmountofControlInformationinResponses) + - [3.1.1 `metadata=minimal` (`odata.metadata=minimal`)](#metadataminimalodatametadataminimal) + - [3.1.2 `metadata=full` (`odata.metadata=full`)](#metadatafullodatametadatafull) + - [3.1.3 `metadata=none` (`odata.metadata=none`)](#metadatanoneodatametadatanone) + - [3.2 Controlling the Representation of Numbers](#ControllingtheRepresentationofNumbers) +- [4 Common Characteristics](#CommonCharacteristics) + - [4.1 Header Content-Type](#HeaderContentType) + - [4.2 Message Body](#MessageBody) + - [4.3 Relative URLs](#RelativeURLs) + - [4.4 Payload Ordering Constraints](#PayloadOrderingConstraints) + - [4.5 Control Information](#ControlInformation) + - [4.5.1 Control Information: `context` (`odata.context`)](#ControlInformationcontextodatacontext) + - [4.5.2 Control Information: `metadataEtag` (`odata.metadataEtag`)](#ControlInformationmetadataEtagodatametadataEtag) + - [4.5.3 Control Information: `type` (`odata.type`)](#ControlInformationtypeodatatype) + - [4.5.4 Control Information: `count` (`odata.count`)](#ControlInformationcountodatacount) + - [4.5.5 Control Information: `nextLink` (`odata.nextLink`)](#ControlInformationnextLinkodatanextLink) + - [4.5.6 Control Information: `delta` (`odata.delta`)](#ControlInformationdeltaodatadelta) + - [4.5.7 Control Information: `deltaLink` (`odata.deltaLink`)](#ControlInformationdeltaLinkodatadeltaLink) + - [4.5.8 Control Information: `id` (`odata.id`)](#ControlInformationidodataid) + - [4.5.9 Control Information: `editLink` and `readLink` (`odata.editLink` and `odata.readLink`)](#ControlInformationeditLinkandreadLinkodataeditLinkandodatareadLink) + - [4.5.10 Control Information: `etag` (`odata.etag`)](#ControlInformationetagodataetag) + - [4.5.11 Control Information: `navigationLink` and `associationLink` (`odata.navigationLink` and `odata.associationLink`)](#ControlInformationnavigationLinkandassociationLinkodatanavigationLinkandodataassociationLink) + - [4.5.12 Control Information: `media*` (`odata.media*`)](#ControlInformationmediaodatamedia) + - [4.5.13 Control Information: `removed` (`odata.removed`)](#ControlInformationremovedodataremoved) + - [4.5.14 Control Information: `collectionAnnotations` (`odata.collectionAnnotations`)](#ControlInformationcollectionAnnotationsodatacollectionAnnotations) +- [5 Service Document](#ServiceDocument) +- [6 Entity](#Entity) +- [7 Structural Property](#StructuralProperty) + - [7.1 Primitive Value](#PrimitiveValue) + - [7.2 Complex Value](#ComplexValue) + - [7.3 Collection of Primitive Values](#CollectionofPrimitiveValues) + - [7.4 Collection of Complex Values](#CollectionofComplexValues) + - [7.5 Untyped Value](#UntypedValue) +- [8 Navigation Property](#NavigationProperty) + - [8.1 Navigation Link](#NavigationLink) + - [8.2 Association Link](#AssociationLink) + - [8.3 Expanded Navigation Property](#ExpandedNavigationProperty) + - [8.4 Deep Insert](#DeepInsert) + - [8.5 Bind Operation](#BindOperation) + - [8.6 Collection ETag](#CollectionETag) +- [9 Stream Property](#StreamProperty) +- [10 Media Entity](#MediaEntity) +- [11 Individual Property or Operation Response](#IndividualPropertyorOperationResponse) +- [12 Collection of Operation Responses](#CollectionofOperationResponses) +- [13 Collection of Entities](#CollectionofEntities) +- [14 Entity Reference](#EntityReference) +- [15 Delta Payload](#DeltaPayload) + - [15.1 Delta Responses](#DeltaResponses) + - [15.2 Added/Changed Entity](#AddedChangedEntity) + - [15.3 Deleted Entity](#DeletedEntity) + - [15.4 Added Link](#AddedLink) + - [15.5 Deleted Link](#DeletedLink) + - [15.6 Update a Collection of Entities](#UpdateaCollectionofEntities) +- [16 Bound Function](#BoundFunction) +- [17 Bound Action](#BoundAction) +- [18 Action Invocation](#ActionInvocation) +- [19 Batch Requests and Responses](#BatchRequestsandResponses) + - [19.1 Batch Request](#BatchRequest) + - [19.2 Referencing New Entities](#ReferencingNewEntities) + - [19.3 Referencing an ETag](#ReferencinganETag) + - [19.4 Processing a Batch Request](#ProcessingaBatchRequest) + - [19.5 Batch Response](#BatchResponse) + - [19.6 Asynchronous Batch Requests](#AsynchronousBatchRequests) +- [20 Instance Annotations](#InstanceAnnotations) + - [20.1 Annotate a JSON Object](#AnnotateaJSONObject) + - [20.2 Annotate a JSON Array or Primitive](#AnnotateaJSONArrayorPrimitive) + - [20.3 Annotate a Primitive Value within a JSON Array](#AnnotateaPrimitiveValuewithinaJSONArray) +- [21 Error Handling](#ErrorHandling) + - [21.1 Error Response](#ErrorResponse) + - [21.2 In-Stream Error](#InStreamError) + - [21.3 Error Information in a Success Payload](#ErrorInformationinaSuccessPayload) + - [21.3.1 Primitive Value Errors](#PrimitiveValueErrors) + - [21.3.2 Structured Type Errors](#StructuredTypeErrors) + - [21.3.3 Collection Errors](#CollectionErrors) +- [22 Extensibility](#Extensibility) +- [23 Conformance](#Conformance) +- [A References](#References) + - [A.1 Normative References](#NormativeReferences) + - [A.2 Informative References ](#InformativeReferences) +- [B Safety, Security and Privacy Considerations](#SafetySecurityandPrivacyConsiderations) +- [C Acknowledgments](#Acknowledgments) + - [C.1 Special Thanks](#SpecialThanks) + - [C.2 Participants](#Participants) +- [D Revision History](#RevisionHistory) +- [E Notices](#Notices) +::: + +------- + +# 1 Introduction + +The OData protocol is comprised of a set of specifications for representing and interacting with structured content. The core specification for the protocol is in [OData-Protocol](#ODataProtocol); this document is an extension of the core protocol. This document defines representations for the OData requests and responses using the JavaScript Object Notation (JSON), see [RFC8259]. + +An OData JSON payload may represent: + +- a [single primitive value](#PrimitiveValue) +- a [collection of primitive values](#CollectionofPrimitiveValues) +- a [single complex type value](#ComplexValue) +- a [collection of complex type values](#CollectionofComplexValues) +- a [single entity](#Entity) or [entity reference](#EntityReference) +- a [collection of entities](#CollectionofEntities) or [entity references](#EntityReference) +- a [collection of changes](#DeltaPayload) +- a [service document](#ServiceDocument) describing the top-level resources exposed by the service +- an [error](#ErrorResponse). + +## 1.1 Changes from earlier Versions + + + + +## 1.2 Glossary + +### 1.2.1 Definitions of terms + + +TODO: find out why we need a $dummy$ formula to get `monospace` look as we want it. + +### 1.2.2 Acronyms and abbreviations + + + +### 1.2.3 Document conventions + +Keywords defined by this specification use `this monospaced font`. + +Some sections of this specification are illustrated with non-normative examples. + +::: example +Example 1: text describing an example uses this paragraph style +``` +Non-normative examples use this paragraph style. +``` +::: + +All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading. + +All other text is normative unless otherwise labeled. + +::: example +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 + -t html + -o odata-json-format-v4.02-csd01.html + -c styles/markdown-styles-v1.7.3b.css + -c styles/odata.css + -s + --mathjax + --eol=lf + --wrap=none + --metadata pagetitle="OData JSON Format Version 4.02" + odata-json-format-v4.02-csd01.md +``` + +This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2. +::: + +------- + +# 2 JSON Format Design + +JSON, as described in [RFC8259](#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](#InstanceAnnotations) 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](#PayloadOrderingConstraints). + +------- + +# 3 Requesting the JSON Format + +The OData JSON format can be requested using the `$format` +query option in the request URL with the media type +`application/json`, optionally followed by format parameters, +or the case-insensitive abbreviation `json` which MUST NOT be +followed by format parameters. + +Alternatively, this format can be requested using the +`Accept` header with the media type +`application/json`, optionally followed by format parameters. + +If specified, `$format` overrides any value specified in the +`Accept` header. + +Possible format parameters are: + +- [`ExponentialDecimals`](#ControllingtheRepresentationofNumbers) +- [`IEEE754Compatible`](#ControllingtheRepresentationofNumbers) +- [`metadata`](#ControllingtheAmountofControlInformationinResponses) +- [`streaming`](#PayloadOrderingConstraints) + +The names and values of these format parameters are case-insensitive. + +Services SHOULD advertise the supported media types by annotating the +entity container with the term +[`Capabilities.SupportedFormats`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Capabilities.V1.md#SupportedFormats) +defined in [OData-VocCap](#ODataVocCap), listing all +available formats and combinations of supported format parameters. + + +## 3.1 Controlling the Amount of Control Information in Responses + +The amount of [control information](#ControlInformation) needed (or +desired) in the payload depends on the client application and device. +The `metadata` parameter can be applied to the +`Accept` header of an OData request to influence how much +control information will be included in the response. + +Other `Accept` header parameters (e.g., +`streaming`) are orthogonal to the `metadata` +parameter and are therefore not mentioned in this section. + +If a client prefers a very small wire size and is intelligent enough to +compute data using metadata expressions, the `Accept` header +should include +[`metadata=minimal`](#metadataminimalodatametadataminimal). +If computation is more critical than wire size or the client is +incapable of computing control information, +[`metadata=full`](#metadatafullodatametadatafull) +directs the service to inline the control information that normally +would be computed from metadata expressions in the payload. +[`metadata=none`](#metadatanoneodatametadatanone) +is an option for clients that have out-of-band knowledge or don\'t +require control information. + +In addition, the client may use the `include-annotations` +preference in the `Prefer` header to request additional +control information. Services supporting this MUST NOT omit control +information required by the chosen `metadata` parameter, and +services MUST NOT exclude the +[`nextLink`](#ControlInformationnextLinkodatanextLink), +[`deltaLink`](#ControlInformationdeltaLinkodatadeltaLink), and +[`count`](#ControlInformationcountodatacount) +if they are required by the response type. + +If the client includes the +`OData-MaxVersion` header in a +request and does not specify the +`metadata` format parameter in +either the `Accept` header or `$format` query +option, the service MUST return at least the [minimal control +information](#metadataminimalodatametadataminimal). + +Note that in OData 4.0 the `metadata` 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. + +### 3.1.1 `metadata=minimal` (`odata.metadata=minimal`) + +The `metadata=minimal` format parameter indicates that the +service SHOULD remove computable control information from the payload +wherever possible. The response payload MUST contain at least the +following [control information](#ControlInformation): + +- [`context`](#ControlInformationcontextodatacontext): + the root context URL of the payload and the context URL for any deleted + entries or added or deleted links in a delta response, or for entities + or entity collections whose set cannot be determined from the root + context URL +- [`etag`](#ControlInformationetagodataetag): + the ETag of the entity or collection, as appropriate +- [`count`](#ControlInformationcountodatacount): + the total count of a collection of entities or collection of entity + references, if requested +- [`nextLink`](#ControlInformationnextLinkodatanextLink): + the next link of a collection with partial results +- [`deltaLink`](#ControlInformationdeltaLinkodatadeltaLink): + the delta link for obtaining changes to the result, if requested + +In addition, control information MUST appear in the payload for cases +where actual values are not the same as the computed values and MAY +appear otherwise. When control information appears in the payload, it is +treated as exceptions to the computed values. + +Media entities and stream properties MAY in addition contain the +following control information: + +- [`mediaEtag`](#ControlInformationmediaodatamedia): + the ETag of the stream, as appropriate +- [`mediaContentType`](#ControlInformationmediaodatamedia): + the media type of the stream + +### 3.1.2 `metadata=full` (`odata.metadata=full`) + +The `metadata=full` format parameter indicates that the +service MUST include all control information explicitly in the payload. + +The full list of control information that may appear in a +`metadata=full` response is as follows: + +- [`context`](#ControlInformationcontextodatacontext): + the context URL for a collection, entity, primitive value, or service + document. +- [`count`](#ControlInformationcountodatacount): + the total count of a collection of entities or collection of entity + references, if requested. +- [`nextLink`](#ControlInformationnextLinkodatanextLink): + the next link of a collection with partial results +- [`deltaLink`](#ControlInformationdeltaLinkodatadeltaLink): + the delta link for obtaining changes to the result, if requested +- [`id`](#ControlInformationidodataid): + the ID of the entity +- [`etag`](#ControlInformationetagodataetag): + the ETag of the entity or collection, as appropriate +- [`readLink`](#ControlInformationeditLinkandreadLinkodataeditLinkandodatareadLink): + the link used to read the entity, if the edit link cannot be used to + read the entity +- [`editLink`](#ControlInformationeditLinkandreadLinkodataeditLinkandodatareadLink): + 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`](#NavigationLink): + the link used to retrieve the values of a navigation property +- [`associationLink`](#AssociationLink): + the link used to describe the relationship between this entity and + related entities +- [`type`](#ControlInformationtypeodatatype): + 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)](#ControlInformationtypeodatatype). + +Media entities and stream properties may in addition contain the +following control information: + +- [`mediaReadLink`](#ControlInformationmediaodatamedia): + the link used to read the stream +- [`mediaEditLink`](#ControlInformationmediaodatamedia): + the link used to edit/update the stream +- [`mediaEtag`](#ControlInformationmediaodatamedia): + the ETag of the stream, as appropriate +- [`mediaContentType`](#ControlInformationmediaodatamedia): + the media type of the stream + +### 3.1.3 `metadata=none` (`odata.metadata=none`) + +The `metadata=none` format parameter indicates that the +service SHOULD omit control information other than +[`nextLink`](#ControlInformationnextLinkodatanextLink) and +[`count`](#ControlInformationcountodatacount). +This control information MUST continue to be included, as applicable, +even in the `metadata=none` case. + +It is not valid to specify `metadata=none` on a [delta +request](#DeltaPayload). + +## 3.2 Controlling the Representation of Numbers + +The `IEEE754Compatible=true` format parameter indicates that +the service MUST serialize `Edm.Int64` and +`Edm.Decimal` numbers (including the +[`count`](#ControlInformationcountodatacount), +if requested) as strings. This is in conformance with +[RFC7493](#rfc7493). + +If not specified, or specified as `IEEE754Compatible=false`, +all numbers MUST be serialized as JSON numbers. + +This enables support for JavaScript numbers that are defined to be +64-bit binary format IEEE 754 values (see **[[ECMAScript](#ECMAScript), [section 4.3.1.9](http://www.ecma-international.org/ecma-262/5.1/#sec-4.3.19)]**) +resulting in integers losing precision past 15 digits, and decimals +losing precision due to the conversion from base 10 to base 2. + +OData JSON request and response payloads that format +`Edm.Int64` and `Edm.Decimal` values as strings +MUST specify this format parameter in the media type sent in the +[`Content-Type`](#HeaderContentType) +header. + +Services producing responses without format parameter +`IEEE754Compatible=true` which are unable to produce exact +JSON numbers MAY serialize `Edm.Int64` and +`Edm.Decimal` numbers with a rounded/inexact value as a JSON +number and annotate that value with an instance annotation with term +`Core.ValueException` defined in +[OData-VocCore](#ODataVocCore) containing the exact value as a +string. This situation can for example happen if the client only accepts +`application/json` without any format parameters and the +service is written in JavaScript. + +For payloads with an `OData-Version` header equal to +`4.0` +the `ExponentialDecimals=true` format parameter indicates +that the service MAY serialize `Edm.Decimal` numbers in +exponential notation (e.g. `1e-6` instead of +`0.000001`). + +The sender of a request MUST specify +`ExponentialDecimals=true` in the `Content-Type` +header if the request body contains `Edm.Decimal` values in +exponential notation. + +If not specified, or specified as +`ExponentialDecimals=false`, all `Edm.Decimal` +values MUST be serialized in long notation, using only an optional sign, +digits, and an optional decimal point followed by digits. + +Payloads with an `OData-Version` header equal to `4.01` +or greater always allow exponential notation for numbers and the +`ExponentialDecimals` format parameter is not needed or used. + +------- + +# 4 Common Characteristics + +This section describes common characteristics of the representation for +OData values in JSON. A request or response body consists of several +parts. It contains OData values as part of a larger document. Requests +and responses are structured almost identical; the few existing +differences will be explicitly called out in the respective subsections. + +# 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. + +Responses MUST include the +[`metadata`](#ControllingtheAmountofControlInformationinResponses) +parameter to specify the amount of metadata included in the response. + +Requests and responses MUST include the +[`IEEE754Compatible`](#ControllingtheRepresentationofNumbers) +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](#PayloadOrderingConstraints). + +# 4.2 Message Body + +Each message body is represented as a single JSON object. This object is +either the representation of an [entity](#Entity), +an [entity reference](#EntityReference) or a +[complex type instance](#ComplexValue), or it contains a name/value +pair whose name MUST be `value` and whose value is the correct +representation for a [primitive value](#PrimitiveValue), a +[collection of primitive values](#CollectionofPrimitiveValues), a +[collection of complex values](#CollectionofComplexValues), a +[collection of entities](#CollectionofEntities), or a collection of +objects that represent [changes to a previous +result](#DeltaPayload). + +Client libraries MUST retain the +order of objects within an array in JSON responses. + +# 4.3 Relative URLs + +URLs present in a payload (whether request or response) MAY be +represented as relative URLs. + +Relative URLs, other than those in +[`type`](#ControlInformationtypeodatatype), +are relative to their base URL, which is + +- the [context URL](#ControlInformationcontextodatacontext) of the same + JSON object, if one exists, otherwise +- the context URL of the enclosing object, if one exists, otherwise +- the context URL of the next enclosing object, if one exists, etc. until the + document root, otherwise +- the request URL. + +For context URLs, these rules apply starting with the second bullet +point. + +Within the +[`type`](#ControlInformationtypeodatatype) +control information, relative URLs are relative to the base type URL, +which is + +- the `type` of the enclosing object, if one exists, otherwise +- the `type` of the next enclosing object, if one exists, etc. + until the document root, otherwise +- the context URL of the document root, if one exists, otherwise +- the request URL. + +Processors expanding the URLs MUST use normal URL expansion rules as +defined in [RFC3986](#rfc3986). This means that if the base URL is a +context URL, the part starting with `$metadata#` is ignored +when resolving the relative URL. + +Clients that receive relative URLs in response payloads SHOULD use the +same relative URLs, where appropriate, in request payloads (such as +[bind operations](#BindOperation) and batch requests) and in system +query options (such as `$id`). + +URLs represented as a string within a JSON payload, including [batch +requests](#BatchRequest), must follow standard OData encoding rules. +For relative URLs this means that colons in the path part, especially +within key values, MUST be percent-encoded to avoid confusion with the +scheme separator. Colons within the query part, i.e. after the question +mark character (`?`), need not be percent-encoded. + +::: example +Example 2: +```json +{ + "@context": "http://host/service/$metadata#Customers/$entity", + ... + "@editLink": "Customers('ALFKI')", + ... + "Orders@navigationLink": "Customers('ALFKI')/Orders", + ... +} +``` +::: + +The resulting absolute URLs are +`http://host/service/Customers('ALFKI')` and +`http://host/service/Customers('ALFKI')/Orders`. + +# 4.4 Payload Ordering Constraints + +Ordering constraints MAY be imposed on the JSON payload in order to +support streaming scenarios. These ordering constraints MUST only be +assumed if explicitly specified as some clients (and services) might not +be able to control, or might not care about, the order of the JSON +properties in the payload. + +Clients can request that a JSON response conform to these ordering +constraints by specifying a media type of +[application/json]{style="font-family: +\"Courier New\""} with the `streaming=true` parameter in the +`Accept` header or +`$format` query option. Services +MUST return `406 Not Acceptable` if +the client only requests streaming and the service does not support it. + +Clients may specify the `streaming=true` parameter in the +`Content-Type` header of requests +to indicate that the request body follows the payload ordering +constraints. In the absence of this parameter, the service must assume +that the JSON properties in the request are unordered. + +Processors MUST only assume streaming support if it is explicitly +indicated in the `Content-Type` header via the +`streaming=true` parameter. + +::: example +Example 3: a payload with +``` +Content-Type: application/json;metadata=minimal;streaming=true +``` +can be assumed to support streaming, whereas a payload with +``` +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. + +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. +- The + `type` control information, if present, MUST appear next in + the JSON object. +- The `id` and `etag` control information MUST appear + before any property, property annotation, or property control + information. +- All annotations or control information for a structural or navigation + property MUST appear as a group immediately before the property itself. + The one exception is the + [`nextLink`](#ControlInformationnextLinkodatanextLink) + of a collection which MAY appear after the collection it annotates. +- All other control information can + appear anywhere in the payload as long as it does not violate any of the + above rules. +- For 4.0 payloads, annotations and control information for navigation + properties MUST appear after all structural properties. 4.01 clients + MUST NOT assume this ordering. + +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](#InstanceAnnotations) 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. + +# 4.5.1 Control Information: `context` (`odata.context`) + +The `context` control information +returns the context URL (see [OData-Protocol](#ODataProtocol)) for the +payload. This URL can be absolute or [relative](#RelativeURLs). + +The `context` control information +is not returned if +[`metadata=none`](#metadatanoneodatametadatanone)[ +]{.MsoHyperlink}is requested. Otherwise[ ]{.MsoHyperlink}it MUST be the +first property of any JSON response[. ]{.MsoHyperlink} + +The `context` control information +MUST also be included in requests and responses for entities whose +entity set cannot be determined from the context URL[ ]{.MsoHyperlink}of +the collection. + +For more information on the format of the context URL, see +[OData-Protocol](#ODataProtocol). + +Request payloads MAY include a context URL as a base URL for [relative +URLs](#RelativeURLs) in the request payload. + +::: example +Example 4: +```json +{ + "@context": "http://host/service/$metadata#Customers/$entity", + "@metadataEtag": "W/\"A1FF3E230954908F\"", + ... +} +``` +::: + +# 4.5.2 Control Information: `metadataEtag` (`odata.metadataEtag`) + +The `metadataEtag` control information MAY appear in a +response in order to specify the entity tag (ETag) that can be used to +determine the version of the metadata of the response. If an ETag is +returned when requesting the metadata document, then the service SHOULD +set the `metadataEtag` control information to the metadata +document\'s ETag in all responses when using +[`metadata=minimal`](#metadataminimalodatametadataminimal) +or +[`metadata=full`](#metadatafullodatametadatafull). +If no ETag is returned when requesting the metadata document, then the +service SHOULD NOT set the `metadataEtag` control information +in any responses. + +For details on how ETags are used, see [OData-Protocol](#ODataProtocol). + +# 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](#ControlInformationcontextodatacontext). + +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](#ODataProtocol). + +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](#ODataCSDL) or +[OData-CSDLXML](#ODataCSDL). + +The `type` control information MUST appear in requests and in +responses with [minimal](#metadataminimalodatametadataminimal) or +[full](#metadatafullodatametadatafull) metadata, if the type cannot +be heuristically determined, as described below, and one of the +following is true: + +- The type is derived from the type specified for the (collection of) entities + or (collection of) complex type instances, or +- The type is for a property whose type is not declared in + `$metadata`. + +The following heuristics are used to determine the primitive type of a +dynamic property in the absence of the `type` control +information: + +- Boolean values have a first-class representation in JSON and do not need any + additional control information. +- Numeric values have a first-class representation in JSON but are not further + distinguished, so they include a + [`type`](#ControlInformationtypeodatatype) + 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`](#ControlInformationtypeodatatype) + 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`](#ControllingtheRepresentationofNumbers) + 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. + +For more information on namespace- and alias-qualified names, see +[OData-CSDLJSON](#ODataCSDL) or +[OData-CSDLXML](#ODataCSDL). + +::: example +Example 5: entity of type +`Model.VipCustomer` defined in the +metadata document of the same service with a dynamic property of type +`Edm.Date` +```json +{ + "@context": "http://host/service/$metadata#Customers/$entity", + "@type": "#Model.VipCustomer", + "ID": 2, + "DynamicValue@type": "Date", + "DynamicValue": "2016-09-22", + ... +} +``` +::: + +::: example +Example 6: entity of type +`Model.VipCustomer` defined in the +metadata` `document of a different +service +```json +{ + "@context": "http://host/service/$metadata#Customers/$entity", + "@type": "http://host/alternate/$metadata#Model.VipCustomer", + "ID": 2, + ... +} +``` +::: + +# 4.5.4 Control Information: `count` (`odata.count`) + +# 4.5.5 Control Information: `nextLink` (`odata.nextLink`) + +# 4.5.6 Control Information: `delta` (`odata.delta`) + +# 4.5.7 Control Information: `deltaLink` (`odata.deltaLink`) + +# 4.5.8 Control Information: `id` (`odata.id`) + +# 4.5.9 Control Information: `editLink` and `readLink` (`odata.editLink` and `odata.readLink`) + +# 4.5.10 Control Information: `etag` (`odata.etag`) + +# 4.5.11 Control Information: `navigationLink` and `associationLink` (`odata.navigationLink` and `odata.associationLink`) + +# 4.5.12 Control Information: `media*` (`odata.media*`) + +# 4.5.13 Control Information: `removed` (`odata.removed`) + +# 4.5.14 Control Information: `collectionAnnotations` (`odata.collectionAnnotations`) + + +------- + +# 5 Service Document + +------- + +# 6 Entity + +------- + +# 7 Structural Property + +# 7.1 Primitive Value + +# 7.2 Complex Value + +# 7.3 Collection of Primitive Values + +# 7.4 Collection of Complex Values + +# 7.5 Untyped Value + +------- + +# 8 Navigation Property + +# 8.1 Navigation Link + +# 8.2 Association Link + +# 8.3 Expanded Navigation Property + +# 8.4 Deep Insert + +# 8.5 Bind Operation + +# 8.6 Collection ETag + +------- + +# 9 Stream Property + +------- + +# 10 Media Entity + +------- + +# 11 Individual Property or Operation Response + +------- + +# 12 Collection of Operation Responses + +------- + +# 13 Collection of Entities + +------- + +# 14 Entity Reference + +------- + +# 15 Delta Payload + +# 15.1 Delta Responses + +# 15.2 Added/Changed Entity + +# 15.3 Deleted Entity + +# 15.4 Added Link + +# 15.5 Deleted Link + +# 15.6 Update a Collection of Entities + +------- + +# 16 Bound Function + +------- + +# 17 Bound Action + +------- + +# 18 Action Invocation + +------- + +# 19 Batch Requests and Responses + +# 19.1 Batch Request + +# 19.2 Referencing New Entities + +# 19.3 Referencing an ETag + +# 19.4 Processing a Batch Request + +# 19.5 Batch Response + +# 19.6 Asynchronous Batch Requests + +------- + +# 20 Instance Annotations + +# 20.1 Annotate a JSON Object + +# 20.2 Annotate a JSON Array or Primitive + +# 20.3 Annotate a Primitive Value within a JSON Array + +------- + +# 21 Error Handling + +# 21.1 Error Response + +# 21.2 In-Stream Error + +# 21.3 Error Information in a Success Payload + +# 21.3.1 Primitive Value Errors + +# 21.3.2 Structured Type Errors + +# 21.3.3 Collection Errors + +------- + +# 22 Extensibility + +------- + +# 23 Conformance + +Conforming clients MUST be prepared to consume a service that uses any or all of the constructs defined in this specification. The exception to this are the constructs defined in Delta Response, which are only required for clients that request changes. + + + +In order to be a conforming consumer of the OData JSON format, a client or service: + +1. MUST either: + 1. understand `metadata=minimal` ([section 3.1.1](#metadataminimalodatametadataminimal)) or + 2. explicitly specify `metadata=none` ([section 3.1.3](#metadatanoneodatametadatanone)) or `metadata=full` ([section 3.1.2](#metadatafullodatametadatafull)) in the request (client) +2. MUST be prepared to consume a response with full metadata +3. MUST be prepared to receive all data types ([section 7.1](#PrimitiveValue)) + 1. defined in this specification (client) + 2. exposed by the service (service) +4. MUST interpret all `odata` control information defined according to the `OData-Version` header of the payload ([section 4.5](#ControlInformation)) +5. MUST be prepared to receive any annotations and control information not defined in the `OData-Version` header of the payload ([section 20](#InstanceAnnotations)) +6. MUST NOT require `streaming=true` in the `Content-Type` header ([section 4.4](#PayloadOrderingConstraints)) +7. MUST be a conforming consumer of the OData 4.0 JSON format, for payloads with an `OData-Version` header value of `4.0`. + 1. MUST accept the `odata.` prefix, where defined, on format parameters and control information + 2. MUST accept the `#` prefix in `@odata.type` values + 3. MUST be prepared to handle binding through the use of the `@odata.bind` property in payloads to a `PATCH`, `PUT`, or `POST` request + 4. MUST accept `TargetId` within in a deleted link for a relationship with a maximum cardinality of one + 5. MUST accept the string values `-INF`, `INF`, and `NaN` for single and double values + 6. MUST support property annotations that appear immediately before or after the property they annotate +8. MAY be a conforming consumer of the OData 4.01 JSON format, for payloads with an `OData-Version` header value of `4.01`. + 1. MUST be prepared to interpret control information with or without the `odata.` prefix + 2. MUST be prepared for `@odata.type` primitive values with or without the `#` prefix + 3. MUST be prepared to handle binding through inclusion of an entity reference within a collection-valued navigation property in the body of a `PATCH`, `PUT`, or `POST` request + 4. MUST be prepared for `TargetId` to be included or omitted in a deleted link for a relationship with a maximum cardinality of one + 5. MUST accept the string values `-INF`, `INF`, and `NaN` for decimal values with floating scale + 6. MUST be prepared to handle related entities inline within a delta payload as well as a nested delta representation for the collection + 7. MUST be prepared to handle decimal values written in exponential notation + +In order to be a conforming producer of the OData JSON format, a client or service: + +9. MUST support generating OData 4.0 JSON compliant payloads with an `OData-Version` header value of `4.0`. + 1. MUST NOT omit the `odata.` prefix from format parameters or control information + 2. MUST NOT omit the `#` prefix from `@odata.type` values + 3. MUST NOT include entity values or entity references within a collection-valued navigation property in the body of a `PATCH`, `PUT`, or `POST` request + 4. MUST NOT return decimal values written in exponential notation unless the ExponentialDecimals format parameter is specified. + 5. MUST NOT advertise available actions or functions using name/value pairs prefixed with a property name + 6. MUST NOT return a null value for name/value pairs representing actions or functions that are not available + 7. MUST NOT represent numeric value exceptions for values other than single and double values using the string values `-INF`, `INF`, and `NaN` +10. MAY support generating OData 4.01 JSON compliant payloads for requests with an `OData-Version` header value of `4.01`. + 1. MUST return property annotations immediately before the property they annotate + 2. SHOULD omit the `odata.` prefix from format parameters and control information + 3. SHOULD omit the `#` prefix from `@type` primitive values + 4. MAY include inline related entities or nested delta collections within a delta payload + 5. MAY include `TargetId` within a deleted link for a relationship with a maximum cardinality of 1 + 6. MAY return decimal values written in exponential notation + 7. MAY represent numeric value exceptions for decimal values with floating scale using the string values `-INF`, `INF`, and `NaN` + +In addition, in order to conform to the OData JSON format, a service: + +11. MUST comply with one of the conformance levels defined in [OData-Protocol](#ODataProtocol) +12. MUST support the `application/json` media type in the `Accept` header ([section 3](#RequestingtheJSONFormat)) +13. MUST return well-formed JSON payloads +14. MUST support `odata.metadata=full` ([section 3.1.2](#metadatafullodatametadatafull)) +15. MUST include the `odata.nextLink` control information in partial results for entity collections ([section 4.5.5](#ControlInformationnextLinkodatanextLink)) +16. MUST support entity instances with external metadata ([section 4.5.1](#ControlInformationcontextodatacontext)) +17. MUST support properties with externally defined data types ([section 4.5.3](#ControlInformationtypeodatatype)) +18. MUST NOT violate any other aspects of this OData JSON specification +19. SHOULD support the `$format` system query option ([section 3](#RequestingtheJSONFormat)) +20. MAY support the `odata.streaming=true` parameter in the `Accept` header ([section 4.4](#PayloadOrderingConstraints)) +21. MAY return full metadata regardless of `odata.metadata` ([section 3.1.2](#metadatafullodatametadatafull)) +22. MUST NOT omit null or default values unless the `omit-values` preference is specified in the `Prefer` request header and the `omit-values` preference is included in the `Preference-Applied` response header +23. MUST return OData JSON 4.0-compliant responses for requests with an `OData-MaxVersion` header value of `4.0` +24. MUST support OData JSON 4.0-compliant payloads in requests with an `OData-Version` header value of `4.0` +25. MUST support returning, in the final response to an asynchronous request, the `application/json` payload that would have been returned had the operation completed synchronously, wrapped in an `application/http` message + +In addition, in order to comply with the OData 4.01 JSON format, a service: + +26. SHOULD return the OData JSON 4.01 format for requests with an `OData-MaxVersion` header value of `4.01` +27. MUST support the OData JSON 4.01 format in request payloads for requests with an `OData-Version` header value of `4.01` +28. MUST honor the `odata.etag` control information within `PUT`, `PATCH` or `DELETE` payloads, if specified +29. MUST support returning, in the final response to an asynchronous request, the `application/json` payload that would have been returned had the operation completed synchronously + + +------- + +# Appendix A. References + +This appendix contains the normative and informative references that are used in this document. + +While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity. + +## A.1 Normative References + +The following documents are referenced in such a way that some or all of their content constitutes requirements of this document. + +###### [OData-ABNF] +_ABNF components: OData ABNF Construction Rules Version 4.02 and OData ABNF Test Cases._ +See link in "[Related work](#RelatedWork)" section on cover page. + +###### [OData-CSDL] +_OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02._ +See link in "[Related work](#RelatedWork)" section on cover page. + +_OData Common Schema Definition Language (CSDL) XML Representation Version 4.02._ +See link in "[Related work](#RelatedWork)" section on cover page. + +###### [OData-Protocol] +_OData Version 4.02. Part 1: Protocol._ +See link in "[Related work](#RelatedWork)" section on cover page. + +###### [OData-URL] +_OData Version 4.02. Part 2: URL Conventions._ +See link in "[Related work](#RelatedWork)" section on cover page. + +###### [OData-VocCap] +_OData Vocabularies Version 4.0: Capabilities Vocabulary._ +See link in "[Related work](#RelatedWork)" section on cover page. + +###### [OData-VocCore] +_OData Vocabularies Version 4.0: Core Vocabulary._ +See link in "[Related work](#RelatedWork)" 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_ +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. + +###### [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. + +###### [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. + +###### [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_ +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. + +## 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/. + +------- + +# Appendix B. Safety, Security and Privacy Considerations + +This specification raises no security issues. + +This section is provided as a service to the application developers, information providers, and users of OData version 4.0 giving some references to starting points for securing OData services as specified. OData is a REST-full multi-format service that depends on other services and thus inherits both sides of the coin, security enhancements and concerns alike from the latter. + +For JSON-relevant security implications please cf. at least the relevant subsections of [RFC8259](#rfc8259) as starting point. + +------- + +# Appendix C. Acknowledgments + +## C.1 Special Thanks + +The contributions of the OASIS OData Technical Committee members, enumerated in [OData-Protocol](#ODataProtocol) are gratefully acknowledged. + +## C.2 Participants + +**OData TC Members:** + +| First Name | Last Name | Company | +| :--- | :--- | :--- | +| George | Ericson | Dell | +| Hubert | Heijkers | IBM | +| Ling | Jin | IBM | +| Stefan | Hagen | Individual | +| Michael | Pizzo | Microsoft | +| Christof | Sprenger | Microsoft | +| Ralf | Handl | SAP SE | +| Gerald | Krause | SAP SE | +| Heiko | Theißen | SAP SE | +| Mark | Biamonte | Progress Software | +| Martin | Zurmühl | SAP SE | + +------- + +# Appendix D. Revision History + + + +| Revision | Date | Editor | Changes Made | +| :--- | :--- | :--- | :--- | +| Working Draft 01 | 2023-07-20 | Ralf Handl | Import material from OData JSON Format Version 4.01 | + +------- + +# 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](https://www.oasis-open.org/policies-guidelines/ipr/) 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. + +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](https://www.oasis-open.org/), 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.pdf b/docs/odata-json-format/odata-json-format.pdf new file mode 100644 index 000000000..1a8efa109 Binary files /dev/null and b/docs/odata-json-format/odata-json-format.pdf differ diff --git a/docs/odata-json-format/styles/markdown-styles-v1.7.3b.css b/docs/odata-json-format/styles/markdown-styles-v1.7.3b.css new file mode 100644 index 000000000..f102f0ace --- /dev/null +++ b/docs/odata-json-format/styles/markdown-styles-v1.7.3b.css @@ -0,0 +1,91 @@ +/* OASIS specification styles for HTML generated from Markdown or similar sources */ +/* usually used after basic w3.css */ +/* Paul Knight 2018-09-27 */ +/* pk 2018-10-01 - v1.2 reduced section header and title (h*) font sizes */ +/* pk 2018-10-02 - v1.3 added right margin; allowed text wrapping in code blocks and scrolling for overflowing text */ +/* pk 2018-10-19 - v1.4 added display:inline to avoid page-wide background coloring */ +/* pk 2018-10-25 - v1.5 added use of
as citation tag for References section or elsewhere */ +/* pk 2018-10-26 - v1.5.1 (experimental) and v1.6 added use of
as a page break when generating PDF from the HTML */ +/* pk 2018-11-14 - v1.6.1 - lighter gray background color for code blocks */ +/* pk 2019-02-18 - v1.7 - Use Liberation Sans and Liberation Mono fonts if possible */ +/* pk 2019-02-18 - v1.7.1 (experimental) changed px to pt (and reduced numbers) for fonts and tables; added bigtitle style */ +/* pk 2019-05-23 - v1.7.2 (based on 1.7.1) changed monospace "code" font to Courier New */ +/* pk 2019-08-01 - v1.7.3 substitute PostScript name for fonts (LiberationSans for "Liberation Sans" and CourierNew for "Courier New") to address a flaw in "wkhtmltopdf" which rendered all text as bold. Changed "bigtitle" to "h1big"*/ +/* dk 2020-10-21 - v1.7.3a (unofficial for jadn, based on 1.7.3) update block quotes and code blocks */ +/* Heiko Theißen 2023-06-02 - v1.7.3b (unofficial for odata-data-aggregation-ext, based on v1.7.3a) include local font names "Liberation Sans" and "Courier New" */ + +body { + margin-left: 3pc; + margin-right: 3pc; + font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif; + font-size:12pt; + line-height:1.2; + } + +html{overflow-x:auto} + + /* styles for section headings - levels 1-5 (maybe include heading1, etc. later) */ +h1{font-size:18pt}h2{font-size:14pt}h3{font-size:13pt}h4{font-size:12pt}h5{font-size:11pt} +h1big{font-size: 24pt} +h1,h2,h3,h4,h5,h1big{font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif;font-weight: bold;margin:8pt 0;color: #446CAA} + /* style for h6, for use as Reference tag */ +h6{font-size:12pt; line-height:1.0} +h6{font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif;font-weight: bold;margin:0pt;} + /* not needed - can just use brackets in the label itself */ + /* h6::before {content: "["} */ + /* h6::after {content: "]"} */ + + /* style for hr to insert a page break before each ruled line (generated in markdown by 3 or more hyphens alone on a line) */ +hr{page-break-before: always;} + + +/* Table styles - bordered with option for striped */ +table { + border-collapse: collapse; +} + +table { + border-collapse:collapse; + border-spacing:0; + width:100%; + display:table; + font-size:12pt; + margin-top: 6pt; + } + +table, th, td { + border: 1pt solid black; + padding:6pt 6pt; + text-align:left; + vertical-align:top; +} +th { + color:#ffffff; + background-color: #446CAA; + } + /* "table-striped" tag is not generated by pandoc - add manually in HTML if wanted */ +.table-striped tbody tr:nth-child(even){background-color:#d6f3ff} + +/* style for code blocks */ +pre { + background-color:#f0f0f0; + padding: 6px; +} + +code,kbd,samp{ + font-family:CourierNew, "Courier New", monospace; + white-space: pre-wrap; + font-size: 10pt; +} + +/* offset block quote */ +blockquote { + background-color:#f0f0f0; + padding-left: 10px; + border-left: solid lightgray 6px; +} + +/* space bullets a bit */ +li { + margin: 3px 0; +} diff --git a/docs/odata-json-format/styles/odata.css b/docs/odata-json-format/styles/odata.css new file mode 100644 index 000000000..4efa4b885 --- /dev/null +++ b/docs/odata-json-format/styles/odata.css @@ -0,0 +1,188 @@ +a:target { + background-color: yellow; +} + +a[href^="#OData"], +a[href^="#RFC"], +a[href^="#SQL"] { + font-weight: bold; +} + +a[href^="#OData"]::before, +a[href^="#RFC"]::before, +a[href^="#SQL"]::before { + content: "["; + font-weight: bold; +} + +a[href^="#OData"]::after, +a[href^="#RFC"]::after, +a[href^="#SQL"]::after { + content: "]"; + font-weight: bold; +} + +.toc li { + list-style-type: none; +} + +.example, +.example table { + font-size: smaller; +} + +.example p, +.example li { + font-style: italic; +} + +table { + width: auto; +} + +.example table, +.example th, +.example td { + padding: 2pt 6pt; + white-space: nowrap; +} + +.example td[rowspan] { + text-align: right; + vertical-align: middle; + border-style: dotted; +} + +.example th[colspan] { + text-align: center; +} + +.example-data { + position: relative; +} + +.example-data div { + position: absolute; +} + +.example-data p { + font-style: unset !important; +} + +.example-data svg { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; +} + +.cross tbody tr:first-of-type, +.cross tbody tr:nth-of-type(2), +.cross td:first-of-type, +.cross td:nth-of-type(2) { + font-weight: bold; + color: white; + background-color: #446CAA +} + +.cross tbody tr:first-of-type td:first-of-type, +.cross tbody tr:nth-of-type(2) td:first-of-type, +.cross tbody tr:first-of-type td:nth-of-type(2), +.cross tbody tr:nth-of-type(2) td:nth-of-type(2) { + border: none; + background-color: white; +} + +.example-data th:first-of-type:not(:last-of-type), +.legend tbody tr:first-of-type { + background-color: green; +} + +.nav th:nth-of-type(2), +.nav-2 th:nth-of-type(3), +.nav-2 th:nth-of-type(4), +.nav-2 th:nth-of-type(5), +.legend tbody tr:last-of-type { + background-color: rgb(255, 128, 0); +} + +.legend td { + font-weight: bold; + color: white; +} + +.example-data svg>path { + fill: none; + stroke: black; + stroke-width: 2; +} + +p code, +li code, +h1 code, +h2 code, +h3 code, +h4 code, +h5 code, +h6 code { + font-family: MJXZERO, MJXTEX-T; + font-size: 1em; + line-height: 0; +} + +.example p code, +.example li code { + font-style: initial; +} + +.example pre { + margin-left: 40px; +} + +h1 code, +h2 code, +h3 code, +h4 code, +h5 code, +h6 code { + font-size: unset; +} + +mjx-container { + font-size: unset !important; +} + +mjx-container[display=true] { + text-align: left !important; + margin-left: 40px !important; +} + +/* The following rule enables typewriter single quotes in maths, like $\hbox{\tt{'$Q$'}}$ */ +mjx-c.mjx-c2019::before { + content: "\27" !important; + padding-right: 0.525em !important; + font-family: MJXZERO, MJXTEX-T; +} + +code .er { + color: unset !important; + font-weight: unset !important; +} + +hr:first-of-type { + page-break-before: avoid; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + page-break-after: avoid; +} + +h2[id="22-example-data"] { + page-break-before: always; +} \ No newline at end of file diff --git a/docs/odata-protocol/odata-protocol.html b/docs/odata-protocol/odata-protocol.html new file mode 100644 index 000000000..5e505e113 --- /dev/null +++ b/docs/odata-protocol/odata-protocol.html @@ -0,0 +1,290 @@ + + + + + + + OData Version 4.01. Part 1: Protocol + + + + + + + + +

OASIS Logo

+
+

OData Version 4.02. Part 1: Protocol

+

Committee Specification Draft 01

+

14 July 2023

+

 

+

This stage:

+

https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part1-protocol.md (Authoritative)
+https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part1-protocol.html
+https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part1-protocol.pdf

+

Previous stage:

+

N/A

+

Latest stage:

+

https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.md (Authoritative)
+https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html
+https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.pdf

+

Technical Committee:

+

OASIS Open Data Protocol (OData) TC

+

Chairs:

+

Ralf Handl (ralf.handl@sap.com), SAP SE
+Michael Pizzo (mikep@microsoft.com), Microsoft

+

Editors:

+

Michael Pizzo (mikep@microsoft.com), Microsoft
+Ralf Handl (ralf.handl@sap.com), SAP SE
+Heiko Theißen (heiko.theissen@sap.com), SAP SE

+

Additional artifacts:

+

This prose specification is one component of a Work Product that also includes:

+ + +

This specification replaces or supersedes:

+ +

This specification is related to:

+ +

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.

+

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.

+

Citation format:

+

When referencing this specification the following citation format should be used:

+

[OData-v4.02-Part1]

+

OData Version 4.02. Part 1: Protocol. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part1-protocol.html. Latest stage: https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html.

+

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.

+

For complete copyright information please see the full Notices section in an Appendix below.

+
+

Table of Contents

+
+ +
+
+

1 Introduction

+ + +

1.1 Changes from earlier Versions

+ + + + +

1.2 Glossary

+

1.2.1 Definitions of terms

+ + +

TODO: find out why we need a \(dummy\) formula to get monospace look as we want it.

+

1.2.2 Acronyms and abbreviations

+ + +

1.2.3 Document conventions

+

Keywords defined by this specification use this monospaced font.

+

Some sections of this specification are illustrated with non-normative examples.

+
+

Example 1: text describing an example uses this paragraph style

+
Non-normative examples use this paragraph style.
+
+

All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading.

+

All other text is normative unless otherwise labeled.

+
+

Here is a customized command line which will generate HTML from this markdown file (named odata-v4.02-csd01-part1-protocol.md). Line breaks are added for readability only:

+
pandoc -f gfm+tex_math_dollars+fenced_divs
+       -t html
+       -o odata-v4.02-csd01-part1-protocol.html
+       -c styles/markdown-styles-v1.7.3b.css
+       -c styles/odata.css
+       -s
+       --mathjax
+       --eol=lf
+       --wrap=none
+       --metadata pagetitle="OData Version 4.01. Part 1: Protocol"
+       odata-v4.02-csd01-part1-protocol.md
+

This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2.

+
+
+

2 Section Heading

+

text.

+

2.1 Level 2 Heading

+

text.

+

2.1.1 Level 3 Heading

+

text.

+

2.1.1.1 Level 4 Heading

+

text.

+
2.1.1.1.1 Level 5 Heading
+

This is the deepest level, because six # gets transformed into a Reference tag.

+

2.2 Next Heading

+

text.

+
+

3 Conformance

+ + +

(Note: The [OASIS TC Process](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsConfClause) requires that a specification approved by the TC at the Committee Specification Public Review Draft, Committee Specification or OASIS Standard level must include a separate section, listing a set of numbered conformance clauses, to which any implementation of the specification must adhere in order to claim conformance to the specification (or any optional portion thereof). This is done by listing the conformance clauses here. For the definition of "conformance clause," see [OASIS Defined Terms](https://www.oasis-open.org/policies-guidelines/oasis-defined-terms-2018-05-22/#dConformanceClause).

+

See "Guidelines to Writing Conformance Clauses": https://docs.oasis-open.org/templates/TCHandbook/ConformanceGuidelines.html.

+

Remove this note before submitting for publication.)

+
+

Appendix A. References

+ + +

This appendix contains the normative and informative references that are used in this document.

+

While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity.

+

A.1 Normative References

+

The following documents are referenced in such a way that some or all of their content constitutes requirements of this document.

+

(Reference sources: For references to IETF RFCs, use the approved citation formats at: https://docs.oasis-open.org/templates/ietf-rfc-list/ietf-rfc-list.html. For references to W3C Recommendations, use the approved citation formats at: https://docs.oasis-open.org/templates/w3c-recommendations-list/w3c-recommendations-list.html. Remove this note before submitting for publication.)

+
[OData-v4.02]
+ +
[RFC2119]
+

Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997 http://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 http://www.rfc-editor.org/info/rfc8174.

+

A.2 Informative References

+
[RFC3552]
+

Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003 https://www.rfc-editor.org/info/rfc3552.

+
+

Appendix B. Safety, Security and Privacy Considerations

+ + +

(Note: OASIS strongly recommends that Technical Committees consider issues that might affect safety, security, privacy, and/or data protection in implementations of their specification and document them for implementers and adopters. For some purposes, you may find it required, e.g. if you apply for IANA registration.

+

While it may not be immediately obvious how your specification might make systems vulnerable to attack, most specifications, because they involve communications between systems, message formats, or system settings, open potential channels for exploit. For example, IETF [[RFC3552](#rfc3552)] lists “eavesdropping, replay, message insertion, deletion, modification, and man-in-the-middle” as well as potential denial of service attacks as threats that must be considered and, if appropriate, addressed in IETF RFCs.

+

In addition to considering and describing foreseeable risks, this section should include guidance on how implementers and adopters can protect against these risks.

+

We encourage editors and TC members concerned with this subject to read _Guidelines for Writing RFC Text on Security Considerations_, IETF [[RFC3552](#rfc3552)], for more information.

+

Remove this note before submitting for publication.)

+
+

Appendix C. Acknowledgments

+ + +

Note: A Work Product approved by the TC must include a list of people who participated in the development of the Work Product. This is generally done by collecting the list of names in this appendix. This list shall be initially compiled by the Chair, and any Member of the TC may add or remove their names from the list by request. Remove this note before submitting for publication.

+

C.1 Special Thanks

+ + +

Substantial contributions to this document from the following individuals are gratefully acknowledged:

+

Participant Name, Affiliation or "Individual Member"

+

C.2 Participants

+ + +

The following individuals have participated in the creation of this specification and are gratefully acknowledged:

+

OpenC2 TC Members:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
First NameLast NameCompany
PhilippeAlmanSomething Networks
AlexAmirnovmanCompany B
KrisAndermanMini Micro
DarrenAnstmanBig Networks
+
+

Appendix D. Revision History

+ + + + + + + + + + + + + + + + + + + +
RevisionDateEditorChanges Made
specname-v1.0-wd01yyyy-mm-ddEditor NameInitial working draft
+
+

Appendix E. Example Appendix with subsections

+

E.1 Subsection title

+

E.1.1 Sub-subsection

+
+

Appendix F. 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.

+

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.

+

As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, 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.

+ + diff --git a/docs/odata-protocol/odata-protocol.md b/docs/odata-protocol/odata-protocol.md new file mode 100644 index 000000000..8ab851d4b --- /dev/null +++ b/docs/odata-protocol/odata-protocol.md @@ -0,0 +1,329 @@ + +![OASIS Logo](https://docs.oasis-open.org/templates/OASISLogo-v3.0.png) + +------- + +# OData Version 4.02. Part 1: Protocol + +## Committee Specification Draft 01 + +## 14 July 2023 + +  + +#### This stage: +https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part1-protocol.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part1-protocol.html \ +https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part1-protocol.pdf + +#### Previous stage: +N/A + +#### Latest stage: +https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html \ +https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.pdf + +#### Technical Committee: +[OASIS Open Data Protocol (OData) TC](https://www.oasis-open.org/committees/odata/) + +#### Chairs: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) + +#### Editors: + +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) \ +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Heiko Theißen (heiko.theissen@sap.com), [SAP SE](http://www.sap.com/) + +#### Additional artifacts: +This prose specification is one component of a Work Product that also includes: +* _OData Version 4.02 Part 1: Protocol_. (this document) https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part1-protocol.html +* _OData Version 4.02 Part 2: URL Conventions_. https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.html +* XML schemas: (list file names or directory name) +* Other parts (list titles and/or file names) +* `(Note: Any normative computer language definitions that are part of the Work Product, such as XML instances, schemas and Java(TM) code, including fragments of such, must be (a) well formed and valid, (b) provided in separate plain text files, (c) referenced from the Work Product; and (d) where any definition in these separate files disagrees with the definition found in the specification, the definition in the separate file prevails. Remove this note before submitting for publication.)` + +#### Related work: +This specification replaces or supersedes: +* _OData Version 4.01. Part 1: Protocol_. Edited by Michael Pizzo, Ralf Handl, and Martin Zurmuehl. OASIS Standard. Latest stage: https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html. +* _OData Version 4.0. Part 1: Protocol_. Edited by Michael Pizzo, Ralf Handl, and Martin Zurmuehl. OASIS Standard. Latest stage: http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html. + +This specification is related to: +* Related specifications (include hyperlink, preferably to HTML format) \ +`(remove "related" subsection if no entries)` + +#### 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](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/. + +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). + +Note that any machine-readable content ([Computer Language Definitions](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsCompLang)) 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](#rfc2119)] and [[RFC8174](#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]** + +_OData Version 4.02. Part 1: Protocol_. +Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. +https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part1-protocol.html. +Latest stage: https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html. + +#### Notices +Copyright © OASIS Open 2023. All Rights Reserved. + +Distributed under the terms of the OASIS [IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/). + +The name "OASIS" is a trademark of [OASIS](https://www.oasis-open.org/), 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 + +::: toc +- [1 Introduction](#Introduction) + - [1.1 Changes from earlier Versions](#ChangesfromearlierVersions) + - [1.2 Glossary](#Glossary) + - [1.2.1 Definitions of terms](#Definitionsofterms) + - [1.2.2 Acronyms and abbreviations](#Acronymsandabbreviations) + - [1.2.3 Document conventions](#Documentconventions) +::: + +------- + +# 1 Introduction + + + +## 1.1 Changes from earlier Versions + + + + +## 1.2 Glossary + +### 1.2.1 Definitions of terms + + +TODO: find out why we need a $dummy$ formula to get `monospace` look as we want it. + +### 1.2.2 Acronyms and abbreviations + + + +### 1.2.3 Document conventions + +Keywords defined by this specification use `this monospaced font`. + +Some sections of this specification are illustrated with non-normative examples. + +::: example +Example 1: text describing an example uses this paragraph style +``` +Non-normative examples use this paragraph style. +``` +::: + +All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading. + +All other text is normative unless otherwise labeled. + +::: example +Here is a customized command line which will generate HTML from this markdown file (named `odata-v4.02-csd01-part1-protocol.md`). Line breaks are added for readability only: + +``` +pandoc -f gfm+tex_math_dollars+fenced_divs + -t html + -o odata-v4.02-csd01-part1-protocol.html + -c styles/markdown-styles-v1.7.3b.css + -c styles/odata.css + -s + --mathjax + --eol=lf + --wrap=none + --metadata pagetitle="OData Version 4.01. Part 1: Protocol" + odata-v4.02-csd01-part1-protocol.md +``` + +This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2. +::: + +------- + +# 2 Section Heading +text. + +## 2.1 Level 2 Heading +text. + +### 2.1.1 Level 3 Heading +text. + +#### 2.1.1.1 Level 4 Heading +text. + +##### 2.1.1.1.1 Level 5 Heading +This is the deepest level, because six # gets transformed into a Reference tag. + + +## 2.2 Next Heading +text. + +------- + +# 3 Conformance + + +`(Note: The [OASIS TC Process](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsConfClause) requires that a specification approved by the TC at the Committee Specification Public Review Draft, Committee Specification or OASIS Standard level must include a separate section, listing a set of numbered conformance clauses, to which any implementation of the specification must adhere in order to claim conformance to the specification (or any optional portion thereof). This is done by listing the conformance clauses here.` +`For the definition of "conformance clause," see [OASIS Defined Terms](https://www.oasis-open.org/policies-guidelines/oasis-defined-terms-2018-05-22/#dConformanceClause).` + +`See "Guidelines to Writing Conformance Clauses": +https://docs.oasis-open.org/templates/TCHandbook/ConformanceGuidelines.html.` + +`Remove this note before submitting for publication.)` + + +------- + +# Appendix A. References + + + +This appendix contains the normative and informative references that are used in this document. + +While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity. + +## A.1 Normative References + +The following documents are referenced in such a way that some or all of their content constitutes requirements of this document. + +`(Reference sources: +For references to IETF RFCs, use the approved citation formats at: +https://docs.oasis-open.org/templates/ietf-rfc-list/ietf-rfc-list.html. +For references to W3C Recommendations, use the approved citation formats at: +https://docs.oasis-open.org/templates/w3c-recommendations-list/w3c-recommendations-list.html. +Remove this note before submitting for publication.)` + +###### [OData-v4.02] +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + +##### [RFC2119] +_Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997_ +http://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_ +http://www.rfc-editor.org/info/rfc8174. + +## A.2 Informative References + +###### [RFC3552] +_Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003_ +https://www.rfc-editor.org/info/rfc3552. + +------- + +# Appendix B. Safety, Security and Privacy Considerations + + + +`(Note: OASIS strongly recommends that Technical Committees consider issues that might affect safety, security, privacy, and/or data protection in implementations of their specification and document them for implementers and adopters. For some purposes, you may find it required, e.g. if you apply for IANA registration.` + +`While it may not be immediately obvious how your specification might make systems vulnerable to attack, most specifications, because they involve communications between systems, message formats, or system settings, open potential channels for exploit. For example, IETF [[RFC3552](#rfc3552)] lists “eavesdropping, replay, message insertion, deletion, modification, and man-in-the-middle” as well as potential denial of service attacks as threats that must be considered and, if appropriate, addressed in IETF RFCs.` + +`In addition to considering and describing foreseeable risks, this section should include guidance on how implementers and adopters can protect against these risks.` + +`We encourage editors and TC members concerned with this subject to read _Guidelines for Writing RFC Text on Security Considerations_, IETF [[RFC3552](#rfc3552)], for more information.` + +`Remove this note before submitting for publication.)` + +------- + +# Appendix C. Acknowledgments + + + +`Note: A Work Product approved by the TC must include a list of people who participated in the development of the Work Product. This is generally done by collecting the list of names in this appendix. This list shall be initially compiled by the Chair, and any Member of the TC may add or remove their names from the list by request. Remove this note before submitting for publication.` + +## C.1 Special Thanks + + + +Substantial contributions to this document from the following individuals are gratefully acknowledged: + +Participant Name, Affiliation or "Individual Member" + +## C.2 Participants + + + +The following individuals have participated in the creation of this specification and are gratefully acknowledged: + +**OpenC2 TC Members:** + +| First Name | Last Name | Company | +| :--- | :--- | :--- | +Philippe | Alman | Something Networks +Alex | Amirnovman | Company B +Kris | Anderman | Mini Micro +Darren | Anstman | Big Networks + +------- + +# Appendix D. Revision History + + + +| Revision | Date | Editor | Changes Made | +| :--- | :--- | :--- | :--- | +| specname-v1.0-wd01 | yyyy-mm-dd | Editor Name | Initial working draft | + +------- + +# Appendix E. Example Appendix with subsections + +## E.1 Subsection title + +### E.1.1 Sub-subsection + +------- + +# Appendix F. 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](https://www.oasis-open.org/policies-guidelines/ipr/) 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. + +As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, 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](https://www.oasis-open.org/), 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-protocol/styles/markdown-styles-v1.7.3b.css b/docs/odata-protocol/styles/markdown-styles-v1.7.3b.css new file mode 100644 index 000000000..f102f0ace --- /dev/null +++ b/docs/odata-protocol/styles/markdown-styles-v1.7.3b.css @@ -0,0 +1,91 @@ +/* OASIS specification styles for HTML generated from Markdown or similar sources */ +/* usually used after basic w3.css */ +/* Paul Knight 2018-09-27 */ +/* pk 2018-10-01 - v1.2 reduced section header and title (h*) font sizes */ +/* pk 2018-10-02 - v1.3 added right margin; allowed text wrapping in code blocks and scrolling for overflowing text */ +/* pk 2018-10-19 - v1.4 added display:inline to avoid page-wide background coloring */ +/* pk 2018-10-25 - v1.5 added use of
as citation tag for References section or elsewhere */ +/* pk 2018-10-26 - v1.5.1 (experimental) and v1.6 added use of
as a page break when generating PDF from the HTML */ +/* pk 2018-11-14 - v1.6.1 - lighter gray background color for code blocks */ +/* pk 2019-02-18 - v1.7 - Use Liberation Sans and Liberation Mono fonts if possible */ +/* pk 2019-02-18 - v1.7.1 (experimental) changed px to pt (and reduced numbers) for fonts and tables; added bigtitle style */ +/* pk 2019-05-23 - v1.7.2 (based on 1.7.1) changed monospace "code" font to Courier New */ +/* pk 2019-08-01 - v1.7.3 substitute PostScript name for fonts (LiberationSans for "Liberation Sans" and CourierNew for "Courier New") to address a flaw in "wkhtmltopdf" which rendered all text as bold. Changed "bigtitle" to "h1big"*/ +/* dk 2020-10-21 - v1.7.3a (unofficial for jadn, based on 1.7.3) update block quotes and code blocks */ +/* Heiko Theißen 2023-06-02 - v1.7.3b (unofficial for odata-data-aggregation-ext, based on v1.7.3a) include local font names "Liberation Sans" and "Courier New" */ + +body { + margin-left: 3pc; + margin-right: 3pc; + font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif; + font-size:12pt; + line-height:1.2; + } + +html{overflow-x:auto} + + /* styles for section headings - levels 1-5 (maybe include heading1, etc. later) */ +h1{font-size:18pt}h2{font-size:14pt}h3{font-size:13pt}h4{font-size:12pt}h5{font-size:11pt} +h1big{font-size: 24pt} +h1,h2,h3,h4,h5,h1big{font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif;font-weight: bold;margin:8pt 0;color: #446CAA} + /* style for h6, for use as Reference tag */ +h6{font-size:12pt; line-height:1.0} +h6{font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif;font-weight: bold;margin:0pt;} + /* not needed - can just use brackets in the label itself */ + /* h6::before {content: "["} */ + /* h6::after {content: "]"} */ + + /* style for hr to insert a page break before each ruled line (generated in markdown by 3 or more hyphens alone on a line) */ +hr{page-break-before: always;} + + +/* Table styles - bordered with option for striped */ +table { + border-collapse: collapse; +} + +table { + border-collapse:collapse; + border-spacing:0; + width:100%; + display:table; + font-size:12pt; + margin-top: 6pt; + } + +table, th, td { + border: 1pt solid black; + padding:6pt 6pt; + text-align:left; + vertical-align:top; +} +th { + color:#ffffff; + background-color: #446CAA; + } + /* "table-striped" tag is not generated by pandoc - add manually in HTML if wanted */ +.table-striped tbody tr:nth-child(even){background-color:#d6f3ff} + +/* style for code blocks */ +pre { + background-color:#f0f0f0; + padding: 6px; +} + +code,kbd,samp{ + font-family:CourierNew, "Courier New", monospace; + white-space: pre-wrap; + font-size: 10pt; +} + +/* offset block quote */ +blockquote { + background-color:#f0f0f0; + padding-left: 10px; + border-left: solid lightgray 6px; +} + +/* space bullets a bit */ +li { + margin: 3px 0; +} diff --git a/docs/odata-protocol/styles/odata.css b/docs/odata-protocol/styles/odata.css new file mode 100644 index 000000000..4efa4b885 --- /dev/null +++ b/docs/odata-protocol/styles/odata.css @@ -0,0 +1,188 @@ +a:target { + background-color: yellow; +} + +a[href^="#OData"], +a[href^="#RFC"], +a[href^="#SQL"] { + font-weight: bold; +} + +a[href^="#OData"]::before, +a[href^="#RFC"]::before, +a[href^="#SQL"]::before { + content: "["; + font-weight: bold; +} + +a[href^="#OData"]::after, +a[href^="#RFC"]::after, +a[href^="#SQL"]::after { + content: "]"; + font-weight: bold; +} + +.toc li { + list-style-type: none; +} + +.example, +.example table { + font-size: smaller; +} + +.example p, +.example li { + font-style: italic; +} + +table { + width: auto; +} + +.example table, +.example th, +.example td { + padding: 2pt 6pt; + white-space: nowrap; +} + +.example td[rowspan] { + text-align: right; + vertical-align: middle; + border-style: dotted; +} + +.example th[colspan] { + text-align: center; +} + +.example-data { + position: relative; +} + +.example-data div { + position: absolute; +} + +.example-data p { + font-style: unset !important; +} + +.example-data svg { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; +} + +.cross tbody tr:first-of-type, +.cross tbody tr:nth-of-type(2), +.cross td:first-of-type, +.cross td:nth-of-type(2) { + font-weight: bold; + color: white; + background-color: #446CAA +} + +.cross tbody tr:first-of-type td:first-of-type, +.cross tbody tr:nth-of-type(2) td:first-of-type, +.cross tbody tr:first-of-type td:nth-of-type(2), +.cross tbody tr:nth-of-type(2) td:nth-of-type(2) { + border: none; + background-color: white; +} + +.example-data th:first-of-type:not(:last-of-type), +.legend tbody tr:first-of-type { + background-color: green; +} + +.nav th:nth-of-type(2), +.nav-2 th:nth-of-type(3), +.nav-2 th:nth-of-type(4), +.nav-2 th:nth-of-type(5), +.legend tbody tr:last-of-type { + background-color: rgb(255, 128, 0); +} + +.legend td { + font-weight: bold; + color: white; +} + +.example-data svg>path { + fill: none; + stroke: black; + stroke-width: 2; +} + +p code, +li code, +h1 code, +h2 code, +h3 code, +h4 code, +h5 code, +h6 code { + font-family: MJXZERO, MJXTEX-T; + font-size: 1em; + line-height: 0; +} + +.example p code, +.example li code { + font-style: initial; +} + +.example pre { + margin-left: 40px; +} + +h1 code, +h2 code, +h3 code, +h4 code, +h5 code, +h6 code { + font-size: unset; +} + +mjx-container { + font-size: unset !important; +} + +mjx-container[display=true] { + text-align: left !important; + margin-left: 40px !important; +} + +/* The following rule enables typewriter single quotes in maths, like $\hbox{\tt{'$Q$'}}$ */ +mjx-c.mjx-c2019::before { + content: "\27" !important; + padding-right: 0.525em !important; + font-family: MJXZERO, MJXTEX-T; +} + +code .er { + color: unset !important; + font-weight: unset !important; +} + +hr:first-of-type { + page-break-before: avoid; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + page-break-after: avoid; +} + +h2[id="22-example-data"] { + page-break-before: always; +} \ No newline at end of file diff --git a/docs/odata-url-conventions/odata-url-conventions.html b/docs/odata-url-conventions/odata-url-conventions.html new file mode 100644 index 000000000..e9b7c2c66 --- /dev/null +++ b/docs/odata-url-conventions/odata-url-conventions.html @@ -0,0 +1,290 @@ + + + + + + + OData Version 4.01. Part 2: URL Conventions + + + + + + + + +

OASIS Logo

+
+

OData Version 4.02. Part 2: URL Conventions

+

Committee Specification Draft 01

+

14 July 2023

+

 

+

This stage:

+

https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.md (Authoritative)
+https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.html
+https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.pdf

+

Previous stage:

+

N/A

+

Latest stage:

+

https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.md (Authoritative)
+https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html
+https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.pdf

+

Technical Committee:

+

OASIS Open Data Protocol (OData) TC

+

Chairs:

+

Ralf Handl (ralf.handl@sap.com), SAP SE
+Michael Pizzo (mikep@microsoft.com), Microsoft

+

Editors:

+

Michael Pizzo (mikep@microsoft.com), Microsoft
+Ralf Handl (ralf.handl@sap.com), SAP SE
+Heiko Theißen (heiko.theissen@sap.com), SAP SE

+

Additional artifacts:

+

This prose specification is one component of a Work Product that also includes:

+ + +

This specification replaces or supersedes:

+ +

This specification is related to:

+ +

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.

+

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.

+

Citation format:

+

When referencing this specification the following citation format should be used:

+

[OData-v4.02-Part2]

+

OData Version 4.02. Part 2: URL Conventions. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.html. Latest stage: https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html.

+

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.

+

For complete copyright information please see the full Notices section in an Appendix below.

+
+

Table of Contents

+
+ +
+
+

1 Introduction

+ + +

1.1 Changes from earlier Versions

+ + + + +

1.2 Glossary

+

1.2.1 Definitions of terms

+ + +

TODO: find out why we need a \(dummy\) formula to get monospace look as we want it.

+

1.2.2 Acronyms and abbreviations

+ + +

1.2.3 Document conventions

+

Keywords defined by this specification use this monospaced font.

+

Some sections of this specification are illustrated with non-normative examples.

+
+

Example 1: text describing an example uses this paragraph style

+
Non-normative examples use this paragraph style.
+
+

All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading.

+

All other text is normative unless otherwise labeled.

+
+

Here is a customized command line which will generate HTML from this markdown file (named odata-v4.02-csd01-part2-url-conventions.md). Line breaks are added for readability only:

+
pandoc -f gfm+tex_math_dollars+fenced_divs
+       -t html
+       -o odata-v4.02-csd01-part2-url-conventions.html
+       -c styles/markdown-styles-v1.7.3b.css
+       -c styles/odata.css
+       -s
+       --mathjax
+       --eol=lf
+       --wrap=none
+       --metadata pagetitle="OData Version 4.01. Part 2: URL Conventions"
+       odata-v4.02-csd01-part2-url-conventions.md
+

This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2.

+
+
+

2 Section Heading

+

text.

+

2.1 Level 2 Heading

+

text.

+

2.1.1 Level 3 Heading

+

text.

+

2.1.1.1 Level 4 Heading

+

text.

+
2.1.1.1.1 Level 5 Heading
+

This is the deepest level, because six # gets transformed into a Reference tag.

+

2.2 Next Heading

+

text.

+
+

3 Conformance

+ + +

(Note: The [OASIS TC Process](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsConfClause) requires that a specification approved by the TC at the Committee Specification Public Review Draft, Committee Specification or OASIS Standard level must include a separate section, listing a set of numbered conformance clauses, to which any implementation of the specification must adhere in order to claim conformance to the specification (or any optional portion thereof). This is done by listing the conformance clauses here. For the definition of "conformance clause," see [OASIS Defined Terms](https://www.oasis-open.org/policies-guidelines/oasis-defined-terms-2018-05-22/#dConformanceClause).

+

See "Guidelines to Writing Conformance Clauses": https://docs.oasis-open.org/templates/TCHandbook/ConformanceGuidelines.html.

+

Remove this note before submitting for publication.)

+
+

Appendix A. References

+ + +

This appendix contains the normative and informative references that are used in this document.

+

While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity.

+

A.1 Normative References

+

The following documents are referenced in such a way that some or all of their content constitutes requirements of this document.

+

(Reference sources: For references to IETF RFCs, use the approved citation formats at: https://docs.oasis-open.org/templates/ietf-rfc-list/ietf-rfc-list.html. For references to W3C Recommendations, use the approved citation formats at: https://docs.oasis-open.org/templates/w3c-recommendations-list/w3c-recommendations-list.html. Remove this note before submitting for publication.)

+
[OData-v4.02]
+ +
[RFC2119]
+

Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997 http://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 http://www.rfc-editor.org/info/rfc8174.

+

A.2 Informative References

+
[RFC3552]
+

Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003 https://www.rfc-editor.org/info/rfc3552.

+
+

Appendix B. Safety, Security and Privacy Considerations

+ + +

(Note: OASIS strongly recommends that Technical Committees consider issues that might affect safety, security, privacy, and/or data protection in implementations of their specification and document them for implementers and adopters. For some purposes, you may find it required, e.g. if you apply for IANA registration.

+

While it may not be immediately obvious how your specification might make systems vulnerable to attack, most specifications, because they involve communications between systems, message formats, or system settings, open potential channels for exploit. For example, IETF [[RFC3552](#rfc3552)] lists “eavesdropping, replay, message insertion, deletion, modification, and man-in-the-middle” as well as potential denial of service attacks as threats that must be considered and, if appropriate, addressed in IETF RFCs.

+

In addition to considering and describing foreseeable risks, this section should include guidance on how implementers and adopters can protect against these risks.

+

We encourage editors and TC members concerned with this subject to read _Guidelines for Writing RFC Text on Security Considerations_, IETF [[RFC3552](#rfc3552)], for more information.

+

Remove this note before submitting for publication.)

+
+

Appendix C. Acknowledgments

+ + +

Note: A Work Product approved by the TC must include a list of people who participated in the development of the Work Product. This is generally done by collecting the list of names in this appendix. This list shall be initially compiled by the Chair, and any Member of the TC may add or remove their names from the list by request. Remove this note before submitting for publication.

+

C.1 Special Thanks

+ + +

Substantial contributions to this document from the following individuals are gratefully acknowledged:

+

Participant Name, Affiliation or "Individual Member"

+

C.2 Participants

+ + +

The following individuals have participated in the creation of this specification and are gratefully acknowledged:

+

OpenC2 TC Members:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
First NameLast NameCompany
PhilippeAlmanSomething Networks
AlexAmirnovmanCompany B
KrisAndermanMini Micro
DarrenAnstmanBig Networks
+
+

Appendix D. Revision History

+ + + + + + + + + + + + + + + + + + + +
RevisionDateEditorChanges Made
specname-v1.0-wd01yyyy-mm-ddEditor NameInitial working draft
+
+

Appendix E. Example Appendix with subsections

+

E.1 Subsection title

+

E.1.1 Sub-subsection

+
+

Appendix F. 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.

+

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.

+

As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, 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.

+ + diff --git a/docs/odata-url-conventions/odata-url-conventions.md b/docs/odata-url-conventions/odata-url-conventions.md new file mode 100644 index 000000000..920f706ac --- /dev/null +++ b/docs/odata-url-conventions/odata-url-conventions.md @@ -0,0 +1,329 @@ + +![OASIS Logo](https://docs.oasis-open.org/templates/OASISLogo-v3.0.png) + +------- + +# OData Version 4.02. Part 2: URL Conventions + +## Committee Specification Draft 01 + +## 14 July 2023 + +  + +#### This stage: +https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.html \ +https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.pdf + +#### Previous stage: +N/A + +#### Latest stage: +https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html \ +https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.pdf + +#### Technical Committee: +[OASIS Open Data Protocol (OData) TC](https://www.oasis-open.org/committees/odata/) + +#### Chairs: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) + +#### Editors: + +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) \ +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Heiko Theißen (heiko.theissen@sap.com), [SAP SE](http://www.sap.com/) + +#### Additional artifacts: +This prose specification is one component of a Work Product that also includes: +* _OData Version 4.02 Part 1: Protocol_. https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part1-protocol.html +* _OData Version 4.02 Part 2: URL Conventions_. (this document) https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.html +* XML schemas: (list file names or directory name) +* Other parts (list titles and/or file names) +* `(Note: Any normative computer language definitions that are part of the Work Product, such as XML instances, schemas and Java(TM) code, including fragments of such, must be (a) well formed and valid, (b) provided in separate plain text files, (c) referenced from the Work Product; and (d) where any definition in these separate files disagrees with the definition found in the specification, the definition in the separate file prevails. Remove this note before submitting for publication.)` + +#### Related work: +This specification replaces or supersedes: +* _OData Version 4.01. Part 2: URL Conventions_. Edited by Michael Pizzo, Ralf Handl, and Martin Zurmuehl. OASIS Standard. Latest stage: https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html. +* _OData Version 4.0. Part 2: URL Conventions_. Edited by Michael Pizzo, Ralf Handl, and Martin Zurmuehl. OASIS Standard. Latest stage: http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html. + +This specification is related to: +* Related specifications (include hyperlink, preferably to HTML format) \ +`(remove "related" subsection if no entries)` + +#### 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](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/. + +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). + +Note that any machine-readable content ([Computer Language Definitions](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsCompLang)) 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](#rfc2119)] and [[RFC8174](#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-Part2]** + +_OData Version 4.02. Part 2: URL Conventions_. +Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. +https://docs.oasis-open.org/odata/odata/v4.02/csd01/odata-v4.02-csd01-part2-url-conventions.html. +Latest stage: https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html. + +#### Notices +Copyright © OASIS Open 2023. All Rights Reserved. + +Distributed under the terms of the OASIS [IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/). + +The name "OASIS" is a trademark of [OASIS](https://www.oasis-open.org/), 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 + +::: toc +- [1 Introduction](#Introduction) + - [1.1 Changes from earlier Versions](#ChangesfromearlierVersions) + - [1.2 Glossary](#Glossary) + - [1.2.1 Definitions of terms](#Definitionsofterms) + - [1.2.2 Acronyms and abbreviations](#Acronymsandabbreviations) + - [1.2.3 Document conventions](#Documentconventions) +::: + +------- + +# 1 Introduction + + + +## 1.1 Changes from earlier Versions + + + + +## 1.2 Glossary + +### 1.2.1 Definitions of terms + + +TODO: find out why we need a $dummy$ formula to get `monospace` look as we want it. + +### 1.2.2 Acronyms and abbreviations + + + +### 1.2.3 Document conventions + +Keywords defined by this specification use `this monospaced font`. + +Some sections of this specification are illustrated with non-normative examples. + +::: example +Example 1: text describing an example uses this paragraph style +``` +Non-normative examples use this paragraph style. +``` +::: + +All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading. + +All other text is normative unless otherwise labeled. + +::: example +Here is a customized command line which will generate HTML from this markdown file (named `odata-v4.02-csd01-part2-url-conventions.md`). Line breaks are added for readability only: + +``` +pandoc -f gfm+tex_math_dollars+fenced_divs + -t html + -o odata-v4.02-csd01-part2-url-conventions.html + -c styles/markdown-styles-v1.7.3b.css + -c styles/odata.css + -s + --mathjax + --eol=lf + --wrap=none + --metadata pagetitle="OData Version 4.01. Part 2: URL Conventions" + odata-v4.02-csd01-part2-url-conventions.md +``` + +This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2. +::: + +------- + +# 2 Section Heading +text. + +## 2.1 Level 2 Heading +text. + +### 2.1.1 Level 3 Heading +text. + +#### 2.1.1.1 Level 4 Heading +text. + +##### 2.1.1.1.1 Level 5 Heading +This is the deepest level, because six # gets transformed into a Reference tag. + + +## 2.2 Next Heading +text. + +------- + +# 3 Conformance + + +`(Note: The [OASIS TC Process](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsConfClause) requires that a specification approved by the TC at the Committee Specification Public Review Draft, Committee Specification or OASIS Standard level must include a separate section, listing a set of numbered conformance clauses, to which any implementation of the specification must adhere in order to claim conformance to the specification (or any optional portion thereof). This is done by listing the conformance clauses here.` +`For the definition of "conformance clause," see [OASIS Defined Terms](https://www.oasis-open.org/policies-guidelines/oasis-defined-terms-2018-05-22/#dConformanceClause).` + +`See "Guidelines to Writing Conformance Clauses": +https://docs.oasis-open.org/templates/TCHandbook/ConformanceGuidelines.html.` + +`Remove this note before submitting for publication.)` + + +------- + +# Appendix A. References + + + +This appendix contains the normative and informative references that are used in this document. + +While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity. + +## A.1 Normative References + +The following documents are referenced in such a way that some or all of their content constitutes requirements of this document. + +`(Reference sources: +For references to IETF RFCs, use the approved citation formats at: +https://docs.oasis-open.org/templates/ietf-rfc-list/ietf-rfc-list.html. +For references to W3C Recommendations, use the approved citation formats at: +https://docs.oasis-open.org/templates/w3c-recommendations-list/w3c-recommendations-list.html. +Remove this note before submitting for publication.)` + +###### [OData-v4.02] +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + +##### [RFC2119] +_Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997_ +http://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_ +http://www.rfc-editor.org/info/rfc8174. + +## A.2 Informative References + +###### [RFC3552] +_Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003_ +https://www.rfc-editor.org/info/rfc3552. + +------- + +# Appendix B. Safety, Security and Privacy Considerations + + + +`(Note: OASIS strongly recommends that Technical Committees consider issues that might affect safety, security, privacy, and/or data protection in implementations of their specification and document them for implementers and adopters. For some purposes, you may find it required, e.g. if you apply for IANA registration.` + +`While it may not be immediately obvious how your specification might make systems vulnerable to attack, most specifications, because they involve communications between systems, message formats, or system settings, open potential channels for exploit. For example, IETF [[RFC3552](#rfc3552)] lists “eavesdropping, replay, message insertion, deletion, modification, and man-in-the-middle” as well as potential denial of service attacks as threats that must be considered and, if appropriate, addressed in IETF RFCs.` + +`In addition to considering and describing foreseeable risks, this section should include guidance on how implementers and adopters can protect against these risks.` + +`We encourage editors and TC members concerned with this subject to read _Guidelines for Writing RFC Text on Security Considerations_, IETF [[RFC3552](#rfc3552)], for more information.` + +`Remove this note before submitting for publication.)` + +------- + +# Appendix C. Acknowledgments + + + +`Note: A Work Product approved by the TC must include a list of people who participated in the development of the Work Product. This is generally done by collecting the list of names in this appendix. This list shall be initially compiled by the Chair, and any Member of the TC may add or remove their names from the list by request. Remove this note before submitting for publication.` + +## C.1 Special Thanks + + + +Substantial contributions to this document from the following individuals are gratefully acknowledged: + +Participant Name, Affiliation or "Individual Member" + +## C.2 Participants + + + +The following individuals have participated in the creation of this specification and are gratefully acknowledged: + +**OpenC2 TC Members:** + +| First Name | Last Name | Company | +| :--- | :--- | :--- | +Philippe | Alman | Something Networks +Alex | Amirnovman | Company B +Kris | Anderman | Mini Micro +Darren | Anstman | Big Networks + +------- + +# Appendix D. Revision History + + + +| Revision | Date | Editor | Changes Made | +| :--- | :--- | :--- | :--- | +| specname-v1.0-wd01 | yyyy-mm-dd | Editor Name | Initial working draft | + +------- + +# Appendix E. Example Appendix with subsections + +## E.1 Subsection title + +### E.1.1 Sub-subsection + +------- + +# Appendix F. 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](https://www.oasis-open.org/policies-guidelines/ipr/) 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. + +As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, 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](https://www.oasis-open.org/), 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-url-conventions/styles/markdown-styles-v1.7.3b.css b/docs/odata-url-conventions/styles/markdown-styles-v1.7.3b.css new file mode 100644 index 000000000..f102f0ace --- /dev/null +++ b/docs/odata-url-conventions/styles/markdown-styles-v1.7.3b.css @@ -0,0 +1,91 @@ +/* OASIS specification styles for HTML generated from Markdown or similar sources */ +/* usually used after basic w3.css */ +/* Paul Knight 2018-09-27 */ +/* pk 2018-10-01 - v1.2 reduced section header and title (h*) font sizes */ +/* pk 2018-10-02 - v1.3 added right margin; allowed text wrapping in code blocks and scrolling for overflowing text */ +/* pk 2018-10-19 - v1.4 added display:inline to avoid page-wide background coloring */ +/* pk 2018-10-25 - v1.5 added use of
as citation tag for References section or elsewhere */ +/* pk 2018-10-26 - v1.5.1 (experimental) and v1.6 added use of
as a page break when generating PDF from the HTML */ +/* pk 2018-11-14 - v1.6.1 - lighter gray background color for code blocks */ +/* pk 2019-02-18 - v1.7 - Use Liberation Sans and Liberation Mono fonts if possible */ +/* pk 2019-02-18 - v1.7.1 (experimental) changed px to pt (and reduced numbers) for fonts and tables; added bigtitle style */ +/* pk 2019-05-23 - v1.7.2 (based on 1.7.1) changed monospace "code" font to Courier New */ +/* pk 2019-08-01 - v1.7.3 substitute PostScript name for fonts (LiberationSans for "Liberation Sans" and CourierNew for "Courier New") to address a flaw in "wkhtmltopdf" which rendered all text as bold. Changed "bigtitle" to "h1big"*/ +/* dk 2020-10-21 - v1.7.3a (unofficial for jadn, based on 1.7.3) update block quotes and code blocks */ +/* Heiko Theißen 2023-06-02 - v1.7.3b (unofficial for odata-data-aggregation-ext, based on v1.7.3a) include local font names "Liberation Sans" and "Courier New" */ + +body { + margin-left: 3pc; + margin-right: 3pc; + font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif; + font-size:12pt; + line-height:1.2; + } + +html{overflow-x:auto} + + /* styles for section headings - levels 1-5 (maybe include heading1, etc. later) */ +h1{font-size:18pt}h2{font-size:14pt}h3{font-size:13pt}h4{font-size:12pt}h5{font-size:11pt} +h1big{font-size: 24pt} +h1,h2,h3,h4,h5,h1big{font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif;font-weight: bold;margin:8pt 0;color: #446CAA} + /* style for h6, for use as Reference tag */ +h6{font-size:12pt; line-height:1.0} +h6{font-family: LiberationSans, "Liberation Sans", Arial, Helvetica, sans-serif;font-weight: bold;margin:0pt;} + /* not needed - can just use brackets in the label itself */ + /* h6::before {content: "["} */ + /* h6::after {content: "]"} */ + + /* style for hr to insert a page break before each ruled line (generated in markdown by 3 or more hyphens alone on a line) */ +hr{page-break-before: always;} + + +/* Table styles - bordered with option for striped */ +table { + border-collapse: collapse; +} + +table { + border-collapse:collapse; + border-spacing:0; + width:100%; + display:table; + font-size:12pt; + margin-top: 6pt; + } + +table, th, td { + border: 1pt solid black; + padding:6pt 6pt; + text-align:left; + vertical-align:top; +} +th { + color:#ffffff; + background-color: #446CAA; + } + /* "table-striped" tag is not generated by pandoc - add manually in HTML if wanted */ +.table-striped tbody tr:nth-child(even){background-color:#d6f3ff} + +/* style for code blocks */ +pre { + background-color:#f0f0f0; + padding: 6px; +} + +code,kbd,samp{ + font-family:CourierNew, "Courier New", monospace; + white-space: pre-wrap; + font-size: 10pt; +} + +/* offset block quote */ +blockquote { + background-color:#f0f0f0; + padding-left: 10px; + border-left: solid lightgray 6px; +} + +/* space bullets a bit */ +li { + margin: 3px 0; +} diff --git a/docs/odata-url-conventions/styles/odata.css b/docs/odata-url-conventions/styles/odata.css new file mode 100644 index 000000000..4efa4b885 --- /dev/null +++ b/docs/odata-url-conventions/styles/odata.css @@ -0,0 +1,188 @@ +a:target { + background-color: yellow; +} + +a[href^="#OData"], +a[href^="#RFC"], +a[href^="#SQL"] { + font-weight: bold; +} + +a[href^="#OData"]::before, +a[href^="#RFC"]::before, +a[href^="#SQL"]::before { + content: "["; + font-weight: bold; +} + +a[href^="#OData"]::after, +a[href^="#RFC"]::after, +a[href^="#SQL"]::after { + content: "]"; + font-weight: bold; +} + +.toc li { + list-style-type: none; +} + +.example, +.example table { + font-size: smaller; +} + +.example p, +.example li { + font-style: italic; +} + +table { + width: auto; +} + +.example table, +.example th, +.example td { + padding: 2pt 6pt; + white-space: nowrap; +} + +.example td[rowspan] { + text-align: right; + vertical-align: middle; + border-style: dotted; +} + +.example th[colspan] { + text-align: center; +} + +.example-data { + position: relative; +} + +.example-data div { + position: absolute; +} + +.example-data p { + font-style: unset !important; +} + +.example-data svg { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; +} + +.cross tbody tr:first-of-type, +.cross tbody tr:nth-of-type(2), +.cross td:first-of-type, +.cross td:nth-of-type(2) { + font-weight: bold; + color: white; + background-color: #446CAA +} + +.cross tbody tr:first-of-type td:first-of-type, +.cross tbody tr:nth-of-type(2) td:first-of-type, +.cross tbody tr:first-of-type td:nth-of-type(2), +.cross tbody tr:nth-of-type(2) td:nth-of-type(2) { + border: none; + background-color: white; +} + +.example-data th:first-of-type:not(:last-of-type), +.legend tbody tr:first-of-type { + background-color: green; +} + +.nav th:nth-of-type(2), +.nav-2 th:nth-of-type(3), +.nav-2 th:nth-of-type(4), +.nav-2 th:nth-of-type(5), +.legend tbody tr:last-of-type { + background-color: rgb(255, 128, 0); +} + +.legend td { + font-weight: bold; + color: white; +} + +.example-data svg>path { + fill: none; + stroke: black; + stroke-width: 2; +} + +p code, +li code, +h1 code, +h2 code, +h3 code, +h4 code, +h5 code, +h6 code { + font-family: MJXZERO, MJXTEX-T; + font-size: 1em; + line-height: 0; +} + +.example p code, +.example li code { + font-style: initial; +} + +.example pre { + margin-left: 40px; +} + +h1 code, +h2 code, +h3 code, +h4 code, +h5 code, +h6 code { + font-size: unset; +} + +mjx-container { + font-size: unset !important; +} + +mjx-container[display=true] { + text-align: left !important; + margin-left: 40px !important; +} + +/* The following rule enables typewriter single quotes in maths, like $\hbox{\tt{'$Q$'}}$ */ +mjx-c.mjx-c2019::before { + content: "\27" !important; + padding-right: 0.525em !important; + font-family: MJXZERO, MJXTEX-T; +} + +code .er { + color: unset !important; + font-weight: unset !important; +} + +hr:first-of-type { + page-break-before: avoid; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + page-break-after: avoid; +} + +h2[id="22-example-data"] { + page-break-before: always; +} \ No newline at end of file diff --git a/lib/build-pdf.js b/lib/build-pdf.js index 599d513d6..ffc01aa7d 100644 --- a/lib/build-pdf.js +++ b/lib/build-pdf.js @@ -1,11 +1,26 @@ const pdf = require("./pdf.js"); +const fs = require("fs"); -pdf("odata-data-aggregation-ext") - .then(() => { - console.log("PDF generated"); - process.exit(0); - }) - .catch((error) => { - console.error(error); - process.exit(3); - }); +fs.readdirSync(__dirname + "/..", { withFileTypes: true }).forEach(function ( + doc +) { + if (doc.isDirectory() && doc.name.startsWith("odata-")) { + const htmlFile = `${__dirname}/../docs/${doc.name}/${doc.name}.html`; + const pdfFile = `${__dirname}/../docs/${doc.name}/${doc.name}.pdf`; + + const htmlStat = fs.statSync(htmlFile, { throwIfNoEntry: false }); + const pdfStat = fs.statSync(pdfFile, { throwIfNoEntry: false }); + + if (pdfStat === undefined || htmlStat?.mtime > pdfStat?.mtime) { + pdf(doc.name) + .then(() => { + console.log("✓ " + doc.name); + }) + .catch((error) => { + console.log("❌ " + doc.name); + console.error(error); + process.exitCode = 1; + }); + } + } +}); diff --git a/lib/build.js b/lib/build.js index 4c2f36ec0..00bc66ea9 100644 --- a/lib/build.js +++ b/lib/build.js @@ -7,7 +7,6 @@ fs.readdirSync(__dirname + "/..", { withFileTypes: true }).forEach(function ( doc ) { if (doc.isDirectory() && doc.name.startsWith("odata-")) { - console.log(doc.name); var md = fs.createWriteStream( __dirname + "/../docs/" + doc.name + "/" + doc.name + ".md" ); @@ -19,7 +18,7 @@ fs.readdirSync(__dirname + "/..", { withFileTypes: true }).forEach(function ( __dirname + "/../docs/" + doc.name + "/" + doc.name + ".html" ) ); - md.write(Buffer.of(0xEF, 0xBB, 0xBF)); + md.write(Buffer.of(0xef, 0xbb, 0xbf)); new Number(doc.name) .build( new PassThrough() @@ -32,9 +31,14 @@ fs.readdirSync(__dirname + "/..", { withFileTypes: true }).forEach(function ( html.stdin.end(); }) ) - .catch(function (err) { - console.error(err); - process.exit(1); + .then(() => { + console.log("✓ " + doc.name); + }) + .catch((err) => { + console.log("❌ " + doc.name); + console.error(err.join("\n")); + console.error(); + process.exitCode = 1; }); } }); diff --git a/lib/number.js b/lib/number.js index 97888e2c7..596ff0a37 100644 --- a/lib/number.js +++ b/lib/number.js @@ -2,13 +2,16 @@ const { createInterface } = require("readline"); const fs = require("fs"); const yaml = require("js-yaml"); +const { compareSectionNumbers } = require("./utilities"); + class Number { constructor(dir) { this.dir = dir; this.chapters = fs .readdirSync(dir) .filter((fn) => fn.endsWith(".md")) - .sort(); + .sort(compareSectionNumbers); + // console.log(this.chapters); this.meta = yaml.load(fs.readFileSync(dir + "/meta.yaml")); } @@ -95,9 +98,7 @@ class Number { for (var m, regex = /\]\(#(.*?)\)/g; (m = regex.exec(line)); ) if (!this.refs[m[1]]) this.errors.push( - `Undefined link #${m[1]} in file ${ - this.dir + "/" + file - }, line ${lineno}` + `${this.dir}/${file}(${lineno}): Undefined link #${m[1]}` ); m = line.match(/ ##([A-Za-z]+)(_([A-Za-z]+))?/); if (m && line[m.index + m[0].length] !== "]") { @@ -119,9 +120,7 @@ class Number { if (r) return `${r}](#${p})`; else { this.errors.push( - `Undefined link ##${p} in file ${ - this.dir + "/" + file - }, line ${lineno}` + `${this.dir}/${file}(${lineno}): Undefined link ##${p}` ); return `~~${p}~~]`; } diff --git a/lib/server.js b/lib/server.js index 797ec6354..207ca19ff 100644 --- a/lib/server.js +++ b/lib/server.js @@ -3,9 +3,25 @@ const Number = require("./number"); const pandoc = require("./pandoc"); const http = require("http"); const { execSync } = require("child_process"); +const path = require("path"); +const fs = require("fs"); + +const livereload = require("livereload"); +const liveReloadServer = livereload.createServer({ extraExts: ["md"] }); +liveReloadServer.watch(path.join(__dirname, "..")); + +const connectLivereload = require("connect-livereload"); var app = express() + .use(connectLivereload()) .use(express.static(__dirname + "/../docs")) + .get("/", function (req, res, next) { + const docs = fs + .readdirSync(__dirname + "/..", { withFileTypes: true }) + .filter((doc) => doc.isDirectory() && doc.name.startsWith("odata-")) + .map((doc) => `
  • ${doc.name}
  • `); + res.send(`

    Documents

    `); + }) .get("/*", function (req, res, next) { if (req.path.endsWith("/")) { try { @@ -23,7 +39,10 @@ var app = express() ...req.query, }); proc.stdout.pipe(res); - number.build(proc.stdin).catch(next); + number.build(proc.stdin).catch((err) => { + console.error(); + console.error(err.join("\n")); + }); } catch (err) { next(); } diff --git a/lib/utilities.js b/lib/utilities.js new file mode 100644 index 000000000..e7119820b --- /dev/null +++ b/lib/utilities.js @@ -0,0 +1,27 @@ +module.exports = { compareSectionNumbers }; + +function compareSectionNumbers(a, b) { + // Split section numbers into parts + const partsA = a.split(" ")[0].split("."); + const partsB = b.split(" ")[0].split("."); + + // Compare each part of the section numbers + for (let i = 0; i < Math.min(partsA.length, partsB.length); i++) { + const partA = parseInt(partsA[i]); + const partB = parseInt(partsB[i]); + + //TODO: if both partA and partB are NaN, compare lexicographically + + if (partA < partB) { + return -1; + } else if (partA > partB) { + return 1; + } else if (isNaN(partA) || isNaN(partB)) { + if (partsA[i] < partsB[i]) return -1; + else if (partsA[i] > partsB[i]) return 1; + } + } + + // If all parts are equal, compare the lengths of the section numbers + return partsA.length - partsB.length; +} diff --git a/odata-csdl-json/0 frontmatter.md b/odata-csdl-json/0 frontmatter.md new file mode 100644 index 000000000..8a4c1f0ba --- /dev/null +++ b/odata-csdl-json/0 frontmatter.md @@ -0,0 +1,90 @@ + +![OASIS Logo](https://docs.oasis-open.org/templates/OASISLogo-v3.0.png) + +------- + +# OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02 + +## Committee Specification Draft 01 + +## 14 July 2023 + +  + +#### This stage: +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/$$$stage$$$/$$$filename$$$.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/$$$stage$$$/$$$filename$$$.html \ +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/$$$stage$$$/$$$filename$$$.pdf + +#### Previous stage: +N/A + +#### Latest stage: +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.html \ +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.pdf + +#### Technical Committee: +[OASIS Open Data Protocol (OData) TC](https://www.oasis-open.org/committees/odata/) + +#### Chairs: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) + +#### Editors: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) \ +Heiko Theißen (heiko.theissen@sap.com), [SAP SE](http://www.sap.com/) + +#### Additional artifacts: +This prose specification is one component of a Work Product that also includes: +* XML schemas: (list file names or directory name) +* Other parts (list titles and/or file names) +* `(Note: Any normative computer language definitions that are part of the Work Product, such as XML instances, schemas and Java(TM) code, including fragments of such, must be (a) well formed and valid, (b) provided in separate plain text files, (c) referenced from the Work Product; and (d) where any definition in these separate files disagrees with the definition found in the specification, the definition in the separate file prevails. Remove this note before submitting for publication.)` + +#### Related work: +This specification replaces or supersedes: +* _OData Common Schema Definition Language (CSDL) JSON Representation Version 4.01_. Edited by Michael Pizzo, Ralf Handl, and Martin Zurmuehl. OASIS Standard. Latest stage: https://docs.oasis-open.org/odata/odata-csdl-json/v4.01/odata-csdl-json-v4.01.html. + +This specification is related to: +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + +#### 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 JSON Representation) specifically defines the JSON 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](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/. + +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). + +Note that any machine-readable content ([Computer Language Definitions](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsCompLang)) 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](#rfc2119)] and [[RFC8174](#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]** + +_OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02_. +Edited by Ralf Handl, Michael Pizzo, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. +https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/$$$stage$$$/$$$filename$$$.html. +Latest stage: https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.html. + +#### Notices +Copyright © OASIS Open 2023. All Rights Reserved. + +Distributed under the terms of the OASIS [IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/). + +The name "OASIS" is a trademark of [OASIS](https://www.oasis-open.org/), 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. + +------- diff --git a/odata-csdl-json/1 TODO.md b/odata-csdl-json/1 TODO.md new file mode 100644 index 000000000..44c5bdfba --- /dev/null +++ b/odata-csdl-json/1 TODO.md @@ -0,0 +1,224 @@ +------- + +# ##sec Introduction + + + +## ##subsec Changes from earlier Versions + + + + +## ##subsec Glossary + +### ##subsubsec Definitions of terms + + +TODO: find out why we need a $dummy$ formula to get `monospace` look as we want it. + +### ##subsubsec Acronyms and abbreviations + + + +### ##subsubsec Document conventions + +Keywords defined by this specification use `this monospaced font`. + +Some sections of this specification are illustrated with non-normative examples. + +::: example +Example ##ex: text describing an example uses this paragraph style +``` +Non-normative examples use this paragraph style. +``` +::: + +All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading. + +All other text is normative unless otherwise labeled. + +::: example +Here is a customized command line which will generate HTML from this markdown file (named `$$$filename$$$.md`). Line breaks are added for readability only: + +``` +pandoc -f gfm+tex_math_dollars+fenced_divs + -t html + -o $$$filename$$$.html + -c styles/markdown-styles-v1.7.3b.css + -c styles/odata.css + -s + --mathjax + --eol=lf + --wrap=none + --metadata pagetitle="$$$pagetitle$$$" + $$$filename$$$.md +``` + +This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2. +::: + +------- + +# 2 Section Heading +text. + +## 2.1 Level 2 Heading +text. + +### 2.1.1 Level 3 Heading +text. + +#### 2.1.1.1 Level 4 Heading +text. + +##### 2.1.1.1.1 Level 5 Heading +This is the deepest level, because six # gets transformed into a Reference tag. + + +## 2.2 Next Heading +text. + +------- + +# 3 Conformance + + +`(Note: The [OASIS TC Process](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsConfClause) requires that a specification approved by the TC at the Committee Specification Public Review Draft, Committee Specification or OASIS Standard level must include a separate section, listing a set of numbered conformance clauses, to which any implementation of the specification must adhere in order to claim conformance to the specification (or any optional portion thereof). This is done by listing the conformance clauses here.` +`For the definition of "conformance clause," see [OASIS Defined Terms](https://www.oasis-open.org/policies-guidelines/oasis-defined-terms-2018-05-22/#dConformanceClause).` + +`See "Guidelines to Writing Conformance Clauses": +https://docs.oasis-open.org/templates/TCHandbook/ConformanceGuidelines.html.` + +`Remove this note before submitting for publication.)` + + +------- + +# Appendix A. References + + + +This appendix contains the normative and informative references that are used in this document. + +While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity. + +## A.1 Normative References + +The following documents are referenced in such a way that some or all of their content constitutes requirements of this document. + +`(Reference sources: +For references to IETF RFCs, use the approved citation formats at: +https://docs.oasis-open.org/templates/ietf-rfc-list/ietf-rfc-list.html. +For references to W3C Recommendations, use the approved citation formats at: +https://docs.oasis-open.org/templates/w3c-recommendations-list/w3c-recommendations-list.html. +Remove this note before submitting for publication.)` + +###### [OData-v4.02] +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + +##### [RFC2119] +_Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997_ +http://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_ +http://www.rfc-editor.org/info/rfc8174. + +## A.2 Informative References + +###### [RFC3552] +_Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003_ +https://www.rfc-editor.org/info/rfc3552. + +------- + +# Appendix B. Safety, Security and Privacy Considerations + + + +`(Note: OASIS strongly recommends that Technical Committees consider issues that might affect safety, security, privacy, and/or data protection in implementations of their specification and document them for implementers and adopters. For some purposes, you may find it required, e.g. if you apply for IANA registration.` + +`While it may not be immediately obvious how your specification might make systems vulnerable to attack, most specifications, because they involve communications between systems, message formats, or system settings, open potential channels for exploit. For example, IETF [[RFC3552](#rfc3552)] lists “eavesdropping, replay, message insertion, deletion, modification, and man-in-the-middle” as well as potential denial of service attacks as threats that must be considered and, if appropriate, addressed in IETF RFCs.` + +`In addition to considering and describing foreseeable risks, this section should include guidance on how implementers and adopters can protect against these risks.` + +`We encourage editors and TC members concerned with this subject to read _Guidelines for Writing RFC Text on Security Considerations_, IETF [[RFC3552](#rfc3552)], for more information.` + +`Remove this note before submitting for publication.)` + +------- + +# Appendix C. Acknowledgments + + + +`Note: A Work Product approved by the TC must include a list of people who participated in the development of the Work Product. This is generally done by collecting the list of names in this appendix. This list shall be initially compiled by the Chair, and any Member of the TC may add or remove their names from the list by request. Remove this note before submitting for publication.` + +## C.1 Special Thanks + + + +Substantial contributions to this document from the following individuals are gratefully acknowledged: + +Participant Name, Affiliation or "Individual Member" + +## C.2 Participants + + + +The following individuals have participated in the creation of this specification and are gratefully acknowledged: + +**OpenC2 TC Members:** + +| First Name | Last Name | Company | +| :--- | :--- | :--- | +Philippe | Alman | Something Networks +Alex | Amirnovman | Company B +Kris | Anderman | Mini Micro +Darren | Anstman | Big Networks + +------- + +# Appendix D. Revision History + + + +| Revision | Date | Editor | Changes Made | +| :--- | :--- | :--- | :--- | +| specname-v1.0-wd01 | yyyy-mm-dd | Editor Name | Initial working draft | + +------- + +# Appendix E. Example Appendix with subsections + +## E.1 Subsection title + +### E.1.1 Sub-subsection + +------- + +# Appendix F. 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](https://www.oasis-open.org/policies-guidelines/ipr/) 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. + +As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, 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](https://www.oasis-open.org/), 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/odata-csdl-json/meta.yaml b/odata-csdl-json/meta.yaml new file mode 100644 index 000000000..3e2ea3ddb --- /dev/null +++ b/odata-csdl-json/meta.yaml @@ -0,0 +1,8 @@ +pagetitle: OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02 +subtitle: Committee Specification Draft 01 +filename: odata-csdl-json-v4.02-csd01 +stage: csd01 +previousStage: n/a +pubdate: 14 July 2023 +pubdateISO: '2023-07-14' +copyright: © OASIS Open 2023 diff --git a/odata-csdl-xml/0 frontmatter.md b/odata-csdl-xml/0 frontmatter.md new file mode 100644 index 000000000..e6f64062d --- /dev/null +++ b/odata-csdl-xml/0 frontmatter.md @@ -0,0 +1,90 @@ + +![OASIS Logo](https://docs.oasis-open.org/templates/OASISLogo-v3.0.png) + +------- + +# OData Common Schema Definition Language (CSDL) XML Representation Version 4.02 + +## Committee Specification Draft 01 + +## 14 July 2023 + +  + +#### This stage: +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/$$$stage$$$/$$$filename$$$.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/$$$stage$$$/$$$filename$$$.html \ +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/$$$stage$$$/$$$filename$$$.pdf + +#### Previous stage: +N/A + +#### Latest stage: +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.html \ +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.pdf + +#### Technical Committee: +[OASIS Open Data Protocol (OData) TC](https://www.oasis-open.org/committees/odata/) + +#### Chairs: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) + +#### Editors: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) \ +Heiko Theißen (heiko.theissen@sap.com), [SAP SE](http://www.sap.com/) + +#### Additional artifacts: +This prose specification is one component of a Work Product that also includes: +* XML schemas: (list file names or directory name) +* Other parts (list titles and/or file names) +* `(Note: Any normative computer language definitions that are part of the Work Product, such as XML instances, schemas and Java(TM) code, including fragments of such, must be (a) well formed and valid, (b) provided in separate plain text files, (c) referenced from the Work Product; and (d) where any definition in these separate files disagrees with the definition found in the specification, the definition in the separate file prevails. Remove this note before submitting for publication.)` + +#### Related work: +This specification replaces or supersedes: +* _OData Common Schema Definition Language (CSDL) XML Representation Version 4.01_. Edited by Michael Pizzo, Ralf Handl, and Martin Zurmuehl. OASIS Standard. Latest stage: https://docs.oasis-open.org/odata/odata-csdl-xml/v4.01/odata-csdl-xml-v4.01.html. + +This specification is related to: +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + +#### 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](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/. + +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). + +Note that any machine-readable content ([Computer Language Definitions](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsCompLang)) 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](#rfc2119)] and [[RFC8174](#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-XML-v4.02]** + +_OData Common Schema Definition Language (CSDL) XML Representation Version 4.02_. +Edited by Ralf Handl, Michael Pizzo, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. +https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/$$$stage$$$/$$$filename$$$.html. +Latest stage: https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.html. + +#### Notices +Copyright © OASIS Open 2023. All Rights Reserved. + +Distributed under the terms of the OASIS [IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/). + +The name "OASIS" is a trademark of [OASIS](https://www.oasis-open.org/), 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. + +------- diff --git a/odata-csdl-xml/1 TODO.md b/odata-csdl-xml/1 TODO.md new file mode 100644 index 000000000..44c5bdfba --- /dev/null +++ b/odata-csdl-xml/1 TODO.md @@ -0,0 +1,224 @@ +------- + +# ##sec Introduction + + + +## ##subsec Changes from earlier Versions + + + + +## ##subsec Glossary + +### ##subsubsec Definitions of terms + + +TODO: find out why we need a $dummy$ formula to get `monospace` look as we want it. + +### ##subsubsec Acronyms and abbreviations + + + +### ##subsubsec Document conventions + +Keywords defined by this specification use `this monospaced font`. + +Some sections of this specification are illustrated with non-normative examples. + +::: example +Example ##ex: text describing an example uses this paragraph style +``` +Non-normative examples use this paragraph style. +``` +::: + +All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading. + +All other text is normative unless otherwise labeled. + +::: example +Here is a customized command line which will generate HTML from this markdown file (named `$$$filename$$$.md`). Line breaks are added for readability only: + +``` +pandoc -f gfm+tex_math_dollars+fenced_divs + -t html + -o $$$filename$$$.html + -c styles/markdown-styles-v1.7.3b.css + -c styles/odata.css + -s + --mathjax + --eol=lf + --wrap=none + --metadata pagetitle="$$$pagetitle$$$" + $$$filename$$$.md +``` + +This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2. +::: + +------- + +# 2 Section Heading +text. + +## 2.1 Level 2 Heading +text. + +### 2.1.1 Level 3 Heading +text. + +#### 2.1.1.1 Level 4 Heading +text. + +##### 2.1.1.1.1 Level 5 Heading +This is the deepest level, because six # gets transformed into a Reference tag. + + +## 2.2 Next Heading +text. + +------- + +# 3 Conformance + + +`(Note: The [OASIS TC Process](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsConfClause) requires that a specification approved by the TC at the Committee Specification Public Review Draft, Committee Specification or OASIS Standard level must include a separate section, listing a set of numbered conformance clauses, to which any implementation of the specification must adhere in order to claim conformance to the specification (or any optional portion thereof). This is done by listing the conformance clauses here.` +`For the definition of "conformance clause," see [OASIS Defined Terms](https://www.oasis-open.org/policies-guidelines/oasis-defined-terms-2018-05-22/#dConformanceClause).` + +`See "Guidelines to Writing Conformance Clauses": +https://docs.oasis-open.org/templates/TCHandbook/ConformanceGuidelines.html.` + +`Remove this note before submitting for publication.)` + + +------- + +# Appendix A. References + + + +This appendix contains the normative and informative references that are used in this document. + +While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity. + +## A.1 Normative References + +The following documents are referenced in such a way that some or all of their content constitutes requirements of this document. + +`(Reference sources: +For references to IETF RFCs, use the approved citation formats at: +https://docs.oasis-open.org/templates/ietf-rfc-list/ietf-rfc-list.html. +For references to W3C Recommendations, use the approved citation formats at: +https://docs.oasis-open.org/templates/w3c-recommendations-list/w3c-recommendations-list.html. +Remove this note before submitting for publication.)` + +###### [OData-v4.02] +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + +##### [RFC2119] +_Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997_ +http://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_ +http://www.rfc-editor.org/info/rfc8174. + +## A.2 Informative References + +###### [RFC3552] +_Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003_ +https://www.rfc-editor.org/info/rfc3552. + +------- + +# Appendix B. Safety, Security and Privacy Considerations + + + +`(Note: OASIS strongly recommends that Technical Committees consider issues that might affect safety, security, privacy, and/or data protection in implementations of their specification and document them for implementers and adopters. For some purposes, you may find it required, e.g. if you apply for IANA registration.` + +`While it may not be immediately obvious how your specification might make systems vulnerable to attack, most specifications, because they involve communications between systems, message formats, or system settings, open potential channels for exploit. For example, IETF [[RFC3552](#rfc3552)] lists “eavesdropping, replay, message insertion, deletion, modification, and man-in-the-middle” as well as potential denial of service attacks as threats that must be considered and, if appropriate, addressed in IETF RFCs.` + +`In addition to considering and describing foreseeable risks, this section should include guidance on how implementers and adopters can protect against these risks.` + +`We encourage editors and TC members concerned with this subject to read _Guidelines for Writing RFC Text on Security Considerations_, IETF [[RFC3552](#rfc3552)], for more information.` + +`Remove this note before submitting for publication.)` + +------- + +# Appendix C. Acknowledgments + + + +`Note: A Work Product approved by the TC must include a list of people who participated in the development of the Work Product. This is generally done by collecting the list of names in this appendix. This list shall be initially compiled by the Chair, and any Member of the TC may add or remove their names from the list by request. Remove this note before submitting for publication.` + +## C.1 Special Thanks + + + +Substantial contributions to this document from the following individuals are gratefully acknowledged: + +Participant Name, Affiliation or "Individual Member" + +## C.2 Participants + + + +The following individuals have participated in the creation of this specification and are gratefully acknowledged: + +**OpenC2 TC Members:** + +| First Name | Last Name | Company | +| :--- | :--- | :--- | +Philippe | Alman | Something Networks +Alex | Amirnovman | Company B +Kris | Anderman | Mini Micro +Darren | Anstman | Big Networks + +------- + +# Appendix D. Revision History + + + +| Revision | Date | Editor | Changes Made | +| :--- | :--- | :--- | :--- | +| specname-v1.0-wd01 | yyyy-mm-dd | Editor Name | Initial working draft | + +------- + +# Appendix E. Example Appendix with subsections + +## E.1 Subsection title + +### E.1.1 Sub-subsection + +------- + +# Appendix F. 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](https://www.oasis-open.org/policies-guidelines/ipr/) 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. + +As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, 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](https://www.oasis-open.org/), 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/odata-csdl-xml/meta.yaml b/odata-csdl-xml/meta.yaml new file mode 100644 index 000000000..9e27116dd --- /dev/null +++ b/odata-csdl-xml/meta.yaml @@ -0,0 +1,8 @@ +pagetitle: OData Common Schema Definition Language (CSDL) XML Representation Version 4.02 +subtitle: Committee Specification Draft 01 +filename: odata-csdl-xml-v4.02-csd01 +stage: csd01 +previousStage: n/a +pubdate: 14 July 2023 +pubdateISO: '2023-07-14' +copyright: © OASIS Open 2023 diff --git a/odata-data-aggregation-ext/0 frontmatter.md b/odata-data-aggregation-ext/0 frontmatter.md index d7d7328c7..d22f4513f 100644 --- a/odata-data-aggregation-ext/0 frontmatter.md +++ b/odata-data-aggregation-ext/0 frontmatter.md @@ -12,14 +12,14 @@   #### This stage: -https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/csd04/odata-data-aggregation-ext-v4.0-csd04.md (Authoritative) \ -https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/csd04/odata-data-aggregation-ext-v4.0-csd04.html \ -https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/csd04/odata-data-aggregation-ext-v4.0-csd04.pdf +https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/$$$stage$$$/$$$filename$$$.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/$$$stage$$$/$$$filename$$$.html \ +https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/$$$stage$$$/$$$filename$$$.pdf #### Previous stage: -https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/cs02/odata-data-aggregation-ext-v4.0-cs02.docx (Authoritative) \ -https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/cs02/odata-data-aggregation-ext-v4.0-cs02.html \ -https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/cs02/odata-data-aggregation-ext-v4.0-cs02.pdf +https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/$$$previousStage$$$/odata-data-aggregation-ext-v4.0-$$$previousStage$$$.docx (Authoritative) \ +https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/$$$previousStage$$$/odata-data-aggregation-ext-v4.0-$$$previousStage$$$.html \ +https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/$$$previousStage$$$/odata-data-aggregation-ext-v4.0-$$$previousStage$$$.pdf #### Latest stage: https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/odata-data-aggregation-ext-v4.0.md (Authoritative) \ @@ -45,10 +45,10 @@ Martin Zurmühl (martin.zurmuehl@sap.com), [SAP SE](https://www.sap.com/) #### Additional artifacts: This document is one component of a Work Product that also includes: -* ABNF components: _OData Aggregation ABNF Construction Rules Version 4.0 and OData Aggregation ABNF Test Cases_: https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/csd04/abnf/ +* ABNF components: _OData Aggregation ABNF Construction Rules Version 4.0 and OData Aggregation ABNF Test Cases_: https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/$$$stage$$$/abnf/ * OData Aggregation Vocabulary: - * https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/csd04/vocabularies/Org.OData.Aggregation.V1.json - * https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/csd04/vocabularies/Org.OData.Aggregation.V1.xml + * https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/$$$stage$$$/vocabularies/Org.OData.Aggregation.V1.json + * https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/$$$stage$$$/vocabularies/Org.OData.Aggregation.V1.xml #### Related work: This specification is related to: @@ -83,7 +83,7 @@ When referencing this specification the following citation format should be used _$$$pagetitle$$$_. Edited by Ralf Handl, Hubert Heijkers, Gerald Krause, Michael Pizzo, Heiko Theißen, and Martin Zurmuehl. $$$pubdate$$$. OASIS $$$subtitle$$$. -https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/csd04/$$$filename$$$.html. +https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/$$$stage$$$/$$$filename$$$.html. Latest stage: https://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/odata-data-aggregation-ext-v4.0.html. #### Notices diff --git a/odata-data-aggregation-ext/5 Vocabulary for Data Aggregation.md b/odata-data-aggregation-ext/5 Vocabulary for Data Aggregation.md index b3af082da..d655732d0 100644 --- a/odata-data-aggregation-ext/5 Vocabulary for Data Aggregation.md +++ b/odata-data-aggregation-ext/5 Vocabulary for Data Aggregation.md @@ -220,7 +220,7 @@ The hierarchy terms can be applied to the [Example Data Model](#ExampleDataModel + aggregation-ext/v4.0/$$$stage$$$/vocabularies/Org.OData.Aggregation.V1.xml"> diff --git a/odata-data-aggregation-ext/meta.yaml b/odata-data-aggregation-ext/meta.yaml index 56e79bfe0..d28dd55bb 100644 --- a/odata-data-aggregation-ext/meta.yaml +++ b/odata-data-aggregation-ext/meta.yaml @@ -1,6 +1,8 @@ pagetitle: OData Extension for Data Aggregation Version 4.0 subtitle: Committee Specification Draft 04 filename: odata-data-aggregation-ext-v4.0-csd04 +stage: csd04 +previousStage: cs02 pubdate: 05 July 2023 pubdateISO: '2023-07-05' copyright: © OASIS Open 2023 diff --git a/odata-json-format/0 frontmatter.md b/odata-json-format/0 frontmatter.md new file mode 100644 index 000000000..5862b8cea --- /dev/null +++ b/odata-json-format/0 frontmatter.md @@ -0,0 +1,89 @@ + +![OASIS Logo](https://docs.oasis-open.org/templates/OASISLogo-v3.0.png) + +------- + +# $$$pagetitle$$$ + +## $$$subtitle$$$ + +## $$$pubdate$$$ + +  + +#### This stage: +https://docs.oasis-open.org/odata/odata-json-format/v4.02/$$$stage$$$/$$$filename$$$.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata-json-format/v4.02/$$$stage$$$/$$$filename$$$.html \ +https://docs.oasis-open.org/odata/odata-json-format/v4.02/$$$stage$$$/$$$filename$$$.pdf + +#### Previous stage: +N/A + +#### Latest stage: +https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html \ +https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.pdf + +#### Technical Committee: +[OASIS Open Data Protocol (OData) TC](https://www.oasis-open.org/committees/odata/) + +#### Chairs: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) + +#### Editors: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) \ +Heiko Theißen (heiko.theissen@sap.com), [SAP SE](http://www.sap.com/) + +#### Related work: +This specification replaces or supersedes: +* OData JSON Format Version 4.01. Edited by Michael Pizzo, Ralf Handl, and Mark Biamonte. OASIS Standard. Latest stage: https://docs.oasis-open.org/odata/odata-json-format/v4.01/odata-json-format-v4.01.html. +* OData JSON Format Version 4.0. Edited by Ralf Handl, Michael Pizzo, and Mark Biamonte. OASIS Standard. Latest stage: http://docs.oasis-open.org/odata/odata-json-format/v4.0/odata-json-format-v4.0.html. + +This specification is related to: +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + * _ABNF components: OData ABNF Construction Rules Version 4.02 and OData ABNF Test Cases_. https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/abnf/ +* _OData Vocabularies Version 4.0_. Edited by Michael Pizzo, Ralf Handl, and Ram Jeyaraman. Latest stage: https://docs.oasis-open.org/odata/odata-vocabularies/v4.0/odata-vocabularies-v4.0.html +* _OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. Latest stage: https://docs.oasis-open.org/odata/odata-csdl-json/v4.02/odata-csdl-json-v4.02.html +* _OData Common Schema Definition Language (CSDL) XML Representation Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. Latest stage: https://docs.oasis-open.org/odata/odata-csdl-xml/v4.02/odata-csdl-xml-v4.02.html + +#### 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](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/. + +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). + +Note that any machine-readable content ([Computer Language Definitions](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsCompLang)) 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](#rfc2119)] and [[RFC8174](#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]** + +_$$$pagetitle$$$_. +Edited by Ralf Handl, Michael Pizzo, and Heiko Theißen. $$$pubdate$$$. OASIS $$$subtitle$$$. +https://docs.oasis-open.org/odata/odata-json-format/v4.02/$$$stage$$$/$$$filename$$$.html. +Latest stage: https://docs.oasis-open.org/odata/odata-json-format/v4.02/odata-json-format-v4.02.html. + +#### Notices +Copyright $$$copyright$$$. All Rights Reserved. + +Distributed under the terms of the OASIS [IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/). + +The name "OASIS" is a trademark of [OASIS](https://www.oasis-open.org/), 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](#Notices). + +------- diff --git a/odata-json-format/1 Introduction.md b/odata-json-format/1 Introduction.md new file mode 100644 index 000000000..7978e76a6 --- /dev/null +++ b/odata-json-format/1 Introduction.md @@ -0,0 +1,112 @@ +------- + +# ##sec Introduction + +The OData protocol is comprised of a set of specifications for representing and interacting with structured content. The core specification for the protocol is in [OData-Protocol](#ODataProtocol); this document is an extension of the core protocol. This document defines representations for the OData requests and responses using the JavaScript Object Notation (JSON), see [RFC8259]. + +An OData JSON payload may represent: + +- a [single primitive value](#PrimitiveValue) +- a [collection of primitive values](#CollectionofPrimitiveValues) +- a [single complex type value](#ComplexValue) +- a [collection of complex type values](#CollectionofComplexValues) +- a [single entity](#Entity) or [entity reference](#EntityReference) +- a [collection of entities](#CollectionofEntities) or [entity references](#EntityReference) +- a [collection of changes](#DeltaPayload) +- a [service document](#ServiceDocument) describing the top-level resources exposed by the service +- an [error](#ErrorResponse). + +## ##subsec Changes from earlier Versions + + + + +## ##subsec Glossary + +### ##subsubsec Definitions of terms + + +TODO: find out why we need a $dummy$ formula to get `monospace` look as we want it. + +### ##subsubsec Acronyms and abbreviations + + + +### ##subsubsec Document conventions + +Keywords defined by this specification use `this monospaced font`. + +Some sections of this specification are illustrated with non-normative examples. + +::: example +Example ##ex: text describing an example uses this paragraph style +``` +Non-normative examples use this paragraph style. +``` +::: + +All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading. + +All other text is normative unless otherwise labeled. + +::: example +Here is a customized command line which will generate HTML from this markdown file (named `$$$filename$$$.md`). Line breaks are added for readability only: + +``` +pandoc -f gfm+tex_math_dollars+fenced_divs + -t html + -o $$$filename$$$.html + -c styles/markdown-styles-v1.7.3b.css + -c styles/odata.css + -s + --mathjax + --eol=lf + --wrap=none + --metadata pagetitle="$$$pagetitle$$$" + $$$filename$$$.md +``` + +This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2. +::: + +------- + +# ##sec JSON Format Design + +JSON, as described in [RFC8259](#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](#InstanceAnnotations) 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](#PayloadOrderingConstraints). diff --git a/odata-json-format/23 Conformance.md b/odata-json-format/23 Conformance.md new file mode 100644 index 000000000..13f48d077 --- /dev/null +++ b/odata-json-format/23 Conformance.md @@ -0,0 +1,79 @@ +------- + +# ##sec Conformance + +Conforming clients MUST be prepared to consume a service that uses any or all of the constructs defined in this specification. The exception to this are the constructs defined in Delta Response, which are only required for clients that request changes. + + + +In order to be a conforming consumer of the OData JSON format, a client or service: + +1. MUST either: + 1. understand `metadata=minimal` ([section ##metadataminimalodatametadataminimal]) or + 2. explicitly specify `metadata=none` ([section ##metadatanoneodatametadatanone]) or `metadata=full` ([section ##metadatafullodatametadatafull]) in the request (client) +2. MUST be prepared to consume a response with full metadata +3. MUST be prepared to receive all data types ([section ##PrimitiveValue]) + 1. defined in this specification (client) + 2. exposed by the service (service) +4. MUST interpret all `odata` control information defined according to the `OData-Version` header of the payload ([section ##ControlInformation]) +5. MUST be prepared to receive any annotations and control information not defined in the `OData-Version` header of the payload ([section ##InstanceAnnotations]) +6. MUST NOT require `streaming=true` in the `Content-Type` header ([section ##PayloadOrderingConstraints]) +7. MUST be a conforming consumer of the OData 4.0 JSON format, for payloads with an `OData-Version` header value of `4.0`. + 1. MUST accept the `odata.` prefix, where defined, on format parameters and control information + 2. MUST accept the `#` prefix in `@odata.type` values + 3. MUST be prepared to handle binding through the use of the `@odata.bind` property in payloads to a `PATCH`, `PUT`, or `POST` request + 4. MUST accept `TargetId` within in a deleted link for a relationship with a maximum cardinality of one + 5. MUST accept the string values `-INF`, `INF`, and `NaN` for single and double values + 6. MUST support property annotations that appear immediately before or after the property they annotate +8. MAY be a conforming consumer of the OData 4.01 JSON format, for payloads with an `OData-Version` header value of `4.01`. + 1. MUST be prepared to interpret control information with or without the `odata.` prefix + 2. MUST be prepared for `@odata.type` primitive values with or without the `#` prefix + 3. MUST be prepared to handle binding through inclusion of an entity reference within a collection-valued navigation property in the body of a `PATCH`, `PUT`, or `POST` request + 4. MUST be prepared for `TargetId` to be included or omitted in a deleted link for a relationship with a maximum cardinality of one + 5. MUST accept the string values `-INF`, `INF`, and `NaN` for decimal values with floating scale + 6. MUST be prepared to handle related entities inline within a delta payload as well as a nested delta representation for the collection + 7. MUST be prepared to handle decimal values written in exponential notation + +In order to be a conforming producer of the OData JSON format, a client or service: + +9. MUST support generating OData 4.0 JSON compliant payloads with an `OData-Version` header value of `4.0`. + 1. MUST NOT omit the `odata.` prefix from format parameters or control information + 2. MUST NOT omit the `#` prefix from `@odata.type` values + 3. MUST NOT include entity values or entity references within a collection-valued navigation property in the body of a `PATCH`, `PUT`, or `POST` request + 4. MUST NOT return decimal values written in exponential notation unless the ExponentialDecimals format parameter is specified. + 5. MUST NOT advertise available actions or functions using name/value pairs prefixed with a property name + 6. MUST NOT return a null value for name/value pairs representing actions or functions that are not available + 7. MUST NOT represent numeric value exceptions for values other than single and double values using the string values `-INF`, `INF`, and `NaN` +10. MAY support generating OData 4.01 JSON compliant payloads for requests with an `OData-Version` header value of `4.01`. + 1. MUST return property annotations immediately before the property they annotate + 2. SHOULD omit the `odata.` prefix from format parameters and control information + 3. SHOULD omit the `#` prefix from `@type` primitive values + 4. MAY include inline related entities or nested delta collections within a delta payload + 5. MAY include `TargetId` within a deleted link for a relationship with a maximum cardinality of 1 + 6. MAY return decimal values written in exponential notation + 7. MAY represent numeric value exceptions for decimal values with floating scale using the string values `-INF`, `INF`, and `NaN` + +In addition, in order to conform to the OData JSON format, a service: + +11. MUST comply with one of the conformance levels defined in [OData-Protocol](#ODataProtocol) +12. MUST support the `application/json` media type in the `Accept` header ([section ##RequestingtheJSONFormat]) +13. MUST return well-formed JSON payloads +14. MUST support `odata.metadata=full` ([section ##metadatafullodatametadatafull]) +15. MUST include the `odata.nextLink` control information in partial results for entity collections ([section ##ControlInformationnextLinkodatanextLink]) +16. MUST support entity instances with external metadata ([section ##ControlInformationcontextodatacontext]) +17. MUST support properties with externally defined data types ([section ##ControlInformationtypeodatatype]) +18. MUST NOT violate any other aspects of this OData JSON specification +19. SHOULD support the `$format` system query option ([section ##RequestingtheJSONFormat]) +20. MAY support the `odata.streaming=true` parameter in the `Accept` header ([section ##PayloadOrderingConstraints]) +21. MAY return full metadata regardless of `odata.metadata` ([section ##metadatafullodatametadatafull]) +22. MUST NOT omit null or default values unless the `omit-values` preference is specified in the `Prefer` request header and the `omit-values` preference is included in the `Preference-Applied` response header +23. MUST return OData JSON 4.0-compliant responses for requests with an `OData-MaxVersion` header value of `4.0` +24. MUST support OData JSON 4.0-compliant payloads in requests with an `OData-Version` header value of `4.0` +25. MUST support returning, in the final response to an asynchronous request, the `application/json` payload that would have been returned had the operation completed synchronously, wrapped in an `application/http` message + +In addition, in order to comply with the OData 4.01 JSON format, a service: + +26. SHOULD return the OData JSON 4.01 format for requests with an `OData-MaxVersion` header value of `4.01` +27. MUST support the OData JSON 4.01 format in request payloads for requests with an `OData-Version` header value of `4.01` +28. MUST honor the `odata.etag` control information within `PUT`, `PATCH` or `DELETE` payloads, if specified +29. MUST support returning, in the final response to an asynchronous request, the `application/json` payload that would have been returned had the operation completed synchronously diff --git a/odata-json-format/3 Requesting the JSON Format.md b/odata-json-format/3 Requesting the JSON Format.md new file mode 100644 index 000000000..31e0cb507 --- /dev/null +++ b/odata-json-format/3 Requesting the JSON Format.md @@ -0,0 +1,235 @@ +------- + +# ##sec Requesting the JSON Format + +The OData JSON format can be requested using the `$format` +query option in the request URL with the media type +`application/json`, optionally followed by format parameters, +or the case-insensitive abbreviation `json` which MUST NOT be +followed by format parameters. + +Alternatively, this format can be requested using the +`Accept` header with the media type +`application/json`, optionally followed by format parameters. + +If specified, `$format` overrides any value specified in the +`Accept` header. + +Possible format parameters are: + +- [`ExponentialDecimals`](#ControllingtheRepresentationofNumbers) +- [`IEEE754Compatible`](#ControllingtheRepresentationofNumbers) +- [`metadata`](#ControllingtheAmountofControlInformationinResponses) +- [`streaming`](#PayloadOrderingConstraints) + +The names and values of these format parameters are case-insensitive. + +Services SHOULD advertise the supported media types by annotating the +entity container with the term +[`Capabilities.SupportedFormats`](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Capabilities.V1.md#SupportedFormats) +defined in [OData-VocCap](#ODataVocCap), listing all +available formats and combinations of supported format parameters. + + +## ##subsec Controlling the Amount of Control Information in Responses + +The amount of [control information](#ControlInformation) needed (or +desired) in the payload depends on the client application and device. +The `metadata` parameter can be applied to the +`Accept` header of an OData request to influence how much +control information will be included in the response. + +Other `Accept` header parameters (e.g., +`streaming`) are orthogonal to the `metadata` +parameter and are therefore not mentioned in this section. + +If a client prefers a very small wire size and is intelligent enough to +compute data using metadata expressions, the `Accept` header +should include +[`metadata=minimal`](#metadataminimalodatametadataminimal). +If computation is more critical than wire size or the client is +incapable of computing control information, +[`metadata=full`](#metadatafullodatametadatafull) +directs the service to inline the control information that normally +would be computed from metadata expressions in the payload. +[`metadata=none`](#metadatanoneodatametadatanone) +is an option for clients that have out-of-band knowledge or don\'t +require control information. + +In addition, the client may use the `include-annotations` +preference in the `Prefer` header to request additional +control information. Services supporting this MUST NOT omit control +information required by the chosen `metadata` parameter, and +services MUST NOT exclude the +[`nextLink`](#ControlInformationnextLinkodatanextLink), +[`deltaLink`](#ControlInformationdeltaLinkodatadeltaLink), and +[`count`](#ControlInformationcountodatacount) +if they are required by the response type. + +If the client includes the +`OData-MaxVersion` header in a +request and does not specify the +`metadata` format parameter in +either the `Accept` header or `$format` query +option, the service MUST return at least the [minimal control +information](#metadataminimalodatametadataminimal). + +Note that in OData 4.0 the `metadata` 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. + +### ##subsubsec `metadata=minimal` (`odata.metadata=minimal`) + +The `metadata=minimal` format parameter indicates that the +service SHOULD remove computable control information from the payload +wherever possible. The response payload MUST contain at least the +following [control information](#ControlInformation): + +- [`context`](#ControlInformationcontextodatacontext): + the root context URL of the payload and the context URL for any deleted + entries or added or deleted links in a delta response, or for entities + or entity collections whose set cannot be determined from the root + context URL +- [`etag`](#ControlInformationetagodataetag): + the ETag of the entity or collection, as appropriate +- [`count`](#ControlInformationcountodatacount): + the total count of a collection of entities or collection of entity + references, if requested +- [`nextLink`](#ControlInformationnextLinkodatanextLink): + the next link of a collection with partial results +- [`deltaLink`](#ControlInformationdeltaLinkodatadeltaLink): + the delta link for obtaining changes to the result, if requested + +In addition, control information MUST appear in the payload for cases +where actual values are not the same as the computed values and MAY +appear otherwise. When control information appears in the payload, it is +treated as exceptions to the computed values. + +Media entities and stream properties MAY in addition contain the +following control information: + +- [`mediaEtag`](#ControlInformationmediaodatamedia): + the ETag of the stream, as appropriate +- [`mediaContentType`](#ControlInformationmediaodatamedia): + the media type of the stream + +### ##subsubsec `metadata=full` (`odata.metadata=full`) + +The `metadata=full` format parameter indicates that the +service MUST include all control information explicitly in the payload. + +The full list of control information that may appear in a +`metadata=full` response is as follows: + +- [`context`](#ControlInformationcontextodatacontext): + the context URL for a collection, entity, primitive value, or service + document. +- [`count`](#ControlInformationcountodatacount): + the total count of a collection of entities or collection of entity + references, if requested. +- [`nextLink`](#ControlInformationnextLinkodatanextLink): + the next link of a collection with partial results +- [`deltaLink`](#ControlInformationdeltaLinkodatadeltaLink): + the delta link for obtaining changes to the result, if requested +- [`id`](#ControlInformationidodataid): + the ID of the entity +- [`etag`](#ControlInformationetagodataetag): + the ETag of the entity or collection, as appropriate +- [`readLink`](#ControlInformationeditLinkandreadLinkodataeditLinkandodatareadLink): + the link used to read the entity, if the edit link cannot be used to + read the entity +- [`editLink`](#ControlInformationeditLinkandreadLinkodataeditLinkandodatareadLink): + 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`](#NavigationLink): + the link used to retrieve the values of a navigation property +- [`associationLink`](#AssociationLink): + the link used to describe the relationship between this entity and + related entities +- [`type`](#ControlInformationtypeodatatype): + 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)](#ControlInformationtypeodatatype). + +Media entities and stream properties may in addition contain the +following control information: + +- [`mediaReadLink`](#ControlInformationmediaodatamedia): + the link used to read the stream +- [`mediaEditLink`](#ControlInformationmediaodatamedia): + the link used to edit/update the stream +- [`mediaEtag`](#ControlInformationmediaodatamedia): + the ETag of the stream, as appropriate +- [`mediaContentType`](#ControlInformationmediaodatamedia): + the media type of the stream + +### ##subsubsec `metadata=none` (`odata.metadata=none`) + +The `metadata=none` format parameter indicates that the +service SHOULD omit control information other than +[`nextLink`](#ControlInformationnextLinkodatanextLink) and +[`count`](#ControlInformationcountodatacount). +This control information MUST continue to be included, as applicable, +even in the `metadata=none` case. + +It is not valid to specify `metadata=none` on a [delta +request](#DeltaPayload). + +## ##subsec Controlling the Representation of Numbers + +The `IEEE754Compatible=true` format parameter indicates that +the service MUST serialize `Edm.Int64` and +`Edm.Decimal` numbers (including the +[`count`](#ControlInformationcountodatacount), +if requested) as strings. This is in conformance with +[RFC7493](#rfc7493). + +If not specified, or specified as `IEEE754Compatible=false`, +all numbers MUST be serialized as JSON numbers. + +This enables support for JavaScript numbers that are defined to be +64-bit binary format IEEE 754 values (see **[[ECMAScript](#ECMAScript), [section 4.3.1.9](http://www.ecma-international.org/ecma-262/5.1/#sec-4.3.19)]**) +resulting in integers losing precision past 15 digits, and decimals +losing precision due to the conversion from base 10 to base 2. + +OData JSON request and response payloads that format +`Edm.Int64` and `Edm.Decimal` values as strings +MUST specify this format parameter in the media type sent in the +[`Content-Type`](#HeaderContentType) +header. + +Services producing responses without format parameter +`IEEE754Compatible=true` which are unable to produce exact +JSON numbers MAY serialize `Edm.Int64` and +`Edm.Decimal` numbers with a rounded/inexact value as a JSON +number and annotate that value with an instance annotation with term +`Core.ValueException` defined in +[OData-VocCore](#ODataVocCore) containing the exact value as a +string. This situation can for example happen if the client only accepts +`application/json` without any format parameters and the +service is written in JavaScript. + +For payloads with an `OData-Version` header equal to +`4.0` +the `ExponentialDecimals=true` format parameter indicates +that the service MAY serialize `Edm.Decimal` numbers in +exponential notation (e.g. `1e-6` instead of +`0.000001`). + +The sender of a request MUST specify +`ExponentialDecimals=true` in the `Content-Type` +header if the request body contains `Edm.Decimal` values in +exponential notation. + +If not specified, or specified as +`ExponentialDecimals=false`, all `Edm.Decimal` +values MUST be serialized in long notation, using only an optional sign, +digits, and an optional decimal point followed by digits. + +Payloads with an `OData-Version` header equal to `4.01` +or greater always allow exponential notation for numbers and the +`ExponentialDecimals` format parameter is not needed or used. diff --git a/odata-json-format/4 Common Characteristics.md b/odata-json-format/4 Common Characteristics.md new file mode 100644 index 000000000..963d2bbf0 --- /dev/null +++ b/odata-json-format/4 Common Characteristics.md @@ -0,0 +1,380 @@ +------- + +# ##sec Common Characteristics + +This section describes common characteristics of the representation for +OData values in JSON. A request or response body consists of several +parts. It contains OData values as part of a larger document. Requests +and responses are structured almost identical; the few existing +differences will be explicitly called out in the respective subsections. + +# ##subsec 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. + +Responses MUST include the +[`metadata`](#ControllingtheAmountofControlInformationinResponses) +parameter to specify the amount of metadata included in the response. + +Requests and responses MUST include the +[`IEEE754Compatible`](#ControllingtheRepresentationofNumbers) +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](#PayloadOrderingConstraints). + +# ##subsec Message Body + +Each message body is represented as a single JSON object. This object is +either the representation of an [entity](#Entity), +an [entity reference](#EntityReference) or a +[complex type instance](#ComplexValue), or it contains a name/value +pair whose name MUST be `value` and whose value is the correct +representation for a [primitive value](#PrimitiveValue), a +[collection of primitive values](#CollectionofPrimitiveValues), a +[collection of complex values](#CollectionofComplexValues), a +[collection of entities](#CollectionofEntities), or a collection of +objects that represent [changes to a previous +result](#DeltaPayload). + +Client libraries MUST retain the +order of objects within an array in JSON responses. + +# ##subsec Relative URLs + +URLs present in a payload (whether request or response) MAY be +represented as relative URLs. + +Relative URLs, other than those in +[`type`](#ControlInformationtypeodatatype), +are relative to their base URL, which is + +- the [context URL](#ControlInformationcontextodatacontext) of the same + JSON object, if one exists, otherwise +- the context URL of the enclosing object, if one exists, otherwise +- the context URL of the next enclosing object, if one exists, etc. until the + document root, otherwise +- the request URL. + +For context URLs, these rules apply starting with the second bullet +point. + +Within the +[`type`](#ControlInformationtypeodatatype) +control information, relative URLs are relative to the base type URL, +which is + +- the `type` of the enclosing object, if one exists, otherwise +- the `type` of the next enclosing object, if one exists, etc. + until the document root, otherwise +- the context URL of the document root, if one exists, otherwise +- the request URL. + +Processors expanding the URLs MUST use normal URL expansion rules as +defined in [RFC3986](#rfc3986). This means that if the base URL is a +context URL, the part starting with `$metadata#` is ignored +when resolving the relative URL. + +Clients that receive relative URLs in response payloads SHOULD use the +same relative URLs, where appropriate, in request payloads (such as +[bind operations](#BindOperation) and batch requests) and in system +query options (such as `$id`). + +URLs represented as a string within a JSON payload, including [batch +requests](#BatchRequest), must follow standard OData encoding rules. +For relative URLs this means that colons in the path part, especially +within key values, MUST be percent-encoded to avoid confusion with the +scheme separator. Colons within the query part, i.e. after the question +mark character (`?`), need not be percent-encoded. + +::: example +Example ##ex: +```json +{ + "@context": "http://host/service/$metadata#Customers/$entity", + ... + "@editLink": "Customers('ALFKI')", + ... + "Orders@navigationLink": "Customers('ALFKI')/Orders", + ... +} +``` +::: + +The resulting absolute URLs are +`http://host/service/Customers('ALFKI')` and +`http://host/service/Customers('ALFKI')/Orders`. + +# ##subsec Payload Ordering Constraints + +Ordering constraints MAY be imposed on the JSON payload in order to +support streaming scenarios. These ordering constraints MUST only be +assumed if explicitly specified as some clients (and services) might not +be able to control, or might not care about, the order of the JSON +properties in the payload. + +Clients can request that a JSON response conform to these ordering +constraints by specifying a media type of +[application/json]{style="font-family: +\"Courier New\""} with the `streaming=true` parameter in the +`Accept` header or +`$format` query option. Services +MUST return `406 Not Acceptable` if +the client only requests streaming and the service does not support it. + +Clients may specify the `streaming=true` parameter in the +`Content-Type` header of requests +to indicate that the request body follows the payload ordering +constraints. In the absence of this parameter, the service must assume +that the JSON properties in the request are unordered. + +Processors MUST only assume streaming support if it is explicitly +indicated in the `Content-Type` header via the +`streaming=true` parameter. + +::: example +Example ##ex: a payload with +``` +Content-Type: application/json;metadata=minimal;streaming=true +``` +can be assumed to support streaming, whereas a payload with +``` +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. + +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. +- The + `type` control information, if present, MUST appear next in + the JSON object. +- The `id` and `etag` control information MUST appear + before any property, property annotation, or property control + information. +- All annotations or control information for a structural or navigation + property MUST appear as a group immediately before the property itself. + The one exception is the + [`nextLink`](#ControlInformationnextLinkodatanextLink) + of a collection which MAY appear after the collection it annotates. +- All other control information can + appear anywhere in the payload as long as it does not violate any of the + above rules. +- For 4.0 payloads, annotations and control information for navigation + properties MUST appear after all structural properties. 4.01 clients + MUST NOT assume this ordering. + +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. + +# ##subsec Control Information + +In addition to the "pure data" a message body MAY contain +[annotations](#InstanceAnnotations) 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. + +# ##subsubsec Control Information: `context` (`odata.context`) + +The `context` control information +returns the context URL (see [OData-Protocol](#ODataProtocol)) for the +payload. This URL can be absolute or [relative](#RelativeURLs). + +The `context` control information +is not returned if +[`metadata=none`](#metadatanoneodatametadatanone)[ +]{.MsoHyperlink}is requested. Otherwise[ ]{.MsoHyperlink}it MUST be the +first property of any JSON response[. ]{.MsoHyperlink} + +The `context` control information +MUST also be included in requests and responses for entities whose +entity set cannot be determined from the context URL[ ]{.MsoHyperlink}of +the collection. + +For more information on the format of the context URL, see +[OData-Protocol](#ODataProtocol). + +Request payloads MAY include a context URL as a base URL for [relative +URLs](#RelativeURLs) in the request payload. + +::: example +Example ##ex: +```json +{ + "@context": "http://host/service/$metadata#Customers/$entity", + "@metadataEtag": "W/\"A1FF3E230954908F\"", + ... +} +``` +::: + +# ##subsubsec Control Information: `metadataEtag` (`odata.metadataEtag`) + +The `metadataEtag` control information MAY appear in a +response in order to specify the entity tag (ETag) that can be used to +determine the version of the metadata of the response. If an ETag is +returned when requesting the metadata document, then the service SHOULD +set the `metadataEtag` control information to the metadata +document\'s ETag in all responses when using +[`metadata=minimal`](#metadataminimalodatametadataminimal) +or +[`metadata=full`](#metadatafullodatametadatafull). +If no ETag is returned when requesting the metadata document, then the +service SHOULD NOT set the `metadataEtag` control information +in any responses. + +For details on how ETags are used, see [OData-Protocol](#ODataProtocol). + +# ##subsubsec 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](#ControlInformationcontextodatacontext). + +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](#ODataProtocol). + +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](#ODataCSDL) or +[OData-CSDLXML](#ODataCSDL). + +The `type` control information MUST appear in requests and in +responses with [minimal](#metadataminimalodatametadataminimal) or +[full](#metadatafullodatametadatafull) metadata, if the type cannot +be heuristically determined, as described below, and one of the +following is true: + +- The type is derived from the type specified for the (collection of) entities + or (collection of) complex type instances, or +- The type is for a property whose type is not declared in + `$metadata`. + +The following heuristics are used to determine the primitive type of a +dynamic property in the absence of the `type` control +information: + +- Boolean values have a first-class representation in JSON and do not need any + additional control information. +- Numeric values have a first-class representation in JSON but are not further + distinguished, so they include a + [`type`](#ControlInformationtypeodatatype) + 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`](#ControlInformationtypeodatatype) + 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`](#ControllingtheRepresentationofNumbers) + 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. + +For more information on namespace- and alias-qualified names, see +[OData-CSDLJSON](#ODataCSDL) or +[OData-CSDLXML](#ODataCSDL). + +::: example +Example ##ex: entity of type +`Model.VipCustomer` defined in the +metadata document of the same service with a dynamic property of type +`Edm.Date` +```json +{ + "@context": "http://host/service/$metadata#Customers/$entity", + "@type": "#Model.VipCustomer", + "ID": 2, + "DynamicValue@type": "Date", + "DynamicValue": "2016-09-22", + ... +} +``` +::: + +::: example +Example ##ex: entity of type +`Model.VipCustomer` defined in the +metadata` `document of a different +service +```json +{ + "@context": "http://host/service/$metadata#Customers/$entity", + "@type": "http://host/alternate/$metadata#Model.VipCustomer", + "ID": 2, + ... +} +``` +::: + +# ##subsubsec Control Information: `count` (`odata.count`) + +# ##subsubsec Control Information: `nextLink` (`odata.nextLink`) + +# ##subsubsec Control Information: `delta` (`odata.delta`) + +# ##subsubsec Control Information: `deltaLink` (`odata.deltaLink`) + +# ##subsubsec Control Information: `id` (`odata.id`) + +# ##subsubsec Control Information: `editLink` and `readLink` (`odata.editLink` and `odata.readLink`) + +# ##subsubsec Control Information: `etag` (`odata.etag`) + +# ##subsubsec Control Information: `navigationLink` and `associationLink` (`odata.navigationLink` and `odata.associationLink`) + +# ##subsubsec Control Information: `media*` (`odata.media*`) + +# ##subsubsec Control Information: `removed` (`odata.removed`) + +# ##subsubsec Control Information: `collectionAnnotations` (`odata.collectionAnnotations`) + diff --git a/odata-json-format/5 to 22 TODO.md b/odata-json-format/5 to 22 TODO.md new file mode 100644 index 000000000..553be76cd --- /dev/null +++ b/odata-json-format/5 to 22 TODO.md @@ -0,0 +1,135 @@ +------- + +# ##sec Service Document + +------- + +# ##sec Entity + +------- + +# ##sec Structural Property + +# ##subsec Primitive Value + +# ##subsec Complex Value + +# ##subsec Collection of Primitive Values + +# ##subsec Collection of Complex Values + +# ##subsec Untyped Value + +------- + +# ##sec Navigation Property + +# ##subsec Navigation Link + +# ##subsec Association Link + +# ##subsec Expanded Navigation Property + +# ##subsec Deep Insert + +# ##subsec Bind Operation + +# ##subsec Collection ETag + +------- + +# ##sec Stream Property + +------- + +# ##sec Media Entity + +------- + +# ##sec Individual Property or Operation Response + +------- + +# ##sec Collection of Operation Responses + +------- + +# ##sec Collection of Entities + +------- + +# ##sec Entity Reference + +------- + +# ##sec Delta Payload + +# ##subsec Delta Responses + +# ##subsec Added/Changed Entity + +# ##subsec Deleted Entity + +# ##subsec Added Link + +# ##subsec Deleted Link + +# ##subsec Update a Collection of Entities + +------- + +# ##sec Bound Function + +------- + +# ##sec Bound Action + +------- + +# ##sec Action Invocation + +------- + +# ##sec Batch Requests and Responses + +# ##subsec Batch Request + +# ##subsec Referencing New Entities + +# ##subsec Referencing an ETag + +# ##subsec Processing a Batch Request + +# ##subsec Batch Response + +# ##subsec Asynchronous Batch Requests + +------- + +# ##sec Instance Annotations + +# ##subsec Annotate a JSON Object + +# ##subsec Annotate a JSON Array or Primitive + +# ##subsec Annotate a Primitive Value within a JSON Array + +------- + +# ##sec Error Handling + +# ##subsec Error Response + +# ##subsec In-Stream Error + +# ##subsec Error Information in a Success Payload + +# ##subsubsec Primitive Value Errors + +# ##subsubsec Structured Type Errors + +# ##subsubsec Collection Errors + +------- + +# ##sec Extensibility diff --git a/odata-json-format/Appendix.md b/odata-json-format/Appendix.md new file mode 100644 index 000000000..dda95ef64 --- /dev/null +++ b/odata-json-format/Appendix.md @@ -0,0 +1,153 @@ + +------- + +# Appendix ##asec References + +This appendix contains the normative and informative references that are used in this document. + +While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity. + +## ##subasec Normative References + +The following documents are referenced in such a way that some or all of their content constitutes requirements of this document. + +###### [OData-ABNF] +_ABNF components: OData ABNF Construction Rules Version 4.02 and OData ABNF Test Cases._ +See link in "[Related work](#RelatedWork)" section on cover page. + +###### [OData-CSDL] +_OData Common Schema Definition Language (CSDL) JSON Representation Version 4.02._ +See link in "[Related work](#RelatedWork)" section on cover page. + +_OData Common Schema Definition Language (CSDL) XML Representation Version 4.02._ +See link in "[Related work](#RelatedWork)" section on cover page. + +###### [OData-Protocol] +_OData Version 4.02. Part 1: Protocol._ +See link in "[Related work](#RelatedWork)" section on cover page. + +###### [OData-URL] +_OData Version 4.02. Part 2: URL Conventions._ +See link in "[Related work](#RelatedWork)" section on cover page. + +###### [OData-VocCap] +_OData Vocabularies Version 4.0: Capabilities Vocabulary._ +See link in "[Related work](#RelatedWork)" section on cover page. + +###### [OData-VocCore] +_OData Vocabularies Version 4.0: Core Vocabulary._ +See link in "[Related work](#RelatedWork)" 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_ +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. + +###### [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. + +###### [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. + +###### [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_ +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. + +## ##subasec 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/. + +------- + +# Appendix ##asec Safety, Security and Privacy Considerations + +This specification raises no security issues. + +This section is provided as a service to the application developers, information providers, and users of OData version 4.0 giving some references to starting points for securing OData services as specified. OData is a REST-full multi-format service that depends on other services and thus inherits both sides of the coin, security enhancements and concerns alike from the latter. + +For JSON-relevant security implications please cf. at least the relevant subsections of [RFC8259](#rfc8259) as starting point. + +------- + +# Appendix ##asec Acknowledgments + +## ##subasec Special Thanks + +The contributions of the OASIS OData Technical Committee members, enumerated in [OData-Protocol](#ODataProtocol) are gratefully acknowledged. + +## ##subasec Participants + +**OData TC Members:** + +| First Name | Last Name | Company | +| :--- | :--- | :--- | +| George | Ericson | Dell | +| Hubert | Heijkers | IBM | +| Ling | Jin | IBM | +| Stefan | Hagen | Individual | +| Michael | Pizzo | Microsoft | +| Christof | Sprenger | Microsoft | +| Ralf | Handl | SAP SE | +| Gerald | Krause | SAP SE | +| Heiko | Theißen | SAP SE | +| Mark | Biamonte | Progress Software | +| Martin | Zurmühl | SAP SE | + +------- + +# Appendix ##asec Revision History + + + +| Revision | Date | Editor | Changes Made | +| :--- | :--- | :--- | :--- | +| Working Draft 01 | 2023-07-20 | Ralf Handl | Import material from OData JSON Format Version 4.01 | + +------- + +# Appendix ##asec 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](https://www.oasis-open.org/policies-guidelines/ipr/) 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. + +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](https://www.oasis-open.org/), 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/odata-json-format/meta.yaml b/odata-json-format/meta.yaml new file mode 100644 index 000000000..ecdb5412a --- /dev/null +++ b/odata-json-format/meta.yaml @@ -0,0 +1,8 @@ +pagetitle: OData JSON Format Version 4.02 +subtitle: Committee Specification Draft 01 +filename: odata-json-format-v4.02-csd01 +stage: csd01 +previousStage: n/a +pubdate: 14 July 2023 +pubdateISO: '2023-07-14' +copyright: © OASIS Open 2023 diff --git a/odata-protocol/0 frontmatter.md b/odata-protocol/0 frontmatter.md new file mode 100644 index 000000000..88808910a --- /dev/null +++ b/odata-protocol/0 frontmatter.md @@ -0,0 +1,92 @@ + +![OASIS Logo](https://docs.oasis-open.org/templates/OASISLogo-v3.0.png) + +------- + +# OData Version 4.02. Part 1: Protocol + +## Committee Specification Draft 01 + +## 14 July 2023 + +  + +#### This stage: +https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/$$$filename$$$.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/$$$filename$$$.html \ +https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/$$$filename$$$.pdf + +#### Previous stage: +N/A + +#### Latest stage: +https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html \ +https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.pdf + +#### Technical Committee: +[OASIS Open Data Protocol (OData) TC](https://www.oasis-open.org/committees/odata/) + +#### Chairs: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) + +#### Editors: + +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) \ +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Heiko Theißen (heiko.theissen@sap.com), [SAP SE](http://www.sap.com/) + +#### Additional artifacts: +This prose specification is one component of a Work Product that also includes: +* _OData Version 4.02 Part 1: Protocol_. (this document) https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/$$$filename$$$.html +* _OData Version 4.02 Part 2: URL Conventions_. https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/odata-v4.02-csd01-part2-url-conventions.html +* XML schemas: (list file names or directory name) +* Other parts (list titles and/or file names) +* `(Note: Any normative computer language definitions that are part of the Work Product, such as XML instances, schemas and Java(TM) code, including fragments of such, must be (a) well formed and valid, (b) provided in separate plain text files, (c) referenced from the Work Product; and (d) where any definition in these separate files disagrees with the definition found in the specification, the definition in the separate file prevails. Remove this note before submitting for publication.)` + +#### Related work: +This specification replaces or supersedes: +* _OData Version 4.01. Part 1: Protocol_. Edited by Michael Pizzo, Ralf Handl, and Martin Zurmuehl. OASIS Standard. Latest stage: https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html. +* _OData Version 4.0. Part 1: Protocol_. Edited by Michael Pizzo, Ralf Handl, and Martin Zurmuehl. OASIS Standard. Latest stage: http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html. + +This specification is related to: +* Related specifications (include hyperlink, preferably to HTML format) \ +`(remove "related" subsection if no entries)` + +#### 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](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/. + +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). + +Note that any machine-readable content ([Computer Language Definitions](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsCompLang)) 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](#rfc2119)] and [[RFC8174](#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]** + +_OData Version 4.02. Part 1: Protocol_. +Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. +https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/$$$filename$$$.html. +Latest stage: https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html. + +#### Notices +Copyright © OASIS Open 2023. All Rights Reserved. + +Distributed under the terms of the OASIS [IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/). + +The name "OASIS" is a trademark of [OASIS](https://www.oasis-open.org/), 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. + +------- diff --git a/odata-protocol/1 TODO.md b/odata-protocol/1 TODO.md new file mode 100644 index 000000000..44c5bdfba --- /dev/null +++ b/odata-protocol/1 TODO.md @@ -0,0 +1,224 @@ +------- + +# ##sec Introduction + + + +## ##subsec Changes from earlier Versions + + + + +## ##subsec Glossary + +### ##subsubsec Definitions of terms + + +TODO: find out why we need a $dummy$ formula to get `monospace` look as we want it. + +### ##subsubsec Acronyms and abbreviations + + + +### ##subsubsec Document conventions + +Keywords defined by this specification use `this monospaced font`. + +Some sections of this specification are illustrated with non-normative examples. + +::: example +Example ##ex: text describing an example uses this paragraph style +``` +Non-normative examples use this paragraph style. +``` +::: + +All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading. + +All other text is normative unless otherwise labeled. + +::: example +Here is a customized command line which will generate HTML from this markdown file (named `$$$filename$$$.md`). Line breaks are added for readability only: + +``` +pandoc -f gfm+tex_math_dollars+fenced_divs + -t html + -o $$$filename$$$.html + -c styles/markdown-styles-v1.7.3b.css + -c styles/odata.css + -s + --mathjax + --eol=lf + --wrap=none + --metadata pagetitle="$$$pagetitle$$$" + $$$filename$$$.md +``` + +This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2. +::: + +------- + +# 2 Section Heading +text. + +## 2.1 Level 2 Heading +text. + +### 2.1.1 Level 3 Heading +text. + +#### 2.1.1.1 Level 4 Heading +text. + +##### 2.1.1.1.1 Level 5 Heading +This is the deepest level, because six # gets transformed into a Reference tag. + + +## 2.2 Next Heading +text. + +------- + +# 3 Conformance + + +`(Note: The [OASIS TC Process](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsConfClause) requires that a specification approved by the TC at the Committee Specification Public Review Draft, Committee Specification or OASIS Standard level must include a separate section, listing a set of numbered conformance clauses, to which any implementation of the specification must adhere in order to claim conformance to the specification (or any optional portion thereof). This is done by listing the conformance clauses here.` +`For the definition of "conformance clause," see [OASIS Defined Terms](https://www.oasis-open.org/policies-guidelines/oasis-defined-terms-2018-05-22/#dConformanceClause).` + +`See "Guidelines to Writing Conformance Clauses": +https://docs.oasis-open.org/templates/TCHandbook/ConformanceGuidelines.html.` + +`Remove this note before submitting for publication.)` + + +------- + +# Appendix A. References + + + +This appendix contains the normative and informative references that are used in this document. + +While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity. + +## A.1 Normative References + +The following documents are referenced in such a way that some or all of their content constitutes requirements of this document. + +`(Reference sources: +For references to IETF RFCs, use the approved citation formats at: +https://docs.oasis-open.org/templates/ietf-rfc-list/ietf-rfc-list.html. +For references to W3C Recommendations, use the approved citation formats at: +https://docs.oasis-open.org/templates/w3c-recommendations-list/w3c-recommendations-list.html. +Remove this note before submitting for publication.)` + +###### [OData-v4.02] +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + +##### [RFC2119] +_Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997_ +http://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_ +http://www.rfc-editor.org/info/rfc8174. + +## A.2 Informative References + +###### [RFC3552] +_Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003_ +https://www.rfc-editor.org/info/rfc3552. + +------- + +# Appendix B. Safety, Security and Privacy Considerations + + + +`(Note: OASIS strongly recommends that Technical Committees consider issues that might affect safety, security, privacy, and/or data protection in implementations of their specification and document them for implementers and adopters. For some purposes, you may find it required, e.g. if you apply for IANA registration.` + +`While it may not be immediately obvious how your specification might make systems vulnerable to attack, most specifications, because they involve communications between systems, message formats, or system settings, open potential channels for exploit. For example, IETF [[RFC3552](#rfc3552)] lists “eavesdropping, replay, message insertion, deletion, modification, and man-in-the-middle” as well as potential denial of service attacks as threats that must be considered and, if appropriate, addressed in IETF RFCs.` + +`In addition to considering and describing foreseeable risks, this section should include guidance on how implementers and adopters can protect against these risks.` + +`We encourage editors and TC members concerned with this subject to read _Guidelines for Writing RFC Text on Security Considerations_, IETF [[RFC3552](#rfc3552)], for more information.` + +`Remove this note before submitting for publication.)` + +------- + +# Appendix C. Acknowledgments + + + +`Note: A Work Product approved by the TC must include a list of people who participated in the development of the Work Product. This is generally done by collecting the list of names in this appendix. This list shall be initially compiled by the Chair, and any Member of the TC may add or remove their names from the list by request. Remove this note before submitting for publication.` + +## C.1 Special Thanks + + + +Substantial contributions to this document from the following individuals are gratefully acknowledged: + +Participant Name, Affiliation or "Individual Member" + +## C.2 Participants + + + +The following individuals have participated in the creation of this specification and are gratefully acknowledged: + +**OpenC2 TC Members:** + +| First Name | Last Name | Company | +| :--- | :--- | :--- | +Philippe | Alman | Something Networks +Alex | Amirnovman | Company B +Kris | Anderman | Mini Micro +Darren | Anstman | Big Networks + +------- + +# Appendix D. Revision History + + + +| Revision | Date | Editor | Changes Made | +| :--- | :--- | :--- | :--- | +| specname-v1.0-wd01 | yyyy-mm-dd | Editor Name | Initial working draft | + +------- + +# Appendix E. Example Appendix with subsections + +## E.1 Subsection title + +### E.1.1 Sub-subsection + +------- + +# Appendix F. 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](https://www.oasis-open.org/policies-guidelines/ipr/) 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. + +As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, 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](https://www.oasis-open.org/), 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/odata-protocol/meta.yaml b/odata-protocol/meta.yaml new file mode 100644 index 000000000..312772820 --- /dev/null +++ b/odata-protocol/meta.yaml @@ -0,0 +1,8 @@ +pagetitle: 'OData Version 4.01. Part 1: Protocol' +subtitle: Committee Specification Draft 01 +filename: odata-v4.02-csd01-part1-protocol +stage: csd01 +previousStage: n/a +pubdate: 14 July 2023 +pubdateISO: '2023-07-14' +copyright: © OASIS Open 2023 diff --git a/odata-url-conventions/0 frontmatter.md b/odata-url-conventions/0 frontmatter.md new file mode 100644 index 000000000..ae99685e9 --- /dev/null +++ b/odata-url-conventions/0 frontmatter.md @@ -0,0 +1,92 @@ + +![OASIS Logo](https://docs.oasis-open.org/templates/OASISLogo-v3.0.png) + +------- + +# OData Version 4.02. Part 2: URL Conventions + +## Committee Specification Draft 01 + +## 14 July 2023 + +  + +#### This stage: +https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/$$$filename$$$.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/$$$filename$$$.html \ +https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/$$$filename$$$.pdf + +#### Previous stage: +N/A + +#### Latest stage: +https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.md (Authoritative) \ +https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html \ +https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.pdf + +#### Technical Committee: +[OASIS Open Data Protocol (OData) TC](https://www.oasis-open.org/committees/odata/) + +#### Chairs: + +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) + +#### Editors: + +Michael Pizzo (mikep@microsoft.com), [Microsoft](http://www.microsoft.com/) \ +Ralf Handl (ralf.handl@sap.com), [SAP SE](http://www.sap.com/) \ +Heiko Theißen (heiko.theissen@sap.com), [SAP SE](http://www.sap.com/) + +#### Additional artifacts: +This prose specification is one component of a Work Product that also includes: +* _OData Version 4.02 Part 1: Protocol_. https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/odata-v4.02-csd01-part1-protocol.html +* _OData Version 4.02 Part 2: URL Conventions_. (this document) https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/$$$filename$$$.html +* XML schemas: (list file names or directory name) +* Other parts (list titles and/or file names) +* `(Note: Any normative computer language definitions that are part of the Work Product, such as XML instances, schemas and Java(TM) code, including fragments of such, must be (a) well formed and valid, (b) provided in separate plain text files, (c) referenced from the Work Product; and (d) where any definition in these separate files disagrees with the definition found in the specification, the definition in the separate file prevails. Remove this note before submitting for publication.)` + +#### Related work: +This specification replaces or supersedes: +* _OData Version 4.01. Part 2: URL Conventions_. Edited by Michael Pizzo, Ralf Handl, and Martin Zurmuehl. OASIS Standard. Latest stage: https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html. +* _OData Version 4.0. Part 2: URL Conventions_. Edited by Michael Pizzo, Ralf Handl, and Martin Zurmuehl. OASIS Standard. Latest stage: http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part2-url-conventions.html. + +This specification is related to: +* Related specifications (include hyperlink, preferably to HTML format) \ +`(remove "related" subsection if no entries)` + +#### 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](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/. + +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). + +Note that any machine-readable content ([Computer Language Definitions](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsCompLang)) 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](#rfc2119)] and [[RFC8174](#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-Part2]** + +_OData Version 4.02. Part 2: URL Conventions_. +Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. 14 July 2023. OASIS Committee Specification Draft 01. +https://docs.oasis-open.org/odata/odata/v4.02/$$$stage$$$/$$$filename$$$.html. +Latest stage: https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html. + +#### Notices +Copyright © OASIS Open 2023. All Rights Reserved. + +Distributed under the terms of the OASIS [IPR Policy](https://www.oasis-open.org/policies-guidelines/ipr/). + +The name "OASIS" is a trademark of [OASIS](https://www.oasis-open.org/), 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. + +------- diff --git a/odata-url-conventions/1 TODO.md b/odata-url-conventions/1 TODO.md new file mode 100644 index 000000000..44c5bdfba --- /dev/null +++ b/odata-url-conventions/1 TODO.md @@ -0,0 +1,224 @@ +------- + +# ##sec Introduction + + + +## ##subsec Changes from earlier Versions + + + + +## ##subsec Glossary + +### ##subsubsec Definitions of terms + + +TODO: find out why we need a $dummy$ formula to get `monospace` look as we want it. + +### ##subsubsec Acronyms and abbreviations + + + +### ##subsubsec Document conventions + +Keywords defined by this specification use `this monospaced font`. + +Some sections of this specification are illustrated with non-normative examples. + +::: example +Example ##ex: text describing an example uses this paragraph style +``` +Non-normative examples use this paragraph style. +``` +::: + +All examples in this document are non-normative and informative only. Examples labeled with ⚠ contain advanced concepts or make use of keywords that are defined only later in the text, they can be skipped at first reading. + +All other text is normative unless otherwise labeled. + +::: example +Here is a customized command line which will generate HTML from this markdown file (named `$$$filename$$$.md`). Line breaks are added for readability only: + +``` +pandoc -f gfm+tex_math_dollars+fenced_divs + -t html + -o $$$filename$$$.html + -c styles/markdown-styles-v1.7.3b.css + -c styles/odata.css + -s + --mathjax + --eol=lf + --wrap=none + --metadata pagetitle="$$$pagetitle$$$" + $$$filename$$$.md +``` + +This uses pandoc 3.1.2 from https://github.com/jgm/pandoc/releases/tag/3.1.2. +::: + +------- + +# 2 Section Heading +text. + +## 2.1 Level 2 Heading +text. + +### 2.1.1 Level 3 Heading +text. + +#### 2.1.1.1 Level 4 Heading +text. + +##### 2.1.1.1.1 Level 5 Heading +This is the deepest level, because six # gets transformed into a Reference tag. + + +## 2.2 Next Heading +text. + +------- + +# 3 Conformance + + +`(Note: The [OASIS TC Process](https://www.oasis-open.org/policies-guidelines/tc-process-2017-05-26/#wpComponentsConfClause) requires that a specification approved by the TC at the Committee Specification Public Review Draft, Committee Specification or OASIS Standard level must include a separate section, listing a set of numbered conformance clauses, to which any implementation of the specification must adhere in order to claim conformance to the specification (or any optional portion thereof). This is done by listing the conformance clauses here.` +`For the definition of "conformance clause," see [OASIS Defined Terms](https://www.oasis-open.org/policies-guidelines/oasis-defined-terms-2018-05-22/#dConformanceClause).` + +`See "Guidelines to Writing Conformance Clauses": +https://docs.oasis-open.org/templates/TCHandbook/ConformanceGuidelines.html.` + +`Remove this note before submitting for publication.)` + + +------- + +# Appendix A. References + + + +This appendix contains the normative and informative references that are used in this document. + +While any hyperlinks included in this appendix were valid at the time of publication, OASIS cannot guarantee their long-term validity. + +## A.1 Normative References + +The following documents are referenced in such a way that some or all of their content constitutes requirements of this document. + +`(Reference sources: +For references to IETF RFCs, use the approved citation formats at: +https://docs.oasis-open.org/templates/ietf-rfc-list/ietf-rfc-list.html. +For references to W3C Recommendations, use the approved citation formats at: +https://docs.oasis-open.org/templates/w3c-recommendations-list/w3c-recommendations-list.html. +Remove this note before submitting for publication.)` + +###### [OData-v4.02] +* _OData Version 4.02_. Edited by Michael Pizzo, Ralf Handl, and Heiko Theißen. A multi-part Work Product that includes: + * _OData Version 4.02 Part 1: Protocol_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part1-protocol.html + * _OData Version 4.02 Part 2: URL Conventions_. Latest stage. https://docs.oasis-open.org/odata/odata/v4.02/odata-v4.02-part2-url-conventions.html + +##### [RFC2119] +_Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997_ +http://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_ +http://www.rfc-editor.org/info/rfc8174. + +## A.2 Informative References + +###### [RFC3552] +_Rescorla, E. and B. Korver, "Guidelines for Writing RFC Text on Security Considerations", BCP 72, RFC 3552, DOI 10.17487/RFC3552, July 2003_ +https://www.rfc-editor.org/info/rfc3552. + +------- + +# Appendix B. Safety, Security and Privacy Considerations + + + +`(Note: OASIS strongly recommends that Technical Committees consider issues that might affect safety, security, privacy, and/or data protection in implementations of their specification and document them for implementers and adopters. For some purposes, you may find it required, e.g. if you apply for IANA registration.` + +`While it may not be immediately obvious how your specification might make systems vulnerable to attack, most specifications, because they involve communications between systems, message formats, or system settings, open potential channels for exploit. For example, IETF [[RFC3552](#rfc3552)] lists “eavesdropping, replay, message insertion, deletion, modification, and man-in-the-middle” as well as potential denial of service attacks as threats that must be considered and, if appropriate, addressed in IETF RFCs.` + +`In addition to considering and describing foreseeable risks, this section should include guidance on how implementers and adopters can protect against these risks.` + +`We encourage editors and TC members concerned with this subject to read _Guidelines for Writing RFC Text on Security Considerations_, IETF [[RFC3552](#rfc3552)], for more information.` + +`Remove this note before submitting for publication.)` + +------- + +# Appendix C. Acknowledgments + + + +`Note: A Work Product approved by the TC must include a list of people who participated in the development of the Work Product. This is generally done by collecting the list of names in this appendix. This list shall be initially compiled by the Chair, and any Member of the TC may add or remove their names from the list by request. Remove this note before submitting for publication.` + +## C.1 Special Thanks + + + +Substantial contributions to this document from the following individuals are gratefully acknowledged: + +Participant Name, Affiliation or "Individual Member" + +## C.2 Participants + + + +The following individuals have participated in the creation of this specification and are gratefully acknowledged: + +**OpenC2 TC Members:** + +| First Name | Last Name | Company | +| :--- | :--- | :--- | +Philippe | Alman | Something Networks +Alex | Amirnovman | Company B +Kris | Anderman | Mini Micro +Darren | Anstman | Big Networks + +------- + +# Appendix D. Revision History + + + +| Revision | Date | Editor | Changes Made | +| :--- | :--- | :--- | :--- | +| specname-v1.0-wd01 | yyyy-mm-dd | Editor Name | Initial working draft | + +------- + +# Appendix E. Example Appendix with subsections + +## E.1 Subsection title + +### E.1.1 Sub-subsection + +------- + +# Appendix F. 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](https://www.oasis-open.org/policies-guidelines/ipr/) 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. + +As stated in the OASIS IPR Policy, the following three paragraphs in brackets apply to OASIS Standards Final Deliverable documents (Committee Specification, 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](https://www.oasis-open.org/), 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/odata-url-conventions/meta.yaml b/odata-url-conventions/meta.yaml new file mode 100644 index 000000000..6e8081c3b --- /dev/null +++ b/odata-url-conventions/meta.yaml @@ -0,0 +1,8 @@ +pagetitle: 'OData Version 4.01. Part 2: URL Conventions' +subtitle: Committee Specification Draft 01 +filename: odata-v4.02-csd01-part2-url-conventions +stage: csd01 +previousStage: n/a +pubdate: 14 July 2023 +pubdateISO: '2023-07-14' +copyright: © OASIS Open 2023 diff --git a/package-lock.json b/package-lock.json index 21ede2b2c..8b1036705 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,10 @@ "js-yaml": "^4.1.0", "mocha": "^10.2.0", "puppeteer": "^20.7.4" + }, + "devDependencies": { + "connect-livereload": "^0.6.1", + "livereload": "^0.9.3" } }, "node_modules/@babel/code-frame": { @@ -650,6 +654,15 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, + "node_modules/connect-livereload": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/connect-livereload/-/connect-livereload-0.6.1.tgz", + "integrity": "sha512-3R0kMOdL7CjJpU66fzAkCe6HNtd3AavCS4m+uW4KtJjrdGPT0SQEZieAYd+cm+lJoBznNQ4lqipYWkhBMgk00g==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -1617,6 +1630,51 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, + "node_modules/livereload": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/livereload/-/livereload-0.9.3.tgz", + "integrity": "sha512-q7Z71n3i4X0R9xthAryBdNGVGAO2R5X+/xXpmKeuPMrteg+W2U8VusTKV3YiJbXZwKsOlFlHe+go6uSNjfxrZw==", + "dev": true, + "dependencies": { + "chokidar": "^3.5.0", + "livereload-js": "^3.3.1", + "opts": ">= 1.2.0", + "ws": "^7.4.3" + }, + "bin": { + "livereload": "bin/livereload.js" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/livereload-js": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-3.4.1.tgz", + "integrity": "sha512-5MP0uUeVCec89ZbNOT/i97Mc+q3SxXmiUGhRFOTmhrGPn//uWVQdCvcLJDy64MSBR5MidFdOR7B9viumoavy6g==", + "dev": true + }, + "node_modules/livereload/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "dev": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -1929,6 +1987,12 @@ "node": ">= 0.8.0" } }, + "node_modules/opts": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opts/-/opts-2.0.2.tgz", + "integrity": "sha512-k41FwbcLnlgnFh69f4qdUfvDQ+5vaSDnVPFI/y5XuhKRq97EnVVneO9F1ESVCdiVu4fCS2L8usX3mU331hB7pg==", + "dev": true + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", diff --git a/package.json b/package.json index b7f29af6d..da97447aa 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "build": "node lib/build", "pdf": "node lib/build-pdf.js", "start": "node lib/server", - "test": "c8 -r html -r text mocha --timeout 10000" + "test": "c8 -r html -r text mocha" }, "author": "", "license": "ISC", @@ -17,5 +17,9 @@ "js-yaml": "^4.1.0", "mocha": "^10.2.0", "puppeteer": "^20.7.4" + }, + "devDependencies": { + "connect-livereload": "^0.6.1", + "livereload": "^0.9.3" } } diff --git a/test/build.test.js b/test/build.test.js index ebb02b6de..5e5b94ad5 100644 --- a/test/build.test.js +++ b/test/build.test.js @@ -1,11 +1,14 @@ const fs = require("fs"); const Number = require("../lib/number"); const pandoc = require("../lib/pandoc"); +const { compareSectionNumbers } = require("../lib/utilities"); const puppeteer = require("puppeteer"); const assert = require("assert"); const { PassThrough } = require("stream"); describe("OASIS doc build", function () { + this.timeout(10000); + it("Markdown assembly", async function () { var md = new PassThrough(); new Number(__dirname + "/test-data").build(md); @@ -20,6 +23,7 @@ describe("OASIS doc build", function () { "Markdown" ); }); + it("Pandoc", async function () { var proc = pandoc({ "--metadata-file": __dirname + "/test-data/meta.yaml", @@ -36,6 +40,7 @@ describe("OASIS doc build", function () { "HTML" ); }); + it("Puppeteer", async function () { var browser = await puppeteer.launch({ headless: "new" }); var page = await browser.newPage(); @@ -47,4 +52,13 @@ describe("OASIS doc build", function () { assert.equal(box.height, 7); await browser.close(); }); + + it("Compare section numbers", function () { + assert.equal(compareSectionNumbers("0 foo", "1 bar"), -1, "simple"); + assert.equal(compareSectionNumbers("1 foo", "0 bar"), 1, "simple, reverse"); + assert.equal(compareSectionNumbers("9 foo", "23 bar"), -1, "numeric"); + assert.equal(compareSectionNumbers("3 foo", "3.4 bar"), -1, "prefix"); + assert.equal(compareSectionNumbers("3.14 foo", "3.4 bar"), 1, "prefix"); + assert.equal(compareSectionNumbers("9 foo", "Appendix"), -1, "numeric"); + }); });