Demo repository about Microsoft Kiota for .NET meetup in Vilnius. Kiota is a command line tool for generating an API client to call any OpenAPI-described API you're interested in.
The goal is to eliminate the need to take a dependency on a different API client library for every API that you need to call. Kiota API clients provide a strongly typed experience with all the features you expect from a high quality API SDK, but without having to learn a new library for every HTTP API.
- PowerShell installed - we do recommend an editor like Visual Studio Code to be able to write scripts and work with code.
- git installed - instructions step by step here
- .NET installed to run the application if you want to run it
- an editor (besides notepad) to see and work with code, yaml, scripts and more (for example Visual Studio Code or Visual Studio or Jetbrains Rider)
- [OPTIONAL] GitHub CLI installed to work with GitHub - how to install
- [OPTIONAL] Github GUI App for managing changes and work on forked repo
- [OPTIONAL] Windows Terminal
Scripts are available in scripts folder. The scripts are written in PowerShell.
- Add-DirToSystemEnv.ps1 - adds a directory to the system environment variable PATH
- Compile-Containers.ps1 - uses Azure CLI to compile containers with the help of Azure Registry Tasks - check also containers folder for dockerfile definition.
- Set-EnvVariables.ps1 - Set environment variables from local.env file
The demo code is structured in the following way:
- Kiota.MinimalApi - the minimal api application with sample data and OpenAPI definitions.
- Kiota.ClassicalHttpCall - project to call minimal api with classical http client.
- Kiota.ApiCall - project to call OpenAPI to see the data and programmatically show activate them.
- Kiota.OpenApiCall - project to call OpenAPI to see the data and programmatically show activate them.
- Kiota.QuickStart - project to call sample OpenAPI to generate data from provided file.
- Kiota.AuthenticationExample - project to call OpenAPI with authentication and show the data.
- Kiota.SimpleApiCall - project to call OpenAPI with simple data and show them.
Docker files are available to build and run the application in containers. You can also leverage helper script Compile-Containers.ps1 to build containers using Azure Container Registry task builders.
Flow for the session is defined here.
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.