A modern, feature-rich OpenAPI/Swagger documentation and testing interface with advanced functionality for API development and testing.
Want to try OpenAPI UI before integrating it into your project? Check out our live demo:
๐ Try it yourself at https://jakubkozera.github.io/openapi-ui/
The demo showcases all the features mentioned above with a sample API specification, so you can:
- Explore the modern UI and navigation
- Test the interactive API functionality
- Try out the Collection Runner
- Experience the authentication features
- Generate code snippets and API clients
- See the variable management in action
No installation required - just open the link and start exploring!
- ๐ Easy Integration - Simple one-line setup in your ASP.NET Core application
- ๐ฑ Modern UI - Clean, responsive interface for API documentation
- ๐ Easy Navigation - Search and filter options for quick endpoint discovery
- ๐ Comprehensive Endpoint Documentation - Detailed API docs with requirements, parameters, and schemas
- โก Try It Out Section - Interactive API testing directly from the documentation
- ๐ Authentication Options - Built-in support for various authentication schemes (Bearer Token, Basic Auth, API Key, OAuth2, OpenID Connect)
- Real-time Response Viewing - Immediate feedback with formatted response data
- ๐ Collection Runner - Execute multiple API requests in sequence for testing workflows
- Variable extraction and chaining between requests
- Output Parameters - Extract values from responses for reuse
- ๐ Code Snippets Generation - Auto-generate code examples in multiple programming languages
- ๐ ๏ธ API Client Generation - Generate complete API client libraries for different platforms (C#, JavaScript/TypeScript)
- Monaco Editor Integration - Advanced code editing with syntax highlighting
- Variables Management - Define and manage environment variables
- Favorites System - Bookmark frequently used endpoints
- ๐ Search & Filtering - Quickly find endpoints and operations
- ๐จ Theme Support - Light and dark themes
- ๐ฑ Responsive Design - Works seamlessly on desktop and mobile devices
- ๐ง Customizable - Embedded CSS and JavaScript that can be themed
- Smart Sidebar - Collapsible navigation with search functionality
- Endpoint Grouping - Organized by tags and paths
- Quick Access - Jump to specific operations instantly
- Breadcrumb Navigation - Always know where you are in the API
OpenAPI UI is available in multiple formats to suit different integration needs:
- Pure HTML/CSS/JavaScript implementation
- No dependencies on specific frameworks
- Easy to embed in any web application
- Self-contained single-file distribution available
- ๐ฆ NuGet package:
JakubKozera.OpenApiUi
- ๐ Seamless integration with ASP.NET Core applications
- ๐ง Middleware support for easy setup
- โ๏ธ Compatible with existing Swagger/OpenAPI pipelines
- ๐ฆ Self-Contained - All assets embedded in the NuGet package
- ๐ Multi-Framework Support - Compatible with .NET 6.0, 8.0, and 9.0
- Standalone demo with sample API specifications
- Perfect for testing and evaluation
- No backend required
- Install the NuGet package:
dotnet add package JakubKozera.OpenApiUi
Or via Package Manager Console in Visual Studio:
Install-Package JakubKozera.OpenApiUi
- Add to your
Program.cs
(orStartup.cs
for older versions):
using JakubKozera.OpenApiUi;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
// Add OpenAPI UI middleware
app.UseOpenApiUi(); // Uses default path "/swagger/v1/swagger.json"
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
- Access the OpenAPI UI
Navigate to /openapi-ui
in your browser to view the API documentation interface.
You can specify a custom path to your OpenAPI specification:
app.UseOpenApiUi("/api/docs/swagger.json");
- .NET 6.0, 8.0, or 9.0
- ASP.NET Core application
- OpenAPI/Swagger specification endpoint
- Ensure the middleware is added after
UseSwagger()
if you're using Swashbuckle - Check that your OpenAPI specification path is correct and accessible
- Verify the middleware is registered in the request pipeline
Make sure the path you specify in UseOpenApiUi()
matches your actual OpenAPI specification endpoint.
The static assets are served from embedded resources. If they're not loading, check the browser's developer tools for 404 errors and verify the middleware is properly configured.
This project is licensed under the MIT License - see the LICENSE file for details.
- ๐ Documentation
- ๐ Issue Tracker
- ๐ฌ Discussions
- Modern Architecture - Built with modern web standards
- Rich Feature Set - Goes beyond basic documentation
- Developer Focused - Tools that developers actually need
- Easy Integration - Multiple distribution formats
- Active Development - Continuously improved and updated
- Performance Optimized - Fast loading and smooth interactions
Transform your API documentation from static pages into a powerful development tool with OpenAPI UI!