Skip to content

Instantly share code, notes, and snippets.

@tirthankarkundu17
Last active May 9, 2021 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tirthankarkundu17/dcd86e809227fd4fa142d2d9861f5bd4 to your computer and use it in GitHub Desktop.
Save tirthankarkundu17/dcd86e809227fd4fa142d2d9861f5bd4 to your computer and use it in GitHub Desktop.
JSON Placeholder RAML
#%RAML 1.0
title: jsonplaceholder-api
/posts:
get:
responses:
200:
body:
application/json:
example: |
[{
"userId": 1,
"id": 1,
"title": "sunt aut o reprehenderit",
"body": "quia et suscipitveniet architecto"
}]
post:
body:
application/json:
example: |
{
"userId": 1,
"title": "sunt aut o reprehenderit",
"body": "quia et suscipitveniet architecto"
}
responses:
201:
body:
application/json:
example: |
{
"userId": 1,
"id": 1,
"title": "sunt aut o reprehenderit",
"body": "quia et suscipitveniet architecto"
}
/{id}:
get:
responses:
200:
body:
application/json:
example: |
{
"userId": 1,
"id": 1,
"title": "sunt aut o reprehenderit",
"body": "quia et suscipitveniet architecto"
}
put:
body:
application/json:
example: |
{
"userId": 1,
"id": 1,
"title": "foo",
"body": "bar"
}
responses:
201:
body:
application/json:
example: |
{
"userId": 1,
"id": 1,
"title": "foo",
"body": "bar"
}
patch:
body:
application/json:
example: |
{
"userId": 1,
"id": 1,
"title": "foo",
"body": "bar"
}
responses:
201:
body:
application/json:
example: |
{
"userId": 1,
"id": 1,
"title": "foo",
"body": "bar"
}
delete:
responses:
200:
body:
application/json:
example: |
{}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment