Files
divkit/api_generator/README.md
T
timatifey a2ee37f04a connect python api_generator to client/android
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
2022-08-31 19:03:31 +03:00

815 B

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