From 2907661e4d3b9d6d887bdb1a93c2eac1fa4c231e Mon Sep 17 00:00:00 2001 From: Andrzej Date: Thu, 21 Feb 2019 11:02:22 +0100 Subject: [PATCH] Add HAL OAS3 snippet --- .../message/HAL-snippet-full-OpenApi3.yaml | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 rest-api-guidelines/functionality/message/HAL-snippet-full-OpenApi3.yaml diff --git a/rest-api-guidelines/functionality/message/HAL-snippet-full-OpenApi3.yaml b/rest-api-guidelines/functionality/message/HAL-snippet-full-OpenApi3.yaml new file mode 100644 index 0000000..bb79aec --- /dev/null +++ b/rest-api-guidelines/functionality/message/HAL-snippet-full-OpenApi3.yaml @@ -0,0 +1,81 @@ +openapi: 3.0.0 +info: + title: HAL + description: 'HAL snippet for OAS3' + contact: + name: Andrzej Jarzyna + url: https://github.com/jerzyn + email: andrzej.jarzyna@adidas.com + version: '1.0.0' +servers: +- url: http://{defaultHost} + variables: + defaultHost: + default: www.example.com +paths: {} +components: + schemas: + HALLinkObject: + title: HALLinkObject + required: + - href + 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 + HALCuriesLink: + title: HALCuriesLink + required: + - templated + - href + type: object + properties: + templated: + type: string + example: True + href: + type: string + type: + type: string + deprecation: + type: string + name: + type: string + profile: + type: string + title: + type: string + hreflang: + type: string + HAL: + title: HAL + type: object + properties: + _links: + $ref: '#/components/schemas/Links' + _embedded: + type: object + additionalProperties: + $ref: '#/components/schemas/HAL' + description: JSON Hypertext Application Language. Definition of [HAL message format](https://tools.ietf.org/html/draft-kelly-json-hal-08) + Links: + title: Links + type: object + properties: + curies: + $ref: '#/components/schemas/HALCuriesLink' +tags: []