Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions model/gen-apis.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

# Code is generated by ucloud-model, DO NOT EDIT IT.

ucloud-model sdk apis --lang python3 --type public --template ../ucloud-api-model-v2/apisdk/lang/python/templates/clients.tpl --output ./ucloud/client.py
ucloud-model sdk apis --lang python3 --type public --template ../ucloud-api-model-v2/apisdk/lang/python/templates/docs.tpl --output ./docs/services.rst
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 ../ucloud-api-model-v2/apisdk/lang/python/templates/schema.tpl --output ./ucloud/services/{{ . | lower }}/schemas/apis.py
ucloud-model sdk apis --lang python3 --product {{ . }} --type public --template ../ucloud-api-model-v2/apisdk/lang/python/templates/model.tpl --output ./ucloud/services/{{ . | lower }}/schemas/models.py
ucloud-model sdk apis --lang python3 --product {{ . }} --type public --template ../ucloud-api-model-v2/apisdk/lang/python/templates/client.tpl --output ./ucloud/services/{{ . | lower }}/client.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 }}
2 changes: 1 addition & 1 deletion model/gen-tests.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ range $index, $test := .GetAll }}
ucloud-model sdk test \
--lang python3 \
--template ../ucloud-api-model-v2/apisdk/lang/python/templates/testing.tpl \
--template ${U_MODEL_HOME}/providers/python/templates/testing.tpl \
--output tests/test_services/test_set_{{ $test.ID }}.py \
--name {{ $test.ID }}
{{ end }}
Expand Down