Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_CSD02
    • Fix Version/s: V4.01_CS02
    • Component/s: CSDL JSON , CSDL XML, Protocol
    • Labels:
      None
    • Environment:

      Applied

    • Proposal:
      Hide

      The proposal is to allow a Singleton to be specified as Nullable.

      In clause 13.3 Singleton, add:

      Attribute Nullable
      The value of Nullable is one of the Boolean literals true or false. Absence of the attribute means false. A value of true specifies that the declaring Singleton MAY have no related entity. If false, instances of the declaring Singleton MUST always have a related entity.

      Behavior:
      For 4.01 responses:
      -services return "nullable":true for nullable singleton in JSON. absence means not-nullable, as with all other nullable facets in JSON.
      -services return "nullable=true" for nullable singleton in XML. Absence of this attribute means not-nullable. note that this is the opposite default as for single-valued navigation properties.
      -services return 204, No Content, for null-valued singletons (just as for null-valued singleton navigation properties).
      For 4.0 responses:
      -services must return "nullable":false, or omit the nullable facet, for a singleton in JSON
      -services must not return the nullable attribute for a singleton in XML
      -services must return a representation of the singleton (i.e., an object with only a context Url) or an error (such as 404).

      Show
      The proposal is to allow a Singleton to be specified as Nullable. In clause 13.3 Singleton, add: Attribute Nullable The value of Nullable is one of the Boolean literals true or false. Absence of the attribute means false. A value of true specifies that the declaring Singleton MAY have no related entity. If false, instances of the declaring Singleton MUST always have a related entity. Behavior: For 4.01 responses: -services return "nullable":true for nullable singleton in JSON. absence means not-nullable, as with all other nullable facets in JSON. -services return "nullable=true" for nullable singleton in XML. Absence of this attribute means not-nullable. note that this is the opposite default as for single-valued navigation properties. -services return 204, No Content, for null-valued singletons (just as for null-valued singleton navigation properties). For 4.0 responses: -services must return "nullable":false, or omit the nullable facet, for a singleton in JSON -services must not return the nullable attribute for a singleton in XML -services must return a representation of the singleton (i.e., an object with only a context Url) or an error (such as 404).
    • Resolution:
      Show
      https://github.com/oasis-tcs/odata-csdl-schemas/pull/2 https://www.oasis-open.org/committees/download.php/64129/odata-csdl-json-v4.01-wd05-2018-10-22.docx   https://www.oasis-open.org/committees/download.php/64130/odata-csdl-xml-v4.01-wd06-2018-10-22.docx  

      Description

      Properties of the Service Document are described by Singletons and EntitySets.
      While it is possible to have an empty EntitySet. It is not currently possible to have an empty (i.e. null) Singleton. So for a given service document, implementations are required to minimally populate all singletons, regardless of whether or not the implementation actually has a value for that property.

        Attachments

          Activity

            People

            • Assignee:
              george.ericson George Ericson
              Reporter:
              george.ericson George Ericson
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: