The script takes a JSON schema at the input and generates the code of objects described in the schema based on it and the config.
{
"lang": "[kotlin|kotlinDsl|swift|typescript|python|documentation]",
"header": "// Header of every generated file. Generated code. Do not modify.\nimport some.lib\nimport other.lib\n\n"
}Setup environment:
pip install -r dev_requirements.txtRun generator:
python3 -m api_generator -c /config/file/name.json -s /path/to/schema -o /output/path [--checkhash] [--savehash]./api_generator.sh /config/file/name.json /path/to/schema /output/path [--checkhash] [--savehash]--checkhashCheck the hash files in the output directory before generating--savehashSave the hash files of the generator, config and schema to the output directory
Run tests:
python3 -m pytestBuild:
ya makeRun generator:
./api_generator_script -c /config/file/name.json -s /path/to/schema -o /output/path [--checkhash] [--savehash]--checkhashCheck the hash files in the output directory before generating--savehashSave the hash files of the generator, config and schema to the output directory
Run tests:
ya make -t