It’s always good to start with a command like that:
1 | $ autorest --version=3.0.6370 --az --use=@autorest/az@latest ../azure-rest-api-specs/specification/dnsresolver/resource-manager/readme.md --azure-cli-extension-folder=./azure-cli-extensions |
Make sure you have these specific versions installed:
AutoRest Core | AutoRest CLI | Node.js |
---|---|---|
3.0.6370 | 3.5.1 | 12.20 |
Errors you might encounter nowadays:
- ERROR: Schema violation: Additional properties not allowed: x-ms-identifiers
- Append --pass-thru:schema-validator-swagger to the command;
- AttributeError: module ‘mistune’ has no attribute ‘BlockGrammar’
- Active the venv within ~/.autorest/@autorest_python@5.4.0/node_modules/@autorest/python;
- Execute pip install mistune==0.8.4;
- ImportError: cannot import name ‘_unicodefun’ from ‘click’
- Active the venv within ~/.autorest/@autorest_az@1.8.0/node_modules/@autorest/az;
- Execute pip install click==8.0.2;
One more thing, it’s a good practice to clean up AutoRest extensions by:
1 | $ autorest --reset |
When readme.az.md is missing, the header should be like:
1 | # AZ |
Make sure azext_metadata.json meets the demand:
1 | extension-mode: preview |
From report.md, resolve the defects within UX:
1 | cli: |
Fix azdev style and azdev linter checks:
1 | cli: |
Clean up tests folder and compose test_dns_resolver_commands.py:
1 | # -------------------------------------------------------------------------------------------- |
Remaining works to be done:
- Update README.rst and HISTORY.rst;
- Update CODEOWNERS and service_name.json;