Skip to content

Commit ab9ae05

Browse files
authored
Merge pull request #521 from necusjz/update-document
docs: generate codes via new interface
2 parents 07a631e + f6fc15a commit ab9ae05

File tree

1 file changed

+5
-29
lines changed

1 file changed

+5
-29
lines changed

docs/pages/usage/setup_and_run.md

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -134,36 +134,12 @@ aaz-dev run --cli-path {path to azure-cli} --cli-extension-path {path to azure-c
134134

135135
![start with swagger module path](../../assets/images/setup_and_run/swagger_module_start.png)
136136

137-
## Generate `aaz` model and commands in scripts
138-
139-
### 1. Generate `aaz` model
140-
141-
The following cmd can be used to generate `aaz` command model directly in cmd shell.
142-
143-
```bash
144-
aaz-dev command-model generate-from-swagger -a {path to aaz} --sm {path to swagger module} -m {swagger module name} --rp {resource provider name} --swagger-tag {swagger tag with input files specified}
145-
```
146-
147-
for example, generating `aaz` command model for liftrpinecone under tag `package-2024-10-22-preview`:
148-
149-
```bash
150-
aaz-dev command-model generate-from-swagger -a ./aaz --sm ./azure-rest-api-specs/specification/liftrpinecone -m liftrpinecone --rp Pinecone.VectorDb --swagger-tag package-2024-10-22-preview
151-
```
152-
153-
And developers can check `aaz` folder to see the newly generated command models for `liftrpinecone`.
154-
155-
### 2. Generate `aaz` commands
156-
157-
Based on the `aaz` model generated in last step, the following cmd can be used to generate `aaz` commands into cli extension directly in cmd shell.
158-
137+
## Generate Azure CLI module in seconds!
138+
E.g.,
159139
```bash
160-
aaz-dev cli generate-by-swagger-tag -a {path to aaz} -e {path to azure-cli-extensions} --name {target extension module name} --sm {path to swagger module} --rp {resource provider name} --tag {swagger tag with input files specified} --profile {chosen cmd profile}
140+
aaz-dev cli generate --spec chaos --module chaos
161141
```
162142

163-
For example, generate `aaz` command under cli extension module `myliftrpinecone` for swagger module liftrpinecone under tag `package-2024-10-22-preview` and the `latest` profile:
164-
165-
```bash
166-
aaz-dev cli generate-by-swagger-tag -a ./aaz -e ./azure-cli-extensions --name myliftrpinecone --sm ./azure-rest-api-specs/specification/liftrpinecone --rp Pinecone.VectorDb --tag package-2024-10-22-preview --profile latest
167-
```
143+
It will convert the specification from https://github.com/Azure/azure-rest-api-specs/tree/main/specification/chaos into an Azure CLI module named `chaos`.
168144

169-
And developers can check `azure-cli-extensions` folder to see the newly generated commands for swagger module liftrpinecone under cli extension module `myliftrpinecone`.
145+
> Generate code effortlessly. If the result isn't what you expected, use the UI to fine-tune it.

0 commit comments

Comments
 (0)