I have a swagger document for a web-service, I want to validate that the response from the service (JSON) matches the format defined by the SWAGGER doc.
I have found myriad ways of testing to make sure the swagger is valid, and for testing against a JSON Schema, but next to nothing on validating data against the swagger doc.
I did come up with a hybrid solution, I found a python app which extract the schema from the swagger and then used ExJsonSchema to validate, works great on my mac, unfortunately not so well on a windows PC for work, I believe it’s the difference in file paths i.e. ‘’ vs ‘/’.
Anyway thanks of the info, I will go read up on it.
I didn’t find an easy solution, I wrote a small command line app in Elixir which executes the python script as a system call.This results in the swagger being split into a series of JSON Schema files, in a subdirectory, as I know the operation (passed in the command line) I also know which operation I’m testing. So I can open the appropriate JSON schema file and compare that against the response from the web-service.
I’m sorry I can’t share the source, it was written on the company time