We are creating an RPC API supported by perl and HTTP. We are looking for a library for documenting API I / O and checking, in particular, API input. We initially only supported XML, but now we are mainly moving towards JSON I / O. But for now: XML and JSON.
Instead of just documenting the input and output structures in the text for people, for XML we used RELAX NG , the built-in POD for documenting input and output looked like for checking input and, possibly, output. But this does not work for JSON, so currently we can not / do not check JSON.
We looked at JSON :: Schema , as it can check perl data structures and, therefore, can work for both XML and JSON. But there are more dependencies than we can live on debian stable. Therefore, JSON :: Schema is impossible for us.
What other options are there?
Edited to add: Ideally, we would like the validation for I / O data to be as complex as in the Liquid Web documentation . Bonus is the automatic creation of documentation (both for Liquid Web) and the creation of test cases.
source
share