{"id":28719181,"url":"https://github.com/soenneker/soenneker.openapi.diagnostics","last_synced_at":"2026-04-14T23:06:31.754Z","repository":{"id":299133958,"uuid":"1002162435","full_name":"soenneker/soenneker.openapi.diagnostics","owner":"soenneker","description":"A utility to diagnose openapi documents for client generation and other problems","archived":false,"fork":false,"pushed_at":"2026-02-19T04:38:32.000Z","size":347,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-19T10:48:00.098Z","etag":null,"topics":["client","csharp","diagnostic","diagnostics","dotnet","openapi","openapidiagnostics","util","utility"],"latest_commit_sha":null,"homepage":"https://soenneker.com","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soenneker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"soenneker","buy_me_a_coffee":"soenneker","thanks_dev":"soenneker","ko_fi":"soenneker","patreon":"soenneker"}},"created_at":"2025-06-14T21:12:19.000Z","updated_at":"2026-02-19T04:38:35.000Z","dependencies_parsed_at":"2026-02-10T23:00:55.423Z","dependency_job_id":null,"html_url":"https://github.com/soenneker/soenneker.openapi.diagnostics","commit_stats":null,"previous_names":["soenneker/soenneker.openapi.diagnostics"],"tags_count":50,"template":false,"template_full_name":null,"purl":"pkg:github/soenneker/soenneker.openapi.diagnostics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.openapi.diagnostics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.openapi.diagnostics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.openapi.diagnostics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.openapi.diagnostics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soenneker","download_url":"https://codeload.github.com/soenneker/soenneker.openapi.diagnostics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soenneker%2Fsoenneker.openapi.diagnostics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29672759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T03:11:15.450Z","status":"ssl_error","status_checked_at":"2026-02-21T03:10:34.920Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","csharp","diagnostic","diagnostics","dotnet","openapi","openapidiagnostics","util","utility"],"created_at":"2025-06-15T06:00:35.660Z","updated_at":"2026-03-15T04:24:00.969Z","avatar_url":"https://github.com/soenneker.png","language":"C#","funding_links":["https://github.com/sponsors/soenneker","https://buymeacoffee.com/soenneker","https://thanks.dev/soenneker","https://ko-fi.com/soenneker","https://patreon.com/soenneker"],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/nuget/v/soenneker.openapi.diagnostics.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.openapi.diagnostics/)\n[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.openapi.diagnostics/publish-package.yml?style=for-the-badge)](https://github.com/soenneker/soenneker.openapi.diagnostics/actions/workflows/publish-package.yml)\n[![](https://img.shields.io/nuget/dt/soenneker.openapi.diagnostics.svg?style=for-the-badge)](https://www.nuget.org/packages/soenneker.openapi.diagnostics/)\n[![](https://img.shields.io/github/actions/workflow/status/soenneker/soenneker.openapi.diagnostics/codeql.yml?label=CodeQL\u0026style=for-the-badge)](https://github.com/soenneker/soenneker.openapi.diagnostics/actions/workflows/codeql.yml)\n\n# ![](https://user-images.githubusercontent.com/4441470/224455560-91ed3ee7-f510-4041-a8d2-3fc093025112.png) Soenneker.OpenApi.Diagnostics\n\nA comprehensive OpenAPI document diagnostic utility that helps identify issues that could affect client generation and API documentation.\n\n## Features\n\n### Top-Level Showstopper Issues\n- Empty or Invalid OperationId detection\n- Invalid $ref identifier validation\n- Empty enum array detection\n- Schema name conflict detection\n- Polymorphic type validation\n- Path parameter validation\n- Recursive model validation\n- Default value validation\n- Empty schema detection\n\n### Mid-Level Problems\n- allOf usage validation\n- Name collision detection\n- Schema combination validation\n- Format/type combination validation\n- OpenAPI version validation\n\n### Subtle Problems\n- Discriminator mapping validation\n- Description/summary validation\n- Parameter/response reference validation\n- Media type validation\n- Request body validation\n\n### Kiota-Specific Issues\n- File size validation\n- Empty key detection\n- Nullable property validation\n- Enum type validation\n- Discriminator property validation\n\n## Installation\n\n```bash\ndotnet add package Soenneker.OpenApi.Diagnostics\n```\n\n## Usage\n\n### Basic Usage\n\n```csharp\nusing Microsoft.Extensions.DependencyInjection;\nusing Soenneker.OpenApi.Diagnostics;\nusing Soenneker.OpenApi.Diagnostics.Abstract;\n\n// Register the service\nservices.AddOpenApiDiagnostics();\n\n// Use the service\npublic class MyService\n{\n    private readonly IOpenApiDiagnostics _diagnostics;\n\n    public MyService(IOpenApiDiagnostics diagnostics)\n    {\n        _diagnostics = diagnostics;\n    }\n\n    public async Task AnalyzeOpenApiDocument(string jsonContent)\n    {\n        var issues = await _diagnostics.AnalyzeJson(jsonContent);\n        \n        foreach (var issue in issues)\n        {\n            Console.WriteLine($\"Severity: {issue.Severity}\");\n            Console.WriteLine($\"Category: {issue.Category}\");\n            Console.WriteLine($\"Code: {issue.Code}\");\n            Console.WriteLine($\"Message: {issue.Message}\");\n            Console.WriteLine($\"Location: {issue.Location}\");\n            if (issue.Details != null)\n                Console.WriteLine($\"Details: {issue.Details}\");\n            Console.WriteLine();\n        }\n    }\n}\n```\n\n### Analyzing a File\n\n```csharp\nvar issues = await _diagnostics.AnalyzeFile(\"path/to/openapi.json\");\n```\n\n### Analyzing a Document\n\n```csharp\nvar document = new OpenApiDocument();\n// ... populate document ...\nvar issues = await _diagnostics.AnalyzeDocument(document);\n```\n\n## Diagnostic Categories\n\nThe library categorizes issues into the following categories:\n\n- OperationId\n- Reference\n- Enum\n- SchemaNaming\n- PolymorphicType\n- PathParameter\n- RecursiveModel\n- DefaultValue\n- EmptySchema\n- SchemaCombination\n- FormatType\n- Version\n- Discriminator\n- Description\n- MediaType\n- RequestBody\n- FileSize\n- EmptyKey\n- Nullable\n- Other\n\n## Severity Levels\n\nIssues are classified into three severity levels:\n\n- Error: Critical issues that will prevent client generation\n- Warning: Issues that may cause problems but won't prevent generation\n- Info: Issues that may affect functionality but are not critical\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoenneker%2Fsoenneker.openapi.diagnostics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoenneker%2Fsoenneker.openapi.diagnostics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoenneker%2Fsoenneker.openapi.diagnostics/lists"}