Permalink
Switch branches/tags
Nothing to show
Find file
1993179 Nov 2, 2012
77 lines (75 sloc) 3.81 KB
---
id: "resource"
type: "object"
properties:
_links:
type: "object"
title: "Hyperlink"
description: "Represents a hyperlink from the containing resource to a URI."
additionalProperties:
type:
-
id: "link"
type: "object"
properties:
href:
type: "string"
title: "URI of the target resource"
description: "Either a URI [RFC3986] or URI Template [RFC6570] of the target resource."
templated:
type: "boolean"
optional: true
default: false
title: "URI Template"
description: "Is true when the link object's href property is a URI Template. Defaults to false."
type:
type: "string"
pattern: "^(application|audio|example|image|message|model|multipart|text|video)\\/[a-zA-Z0-9!#\\$&\\.\\+-\\^_]{1,127}$"
optional: true
title: "Media type indication of the target resource"
description: "When present, used as a hint to indicate the media type expected when dereferencing the target resource."
name:
type: "string"
optional: true
title: "Secondary key"
description: "When present, may be used as a secondary key for selecting link objects that contain the same relation type."
profile:
type: "string"
format: "uri"
optional: true
title: "Additional semantics of the target resource"
description: "A URI that, when dereferenced, results in a profile to allow clients to learn about additional semantics (constraints, conventions, extensions) that are associated with the target resource representation, in addition to those defined by the HAL media type and relations."
title:
type: "string"
optional: true
title: "Human-readable identifier"
description: "When present, is used to label the destination of a link such that it can be used as a human-readable identifier (e.g. a menu entry) in the language indicated by the Content-Language header (if present)."
hreflang:
type: "string"
pattern: "^([a-zA-Z]{2,3}(-[a-zA-Z]{3}(-[a-zA-Z]{3}){0,2})?(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-([a-zA-Z0-9]{5,8}|[0-9][a-zA-Z0-9]{3}))*([0-9A-WY-Za-wy-z](-[a-zA-Z0-9]{2,8}){1,})*(x-[a-zA-Z0-9]{2,8})?)|(x-[a-zA-Z0-9]{2,8})|(en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE)|(art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang)$"
optional: true
title: "Language indication of the target resource [RFC5988]"
description: "When present, is a hint in RFC5646 format indicating what the language of the result of dereferencing the link should be. Note that this is only a hint; for example, it does not override the Content-Language header of a HTTP response obtained by actually following the link."
additionalProperties: false
-
type: "array"
items:
-
$ref: "link"
uniqueItems: true
additionalProperties: false
optional: true
_embedded:
type: "object"
additionalProperties:
type:
-
$ref: "resource"
-
type: "array"
items:
-
$ref: "resource"
uniqueItems: true
additionalProperties: false
optional: true