microsoft / microsoft/kiota

As a developer, I want to have a sliced OpenAPI document with only the endpoints and components used by my solution when generating a client

Open
#4,770 7 comments 0 reactions 0 assignees View on GitHub
enhancement generator type:enhancement type:feature
Dominant language
C#
Stars
3.8k
Forks
333
Avg merge
16h 29m
Merged PRs (30d)
116

Description

### Is your feature request related to a problem? Please describe the problem.

Kiota produces large OpenAPI documents even when only one endpoint is selected because it doesn’t remove unused components.

### Client library/SDK language

None

### Describe the solution you'd like

When generating clients, Kiota should be able to trim unused components from the original OpenAPI document to generate a clean sliced OpenAPI document with only the information that is important for my solution.

For clients:

Remove all unused components and keep all used components including schemas, parameters, responses.
Remove all extensions (starts with x-) that don't match with our internal documentation of supported extensions in Kiota.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by tracing the client-generation entry point from an OpenAPI input and identify where referenced components and extensions are collected. Done means the generated document retains only used schemas, parameters, and responses, removes unsupported x- extensions, and has coverage for the slicing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.