Skip to content

Yoozii/kiota

 
 

Repository files navigation

Project

Dotnet CodeQL Coverage Sonarcloud Status

Kiota is a project to build an OpenAPI based code generator for creating SDKs for HTTP APIs. The goal is to produce a lightweight, low maintenance, code generator that is fast enough to run as part of the compile time tool-chain but scalable enough to handle the largest APIs. Kiota generates a lightweight set of strongly typed classes that layer over a set of core HTTP libraries and produce an intuitive and discoverable way of creating HTTP requests. A set of abstractions decouple the generated service library from the core libraries allowing a variety of core libraries to be supported.

This library builds on top of the Microsoft.OpenAPI.NET library to ensure comprehensive support for APIs that use OpenAPI descriptions. One of the goals of the project is to provide the best code generator support possible for OpenAPI and JSON Schema features. The conceptual documentation describes how kiota works and the high level concepts, this readme documents how to get started with Kiota.

Getting started

Generating SDKs

  1. Install required tools and dependencies. (refer to the Supported Languages table under the Required tools & dependencies column)
  2. Get Kiota using one of the available options.
  3. Generate your API client, checkout the Parameters reference for the different options.
  4. Start calling your API using your fluent API SDK.

Supported languages

The following table provides an overview of the languages supported by Kiota and the progress in the implementation of the different components.

Language Generation Abstractions Serialization Authentication HTTP Required tools & dependencies
CSharp JSON, TEXT Anonymous, Azure link
Go JSON, TEXT Anonymous, Azure link
Java JSON, TEXT Anonymous, Azure link
PHP JSON, TEXT Anonymous, ✔️ PHP League link
Python JSON, ❌ TEXT Anonymous, Azure
Ruby JSON, ❌ TEXT Anonymous, ❌ Azure link
TypeScript/JavaScript JSON, TEXT Anonymous, Azure link
Shell , JSON, TEXT Anonymous, Azure link
Swift ❌ JSON, ❌ TEXT Anonymous, ❌ Azure

Legend: ✔ -> in preview, ❌ -> not started, ▶ -> in progress.

Parameters reference

Parameters are documented here.

Debugging

Make sure you install the pre-requisites first. If you are using Visual Studio Code as your IDE, the launch.json file already contains the configuration to run Kiota. By default this configuration will use the openApiDocs/v1.0/Mail.yml under the PowerShell repository as the OpenAPI to generate an SDK for. By default this configuration will output the generated files in a graphdotnetv4|graphjavav4|graphtypescriptv4 folder located in the parent folder this repository is cloned in.

Selecting the language you want to generate an SDK for in the Visual Studio Debug tab and hitting F5 will automatically build, start, and attach the debugging process to Kiota.

Samples

You can find samples of clients generated with Kiota in the Kiota samples repository.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

About

OpenAPI based HTTP Client code generator

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 83.4%
  • Python 10.7%
  • Ruby 5.0%
  • Other 0.9%