JSON Payload Inspection

Great! Glad to know that the GET method worked.

I have answered your queries below:

If I want to pass multiple method like GET POST PUT, Is it possible to pass in the same definition or do I need to create separate JSON validation definition.

  1. You would need to create a separate JSON validation for each request method.

Can we define multiple JSON format definition for different path.

  1. Yes you can, by simply changing the value of the path. You can also check the root with “/”

Can we define most generalize format rather than defining specific with attribute, which will just do basic checks on JSON format like all the curly braces are getting closed or commas are in place.

  1. Yes you can. That validation check is handled by the schema directly, so if you pass in an object data structure check, it should work. Here is an example below
{
							"method": "PUT",
							"path": "/",
							"schema": {
								"type": "object"
							},
							"error_response_code": 422
						}

One caveat to note is that this only validates the first parameter. For example passing the following:

  1. {}}
  2. {},
  3. {}“This surprisingly works”

in the body will work since the first value is an object.

Hope this helps