Skip to content

SAP OData missing __metadata property #60

Description

@snebjorn

I'm working with an ODATA endpoint in SAP and I noticed that SAP sends a __metadata property which isn't described in the $metadata unfortunately. Not sure if it can be "turned on" via a query parameter. However it's there.

I looked though the XSLT scripts and couldn't find a "handler" for the __metadata property. Is it possible to add this to the generated OAS when converting a metadata from SAP OData?

The reason why the __metadata property is relevant is because it contains the etag value for an entity.

The SAP ODATA response looks like this:

{
  "d": {
    "results": [
      {
        "__metadata": {
          "id": "https://.../{dataservice}/{resource}('id')",
          "uri": "https://.../{dataservice}/{resource}('id')",
          "type": "{dataservice}.{resource}",
          "etag": "..."
        },
        "...": "..." // omitted
      }
    ]
  }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions