#2584·NSwag

Exclude API paths in CSharp Client generation

Author: SaebAminiCreated Dec 16, 2019Updated Sep 9, 2026
Labelstype: enhancementtype: questionproject: NSwag.SwaggerGeneration.WebApi

I know there's already support for excluding controllers when generating the OpenAPI document, but this is for the other end when generating clients.

Is it possible to configure NSwag to generate clients only for specific segments/paths from a given OpenAPI document? I'm specifically using the CSharp Client generator here.

The use case is for when you're dealing with huge APIs, but you only really need to consume small portions of it.