Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-1219

Be more explicit about the purpose of $DefaultValue in a Term definition

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: V4.01_CS01
    • Fix Version/s: V4.01_CS02
    • Component/s: CSDL JSON
    • Labels:
    • Environment:

      Applied

    • Proposal:
      Hide

      At a minimum I think we should be extremely clear in our JSON CSDL specification that this full fidelity between multiple formats of our CSDL is the sole purpose of this $DefaultValue to exists and to not confuse it with $DefaultValue of properties that, when omitted, are presumed to be applied.

      Show
      At a minimum I think we should be extremely clear in our JSON CSDL specification that this full fidelity between multiple formats of our CSDL is the sole purpose of this $DefaultValue to exists and to not confuse it with $DefaultValue of properties that, when omitted, are presumed to be applied.
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/64129/odata-csdl-json-v4.01-wd05-2018-10-22.docx  

      Description

      It appears to be unclear what the purpose is of having a $DefaultValue for a term definition in our JSON CSDL as, as stated in the specification as is, in our JSON CSDL a value MUST always be specified anyway. And while a $DefaultValue might be obvious for some terms, most notably boolean typed terms (read: tags) where the values is typically true, and there maybe a value for some enum and numerically based terms, this is less so the case for any of the other types.

      The reference to it being for documentation purposes raised different questions.

      On the other hand, if a term is of a structured type, default values of the individual structural properties are indeed implied in absence of the property, which is not the case for terms not being applied to any model element it could have been applied to, which further would speak to not having a $DefaultValue in terms potentially causing confusion.

      Our XML CSDL however didn't require the value to be there, merely 'tagging' a model element with the annotation term would suffice, implying the DefaultValue specified in the XML CSDL. Therefore, arguably, the only remaining 'function' of this $DefaultValue is to allow for full fidelity round-tripping between our XML and JSON versions of the CSDL.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hubert.heijkers Hubert Heijkers
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: