XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_CS01
    • Fix Version/s: V4.01_CS02
    • Component/s: JSON Format, Protocol
    • Labels:
      None
    • Proposal:
      Hide
      1. Omitting an optional function parameter means that the parameter has the default value specified in the annotation Core.OptionalParameter.
      2. If no explicit DefaultValue is specified, the service is free on how to interpret this. Call this out in term definition.
      3. Nullable non-binding action parameters can already be omitted from the request body, and omitting them means that they have the value null.
      4. Allow annotating action parameters with Core.OptionalParameter. This allows to omit them, whether they are nullable or not.
      5. Omitted action parameter with a DefaultValue means that default value
      6. Omitted action parameter without DefaultValue can be freely interpreted by the service

      A nullable non-binding action parameter is equivalent to being annotated with optionalParameter = true and a default value as null.

      Show
      Omitting an optional function parameter means that the parameter has the default value specified in the annotation Core.OptionalParameter. If no explicit DefaultValue is specified, the service is free on how to interpret this. Call this out in term definition. Nullable non-binding action parameters can already be omitted from the request body, and omitting them means that they have the value null. Allow annotating action parameters with Core.OptionalParameter. This allows to omit them, whether they are nullable or not. Omitted action parameter with a DefaultValue means that default value Omitted action parameter without DefaultValue can be freely interpreted by the service A nullable non-binding action parameter is equivalent to being annotated with optionalParameter = true and a default value as null.
    • Resolution:
      Show
      https://github.com/oasis-tcs/odata-vocabularies/pull/39/files https://www.oasis-open.org/committees/download.php/64714/odata-v4.01-wd06-part1-protocol-2019-02-15.docx https://www.oasis-open.org/committees/download.php/64715/odata-json-format-v4.01-wd06-2019-02-15.docx

      Description

      With https://issues.oasis-open.org/browse/ODATA-1066 we added the possibility to mark parameters as optional.

      We also added text to Part 1: Protocol describing how function overload resolution works in combination with optional parameters.

      Two aspects of optional parameters just came up during implementation that I can’t find in the document or the issue:

      1. Are services free to interpret the absence of a parameter as best suits the purpose of the function?
      2. Can actions also have optional parameters?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              handl Ralf Handl
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: