Adds API versioning to ABP HTTP APIs so multiple versions of the same service coexist behind static client proxies. Use for AddAbpApiVersioning, query/header/media-type version readers, attaching ApiVersions to conventional controllers, and runtime version switching.
Ships in abp-api. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
ABP integrates the ASP.NET API Versioning library and adapts it to Auto (Conventional) API Controllers and the static C# / JavaScript client proxies. You enable it once, then either attach versions per controller (attribute routing) or per assembly (conventional controllers).
1.0 and 2.0 (etc.) of the same service side by side.ConventionalControllers.Create(...).ICurrentApiVersionInfo.The static C# and JavaScript client proxies cannot carry the version in the URL path/segment.
Use query-string versioning (?api-version=2.0) — the default ABP proxies emit.
Grounding: ApiVersionInfo.ShouldSendInQueryString() returns !BindingSource.IsIn("Path")
(framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ApiVersionInfo.cs),
so a Path binding source is never appended to the proxy request. The versioning doc says the
same: this feature "does not compatible with URL Path Versioning, we suggest to use Versioning
via the Query String" (docs/en/framework/api-development/versioning.md).
AddAbpApiVersioning is an IServiceCollection extension in Microsoft.Extensions.DependencyInjection
(framework/src/Volo.Abp.AspNetCore.Mvc/.../AbpApiVersioningExtensions.cs). Its signature:
IApiVersioningBuilder AddAbpApiVersioning(
this IServiceCollection services,
Action<ApiVersioningOptions>? apiVersioningOptionsSetupAction = null,
Action<MvcApiVersioningOptions>? mvcApiVersioningOptionsSetupAction = null)
ApiVersioningOptions / MvcApiVersioningOptions and the properties set below
(ReportApiVersions, AssumeDefaultVersionWhenUnspecified) come from the ASP.NET API
Versioning library — they are not ABP types. Same for IApiControllerFilter /
NoControllerFilter (used to keep neutral/versionless APIs visible).
public override void ConfigureServices(ServiceConfigurationContext context)
{
// Show neutral / versionless APIs.
context.Services.AddTransient<IApiControllerFilter, NoControllerFilter>();
context.Services.AddAbpApiVersioning(options =>
{
options.ReportApiVersions = true;
options.AssumeDefaultVersionWhenUnspecified = true;
});
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ChangeControllerModelApiExplorerGroupName = false;
});
}
The version reader (query string vs. header vs. media type) is the standard ASP.NET API
Versioning ApiVersionReader on ApiVersioningOptions — keep it on the query string when static
proxies are in play (see the warning above).
Put [ApiVersion(...)] (an ASP.NET API Versioning attribute) on each controller. Two controllers
sharing one [Route] but different versions serve as v1/v2 of the same service:
[ApiVersion("1.0", Deprecated = true)]
[ControllerName("Book")]
[Route("api/BookStore/Book")]
public class BookController : BookStoreController, IBookAppService { /* ... */ }
[ApiVersion("2.0")]
[ControllerName("Book")]
[Route("api/BookStore/Book")]
public class BookV2Controller : BookStoreController, IBookV2AppService { /* ... */ }
Attach versions per assembly in PreConfigureServices. ConventionalControllerSetting.ApiVersions
is a List<ApiVersion> (framework/src/Volo.Abp.AspNetCore.Mvc/.../Conventions/ConventionalControllerSetting.cs);
ApiVersion is an ASP.NET API Versioning type. Use TypePredicate to split versions by namespace:
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(BookStoreWebAppModule).Assembly, opts =>
{
opts.TypePredicate = t => t.Namespace == typeof(v2.TodoAppService).Namespace;
opts.ApiVersions.Add(new ApiVersion(2, 0));
});
options.ConventionalControllers.Create(typeof(BookStoreWebAppModule).Assembly, opts =>
{
opts.TypePredicate = t => t.Namespace == typeof(v1.TodoAppService).Namespace;
opts.ApiVersions.Add(new ApiVersion(1, 0));
});
});
}
Then wire those pre-configured settings into the versioning options with the ConfigureAbp
extension — ConfigureAbp(this MvcApiVersioningOptions options, AbpAspNetCoreMvcOptions mvcOptions)
(same file as AddAbpApiVersioning). It reads mvcOptions.ConventionalControllers, calling each
setting's MvcApiVersioningConfigurer if set, otherwise applying its ApiVersions by convention
(neutral when none):
public override void ConfigureServices(ServiceConfigurationContext context)
{
var preActions = context.Services.GetPreConfigureActions<AbpAspNetCoreMvcOptions>();
context.Services.AddTransient<IApiControllerFilter, NoControllerFilter>();
context.Services.AddAbpApiVersioning(options =>
{
options.ReportApiVersions = true;
options.AssumeDefaultVersionWhenUnspecified = true;
}, options =>
{
options.ConfigureAbp(preActions.Configure());
});
}
When one client wants a specific version from a multi-version service, inject
ICurrentApiVersionInfo (namespace Volo.Abp.Http.Client.ClientProxying) and scope the change
with Change(...). It stores an AsyncLocal value restored on dispose, so wrap it in a using:
var current = serviceProvider.GetRequiredService<ICurrentApiVersionInfo>();
var bookService = serviceProvider.GetRequiredService<IBookV4AppService>();
using (current.Change(new ApiVersionInfo(ParameterBindingSources.Query, "4.0")))
{
var book = await bookService.GetAsync(); // proxy adds ?api-version=4.0
}
ApiVersionInfo(string bindingSource, string version) —
framework/src/Volo.Abp.Http.Client/.../ClientProxying/ApiVersionInfo.cs.ParameterBindingSources.Query / .Header / .Path … are string consts in
Volo.Abp.Http.ProxyScripting.Generators.ParameterBindingSources. Use Query; Path is
dropped by the proxy (see the warning).Chain .AddApiExplorer(...) on the builder returned by AddAbpApiVersioning for one Swagger
document per version, then iterate provider.ApiVersionDescriptions to add a SwaggerEndpoint
each. GroupNameFormat, SubstituteApiVersionInUrl, IApiVersionDescriptionProvider are ASP.NET
API Versioning types (not ABP); full example in the versioning doc. Deeper Swagger setup belongs
to the configure-swagger-openapi skill.
?api-version=1.0 and ?api-version=2.0; confirm each hits the
matching version and that ReportApiVersions adds api-supported-versions response headers.NoControllerFilter job).Path
binding source. Stay on query-string versioning.ApiVersions on a conventional-controller assembly does nothing unless
options.ConfigureAbp(preActions.Configure()) is applied to the versioning options.AddAbpApiVersioning returns an IApiVersioningBuilder; call .AddApiExplorer(...) on that
return value — don't try to add the explorer separately.ReportApiVersions, AssumeDefaultVersionWhenUnspecified, [ApiVersion], ApiVersion,
IApiControllerFilter/NoControllerFilter are ASP.NET API Versioning symbols ABP wraps — look
them up in that library's wiki, not the ABP API.What SKILL.md sets; muted values are Claude Code's defaults
6 skills in this plugin
/configure-corsConfigure CORS (browser cross-origin access) for an ABP HTTP API host. USE FOR: the App:CorsOrigins setting (comma-separated, trailing-slash trimming), AddCors + WithOrigins, WithAbpExposedHeaders, SetIsOriginAllowedToAllowWildcardSubdomains for wildcard subdomains, the AllowCredentials vs any-origin conflict, UseCors middleware ordering, and which host/gateway to configure in tiered/microservice solutions. DO NOT USE FOR: OpenIddict client redirect / post-logout URIs (registered on the OpenIddict client application at creation/seeding, not a CORS or auth-config setting); RedirectAllowedUrls and named app URLs (configure-app-urls); CSRF/antiforgery and security response headers (secure-web-requests); calling a remote API from C# (consume-remote-services)./configure-swagger-openapiWire up Swagger/OpenAPI for an ABP host with the Volo.Abp.Swashbuckle helpers, including OAuth/OIDC authorize flows and hiding framework endpoints. USE FOR: AddAbpSwaggerGen + UseAbpSwaggerUI setup, AddAbpSwaggerGenWithOAuth / AddAbpSwaggerGenWithOidc for interactive auth on the Swagger UI, AbpSwaggerOidcFlows, HideAbpEndpoints, a metadata/discovery address that differs from the issuer (k8s/docker), versioned SwaggerDoc definitions. DO NOT USE FOR: exposing application services as HTTP controllers (use expose-http-apis); generating C# client proxies for remote APIs (use consume-remote-services); choosing an API versioning strategy (use version-http-apis); configuring the OpenIddict token/authorization server or JWT validation itself (use configure-openiddict-authentication / configure-openiddict-validation).
/consume-remote-servicesCall a remote ABP HTTP API from C# through generated client proxies instead of raw HttpClient. USE FOR: setting up dynamic (runtime) or static (build-time) client proxies, configuring AbpRemoteServiceOptions (BaseUrl / named endpoints), wiring tiered / microservice calls, authenticating proxy calls (forward the current user token with AbpHttpClientIdentityModelWebModule, or client credentials with AbpHttpClientIdentityModelModule + IdentityClients), adding Polly retry to proxy clients. DO NOT USE FOR: exposing your own services as HTTP APIs or auto controllers (use expose-http-apis); choosing sync HTTP vs async events between services or the outbox/inbox (use design-module-and-service-communication); routing proxies through Dapr service invocation (use integrate-dapr-services).
/expose-http-apisExpose ABP application services as REST endpoints through Auto/Conventional API Controllers. USE FOR: publishing application services as HTTP controllers, route/verb conventions, [RemoteService] toggles, integration services and [IntegrationService]. DO NOT USE FOR: calling a remote ABP HTTP API from C# with client proxies (use consume-remote-services); designing sync-vs-async inter-service communication or the outbox/inbox (use design-module-and-service-communication); building UI pages (use angular-ui / blazor-ui / mvc-razor-ui).
/use-abp-standard-endpointsUse ABP's built-in application-configuration and application-localization HTTP endpoints, and extend them with an IApplicationConfigurationContributor. USE FOR: reading /api/abp/application-configuration (current user, granted policies, settings, features, multi-tenancy, timing) and /api/abp/application-localization from a custom client; extending the config with IApplicationConfigurationContributor and AbpApplicationConfigurationOptions. DO NOT USE FOR: publishing your own application services as controllers (use expose-http-apis); calling remote ABP APIs with C# client proxies (use consume-remote-services); consuming the config in Angular/Blazor/MVC startup (use the per-stack UI skill: angular-ui / blazor-ui / mvc-razor-ui); defining settings/features themselves (use manage-settings-and-features); defining permissions (use permissions-and-authorization).
/abp-api:version-http-apisfrom abp-api
npx claudepluginhub abpframework/abp-skills --plugin abp-apiOther plugins' skills for the same job