Skip to content

Generation using autorest for Python v5 dev mode

Laurent Mazuel edited this page Jan 17, 2020 · 6 revisions

Once: prepare the env

Python 3.6 is required to run this new autorest

Install autorest-beta

  • npm install -g "@autorest/autorest"

Clone, create a venv and install deps

All generation must be done with this venv load.

Generate

It's actually as usual, expect the main cmd line must starts with "autorest-beta". Be sure --use points to the folder where you cloned autorest, and that your venv is loaded.

Example: autorest-beta --use=. --add-credentials --payload-flattening-threshold=2 --namespace=azure.cognitiveservices.language.textanalytics --package-name=azure-cognitiveservices-language-textanalytics --no-namespace-folders ---clear-output-folder --output-folder=TextAnalytics --input-file=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.0-preview.1/TextAnalytics.json --credential-scopes=https://cognitiveservices.azure.com/.default

Clone this wiki locally