microsoft/kiota
OpenAPI based HTTP Client code generator
Healthy across the board
Permissive license, no critical CVEs, actively maintained — safe to depend on.
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
No critical CVEs, sane security posture — runnable as-is.
- ✓Last commit 1d ago
- ✓11 active contributors
- ✓MIT licensed
Show 3 more →Show less
- ✓CI configured
- ✓Tests present
- ⚠Concentrated ownership — top contributor handles 77% of recent commits
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Healthy" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/microsoft/kiota)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/microsoft/kiota on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: microsoft/kiota
Generated by RepoPilot · 2026-05-10 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/microsoft/kiota shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
GO — Healthy across the board
- Last commit 1d ago
- 11 active contributors
- MIT licensed
- CI configured
- Tests present
- ⚠ Concentrated ownership — top contributor handles 77% of recent commits
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live microsoft/kiota
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/microsoft/kiota.
What it runs against: a local clone of microsoft/kiota — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in microsoft/kiota | Confirms the artifact applies here, not a fork |
| 2 | License is still MIT | Catches relicense before you depend on it |
| 3 | Default branch main exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 31 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of microsoft/kiota. If you don't
# have one yet, run these first:
#
# git clone https://github.com/microsoft/kiota.git
# cd kiota
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of microsoft/kiota and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "microsoft/kiota(\\.git)?\\b" \\
&& ok "origin remote is microsoft/kiota" \\
|| miss "origin remote is not microsoft/kiota (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
&& ok "license is MIT" \\
|| miss "license drift — was MIT at generation time"
# 3. Default branch
git rev-parse --verify main >/dev/null 2>&1 \\
&& ok "default branch main exists" \\
|| miss "default branch main no longer exists"
# 4. Critical files exist
test -f "README.md" \\
&& ok "README.md" \\
|| miss "missing critical file: README.md"
test -f "global.json" \\
&& ok "global.json" \\
|| miss "missing critical file: global.json"
test -f ".github/workflows/dotnet.yml" \\
&& ok ".github/workflows/dotnet.yml" \\
|| miss "missing critical file: .github/workflows/dotnet.yml"
test -f "CONTRIBUTING.md" \\
&& ok "CONTRIBUTING.md" \\
|| miss "missing critical file: CONTRIBUTING.md"
test -f ".azure-pipelines/ci-build.yml" \\
&& ok ".azure-pipelines/ci-build.yml" \\
|| miss "missing critical file: .azure-pipelines/ci-build.yml"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 31 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~1d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/microsoft/kiota"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
Kiota is a command-line code generator that reads OpenAPI descriptions and outputs strongly-typed HTTP API client libraries in 12+ languages (C#, TypeScript, Go, Java, Python, etc.). It eliminates the need to maintain separate SDK dependencies for each API by auto-generating clients with type safety, serialization, authentication, and fluent API patterns built-in. Multi-language monorepo structure: core generation logic in C# (abstractions/, authentication/ directories), language-specific generators in sibling directories, CLI wrapper likely in main executable, and .github/workflows orchestrating multi-language CI builds. The abstractions/ and authentication/ subdirs suggest shared runtime libraries that generated clients depend on across all languages.
👥Who it's for
Backend and frontend developers who consume multiple REST APIs and want generated, strongly-typed clients instead of hand-written HTTP calls or per-API SDKs. Also API platform teams who want to auto-generate SDKs for their OpenAPI-described services without maintaining language-specific codebases.
🌱Maturity & risk
Production-ready and actively maintained. The repo shows mature CI/CD setup (.azure-pipelines, GitHub Actions with CodeQL, SonarCloud coverage tracking), comprehensive test coverage across integration and idempotency tests, and is backed by Microsoft (large C# codebase of ~4.7M lines). Regular releases evident from CHANGELOG.md and active dependabot automation.
Low risk from maintenance perspective (Microsoft-backed, active CI/CD), but inherent complexity: the generator must handle OpenAPI spec variations and language-specific code generation quirks across 12+ languages, increasing the surface area for bugs. Dependency on Microsoft.OpenAPI.NET and language-specific serialization libraries (kiota-serialization-* packages) means upstream changes in those projects could impact all generated clients.
Active areas of work
Active development visible in GitHub Actions workflows (dotnet.yml, integration-tests.yml, load-tests.yml, codeql-analysis.yml all present), dependabot auto-merge configured, and security scanning via codegen-security-guardian agent. The repo appears to be maturing language support and hardening the generator against edge cases (evidenced by idempotency-tests and load-tests workflows).
🚀Get running
Clone and build the C# core: git clone https://github.com/microsoft/kiota && cd kiota && dotnet build. To use Kiota to generate a client: dotnet tool install --global microsoft.kiota && kiota generate --openapi <url> --language csharp --output ./Generated.
Daily commands:
From root: dotnet build to compile the generator. To test: dotnet test (runs all unit tests). To run the CLI locally: dotnet run --project <path-to-cli-project> -- generate --openapi <spec-url> --language csharp --output ./out.
🗺️Map of the codebase
README.md— Defines Kiota's purpose as an OpenAPI-based HTTP client code generator and its core value proposition.global.json— Specifies the .NET SDK version required for building the entire Kiota generator project..github/workflows/dotnet.yml— Primary CI/CD pipeline that builds, tests, and validates all code changes across multiple platforms.CONTRIBUTING.md— Essential guide for contributors covering code standards, testing requirements, and contribution workflow..azure-pipelines/ci-build.yml— Azure Pipeline configuration for continuous integration, build validation, and artifact publishing.abstractions/README.md— Documents the abstraction layer that defines interfaces used by generated client code and HTTP layers.http/README.md— Describes the HTTP request/response handling layer that serves as the foundation for all client operations.
🛠️How to make changes
Add support for a new programming language
- Create a new language-specific directory under
it/following existing pattern (e.g.,it/python/) (it) - Add language-specific build configuration and test harness (
it/csharp/dotnet.csproj) - Update
it/generate-code.ps1to invoke code generation for the new language (it/generate-code.ps1) - Add language-specific workflow job in
.github/workflows/dotnet.ymlto compile and test generated code (.github/workflows/dotnet.yml) - Update CODEOWNERS to assign review responsibility for the new language generator (
.github/CODEOWNERS)
Add a new API endpoint to integration tests
- Place new OpenAPI specification in
it/directory and reference init/config.json(it/config.json) - Run
it/generate-code.ps1to produce generated client code for all supported languages (it/generate-code.ps1) - Add language-specific test cases in
it/{language}/basic/that exercise the new endpoint (it/csharp/basic/KiotaMockServerTests.cs) - Execute
it/do-clean.ps1and re-run.github/workflows/dotnet.ymllocally to validate all language implementations (it/do-clean.ps1)
Implement a new serialization format
- Create a new serialization module under
abstractions/defining the format contract interface (abstractions/README.md) - Update code generator to emit serialization/deserialization calls for the new format in all target languages (
README.md) - Add integration test fixtures in
it/{language}/basic/verifying encode/decode behavior (it/csharp/basic/KiotaMockServerTests.cs) - Document the new serialization format in
docs/and update supported formats list in README (docs/_config.yml)
Add a new authentication provider
- Create authentication module in
authentication/implementing the auth provider interface (authentication/README.md) - Update code generator to emit auth provider initialization in generated client constructors (
README.md) - Add integration tests validating the auth provider with mocked API endpoints in
it/{language}/basic/(it/csharp/basic/KiotaMockServerTests.cs) - Update
.github/workflows/dotnet.ymlto validate auth flow in integration tests (.github/workflows/dotnet.yml)
🔧Why these technologies
- .NET / C# — Kiota generator is built in .NET, leveraging Microsoft.OpenAPI.NET library for spec parsing and enabling cross-platform CLI via .NET tooling.
- Go, Java, C#, Dart — Multiple target language support ensures Kiota clients can be integrated into diverse ecosystems and maximizes developer reach.
- OpenAPI 3.x specification — Industry-standard API description format enabling language-agnostic specification-driven code generation.
- GitHub Actions + Azure Pipelines — Dual CI/CD pipelines provide redundancy and cross-platform validation (Windows, Linux, macOS) for all language generators.
- DevContainer + Docker — Containerized development environment ensures reproducible builds and lowers barrier to entry for contributors.
⚖️Trade-offs already made
-
One-way code generation (not round-trip)
- Why: Simplifies generator logic and avoids merge conflicts when regenerating code from updated specs.
- Consequence: Developers must manually propagate local changes or regenerate when specs update; no automatic sync.
-
Abstraction layer dependencies for generated clients
- Why: Reduces generated code size, centralizes cross-cutting concerns (auth, serialization, HTTP), enables runtime updates.
- Consequence: Generated clients have external dependencies on Kiota abstractions and HTTP libraries; version mismatches can break clients.
-
Multi-language support prioritizes breadth over specialized optimizations
- Why: Enables broad platform coverage; one spec can generate for C#, Java, Go, Dart simultaneously.
- Consequence: Each language generator may not exploit language-specific idioms or optimizations; trade-off between consistency and idiomaticity.
-
Integration tests per language rather than shared test suites
- Why: Captures language-specific behavior and runtime errors early; ensures generated code quality per target platform.
- Consequence: Higher maintenance cost; bug fixes and new tests must be replicated across multiple language test directories.
🚫Non-goals (don't propose these)
- Does not support OpenAPI 2.0 (Swagger) specifications directly—requires conversion to OpenAPI 3.x
- Does not provide runtime API mocking or test server generation
- Does not handle authentication enforcement at code generation time; leaves auth configuration to runtime
- Not designed for API documentation generation or rendering
- Does not support round-trip code generation (hand-edits are not preserved on regeneration)
🪤Traps & gotchas
OpenAPI spec version variance: the generator must handle OpenAPI 3.0.x and 3.1.x (and legacy Swagger 2.0) with subtle differences in schema representation—test thoroughly with spec edge cases. Language-specific serialization: each language has different libraries (Jackson for Java, System.Text.Json for C#, etc.) with incompatible APIs—generated code must match what each library expects. Code generation idempotency: running the generator twice on the same spec should produce identical output (see idempotency-tests.yml workflow)—mutations during generation will cause drift. Multi-language CI complexity: the build matrix across 12 languages makes failures hard to debug; check .github/workflows/dotnet-required-workaround.yml for language-specific workarounds already discovered.
🏗️Architecture
💡Concepts to learn
- OpenAPI Specification (OAS) 3.0 and 3.1 — The input format that Kiota parses; without understanding OpenAPI schema objects, components, and operations, you cannot understand what code generation rules apply to generated output
- Abstract Syntax Tree (AST) Code Generation — Kiota's core pattern: it doesn't template-string code; it builds language-specific AST objects that are then serialized—understanding this separation is key to adding language support or fixing generation bugs
- Request Adapter Pattern — Generated clients use a request adapter abstraction (see abstractions/) to decouple the client from specific HTTP implementations; this allows swapping JSON libraries, auth handlers, and middleware without regenerating code
- Fluent API / Builder Pattern — All generated clients expose fluent APIs (e.g.,
client.Users[id].Messages.Get()) that mirror the OpenAPI path structure; understanding this ergonomic goal explains design choices in code generation - Serialization/Deserialization Plugins — Kiota generates clients that delegate to pluggable serializers (JSON, form-encoded, multipart, text); each language has its own serialization library, so code generation must emit calls to the right library APIs
- Language-Specific Code Generation Variants — A single OpenAPI operation can be represented in 12 different languages with different idioms (generics in Java, type assertions in TypeScript, pointer receivers in Go); Kiota maintains separate generator classes per language to handle these differences
- Idempotent Code Generation — Running the generator twice should produce identical output (test by comparing file hashes); this prevents spurious diffs and enables easy regeneration as specs evolve—see idempotency-tests.yml workflow
🔗Related repos
microsoft/OpenAPI.NET— The foundational OpenAPI parsing library that Kiota depends on; understanding its object model is required for code generation logicmicrosoft/kiota-abstractions-dotnet— Runtime abstractions for C# clients generated by Kiota; lives separately so it can be versioned independently and distributed via NuGetmicrosoft/kiota-http-dotnet— HTTP client middleware and request adapter implementations for C# generated clients; handles auth, retries, and middleware compositionOAI/OpenAPI-Specification— The OpenAPI specification itself; Kiota's entire output depends on correct interpretation of this spec, so understanding the latest version is criticalopenapis/openapi-generator— Alternative OpenAPI code generator (Java-based, broader language support); understanding its approach and limitations clarifies Kiota's design decisions and gap areas
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add integration test coverage for Go code generation in CI/CD pipeline
The repo has integration tests in ./it/ directory with csharp subdirectory and a compare-generation.ps1 script, but no Go integration tests despite Go being a primary language for Kiota abstractions and serialization libraries. Given the go.mod in ./it/ shows multiple Kiota Go dependencies, adding Go-specific integration tests would catch regressions in Go code generation and validate generated clients against real OpenAPI specs.
- [ ] Create ./it/go/ directory structure mirroring ./it/csharp/
- [ ] Add Go integration test cases in ./it/go/ that generate clients from sample OpenAPI specs
- [ ] Update ./it/compare-generation.ps1 to include Go generation and validation steps
- [ ] Add GitHub Actions workflow similar to ./github/workflows/integration-tests.yml with Go test execution (go test, staticcheck, etc.)
- [ ] Document Go test setup in ./it/Readme.md
Create security policy documentation for dependency vulnerability handling
The repo has ./SECURITY.md and ./guardian/SDL/ security baseline files, but lacks specific guidance on how contributors and maintainers should handle Kiota dependency vulnerabilities (especially in Go/C# abstract libraries). Given the dependabot.yml config and auto-merge workflow, documenting the vulnerability triage process would improve security governance and contributor clarity.
- [ ] Review existing ./SECURITY.md and identify gaps in dependency vulnerability workflow
- [ ] Create ./docs/SECURITY-DEPENDENCIES.md documenting: SLA for fixing vulnerabilities, severity classification, auto-merge policies for dependabot
- [ ] Add references to ./guardian/SDL/ baseline policies and how they integrate with dependency scanning
- [ ] Link new documentation from main ./SECURITY.md and ./CONTRIBUTING.md
- [ ] Include examples of recent vulnerability fixes from CHANGELOG.md for context
Add PowerShell linting and validation workflow for integration test scripts
The ./it/compare-generation.ps1 script is critical for integration testing but there's no dedicated CI workflow for PowerShell validation. The repo has workflows for CodeQL, SonarCloud, and .NET, but no linting for PowerShell scripts, which could catch syntax errors and style issues early.
- [ ] Create ./github/workflows/powershell-lint.yml that runs PSScriptAnalyzer on all .ps1 files in ./it/
- [ ] Add PSScriptAnalyzer configuration file (./it/.pssettings or similar) with rules for script quality
- [ ] Update ./CONTRIBUTING.md with PowerShell coding standards section referencing the linter config
- [ ] Integrate workflow into branch protection rules in ./github/policies/branch-protection.yml
- [ ] Document PowerShell setup in ./it/Readme.md for local testing
🌿Good first issues
- Add missing test coverage for Go serialization edge cases in integration-tests.yml (Go has only 5.7K lines but is a first-class language; look for TODOs in kiota-serialization-json-go or kiota-serialization-form-go handling of null/empty values)
- Document authentication flow examples for TypeScript-generated clients in docs/ (README says TypeScript is supported, but docs/_includes likely lacks concrete TypeScript auth samples beyond the main README table)
- Implement or improve error handling for malformed OpenAPI specs in the parser (add validation tests in src/Kiota that catch common spec mistakes like missing operationId, circular $ref, and report them with helpful messages instead of cryptic parse errors)
⭐Top contributors
Click to expand
Top contributors
- @dependabot[bot] — 77 commits
- @baywet — 6 commits
- @hobostay — 4 commits
- @gavinbarron — 3 commits
- @WolfgangHG — 3 commits
📝Recent commits
Click to expand
Recent commits
22a1474— chore(deps): bump com.microsoft.kiota:microsoft-kiota-abstractions (#7677) (dependabot[bot])f1b19db— chore(deps-dev): bump sinon from 21.1.2 to 22.0.0 in /vscode (#7676) (dependabot[bot])7296487— chore(deps-dev): bump cryptography from 47.0.0 to 48.0.0 in /it/python (#7673) (dependabot[bot])5598d0e— chore(deps-dev): bump the eslint group in /it/typescript with 2 updates (#7674) (dependabot[bot])417b702— chore(deps-dev): bump the eslint group in /vscode with 2 updates (#7675) (dependabot[bot])d032b08— Required query params from one operation should not affect sibling operations on the same path (#7665) (jeffreybulanadi)2ef4619— chore(deps): bump SonarSource/sonarqube-scan-action from 7 to 8 (#7666) (dependabot[bot])356fcb9— Bump the opentelemetry group with 1 update (#7668) (dependabot[bot])64e5fcb— Bump Microsoft.NET.Test.Sdk from 18.4.0 to 18.5.1 (#7664) (dependabot[bot])c9a03a1— chore(deps-dev): bump the eslint group in /vscode with 2 updates (#7660) (dependabot[bot])
🔒Security observations
The Kiota codebase demonstrates good security practices with established vulnerability reporting procedures, automated CI/CD security checks (CodeQL, SonarCloud), and dependency management. However, there are medium-severity concerns regarding the invalid Go version specification and disabled compiler warnings that should be addressed. The Docker configuration could benefit from image digest pinning and build argument validation. Overall security posture is solid for an open-source project with active security monitoring, but the identified issues should be remediated to strengthen the security baseline.
- Medium · Outdated Go Version in Integration Tests —
it/go/go.mod. The go.mod file specifies 'go 1.25.0' which does not exist. Go's latest stable version is 1.23.x. This indicates the dependency file may be misconfigured or the project uses a version that doesn't exist, potentially causing build failures or security issues with Go runtime vulnerabilities. Fix: Update go.mod to use a supported Go version (e.g., 'go 1.23' or the latest LTS version). Verify all dependencies are compatible with the specified Go version. - Medium · TreatWarningsAsErrors Disabled in Docker Build —
Dockerfile (build-env stage). The Dockerfile disables treating warnings as errors during the dotnet publish phase with '-p:TreatWarningsAsErrors=false'. This allows potentially unsafe code patterns or deprecated APIs to be compiled without enforcement, reducing code quality and security standards. Fix: Enable TreatWarningsAsErrors to enforce strict compilation standards, or address and document all warnings in the codebase before disabling this check. - Low · Docker Build Arguments Not Validated —
Dockerfile (ARG version_suffix). The Dockerfile accepts a 'version_suffix' argument that is passed directly to dotnet publish without validation. While dotnet publish has some protection against injection, explicit validation of build arguments is a security best practice. Fix: Add validation logic to ensure version_suffix matches expected patterns (e.g., alphanumeric and hyphens only) before using it in the build command. - Low · Base Image Dependencies Not Pinned by Digest —
Dockerfile (FROM statements). The Dockerfile uses 'mcr.microsoft.com/dotnet/sdk:10.0' and 'mcr.microsoft.com/dotnet/runtime:10.0-noble-chiseled-extra' without SHA256 digest pinning. While these are trusted sources, using digest pinning provides additional assurance against image tampering. Fix: Pin base images to specific SHA256 digests: 'FROM mcr.microsoft.com/dotnet/sdk:10.0@sha256:<digest>' and verify digests from the official Microsoft Container Registry. - Low · Security.md File Incomplete —
SECURITY.md. The SECURITY.md file appears to be truncated mid-sentence ('please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.'). This may indicate incomplete security documentation or a configuration error. Fix: Complete the SECURITY.md file with full vulnerability reporting instructions and ensure it's properly formatted and accessible. - Low · Dependency Outdatedness Not Verified —
it/go/go.mod and .github/workflows/. The Go dependencies use relatively recent versions, but the codebase structure doesn't show explicit dependency scanning workflows (though codeql-analysis.yml exists). Regular dependency updates and vulnerability scanning should be enforced. Fix: Ensure dependabot is actively used and consider adding explicit Go module vulnerability scanning in CI/CD pipelines using 'go list -json -m all | nancy sleuth'.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.