forked from ucloud/ucloud-sdk-python3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgen-apis.tpl
More file actions
17 lines (14 loc) · 1.24 KB
/
gen-apis.tpl
File metadata and controls
17 lines (14 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash
# Code is generated by ucloud-model, DO NOT EDIT IT.
ucloud-model sdk apis --lang python3 --type public --template ${U_MODEL_HOME}/providers/python/templates/clients.tpl --output ./ucloud/client.py
ucloud-model sdk apis --lang python3 --type public --template ${U_MODEL_HOME}/providers/python/templates/docs.tpl --output ./docs/services.rst
{{ range $index, $product := (.GetAll | extractUnique "Product") }}
mkdir -p ./ucloud/services/{{ . | lower }}/schemas
touch ./ucloud/services/{{ . | lower }}/__init__.py
touch ./ucloud/services/{{ . | lower }}/schemas/__init__.py
ucloud-model sdk apis --lang python3 --product {{ . }} --type public --template ${U_MODEL_HOME}/providers/python/templates/schema.tpl --output ./ucloud/services/{{ . | lower }}/schemas/apis.py
ucloud-model sdk apis --lang python3 --product {{ . }} --type public --template ${U_MODEL_HOME}/providers/python/templates/model.tpl --output ./ucloud/services/{{ . | lower }}/schemas/models.py
ucloud-model sdk apis --lang python3 --product {{ . }} --type public --template ${U_MODEL_HOME}/providers/python/templates/client.tpl --output ./ucloud/services/{{ . | lower }}/client.py
black ucloud/services/{{ . | lower }}
python -m ucloud.services.{{ . | lower }}.client
{{ end }}