Skip to content

Commit

Permalink
Merge pull request #88 from kairu-ms/fix-wait-command-generation
Browse files Browse the repository at this point in the history
support query and header parameters in wait command
  • Loading branch information
kairu-ms authored Jul 19, 2022
2 parents 85b44f2 + f3005ed commit 47601ec
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/aaz_dev/cli/controller/az_module_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from cli.templates import get_templates
from command.controller.specs_manager import AAZSpecsManager
from command.controller.cfg_reader import CfgReader
from command.controller.workspace_cfg_editor import WorkspaceCfgEditor
from command.model.configuration import CMDHttpOperation, CMDCommand, CMDArgGroup, CMDObjectOutput, CMDHttpResponseJsonBody
from cli.controller.az_profile_generator import AzProfileGenerator
from swagger.utils.tools import swagger_resource_path_to_resource_id
Expand Down Expand Up @@ -408,7 +407,14 @@ def _complete_command_wait_info(command_group):
if rid == resource.id:
wait_cmd_rids[rid]['resource'] = resource.__class__(resource.to_primitive())

for param in operation.http.request.path.params or []:
params = []
if operation.http.request.path and operation.http.request.path.params:
params += operation.http.request.path.params
if operation.http.request.query and operation.http.request.query.params:
params += operation.http.request.query.params
if operation.http.request.header and operation.http.request.header.params:
params += operation.http.request.header.params
for param in params:
if not param.arg:
continue
assert param.arg.startswith("$"), f"Not support path arg name: '{param.arg}'"
Expand Down

0 comments on commit 47601ec

Please sign in to comment.