Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The name of the embedded resource in our example is customers.
  • Other embedded resource names can be included. Each embedded resource name is a sub-property of the _embedded property.
  • Embedded resources can be singular (i.e., the value is just a resource object) or plural (i.e., the value is an array of resource objects). If the embedded resource object is singular by definition, then just set the value to a resource object. Otherwise, use an array even if there is only one embedded resource object. Otherwise, adding an array later on could break clients.
  • Each embedded resource object should also include its own self relation link (which is identified by the _links property).