Files
divkit/api_generator
timatifey 14a680efd0 hashing generator & config & output result
hash of generator & config output
2022-08-31 14:35:25 +03:00
..
2022-08-25 21:21:49 +03:00
2022-08-26 13:48:22 +03:00

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 requirements.txt
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