CoreSystem.OpenApi
2.1.0
See the version list below for details.
dotnet add package CoreSystem.OpenApi --version 2.1.0
NuGet\Install-Package CoreSystem.OpenApi -Version 2.1.0
<PackageReference Include="CoreSystem.OpenApi" Version="2.1.0" />
<PackageVersion Include="CoreSystem.OpenApi" Version="2.1.0" />
<PackageReference Include="CoreSystem.OpenApi" />
paket add CoreSystem.OpenApi --version 2.1.0
#r "nuget: CoreSystem.OpenApi, 2.1.0"
#:package CoreSystem.OpenApi@2.1.0
#addin nuget:?package=CoreSystem.OpenApi&version=2.1.0
#tool nuget:?package=CoreSystem.OpenApi&version=2.1.0
⚡ CoreSystem.OpenApi
Base contracts and models for the CoreSystem OpenAPI infrastructure.
CoreSystem.OpenApi contains the base contracts, options and models shared by every OpenAPI provider implementation. It depends on ASP.NET Core but carries no provider-specific code, so it can be referenced on its own for the response attributes.
✨ Features
- ✅ Shared options, descriptors and problem-details contracts
- ✅ Response attributes usable without any provider
- ✅ Problem response definitions with configurable replacement modes
- ✅ Bearer security scheme options
- ✅ Multi-targeted for .NET 8, .NET 9 and .NET 10
📦 Installation
dotnet add package CoreSystem.OpenApi
🚀 Quick Start
Reference the package and annotate controllers with the response attributes:
using Core.OpenApi.Attributes;
[HttpPost]
[ProducesCreated<OrderResponse>]
public async Task<IActionResult> Create(CreateOrderRequest request)
🧩 Public API
| Type | Description |
|---|---|
CoreProblemDetails / CoreValidationProblemDetails |
Problem details base types. |
OpenApiOptions |
Common options shared by all providers. |
OpenApiServerDescriptor |
Server entry for the document. |
BearerSecurityOptions |
Bearer security scheme configuration. |
OpenApiProblemResponsesOptions |
Shared problem response catalog. |
ProblemResponseDefinition |
One response: status code, component, error code and example. |
ProblemResponseReplacementMode |
Replacement behavior for existing responses. |
ProducesOkAttribute<T> / ProducesCreatedAttribute<T> / ProducesNoContentAttribute |
Response attributes. |
ProducesNotFoundProblemAttribute / ProducesValidationProblemAttribute / ProducesTooManyRequestsProblemAttribute |
Problem response attributes. |
🏗 Architecture
The package is the dependency-free foundation: providers (such as Swashbuckle) build on top of these contracts and options.
📖 Documentation
- Getting Started
- Configuration
🤝 Contributing
Issues, discussions and pull requests are welcome.
📄 License
Released under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. 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. 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
- Microsoft.OpenApi (>= 1.6.25)
-
net8.0
- Microsoft.OpenApi (>= 1.6.25)
-
net9.0
- Microsoft.OpenApi (>= 1.6.25)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CoreSystem.OpenApi:
| Package | Downloads |
|---|---|
|
CoreSystem.OpenApi.Swashbuckle
Reusable OpenAPI and Swagger infrastructure for ASP.NET Core APIs. |
GitHub repositories
This package is not used by any popular GitHub repositories.
2.1.0: Added ProducesConflictProblemAttribute (HTTP 409) for documenting conflict
problem responses. Minor version bump.