Skip to content

Instantly share code, notes, and snippets.

@Brazo
Created December 23, 2015 15:04
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 Brazo/38eb857e2eb70634ff69 to your computer and use it in GitHub Desktop.
Save Brazo/38eb857e2eb70634ff69 to your computer and use it in GitHub Desktop.
CQRS RAML file relating to my blog post series on mulesoft blog site
#%RAML 0.8
title: construction-cqrs-api
version: 1
/parts/{part_id}:
get:
description: Query application behaviour - Returns the price of a part in the currency of the given currency code.
queryParameters:
currency-code:
type: string
example: CHF
required: true
description: Get the real time price of a part using a defined currency code.
responses:
200:
body:
application/xml:
example: !include get-price-instance-example.xml
schema: !include get-price-instance-schema.xsd
put:
description: Command application behaviour - Update the part information
body:
application/xml:
example: |
<part>
<item-id>1</item-id>
<type>Skrews</type>
<currency>CHF</currency>
<price>3992</price>
<link rel="self" href="/parts/1" />
</part>
schema: !include put-part-instance-schema.xsd
responses:
204:
/suppliers:
post:
description: Command application behaviour
body:
application/xml:
example: |
<supplier>
<supplierId></supplierId>
<supplierName>Klein und Gut</supplierName>
<supplierLocation>DE</supplierLocation>
</supplier>
schema: !include post-supplier-instance-schema.xsd
responses:
201:
headers:
Location:
example: http://host.de/suppliers/224
/search:
get:
description: Query application behaviour - Search resource for suppliers. Returns the list of suppliers in the system.
responses:
200:
body:
application/xml:
example: !include get-suppliers-search-example.xml
schema: !include get-suppliers-search-schema.xsd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment