From a4d2bdc4d243bcea2bd3b6e30c8047862b1febf7 Mon Sep 17 00:00:00 2001 From: Andrzej Date: Thu, 21 Feb 2019 10:39:12 +0100 Subject: [PATCH] Add HAL OAS2 snippet --- .../functionality/message/HAL-snippet.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 rest-api-guidelines/functionality/message/HAL-snippet.yaml diff --git a/rest-api-guidelines/functionality/message/HAL-snippet.yaml b/rest-api-guidelines/functionality/message/HAL-snippet.yaml new file mode 100644 index 0000000..ae35fa5 --- /dev/null +++ b/rest-api-guidelines/functionality/message/HAL-snippet.yaml @@ -0,0 +1,64 @@ +HalLinkObject: + title: HAL Link Object + type: object + properties: + href: + type: string + templated: + type: boolean + type: + type: string + deprecation: + type: string + name: + type: string + profile: + type: string + title: + type: string + hreflang: + type: string + required: + - href +HalCuriesLink: + title: HAL Curies Link + allOf: + - type: object + properties: + templated: + enum: + - true + required: + - templated + - $ref: '#/definitions/HalLinkObject' +HAL: + title: HAL + description: >- + JSON Hypertext Application Language. Definition of [HAL message + format](https://tools.ietf.org/html/draft-kelly-json-hal-08) + type: object + properties: + _links: + type: object + additionalProperties: + allOf: + - $ref: '#/definitions/HalLinkObject' + - type: array + items: + $ref: '#/definitions/HalLinkObject' + properties: + curies: + allOf: + - $ref: '#/definitions/HalCuriesLink' + - type: array + items: + $ref: >- + '#/definitions/HalCuriesLink' + _embedded: + type: object + additionalProperties: + allOf: + - $ref: '#/definitions/HAL' + - type: array + items: + $ref: '#/definitions/HAL' \ No newline at end of file