Created
January 22, 2016 16:15
-
-
Save sebastianhenneberg/338e002c5621676d0d1a to your computer and use it in GitHub Desktop.
Example API with RAML Step 3
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: Example API | |
protocols: HTTPS | |
version: v1 | |
baseUri: https://example.com/api/{version} | |
mediaType: application/json | |
types: | |
Gender: | |
type: string | |
enum: [ male, female ] | |
User: | |
type: object | |
properties: | |
id: integer | |
name: string | |
gender: | |
type: Gender | |
required: false | |
example: | |
{ | |
"id": 42, | |
"name": "John Doe", | |
"gender": "male" | |
} | |
Users: | |
type: array | |
items: | |
type: User | |
/users: | |
get: | |
description: Get all users. | |
responses: | |
200: | |
body: | |
type: Users |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment