Skip to content

Instantly share code, notes, and snippets.

@koegel
Last active September 22, 2017 09:38
Show Gist options
  • Select an option

  • Save koegel/f0c1cd7f40582dc7d6ce53b22d80454e to your computer and use it in GitHub Desktop.

Select an option

Save koegel/f0c1cd7f40582dc7d6ce53b22d80454e to your computer and use it in GitHub Desktop.
{
“properties”: {
“users”: {
“type”: “array”
“items”: {
'$ref': '#/definitions/user’
}
},
“tasks”: {
“type”: “array”
“items”: {
'$ref': '#/definitions/task’
}
}
},
definitions: {
“task”: {
“properties”: {
"name" : {"type" :String}
“assignee”: {"type" : String}
}
links: [
{
'rel': 'full',
'href': '#/users/{assignee}',
'targetSchema': {
'$ref': '#/definitions/user’
}
}
],
}
"user" {
“properties”: {
"name": {type: string}
"id": {type: string}
}
}
}
}
{
users: [
{ id: 8238a,
name: "Jonas"
},
{ id: 8228b,
name: "Eugen"}
],
tasks: [
{ name: "do this",
assignee: "8238a",
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment