Last active
May 29, 2017 18:49
-
-
Save jensklose/784c7a6e8c1e987a3b273c9be65ce20f to your computer and use it in GitHub Desktop.
RAML 1.0 HAL type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#%RAML 1.0 Library | |
types: | |
# https://tools.ietf.org/html/draft-kelly-json-hal | |
LinkObject: | |
displayName: HAL Link Object | |
type: object | |
description: An object with link information | |
properties: | |
href: string | |
name?: string | |
type?: string | |
profile?: string | |
title?: string | |
hreflang?: string | |
deprecation?: string | |
templated?: | |
type: boolean | |
default: false | |
LinkArray: | |
displayName: HAL Link Array | |
type: LinkObject[] | |
description: An array of Links of the same link relation | |
Links: | |
displayName: HAL Links | |
properties: | |
self?: LinkObject | |
//: LinkArray | LinkObject | |
Resource: | |
properties: | |
_links?: Links | |
_embedded?: | |
properties: | |
//: Resource | ResourceArray | |
ResourceArray: | |
type: Resource[] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installation
First copy the Gist in your types directory. Next, include the library in your own definitions.
Example usage
api.raml
types/myapi.raml