Skip to content

Instantly share code, notes, and snippets.

@jstoiko
Created December 19, 2017 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jstoiko/a0c76b1d4800c77e6196ebe65de6167f to your computer and use it in GitHub Desktop.
Save jstoiko/a0c76b1d4800c77e6196ebe65de6167f to your computer and use it in GitHub Desktop.
#%RAML 1.0
title: Human API
types:
Human: |
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"id": "http://jsonschema.net",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"age": {
"type": "number"
}
},
"required": ["first_name", "last_name"]
}
Humans: |
{
"type": "array",
"$schema": "http://json-schema.org/draft-04/schema",
"id": "http://jsonschema.net",
"items": {
"type": "object",
"properties": {
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"age": {
"type": "number"
}
},
"required": ["first_name", "last_name"]
}
}
/humans:
post:
body:
application/json:
type: Human
get:
responses:
200:
body:
application/json:
type: Humans
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment