Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple RAML file
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