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

Consider ability to define computed default values

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_WD01
    • Fix Version/s: None
    • Component/s: Vocabularies
    • Labels:
      None
    • Proposal:
      Hide

      OASIS standard term Core.ComputedDefaultValue allows tagging properties that have a computed default value without revealing the underlying (and arbitrarily complex) algorithm.

      Vendor-specific experimental term Common.DerivedDefaultValue allows clients to call server-side logic for computing the default value for a provided context.

      Show
      OASIS standard term Core.ComputedDefaultValue allows tagging properties that have a computed default value without revealing the underlying (and arbitrarily complex) algorithm. Vendor-specific experimental term Common.DerivedDefaultValue allows clients to call server-side logic for computing the default value for a provided context.

      Description

      Currently, default values for properties and (now, as of ODATA-1066) parameters are static values.

      There are some cases where the default value may be the result of a calculation. Examples:
      1) The value of a related property/parameter
      2) An expression based on the value of one (or more) related properties/parameters
      3) The result of invoking a function(import) on the service (with params?)

      Issues:
      -how to express the value of the defaultvalue (use Edm.Untyped? – this could only be supported in 4.01)
      -what is the syntax of the expression?
      -can it invoke a funciton(import) and, if so, how are parameters passed?

      For parameters, could define a derived OptionalParameterType that has a DefaultValueExpression that is Edm.Untyped and only returned as that derived type in a 4.01 payload.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: