Created
January 22, 2016 16:28
-
-
Save sebastianhenneberg/fd3088e37e402b07aa92 to your computer and use it in GitHub Desktop.
Example API with RAML Step 7
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
# document root and types | |
traits: | |
BadRequest: | |
responses: | |
400: | |
description: Required properties missing or validation issues. | |
body: | |
type: Error | |
resourceTypes: | |
NotFound: | |
put: | |
responses: | |
404: | |
description: Unkown <<resourcePathName>>. | |
body: | |
type: Error | |
/users: | |
# get operation | |
post: | |
description: Create new user. | |
is: BadRequest | |
body: | |
type: UserBase | |
responses: | |
201: | |
description: New user created successful. | |
/{userId}: | |
type: NotFound | |
uriParameters: | |
userId: integer | |
put: | |
description: Update user. | |
is: BadRequest | |
body: | |
type: UserBase | |
responses: | |
200: | |
description: User updated successful. | |
body: | |
type: User |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment