Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- adds powershell snippets for docker #47

Merged
merged 1 commit into from
Nov 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions OpenAPI/kiota/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,53 @@ You can download the latest version for your operating system.

You can run Kiota in our Docker container with one of the following commands.

<!-- markdownlint-disable MD051 -->
### [bash](#tab/bash)

```bash
docker run -v /some/output/path:/app/output \
-v /some/input/description.yml:/app/openapi.yml \
mcr.microsoft.com/openapi/kiota generate --language csharp -n namespace-prefix
```

### [PowerShell](#tab/powershell)

```powershell
docker run -v /some/output/path:/app/output `
-v /some/input/description.yml:/app/openapi.yml `
mcr.microsoft.com/openapi/kiota generate --language csharp -n namespace-prefix
```

<!-- markdownlint-enable MD051 -->

---

> [!TIP]
> You can alternatively use the `--openapi` parameter with a URI instead of volume mapping.

To generate a SDK from an online OpenAPI description and into the current directory:

<!-- markdownlint-disable MD024 MD051 -->
### [bash](#tab/bash)

```bash
docker run -v ${PWD}:/app/output mcr.microsoft.com/openapi/kiota \
generate --language typescript -n gfx -d \
https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/dev/openApiDocs/v1.0/Mail.yml
```

### [PowerShell](#tab/powershell)

```powershell
docker run -v ${PWD}:/app/output mcr.microsoft.com/openapi/kiota `
generate --language typescript -n gfx -d `
https://raw.githubusercontent.com/microsoftgraph/msgraph-sdk-powershell/dev/openApiDocs/v1.0/Mail.yml
```

<!-- markdownlint-disable MD024 MD051 -->

---

## Install as .NET tool

If you have the [.NET SDK](https://dotnet.microsoft.com/download) installed, you can install Kiota as a [.NET tool](/dotnet/core/tools/global-tools).
Expand Down