var bld = WebApplication.CreateBuilder(); bld.Services .AddFastEndpoints() .SwaggerDocument(o => { o.DocumentSettings = s => { s.DocumentName = "Initial Release"; s.Version = "v0"; }; }) .SwaggerDocument(o => { o.MaxEndpointVersion = 1; o.ShowDeprecatedOps = true; // specify to show deprecated versions o.DocumentSettings = s => { s.DocumentName = "Release 1"; s.Version = "v1"; }; }) .SwaggerDocument(o => { o.MaxEndpointVersion = 2; o.ShowDeprecatedOps = true; // specify to show deprecated versions o.DocumentSettings = s => { s.DocumentName = "Release 2"; s.Version = "v2"; }; }); var app = bld.Build(); app .UseFastEndpoints() .UseSwaggerGen(); app.Run(); class MyEndpoint : EndpointWithoutRequest { public override void Configure() { Get("say-hello"); AllowAnonymous(); Version(0, deprecateAt: 1); // specify when to deprecate } public override Task HandleAsync(CancellationToken c) => SendAsync($"hello from version: {Definition.Version.Current}"); } class MyEndpoint_V1 : MyEndpoint { public override void Configure() { base.Configure(); Version(1, deprecateAt: 2); // specify when to deprecate } } class MyEndpoint_V2 : MyEndpoint { public override void Configure() { base.Configure(); Version(2); // latest version doesn't need to specify deprecation } }