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 |