Skip to content

bovrhovn/meetup-intro-to-kiota

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meetup intro to Kiota

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.

Kiota Design Overview

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.

Prerequisites

  1. PowerShell installed - we do recommend an editor like Visual Studio Code to be able to write scripts and work with code.
  2. git installed - instructions step by step here
  3. .NET installed to run the application if you want to run it
  4. 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)
  5. [OPTIONAL] GitHub CLI installed to work with GitHub - how to install
  6. [OPTIONAL] Github GUI App for managing changes and work on forked repo
  7. [OPTIONAL] Windows Terminal

Scripts

Scripts are available in scripts folder. The scripts are written in PowerShell.

  1. Add-DirToSystemEnv.ps1 - adds a directory to the system environment variable PATH
  2. Compile-Containers.ps1 - uses Azure CLI to compile containers with the help of Azure Registry Tasks - check also containers folder for dockerfile definition.
  3. Set-EnvVariables.ps1 - Set environment variables from local.env file

Code and usage

The demo code is structured in the following way:

  1. Kiota.MinimalApi - the minimal api application with sample data and OpenAPI definitions.
  2. Kiota.ClassicalHttpCall - project to call minimal api with classical http client.
  3. Kiota.ApiCall - project to call OpenAPI to see the data and programmatically show activate them.
  4. Kiota.OpenApiCall - project to call OpenAPI to see the data and programmatically show activate them.
  5. Kiota.QuickStart - project to call sample OpenAPI to generate data from provided file.
  6. Kiota.AuthenticationExample - project to call OpenAPI with authentication and show the data.
  7. 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

Flow for the session is defined here.

Links

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

Introdution to Microsoft Kiota

Topics

Resources

Stars

Watchers

Forks