-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4063 from microsoft/specs/telemetry
specs: Telemetry in kiota
- Loading branch information
Showing
14 changed files
with
397 additions
and
40 deletions.
There are no files selected for viewing
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
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
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
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
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
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,22 @@ | ||
# download | ||
|
||
## Description | ||
|
||
Downloads an API description. | ||
|
||
## Parameters | ||
|
||
| Parameters | Required | Example | Description | Telemetry | | ||
| -- | -- | -- | -- | -- | | ||
| `search-term` | Yes | Graph | The term to search for. | Yes, without its value | | ||
| `--clear-cache \| --cc` | No | true | Clears any cached data for the current command. Defaults to `False`. | Yes | | ||
| `--clear-output \| --cc` | No | true | Delete the output directory before generating the client. Defaults to `False`. | Yes | | ||
| `--log-level \| --ll` | No | Critical | The log level to use when logging messages to the main output. Options available: Critical, Debug, Error, Information, None, Trace & Warning. Defaults to `Warning`. | Yes | | ||
| `--version \| --v` | No | beta | The version of the OpenAPI document to use | Yes, without its value | | ||
| `--output \| --o` | No | beta | The output directory or file path for the generated code files. Defaults `./output/result.json`. | Yes, without its value | | ||
|
||
## Usage | ||
|
||
```bash | ||
kiota download apisguru::github.com | ||
``` |
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,16 @@ | ||
# CLI Commands | ||
|
||
This section contains the specifications for the Kiota CLI commands. All the commands are documented here: | ||
|
||
* [kiota client add](./client-add.md) | ||
* [kiota client edit](./client-edit.md) | ||
* [kiota client remove](./client-remove.md) | ||
* [kiota client generate](./client-generate.md) | ||
* [kiota config init](./config-init.md) | ||
* [kiota config migrate](./config-migrate.md) | ||
* [kiota download](./download.md) | ||
* [kiota info](./info.md) | ||
* [kiota login](./login.md) | ||
* [kiota logout](./logout.md) | ||
* [kiota search](./search.md) | ||
* [kiota show](./show.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,98 @@ | ||
# info | ||
|
||
## Description | ||
|
||
Show languages and runtime dependencies information. | ||
|
||
## Parameters | ||
|
||
| Parameters | Required | Example | Description | Telemetry | | ||
| -- | -- | -- | -- | -- | | ||
| `--openapi \| -d` | Yes | https://aka.ms/graph/v1.0/openapi.yaml | The location of the OpenAPI description in JSON or YAML format to use to generate the SDK. Accepts a URL or a local path. | Yes, without its value | | ||
| `--language \| -l` | No | csharp | The target language for the generated code files or for the information. | Yes | | ||
| `--clear-cache \| --cc` | No | true | Clears any cached data for the current command. Defaults to `False`. | Yes | | ||
| `--log-level \| --ll` | No | Critical | The log level to use when logging messages to the main output. Options available: Critical, Debug, Error, Information, None, Trace & Warning. Defaults to `Warning`. | Yes | | ||
| `--version \| --v` | No | beta | The version of the OpenAPI document to use | Yes, without its value | | ||
| `--search-key \| --k` | No | github::microsoftgraph/msgraph-metadata/graph.microsoft.com/v1.0 | The search key used to locate the OpenAPI description. | Yes, without its value | | ||
|
||
## Usage | ||
|
||
```bash | ||
kiota info | ||
``` | ||
|
||
```bash | ||
Language Maturity Level | ||
CLI Preview | ||
CSharp Stable | ||
Go Stable | ||
Java Preview | ||
PHP Stable | ||
Python Stable | ||
Ruby Experimental | ||
Swift Experimental | ||
TypeScript Experimental | ||
``` | ||
|
||
The following command with the provided options will display the following result. | ||
|
||
```bash | ||
kiota info -l CSharp | ||
``` | ||
|
||
```bash | ||
The language CSharp is currently in Stable maturity level. | ||
After generating code for this language, you need to install the following packages: | ||
dotnet add package Microsoft.Kiota.Abstractions --version 1.6.1 | ||
dotnet add package Microsoft.Kiota.Http.HttpClientLibrary --version 1.3.0 | ||
dotnet add package Microsoft.Kiota.Serialization.Form --version 1.1.0 | ||
dotnet add package Microsoft.Kiota.Serialization.Json --version 1.1.1 | ||
dotnet add package Microsoft.Kiota.Authentication.Azure --version 1.1.0 | ||
dotnet add package Microsoft.Kiota.Serialization.Text --version 1.1.0 | ||
dotnet add package Microsoft.Kiota.Serialization.Multipart --version 1.1.0 | ||
``` | ||
|
||
Using the `--json` optional parameter render the output in a machine parsable format: | ||
|
||
```bash | ||
kiota info -l CSharp --json | ||
``` | ||
|
||
```json | ||
{ | ||
"maturityLevel": "Stable", | ||
"dependencyInstallCommand": "dotnet add package {0} --version {1}", | ||
"dependencies": [ | ||
{ | ||
"name": "Microsoft.Kiota.Abstractions", | ||
"version": "1.6.1" | ||
}, | ||
{ | ||
"name": "Microsoft.Kiota.Http.HttpClientLibrary", | ||
"version": "1.2.0" | ||
}, | ||
{ | ||
"name": "Microsoft.Kiota.Serialization.Form", | ||
"version": "1.1.0" | ||
}, | ||
{ | ||
"name": "Microsoft.Kiota.Serialization.Json", | ||
"version": "1.1.1" | ||
}, | ||
{ | ||
"name": "Microsoft.Kiota.Authentication.Azure", | ||
"version": "1.1.0" | ||
}, | ||
{ | ||
"name": "Microsoft.Kiota.Serialization.Text", | ||
"version": "1.1.0" | ||
}, | ||
{ | ||
"name": "Microsoft.Kiota.Serialization.Multipart", | ||
"version": "1.1.0" | ||
} | ||
], | ||
"clientClassName": "", | ||
"clientNamespaceName": "" | ||
} | ||
``` |
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,20 @@ | ||
# login | ||
|
||
## Description | ||
|
||
Use `kiota login` to sign in to private repositories and search for/display/generate clients for private API descriptions. This command makes sub-commands available to sign in to specific authentication providers. | ||
|
||
## Parameters | ||
|
||
| Parameters | Required | Example | Description | Telemetry | | ||
| -- | -- | -- | -- | -- | | ||
| `search-provider` | Yes | github | The search provided to login with. | Yes | | ||
| `type` | Yes | device | The authentication strategy to use. | Yes | | ||
| `--log-level \| --ll` | No | Critical | The log level to use when logging messages to the main output. Options available: Critical, Debug, Error, Information, None, Trace & Warning. Defaults to `Warning`. | Yes | | ||
| `--pat` | No | PAT value | The PAT used to login | Yes, without its value | | ||
|
||
## Usage | ||
|
||
```bash | ||
kiota login github device | ||
``` |
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,18 @@ | ||
# logout | ||
|
||
## Description | ||
|
||
Use kiota logout to logout from a private repository containing API descriptions. | ||
|
||
## Parameters | ||
|
||
| Parameters | Required | Example | Description | Telemetry | | ||
| -- | -- | -- | -- | -- | | ||
| `search-provider` | Yes | github | The search provided to login with. | Yes | | ||
| `--log-level \| --ll` | No | Critical | The log level to use when logging messages to the main output. Options available: Critical, Debug, Error, Information, None, Trace & Warning. Defaults to `Warning`. | Yes | | ||
|
||
## Usage | ||
|
||
```bash | ||
kiota logout github | ||
``` |
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,47 @@ | ||
# search | ||
|
||
## Description | ||
|
||
Search for APIs and their description from various registries. | ||
|
||
## Parameters | ||
|
||
| Parameters | Required | Example | Description | Telemetry | | ||
| -- | -- | -- | -- | -- | | ||
| `search-term` | Yes | github | The term to search for. | Yes, without its value | | ||
| `--clear-cache \| --cc` | No | true | Clears any cached data for the current command. Defaults to `False`. | Yes | | ||
| `--log-level \| --ll` | No | Critical | The log level to use when logging messages to the main output. Options available: Critical, Debug, Error, Information, None, Trace & Warning. Defaults to `Warning`. | Yes | | ||
| `--version \| --v` | No | beta | The version of the OpenAPI document to use | Yes, without its value | | ||
|
||
## Usage | ||
|
||
```bash | ||
kiota search github | ||
``` | ||
|
||
```bash | ||
Key Title Description Versions | ||
apisguru::github.com GitHub v3 REST API GitHub's v3 REST API. 1.1.4 | ||
apisguru::github.com:api.github.com GitHub v3 REST API GitHub's v3 REST API. 1.1.4 | ||
apisguru::github.com:ghes-2.18 GitHub v3 REST API GitHub's v3 REST API. 1.1.4 | ||
apisguru::github.com:ghes-2.19 GitHub v3 REST API GitHub's v3 REST API. 1.1.4 | ||
apisguru::github.com:ghes-2.20 GitHub v3 REST API GitHub's v3 REST API. 1.1.4 | ||
apisguru::github.com:ghes-2.21 GitHub v3 REST API GitHub's v3 REST API. 1.1.4 | ||
apisguru::github.com:ghes-2.22 GitHub v3 REST API GitHub's v3 REST API. 1.1.4 | ||
apisguru::github.com:ghes-3.0 GitHub v3 REST API GitHub's v3 REST API. 1.1.4 | ||
apisguru::github.com:ghes-3.1 GitHub v3 REST API GitHub's v3 REST API. 1.1.4 | ||
``` | ||
If the search term is an exact match with one of the results' key, the search command will display a detailed view of the result. | ||
|
||
```bash | ||
kiota search apisguru::github.com | ||
``` | ||
|
||
```bash | ||
Key: apisguru::github.com | ||
Title: GitHub v3 REST API | ||
Description: GitHub's v3 REST API. | ||
Service: https://support.github.com/contact | ||
OpenAPI: https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json | ||
``` |
Oops, something went wrong.