I started working on a new command line app and ruby library called
for converting json to json schema. The app is for converting the json output of an api call into json schema so that I can use it to help document the discourse api without having to manually type the schema myself which can be quite tedious.
So my workflow for documenting the api is to:
- Make a curl request to an endpoint (using discourse_api_curl)
- Take that json output and pass it to
- Save the schema to a .json file inside the discourse api docs directory
- Reference the schema file in a spec
I literally just started working on it and thought I should save what I have for now and hopefully I can get it into a working state tomorrow.
Hopefully you find it useful.