-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(webapi): Remove old UpdateDialog Swagger config #1470
chore(webapi): Remove old UpdateDialog Swagger config #1470
Conversation
oskogstad
commented
Nov 14, 2024
•
edited
Loading
edited
- Chores
- Removed outdated methods related to request example bodies in Swagger documentation.
📝 WalkthroughWalkthroughThe pull request encompasses significant modifications to the OpenAPI specification for the Dialogporten API, particularly in the Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (1)
src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/Dialogs/Update/UpdateDialogEndpointSummary.cs (1)
18-28
: Consider improving response message handlingWhile the current implementation is functional, consider these improvements:
- Format the response messages more consistently by extracting the format strings to constants
- Consider creating a dedicated method for setting up responses to improve readability and maintainability
Example refactor:
public sealed class UpdateDialogEndpointSummary : Summary<UpdateDialogEndpoint> { + private void SetupResponses() + { + Responses[StatusCodes.Status204NoContent] = Constants.SwaggerSummary.Updated.FormatInvariant("aggregate"); + Responses[StatusCodes.Status400BadRequest] = Constants.SwaggerSummary.ValidationError; + // ... other responses + } + public UpdateDialogEndpointSummary() { Summary = "Replaces a dialog"; Description = $""" Replaces a given dialog with the supplied model. For more information see the documentation (link TBD). {Constants.SwaggerSummary.OptimisticConcurrencyNote} """; - Responses[StatusCodes.Status204NoContent] = Constants.SwaggerSummary.Updated.FormatInvariant("aggregate"); - // ... other responses + SetupResponses(); } }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (5)
docs/schema/V1/swagger.verified.json
(0 hunks)src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/Dialogs/Update/UpdateDialogEndpointSummary.cs
(1 hunks)src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/Dialogs/Update/UpdateDialogSwaggerConfig.cs
(0 hunks)src/Digdir.Domain.Dialogporten.WebApi/OpenApiDocumentExtensions.cs
(0 hunks)src/Digdir.Domain.Dialogporten.WebApi/Program.cs
(0 hunks)
💤 Files with no reviewable changes (4)
- docs/schema/V1/swagger.verified.json
- src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/Dialogs/Update/UpdateDialogSwaggerConfig.cs
- src/Digdir.Domain.Dialogporten.WebApi/OpenApiDocumentExtensions.cs
- src/Digdir.Domain.Dialogporten.WebApi/Program.cs
🔇 Additional comments (2)
src/Digdir.Domain.Dialogporten.WebApi/Endpoints/V1/ServiceOwner/Dialogs/Update/UpdateDialogEndpointSummary.cs (2)
1-6
: LGTM: Well-organized imports and namespace
The imports are clean, focused, and properly organized, bringing in only the necessary dependencies.
8-9
: LGTM: Well-designed class declaration
Good use of sealed
modifier and proper inheritance from Summary<UpdateDialogEndpoint>
.