mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
a2ee37f04a
api_generator script 1) api_generator execute script with creating virtual env and checking for changes in requirements 2) update _container in android CI tasks
DivKit API Generator
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.
Config format:
{
"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"
}
Commands
Build
Setup environment:
pip install -r dev_requirements.txt
Run generator:
python -m api_generator -c /config/file/name.json -s /path/to/schema -o /output/path
Run tests:
python -m pytest
With ya make
Build:
ya make
Run generator:
./api_generator -c /config/file/name.json -s /path/to/schema -o /output/path
Run tests:
ya make -t