Created
December 19, 2017 04:12
-
-
Save jstoiko/a0c76b1d4800c77e6196ebe65de6167f to your computer and use it in GitHub Desktop.
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 | |
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