Soenneker.OpenApi.Diagnostics
4.0.94
Prefix Reserved
dotnet add package Soenneker.OpenApi.Diagnostics --version 4.0.94
NuGet\Install-Package Soenneker.OpenApi.Diagnostics -Version 4.0.94
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="Soenneker.OpenApi.Diagnostics" Version="4.0.94" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.OpenApi.Diagnostics" Version="4.0.94" />
<PackageReference Include="Soenneker.OpenApi.Diagnostics" />
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 Soenneker.OpenApi.Diagnostics --version 4.0.94
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.OpenApi.Diagnostics, 4.0.94"
#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 Soenneker.OpenApi.Diagnostics@4.0.94
#: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=Soenneker.OpenApi.Diagnostics&version=4.0.94
#tool nuget:?package=Soenneker.OpenApi.Diagnostics&version=4.0.94
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Soenneker.OpenApi.Diagnostics
A comprehensive OpenAPI document diagnostic utility that helps identify issues that could affect client generation and API documentation.
Features
Top-Level Showstopper Issues
- Empty or Invalid OperationId detection
- Invalid $ref identifier validation
- Empty enum array detection
- Schema name conflict detection
- Polymorphic type validation
- Path parameter validation
- Recursive model validation
- Default value validation
- Empty schema detection
Mid-Level Problems
- allOf usage validation
- Name collision detection
- Schema combination validation
- Format/type combination validation
- OpenAPI version validation
Subtle Problems
- Discriminator mapping validation
- Description/summary validation
- Parameter/response reference validation
- Media type validation
- Request body validation
Kiota-Specific Issues
- File size validation
- Empty key detection
- Nullable property validation
- Enum type validation
- Discriminator property validation
Installation
dotnet add package Soenneker.OpenApi.Diagnostics
Usage
Basic Usage
using Microsoft.Extensions.DependencyInjection;
using Soenneker.OpenApi.Diagnostics;
using Soenneker.OpenApi.Diagnostics.Abstract;
// Register the service
services.AddOpenApiDiagnostics();
// Use the service
public class MyService
{
private readonly IOpenApiDiagnostics _diagnostics;
public MyService(IOpenApiDiagnostics diagnostics)
{
_diagnostics = diagnostics;
}
public async Task AnalyzeOpenApiDocument(string jsonContent)
{
var issues = await _diagnostics.AnalyzeJson(jsonContent);
foreach (var issue in issues)
{
Console.WriteLine($"Severity: {issue.Severity}");
Console.WriteLine($"Category: {issue.Category}");
Console.WriteLine($"Code: {issue.Code}");
Console.WriteLine($"Message: {issue.Message}");
Console.WriteLine($"Location: {issue.Location}");
if (issue.Details != null)
Console.WriteLine($"Details: {issue.Details}");
Console.WriteLine();
}
}
}
Analyzing a File
var issues = await _diagnostics.AnalyzeFile("path/to/openapi.json");
Analyzing a Document
var document = new OpenApiDocument();
// ... populate document ...
var issues = await _diagnostics.AnalyzeDocument(document);
Diagnostic Categories
The library categorizes issues into the following categories:
- OperationId
- Reference
- Enum
- SchemaNaming
- PolymorphicType
- PathParameter
- RecursiveModel
- DefaultValue
- EmptySchema
- SchemaCombination
- FormatType
- Version
- Discriminator
- Description
- MediaType
- RequestBody
- FileSize
- EmptyKey
- Nullable
- Other
Severity Levels
Issues are classified into three severity levels:
- Error: Critical issues that will prevent client generation
- Warning: Issues that may cause problems but won't prevent generation
- Info: Issues that may affect functionality but are not critical
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.OpenApi (>= 3.5.2)
- Soenneker.Utils.File (>= 4.0.2139)
- Soenneker.Utils.PooledStringBuilders (>= 4.0.21)
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 |
|---|---|---|
| 4.0.94 | 31 | 4/15/2026 |
| 4.0.93 | 58 | 4/14/2026 |
| 4.0.92 | 55 | 4/14/2026 |
| 4.0.91 | 91 | 4/3/2026 |
| 4.0.90 | 87 | 4/1/2026 |
| 4.0.89 | 85 | 3/31/2026 |
| 4.0.88 | 87 | 3/23/2026 |
| 4.0.87 | 86 | 3/20/2026 |
| 4.0.86 | 86 | 3/20/2026 |
| 4.0.85 | 88 | 3/20/2026 |
| 4.0.84 | 105 | 3/15/2026 |
| 4.0.83 | 102 | 3/15/2026 |
| 4.0.82 | 101 | 3/14/2026 |
| 4.0.81 | 100 | 3/13/2026 |
| 4.0.80 | 95 | 3/12/2026 |
| 4.0.78 | 98 | 3/12/2026 |
| 4.0.77 | 101 | 3/12/2026 |
| 4.0.76 | 99 | 3/11/2026 |
| 4.0.75 | 100 | 3/11/2026 |
| 4.0.74 | 99 | 3/11/2026 |
Loading failed
Update dependency Soenneker.Utils.File to 4.0.2139 (#385)