Add HAL OAS2 snippet

This commit is contained in:
Andrzej
2019-02-21 10:39:12 +01:00
parent 6e5a0f5965
commit a4d2bdc4d2

View File

@@ -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'