quickstart
Add the NuGet package (.NET 10+):
dotnet add package Sharkable --version 0.6.0
Or using package reference:
<PackageReference Include="Sharkable" Version="0.6.0" />
Add the using directive:
using Sharkable;
Add Sharkable services (normal mode):
builder.Services.AddShark();
Add Sharkable services (AOT mode):
// For AOT, specify assemblies explicitly to avoid code trim
builder.Services.AddShark([typeof(Program).Assembly]);
Wire up the middleware:
var app = builder.Build();
app.UseShark();
That's it — endpoints are discovered, DI is wired, OpenAPI/Scalar is ready.