KarelHusa's avatar
KarelHusa
Champion Level 1
3 years ago
Status:
New Idea

JSON validation in REST requests

Current situation

Currently there's no validation available for JSON messages in REST requests. The only thing to do with JSON is to format it:

 

 

For SOAP requests the validation works pretty well:

- it validates if the XML is well formed

- it validates XML against WSDL/XSD 

 

 

 

The need

For instance, I have a REST POST request with a large JSON document.

I need to validate if:

  • the document is a well formed JSON
  • the document conforms to the API specification (OpenAPI)

Can you please add this function, at least for JSON as the most commonly used format in REST?

 

I would suggest also a check and warning for invisible characters and encoding within the request -- if they come into the request e.g. by copy-pasting, it's very difficult to realize what's wrong. In such cases other tools may work fine (e.g. curl) having the same HTTP headers but still ReadyAPI request fails.

 

Best regards,

Karel

 

No CommentsBe the first to comment