Valobtify.Swagger 1.0.0

dotnet add package Valobtify.Swagger --version 1.0.0                
NuGet\Install-Package Valobtify.Swagger -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Valobtify.Swagger" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Valobtify.Swagger --version 1.0.0                
#r "nuget: Valobtify.Swagger, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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

  1. Add Swagger to Your Project
    First, configure Swagger in your ASP.NET Core project:

    builder.Services.AddSwaggerGen();
    
  2. Add Valobtify Schema Filters
    Use the AddValobtifySchemaFilters extension method to enable value object schema support:

    builder.Services.AddSwaggerGen(options =>
    {
        options.AddValobtifySchemaFilters();
    });
    
  3. 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.

  • Valobtify: Core library for creating and using value objects in .NET.
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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