Soenneker.Attributes.PublicOpenApiObject
4.0.52
Prefix Reserved
dotnet add package Soenneker.Attributes.PublicOpenApiObject --version 4.0.52
NuGet\Install-Package Soenneker.Attributes.PublicOpenApiObject -Version 4.0.52
<PackageReference Include="Soenneker.Attributes.PublicOpenApiObject" Version="4.0.52" />
<PackageVersion Include="Soenneker.Attributes.PublicOpenApiObject" Version="4.0.52" />
<PackageReference Include="Soenneker.Attributes.PublicOpenApiObject" />
paket add Soenneker.Attributes.PublicOpenApiObject --version 4.0.52
#r "nuget: Soenneker.Attributes.PublicOpenApiObject, 4.0.52"
#:package Soenneker.Attributes.PublicOpenApiObject@4.0.52
#addin nuget:?package=Soenneker.Attributes.PublicOpenApiObject&version=4.0.52
#tool nuget:?package=Soenneker.Attributes.PublicOpenApiObject&version=4.0.52
Soenneker.Attributes.PublicOpenApiObject
A marker attribute for contract classes whose schemas are eligible for a public OpenAPI document.
Installation
dotnet add package Soenneker.Attributes.PublicOpenApiObject
Usage
using Soenneker.Attributes.PublicOpenApiObject;
[PublicOpenApiObject]
public sealed class PublicCustomer
{
public required string Id { get; init; }
public required string DisplayName { get; init; }
}
An OpenAPI schema or document filter can select marked types:
using System.Reflection;
bool include = typeof(PublicCustomer)
.IsDefined(typeof(PublicOpenApiObjectAttribute), inherit: true);
Important behavior
- The attribute targets classes. It cannot be applied directly to structs, enums, interfaces, or individual properties.
- Derived classes observe the marker through normal inherited attribute lookup.
- The package does not add, remove, or modify OpenAPI schemas on its own; a generator integration must read the marker.
- Marking a type does not prove that every property is safe to publish. Review the complete serialized schema before including it in a public document.
| Product | Versions 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. |
-
net10.0
- No dependencies.
NuGet packages (25)
Showing the top 5 NuGet packages that depend on Soenneker.Attributes.PublicOpenApiObject:
| Package | Downloads |
|---|---|
|
Soenneker.Enums.UnitOfTime
An enumerator for describing an interval of time |
|
|
Soenneker.Dtos.ProblemDetails
A replication of .NET's ProblemDetails (https://tools.ietf.org/html/rfc7807) that doesn't rely on Microsoft.AspNetCore.Mvc. |
|
|
Soenneker.Enums.DayOfWeek
An enumerator for describing the day of the week (Mon, Tues, ..) |
|
|
Soenneker.Dtos.IdNamePair
A minimal Record type with an Id (string), Name (string), and maximum JSON compatibility |
|
|
Soenneker.Dtos.IdPartitionPair
A minimal Record type with an Id (string), PartitionKey (string), and maximum JSON compatibility |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.52 | 9,731 | 8/29/2026 |
| 4.0.50 | 210 | 8/29/2026 |
| 4.0.49 | 24,778 | 8/18/2026 |
| 4.0.48 | 28,967 | 7/27/2026 |
| 4.0.47 | 25,174 | 7/16/2026 |
| 4.0.46 | 35,525 | 6/18/2026 |
| 4.0.45 | 32,314 | 6/5/2026 |
| 4.0.44 | 40,702 | 4/22/2026 |
| 4.0.42 | 37,740 | 3/12/2026 |
| 4.0.41 | 638 | 3/12/2026 |
| 4.0.40 | 669 | 3/12/2026 |
| 4.0.39 | 5,988 | 3/12/2026 |
| 4.0.38 | 18,376 | 3/10/2026 |
| 4.0.37 | 9,202 | 3/9/2026 |
| 4.0.36 | 804 | 3/9/2026 |
| 4.0.35 | 1,288 | 3/9/2026 |
| 4.0.34 | 24,507 | 3/4/2026 |
| 4.0.33 | 105,263 | 1/2/2026 |
| 4.0.32 | 37,368 | 11/20/2025 |
| 4.0.31 | 25,049 | 11/6/2025 |
Restore CodeQL badge