AiqDocTests A framework to validate request/response's json and create documentation for applications maintained by the devs of the most greedy-gut app on the internet!
pip3 install aiqDocTests
aiqdoctests --init
Will be created the folder data_scructures_io and static.
In the data_scructures_io, is the json files to test the request. Example
We using Cerberus to validate the structure. So if any valid in the json response is a name, type or don't send. Will occurs a exception in tests.
In the static folder, will be the json file to Swagger, with this file you can any package in any language what you want to read.
This swagger.json is generate, so every time that you run the command aiqdoctests -g
in the folder this file will be update.
This json file is for configuration, so the name folders and other things can be personalizable.
with the command aiqdoctests --docs
will be up un flask server in the port 3000 and read the swagger file, this value is for which url will run. default: localhost:3000/docs
The name file generate to swagger. default: swagger.json
The name folder that are the data scructures for requests. default: data_structures_io
The name folder that will be the tests. default: tests
Sometimes in the project, we wanna run command/script before start the tests, example create the tables in the bd. Will run this command before start the tests.
This command is for run between tests, in the tearDown, so after run a test, this is for a script or migration that you want to run for clean the bd for example.
The header for swagger file.
For more you can see in the example (https://github.com/aiqfome/aiqDocTests-example)
Relax, this documentation is still in construction 👷
Any doubt create a issue.
Made with 🍕 &