Skip to content

Conversation

@bkoelman
Copy link
Member

@bkoelman bkoelman commented Feb 12, 2024

This PR adds OpenAPI support for error response schemas, compliant with the JSON:API errors structure.

Example in SwaggerUI:

image

Example usage with NSwag generated C# client:

image

Example usage with Kiota generated C# client:

image

Closes #1057.

QUALITY CHECKLIST

@codecov
Copy link

codecov bot commented Feb 12, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (f7f8f8b) 90.67% compared to head (0cd9754) 90.70%.

Files Patch % Lines
...ApiDotNetCore.OpenApi/OpenApiEndpointConvention.cs 93.22% 2 Missing and 2 partials ⚠️
...rc/JsonApiDotNetCore.OpenApi.Client/ApiResponse.cs 50.00% 1 Missing ⚠️
...tNetCore.OpenApi.Client/Exceptions/ApiException.cs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           openapi    #1460      +/-   ##
===========================================
+ Coverage    90.67%   90.70%   +0.02%     
===========================================
  Files          390      390              
  Lines        12735    12785      +50     
  Branches      2061     2057       -4     
===========================================
+ Hits         11547    11596      +49     
- Misses         772      774       +2     
+ Partials       416      415       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bkoelman bkoelman marked this pull request as ready for review February 12, 2024 00:53
@bkoelman bkoelman merged commit 2af36db into openapi Feb 12, 2024
@bkoelman bkoelman deleted the openapi-error-responses branch February 12, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants