feature/fesd-615_response_ordering#99
Merged
PrincessMadMath merged 7 commits intomainfrom Dec 11, 2025
Merged
Conversation
src/Workleap.Extensions.OpenAPI/Ordering/OrderResponseFilter.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
This PR adds deterministic ordering of responses in OpenAPI document generation to ensure consistent output for better source control diffs and predictable documentation. The implementation sorts responses by HTTP status code, addressing an issue where responses from controller-level and method-level attributes were being added in processing order rather than by status code.
Key Changes:
- Introduced
OrderResponseFilterto sort OpenAPI responses by status code - Added comprehensive test case demonstrating the ordering fix with controller-level
ProducesResponseTypeattributes - Updated response descriptions for HTTP status codes 202 and 204 to use standard descriptions ("Accepted" and "No Content")
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Workleap.Extensions.OpenAPI/Ordering/OrderResponseFilter.cs | New document filter that sorts paths, operations, and responses by status code for deterministic output |
| src/Workleap.Extensions.OpenAPI/Builder/OpenApiBuilder.cs | Registers the new OrderResponseFilter in the Swagger configuration |
| src/tests/WebApi.OpenAPI.SystemTest/Ordering/OrderingController.cs | New test controller demonstrating the ordering fix for multiple response types |
| src/tests/WebApi.OpenAPI.SystemTest/ExtractTypeResult/TypedResultProperContentTypeController.cs | Added NoContent test case to verify proper handling of 204 responses |
| src/tests/expected-openapi-document.yaml | Updated expected output showing properly ordered responses and corrected status code descriptions |
| src/tests/WebApi.OpenAPI.SystemTest/openapi-v1.yaml | Mirror of expected output for system test verification |
| README.md | Updated documentation to list the new ordering feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/tests/WebApi.OpenAPI.SystemTest/Ordering/OrderingController.cs
Outdated
Show resolved
Hide resolved
src/Workleap.Extensions.OpenAPI/Ordering/OrderResponseFilter.cs
Outdated
Show resolved
Hide resolved
src/tests/WebApi.OpenAPI.SystemTest/Ordering/OrderingController.cs
Outdated
Show resolved
Hide resolved
geraldbarre-workleap
approved these changes
Dec 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira issue link: fesd-615
Description of changes
Add deterministic ordering of response.
Additional checks