Created
December 23, 2015 15:04
-
-
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
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
#%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