
API Test Spark
One package reference and one line of code give any .NET 10 Minimal API its own interactive test harness, driven by the OpenAPI contract the API already publishes.

The story
A tool I use several times a week. One package reference and one line of code give any .NET 10 API its own interactive test harness.
- Problem
- Swagger and Scalar are built to document an API, not to build one. While an endpoint was still changing, I kept jumping between browser tabs, terminals and network inspectors to see the request, the response and the timing.
- Decision
- Treat the harness as developer infrastructure, not app code. The React UI ships inside a NuGet package and reads the API's existing OpenAPI contract, so there's no second endpoint catalog to keep in sync and nothing copied into each project.
- Implementation
- A React app embedded in a .NET 10 class library behind MapApiTestSpark(), with safety defaults that keep it out of production and integration tests at the package boundary. DevSpark's critic step caught silent 404s and header exposure before the first commit, and it went from first commit to a published 1.0 in 12 days.
- Outcome
- Published on NuGet with thousands of downloads and a live demo, and in use in my own APIs, including ApiSpark and UISampleSpark.
Overview
One package reference and one line of code give any .NET 10 Minimal API its own interactive test harness, driven by the OpenAPI contract the API already publishes.
Details
A NuGet package that embeds an interactive API test harness into any .NET 10 Minimal API with one line of code. It reads the API's own OpenAPI contract, so there is nothing extra to keep in sync.
Related insights
Articles that explain the architecture decisions, implementation patterns, or delivery trade-offs behind this project.