-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tsp-client local spec development docs (#1793)
Adding docs to explain the local development scenario for folks who havent checked a spec in yet or who want to work on local changes and generate a client library based on those updates. --------- Co-authored-by: Catalina Peralta <[email protected]> Co-authored-by: Timothee Guerin <[email protected]>
- Loading branch information
1 parent
c76be93
commit 1c56a68
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
.../src/content/docs/docs/howtos/Generate with tsp-client/local_spec_quickstart.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
title: Quick Start | ||
--- | ||
|
||
`tsp-client` allows you to develop your TypeSpec project locally before pushing changes upstream. These instructions can be used when you want to generate a client library from a local TypeSpec project that has the changes you wish to use. | ||
|
||
### Prerequisites | ||
|
||
- Install `tsp-client`: | ||
|
||
```bash | ||
npm install -g @azure-tools/typespec-client-generator-cli | ||
``` | ||
|
||
- Have a local Git repository with your TypeSpec project. We'll use the `azure-rest-api-specs` repository in examples. | ||
- Have a clone of an `azure-sdk-for-<language>` repository. We'll use `azure-sdk-for-python` in examples. | ||
|
||
### Generate a client library from local changes | ||
|
||
1. Go to local `azure-rest-api-specs` clone. | ||
2. Create/Modify the TypeSpec project. | ||
3. Switch to the language repository clone you want to generate a client library in. Example: | ||
|
||
```bash | ||
cd <path to>/azure-sdk-for-python | ||
``` | ||
|
||
4. From the root of the repository run the following command: | ||
|
||
```bash | ||
azure-sdk-for-python> tsp-client init -c <path to local typespec project at tspconfig.yaml level> | ||
``` | ||
|
||
Example: | ||
|
||
```bash | ||
azure-sdk-for-python> tsp-client init -c ../azure-rest-api-specs/specification/contosowidgetmanager/Contoso.WidgetManager/ | ||
``` | ||
|
||
:::info | ||
To get familiar with `tsp-client` and supported commands, see [tsp-client usage](https://aka.ms/azsdk/tsp-client). | ||
::: |
2 changes: 1 addition & 1 deletion
2
website/src/content/docs/docs/howtos/Generate with tsp-client/tsp_client.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: tsp-client usage | ||
title: Usage & Configuration | ||
--- | ||
|
||
:::info | ||
|