Microsoft Kiota is a tool that generates API clients for HTTP REST APIs described by OpenAPI. It supports a wide range of languages and leverages the full capabilities of OpenAPI descriptions.
Here are some of its features:
- Generate API clients for HTTP REST APIs described by OpenAPI.
- Support for a wide range of languages.
- Leverage the full capabilities of OpenAPI descriptions.
- Generate only the source code necessary.
- Minimize external dependencies.
If you’re looking for a way to generate API clients for HTTP REST APIs described by OpenAPI, Microsoft Kiota is a great option. It’s easy to use and supports a wide range of languages.
Example
The Kiota command line for .NET can be used to generate a .NET API client for the JSONPlaceholder REST API. The command is
kiota generate -l CSharp -c PostsClient -n KiotaPosts.Client -d ./posts-api.yml -o ./Client
The -l
option specifies the language to generate the client for, in this case CSharp
. The -c
option specifies the name of the client class, in this case PostsClient
. The -n
option specifies the namespace of the client class, in this case KiotaPosts.Client
. The -d
option specifies the path to the OpenAPI description file, in this case ./posts-api.yml
. The -o
option specifies the output directory, in this case ./Client
.