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

feat: adds dependencies filter documentation #110

Merged
merged 7 commits into from
Sep 29, 2024
Merged
Changes from 2 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
74 changes: 59 additions & 15 deletions OpenAPI/kiota/using.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ kiota info [(--openapi | -d) <path>]
[--clear-cache | --cc]
[(--version | -v) <version>]
[(--search-key | -k) <searchKey>]
[(--dependency-type | --dt) <typeKey>]
[(--json)]
```

### Example - global
Expand Down Expand Up @@ -455,6 +457,21 @@ dotnet add package Microsoft.Kiota.Serialization.Text --version 1.1.0
dotnet add package Microsoft.Kiota.Serialization.Multipart --version 1.1.0
```

### Optional Parameters

The info command accepts optional parameters commonly available on the other commands:

- [--openapi](#--openapi--d)
- [--clear-cache](#--clear-cache---cc)
- [--log-level](#--log-level---ll)
- [--language](#--language--l)
- [--version](#--version--v)
- [--search-key](#--search-key--k)
- [--dependency-type](#--dependency-type---dt)
- [--json](#--json)

### `--json`

Using the `--json` optional parameter renders the output in a machine parsable format:

```bash
Expand All @@ -468,48 +485,75 @@ kiota info -l CSharp --json
"dependencies": [
{
"name": "Microsoft.Kiota.Abstractions",
"version": "1.6.1"
"version": "1.6.1",
"type": "abstractions"
},
{
"name": "Microsoft.Kiota.Http.HttpClientLibrary",
"version": "1.2.0"
"version": "1.2.0",
"type": "http"
},
{
"name": "Microsoft.Kiota.Serialization.Form",
"version": "1.1.0"
"version": "1.1.0",
"type": "serialization"
},
{
"name": "Microsoft.Kiota.Serialization.Json",
"version": "1.1.1"
"version": "1.1.1",
"type": "serialization"
},
{
"name": "Microsoft.Kiota.Authentication.Azure",
"version": "1.1.0"
"version": "1.1.0",
"type": "authentication"
},
{
"name": "Microsoft.Kiota.Serialization.Text",
"version": "1.1.0"
"version": "1.1.0",
"type": "serialization"
},
{
"name": "Microsoft.Kiota.Serialization.Multipart",
"version": "1.1.0"
"version": "1.1.0",
"type": "serialization"
},
{
"name": "Microsoft.Kiota.Bundle",
"version": "1.1.0",
"type": "bundle"
}
],
"clientClassName": "",
"clientNamespaceName": ""
}
```

### Optional Parameters
### `--dependency type (--dt)`

The info command accepts optional parameters commonly available on the other commands:
Since: 1.18.1

- [--openapi](#--openapi--d)
- [--clear-cache](#--clear-cache---cc)
- [--log-level](#--log-level---ll)
- [--language](#--language--l)
- [--version](#--version--v)
- [--search-key](#--search-key--k)
The type of dependencies to display when used in combination with the language option. Does not impact the json output. Accepts multiple values. Default empty.

```bash
baywet marked this conversation as resolved.
Show resolved Hide resolved
kiota info --language <language> --dependency-type authentication
```

Accepted values:

| Value | Description | Requirement |
| ----- | ----------- | -------- |
| Abstractions | Define the core concepts of the language. | Build time |
| Additional | Required in addition to the abstractions or bundle. | Build time |
| Authentication | Implement authentication providers. | Optional |
| Bundle | Include abstractions, serialization and HTTP dependencies for simpler management. | |
| HTTP | Implement the request adapter with a specific HTTP client. | Runtime |
| Serialization | Implement serialization and deserialization for a given format. | Runtime |

When no value is provided the info command will display:

- All dependencies when no bundle is available.
- Bundle, authentication and additional dependencies when a bundle is available.

## Client update

Expand Down