Skip to content

Instantly share code, notes, and snippets.

View sammyhenningsson's full-sized avatar

Sammy Henningsson sammyhenningsson

  • Järvsö, Sweden
View GitHub Profile
@sammyhenningsson
sammyhenningsson / alps_http_method.md
Last active August 12, 2020 07:49
Http method extension to ALPS profiles

Extending ALPS profiles with HTTP methods

An ALPS extension with id = http_method describes which HTTP methods is supported for the corresponding link relation. The value property specifies an array of strings with all supported HTTP methods.
This extension may only be used for descriptors of type safe, idempotent or unsafe.

Example

{
  "alps": {
    "version": "1.0",
 "descriptor": [
@sammyhenningsson
sammyhenningsson / shaf-error.md
Last active October 11, 2020 19:01
Specification of the shaf-error media type profile

The shaf-error media type profile

This profile describes a set of descriptors for generic error messages.

shaf-error descriptors

  • code: An identifier that describes the type of error.
  • title: A short string used for labeling the error.
  • message: A description with details about the error.
  • fields: An object with validation errors

Fields

@sammyhenningsson
sammyhenningsson / shaf-form.md
Last active October 11, 2020 19:00
Specification of the shaf-form media type profile

The shaf-form media type profile

This profile describes how a set of descriptors should be interpreted to turn a generic media type into a form (similar to HTML forms). For example, the HAL media type (application/hal+json) does not specify any semantics about forms, however we can add semantics about forms to a HAL document but providing a profile.

shaf-form descriptors

  • method: The HTTP method used for submitting the form.
  • href: The target uri that the form should be submitted to.
  • name: A string used to indentify the form.
  • title: A string used as title/label when showing the form in a user interface.