Skip to content

Instantly share code, notes, and snippets.

@sebastianhenneberg
Created January 22, 2016 16:26
Show Gist options
  • Save sebastianhenneberg/0d8591d06039787a7d74 to your computer and use it in GitHub Desktop.
Save sebastianhenneberg/0d8591d06039787a7d74 to your computer and use it in GitHub Desktop.
Example API with RAML Step 6
# document root and types
/users:
# get operation
post:
description: Create new user.
body:
type: UserBase
responses:
201:
description: New user created successful.
400:
description: Required properties missing or validation issues.
body:
type: Error
/{userId}:
uriParameters:
userId: integer
put:
description: Update user.
body:
type: UserBase
responses:
200:
description: User updated successful.
body:
type: User
400:
description: Required properties missing or validation issues.
body:
type: Error
404:
description: Unkown user.
body:
type: Error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment