azure-cli-dev-tools icon indicating copy to clipboard operation
azure-cli-dev-tools copied to clipboard

azdev extension/cli create -- additional functionality

Open zikalino opened this issue 6 years ago • 2 comments

So this is a proposal to add new parameters to the command:

--autorest-input-file (json or md file within locally cloned azure-rest-api-specs)

If the parameter is added, azdev would run following docker command:

docker run -ti -v azure-rest-api-specs-folder:/azure-rest-api-specs -v output-folder:/generated zikalino/autorest.devops /azure-rest-api-specs/path-to-md-file.md azdev

The command will produce following files in output-folder:

  • _client_factory.py
  • _help.py
  • _params.py
  • commands.py
  • custom.py
  • report.md

These files can be used to replace scaffolded files with complete prototype implementation of command module.

zikalino avatar Jul 03 '19 01:07 zikalino

@tjprescott @yugangw-msft do you have any comments?

zikalino avatar Jul 03 '19 01:07 zikalino

@zikalino if I understand correctly, this would simply wrap the autorest generation of the SDK? Or are you talking about generating the code purely from analysis of the swagger? If it is the first option, I think that would make a lot of sense.

tjprescott avatar Jul 03 '19 16:07 tjprescott