Valobtify.Swagger
1.0.0
dotnet add package Valobtify.Swagger --version 1.0.0
NuGet\Install-Package Valobtify.Swagger -Version 1.0.0
<PackageReference Include="Valobtify.Swagger" Version="1.0.0" />
paket add Valobtify.Swagger --version 1.0.0
#r "nuget: Valobtify.Swagger, 1.0.0"
// Install Valobtify.Swagger as a Cake Addin #addin nuget:?package=Valobtify.Swagger&version=1.0.0 // Install Valobtify.Swagger as a Cake Tool #tool nuget:?package=Valobtify.Swagger&version=1.0.0
Table of Contents
Overview
Valobtify.Swagger
is an extension for integrating Valobtify value objects with Swagger documentation in ASP.NET Core. It automates the process of mapping value objects to Swagger schemas, ensuring your API documentation is accurate and reflective of your domain model.
Installation
Install the Valobtify.Swagger
package via NuGet:
dotnet add package Valobtify.Swagger
Ensure your project uses Swashbuckle.AspNetCore for Swagger support.
Usage
Add Swagger to Your Project
First, configure Swagger in your ASP.NET Core project:builder.Services.AddSwaggerGen();
Add Valobtify Schema Filters
Use theAddValobtifySchemaFilters
extension method to enable value object schema support:builder.Services.AddSwaggerGen(options => { options.AddValobtifySchemaFilters(); });
Enable Middleware
Add Swagger middleware to your application pipeline:app.UseSwagger(); app.UseSwaggerUI();
Integration with Swagger
The AddValobtifySchemaFilters
method ensures that all Valobtify value objects are correctly represented in your Swagger documentation. This means:
- Automatic schema generation: No manual configuration is needed.
- Consistent API documentation: Domain concepts using value objects are properly reflected.
Related Packages
- Valobtify: Core library for creating and using value objects in .NET.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net9.0
- Swashbuckle.AspNetCore.SwaggerGen (>= 7.1.0)
- Valobtify (>= 3.0.0-rc.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 66 | 12/10/2024 |