Skip to content

Commit

Permalink
add tsp doc
Browse files Browse the repository at this point in the history
  • Loading branch information
AllyW committed Sep 25, 2024
1 parent f8b192f commit 706a7d7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
14 changes: 9 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ There are two repos to maintain Azure CLI commands:
- [Azure CLI](https://github.com/Azure/azure-cli)
- [Azure CLI Extension](https://github.com/Azure/azure-cli-extensions)

### What is Swagger(OpenAPI Specification)?
### What is REST API Specifications?

Azure uses swagger to define REST API specifications. Most of swagger files are maintained in the following two repos:
Azure uses swagger(OpenAPI) or TypeSpec to define REST API specifications. Most of files are maintained in the following two repos:
- [azure-rest-api-specs](https://github.com/Azure/azure-rest-api-specs)
- [azure-rest-api-specs-pr](https://github.com/Azure/azure-rest-api-specs-pr)

So the definition of API in swagger is required before using AAZDev tool.
Swagger Specification (or known as OpenAPI Specification) is an API description format for REST APIs. An OpenAPI file, can be written in YAML or json, allows developers to describe the entire API.

TypeSpec (tsp) is a language for defining cloud service APIs and models. It is a highly extensible language with primitives that can describe APIs using REST, gRPC, and other protocols.

The definition of API in swagger or TypeSpec is required before using AAZDev tool.

### What is Atomic CLI Command?

Expand All @@ -69,9 +73,9 @@ The SDK packages a batch of APIs, and when one API has new change and is release

![Architecture](assets/diagrams/out/archutecture/architecture.svg)

AAZDev Tool consists of 4 parts:
AAZDev Tool consists of 5 parts:
- API Translators:
They are responsible for translating the API specification into a command model. We've implemented the swagger 2.0 translator which can support to translate the API specs in [azure-rest-api-specs](https://github.com/Azure/azure-rest-api-specs) repo and [azure-rest-api-specs-pr](https://github.com/Azure/azure-rest-api-specs-pr) repo.
They are responsible for translating the API specification into a command model. We've implemented both swagger 2.0 and Typespec translator which can support to translate the API specs in [azure-rest-api-specs](https://github.com/Azure/azure-rest-api-specs) repo and [azure-rest-api-specs-pr](https://github.com/Azure/azure-rest-api-specs-pr) repo.
- Model Editors:
They are used to edit command models. Currently, _Workspace Editor_ is implemented. More details are introduced in _Workspace_ paragraph.
- Command Models:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion docs/pages/usage/workspace_editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ When using aaz-dev from scratch, the workspace editor is the starting point. A w

In workspace page, the drop-down menu can select an existing workspace or create a new one.

![create_a_workspace](../../assets/recordings/workspace_editor/create_a_workspace.gif)
When creating a new workspace, you have to pick the target resource provider.

#### Add a new workspace from swagger specificcations

![create_a_workspace_from_swagger](../../assets/recordings/workspace_editor/create_a_swagger_workspace.gif)

#### Add a new workspace fron TypeSpec specification

![create_a_workspace_from_typespec](../../assets/recordings/workspace_editor/create_a_typespec_workspace.gif)


### Rename a workspace

Expand Down

0 comments on commit 706a7d7

Please sign in to comment.