Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

How to define a JSON body to be used in POST? it is missing in documentation #177

Open
brunofracalossi opened this issue Sep 10, 2015 · 0 comments

Comments

@brunofracalossi
Copy link

I want to validate a contract based on a POST request that always sends same json body. Tried to define it in several ways(as json schema) , but body is not being send with the request.

to send a param we can do something like below (but how can we do something similar to send a JSON?):

{
"request": {
"http_method": "POST",
"path": "/api/pub/order/simulate",
"headers": {
"Content-Type": "application/json",
"Authorization": "Basic c2VydmljZXM6MTIzNDU2"
},
"params":{
"body": "test"
}
},

"response": {
"status": 200,
"headers": {
"Content-Type": "application/json;charset="UTF-8""
},
"schema": {
"$schema": "http://json-schema.org/draft-03/schema#",
"id" : "sniper order simulation",
"type" : "object",
"properties" : {

  }
}

}
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant