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

Example 77 (invoking an action): show complex parameters

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_ERRATA02
    • Fix Version/s: V4.0_ERRATA03
    • Component/s: Protocol
    • Labels:
      None
    • Environment:

      [Applied]

    • Proposal:
      Hide

      POST http://host/service/Customers('ALFKI')/SampleEntities.CreateOrder

      {
      "items":[

      {"product":4001, "quantity":2}

      ,

      {"product":7062, "quantity":1}

      ],
      "discountCode": "BLACKFRIDAY"
      }

      Also modify description of example appropriately:
      Example 77: invoke the SampleEntities.CreateOrder action using /Customers('ALFKI') as the customer (or binding parameter). The values for the items and and discountCode parameters are passed in the body of the request. The items parameter value is an array of complex type instances, the discountCode parameter value is a string.

      Applied:
      https://www.oasis-open.org/committees/download.php/55616/odata-v4.0-wd08-part1-protocol-2015-05-07.docx

      Show
      POST http://host/service/Customers('ALFKI')/SampleEntities.CreateOrder { "items":[ {"product":4001, "quantity":2} , {"product":7062, "quantity":1} ], "discountCode": "BLACKFRIDAY" } Also modify description of example appropriately: Example 77: invoke the SampleEntities.CreateOrder action using /Customers('ALFKI') as the customer (or binding parameter). The values for the items and and discountCode parameters are passed in the body of the request. The items parameter value is an array of complex type instances, the discountCode parameter value is a string. Applied: https://www.oasis-open.org/committees/download.php/55616/odata-v4.0-wd08-part1-protocol-2015-05-07.docx

      Description

      Change example to use a more complicated parameter structure, e.g. an array of objects with product id and quantity for that product

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: