Skip to content

Instantly share code, notes, and snippets.

@sebastianhenneberg
Created January 22, 2016 16:13
Show Gist options
  • Save sebastianhenneberg/3d7ce6926d20025d1dfe to your computer and use it in GitHub Desktop.
Save sebastianhenneberg/3d7ce6926d20025d1dfe to your computer and use it in GitHub Desktop.
Example API with RAML Step 2
#%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