Skip to content

Commit

Permalink
Add tsp-client local spec development docs (#1793)
Browse files Browse the repository at this point in the history
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
3 people authored Nov 9, 2024
1 parent c76be93 commit 1c56a68
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
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).
:::
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: tsp-client usage
title: Usage & Configuration
---

:::info
Expand Down

0 comments on commit 1c56a68

Please sign in to comment.