Last active
August 29, 2015 14:16
-
-
Save steppat/4df7e2257d7e10c50a30 to your computer and use it in GitHub Desktop.
Simple RAML file
This file contains hidden or 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
Obs: http://tinyurl.com/raml-file | |
----- | |
#%RAML 0.8 | |
baseUri: http://mocksvc.mulesoft.com/mocks/a296cd19-32ae-4c10-ba8a-ffb527bd4f24 | |
title: pagamentos | |
version: 1.0 | |
mediaType: application/json | |
/pagamentos: | |
get: | |
description: Para receber todos os pagamentos | |
queryParameters: | |
data: | |
type: date | |
required: false | |
displayName: Data para filtra dd-mm-yyyy | |
responses: | |
200: | |
body: | |
application/json: | |
example: | | |
{"pagamentos" : | |
{ "pagamento" : { | |
"id" : "1", | |
"status" : "CRIADO", | |
"valor" : "39.9" | |
} | |
} | |
post: | |
description: Para inserir um novo pagamentos | |
body: | |
application/json: | |
example: | | |
{"transacao" : { | |
"titular" : "Fulano", | |
"valor" : "21.9" | |
} | |
} | |
responses: | |
200: | |
body: | |
application/json: | |
example: | | |
{ "pagamento": { | |
"id" : "1", | |
"status":"CRIADO", | |
"valor" : "39.9" | |
} | |
/{id}: | |
get: | |
responses: | |
200: | |
body: | |
application/json: | |
example: | | |
{"pagamento": { | |
"status":"status here" | |
} | |
patch: | |
description: para confirmar o pagamento | |
responses: | |
200: | |
body: | |
application/json: | |
example: | | |
{ "pagamento" :{ | |
"status":"CONFIRMADO" | |
"outros atributos ...": "valor ..." | |
} | |
} | |
delete: | |
description: para cancelar o pagamentos | |
responses: | |
200: | |
body: | |
application/json: | |
example: | | |
{ "pagamento" :{ | |
"status":"CANCELADO" | |
"outros atributos ...": "valor ..." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment