Resource metadata contains information about the resource that is not specific to a particular representation. This data is important when building a dynamic UI using REST resources or when binding UI components to REST endpoints. All endpoint methods should be defined with proper metadata information.
Metadata can be retrieved by a request to the context, for example, /public
, or for a specific version, for example, /public/{
version
}
. Metadata for all resource can be retrieved by a request to /metadata-catalog
, for example, /public/v2/metadata-catalog
. Metadata for an individual resource can be retrieved by a request to /metadata-catalog/{
resource name
}
, where the resource name is a simple dot-notated name of the resource that matches the URI, but without any templated parts, for example, /metadata-catalog/cart
or /metadata-catalog/orders.commerceItems
.
JSON schema for the resource can be retrieved by the same request to /metadata-catalog/{
resource name
}
but for media type application/schema+json
. This JSON schema is built based on the internal swagger model.
Note: When creating endpoints, it is best if they do not depend on specific media types. This prevents you from specifying a Media Type annotation in your endpoint.