Skip to content

Instantly share code, notes, and snippets.

@uehondor
Last active May 16, 2016 15:29
Show Gist options
  • Save uehondor/28a5ecdbe1cf2d5a987fee358c7a7073 to your computer and use it in GitHub Desktop.
Save uehondor/28a5ecdbe1cf2d5a987fee358c7a7073 to your computer and use it in GitHub Desktop.
#%RAML 0.8
baseUri: https://mocksvc.mulesoft.com/mocks/80c45f78-d233-4d86-892e-68e011c77dc7
title: Product Catalog API
version: 1.0
/products:
displayName: Catalog of Product
get:
queryParameters:
itemsCount:
required: false
type: integer
responses:
200:
body:
application/json:
example: |
{
"id": 10,
"name": "Diet Coke",
"price": 5
}
post:
body:
application/json:
example: |
{ "name": "Coke", "price": 4 }
schema: |
{
"type":"object",
"$schema": "http://json-schema.org/draft-03/schema",
"id": "http://jsonschema.net",
"required":false,
"properties": {
"name": {
"type": "string",
"id": "http://jsonschema.net/itemName",
"required":true
},
"price": {
"type":"number",
"id": "http://jsonschema.net/itemPrice",
"required": false
}
}
}
responses:
200:
body:
application/json:
example: |
{
"id": 100,
"name": "Coke",
"price": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment