Hto3.OpenApi.JsonMultipartFormDataSupport 1.1.0

dotnet add package Hto3.OpenApi.JsonMultipartFormDataSupport --version 1.1.0
                    
NuGet\Install-Package Hto3.OpenApi.JsonMultipartFormDataSupport -Version 1.1.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="Hto3.OpenApi.JsonMultipartFormDataSupport" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Hto3.OpenApi.JsonMultipartFormDataSupport" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Hto3.OpenApi.JsonMultipartFormDataSupport" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Hto3.OpenApi.JsonMultipartFormDataSupport --version 1.1.0
                    
#r "nuget: Hto3.OpenApi.JsonMultipartFormDataSupport, 1.1.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.
#:package Hto3.OpenApi.JsonMultipartFormDataSupport@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Hto3.OpenApi.JsonMultipartFormDataSupport&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Hto3.OpenApi.JsonMultipartFormDataSupport&version=1.1.0
                    
Install as a Cake Tool

logo

Hto3.OpenApi.JsonMultipartFormDataSupport

Support JSON Multipart data in OpenAPI with ASP.NET Core.

Overview

This library provides seamless integration for handling JSON data within multipart form requests in ASP.NET Core applications. It enables you to send JSON objects as form parts alongside file uploads and other multipart data, with automatic OpenAPI specification support.

Installation

NuGet Package

dotnet add package Hto3.OpenApi.JsonMultipartFormDataSupport

Or install via NuGet Package Manager:

Install-Package Hto3.OpenApi.JsonMultipartFormDataSupport

Quick Start

1. Register in Startup Configuration

Add the JsonMultipartOperationTransformer to your OpenAPI configuration in Program.cs:

builder.Services.AddOpenApi(options =>
{
    options.AddOperationTransformer<JsonMultipartOperationTransformer>();
});

2. Use the Attribute in Your Endpoints

[HttpPost]
public async Task<IActionResult> UploadData([JsonFormPart] MyDataModel data, [FromForm] FormFile? file)
{
    // data is automatically deserialized from the JSON form part
    // file contains the uploaded file if provided

    return Ok(new { message = "Upload successful", data });
}

public class MyDataModel
{
    public string Name { get; set; }
    public int Age { get; set; }
    public string Description { get; set; }
}

Requirements

  • .NET 10.0 or later
  • ASP.NET Core with OpenAPI support
  • Microsoft.AspNetCore.OpenApi v10.0.11 or later

License

MIT License - See LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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.1.0 83 11/16/2026
1.0.0 85 11/13/2026