Created
January 22, 2016 16:13
-
-
Save sebastianhenneberg/3d7ce6926d20025d1dfe to your computer and use it in GitHub Desktop.
Example API with RAML Step 2
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 | |
/users: | |
get: | |
description: Get all users. | |
responses: | |
200: | |
body: | |
type: array | |
items: | |
type: object | |
properties: | |
id: integer | |
name: string | |
gender: | |
type: string | |
enum: [ male, female ] | |
required: false | |
example: | |
{ | |
"id": 42, | |
"name": "John Doe", | |
"gender": "male" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment