-
Notifications
You must be signed in to change notification settings - Fork 0
Fix Calendar formatting #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
Conversation
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.
Pull Request Overview
This pull request updates calendar-related code to use lowercase property names and wraps calendar elements in a wrapper object for a more consistent API response. Key changes include:
- Renaming calendar element properties (e.g., ID → id, Name → name) in the model, service, controller, and YAML configuration.
- Introducing a new CalendarWrapper model to encapsulate calendar elements.
- Adjusting log messages and method calls in related services to reflect the new naming convention.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/app/betterhm/backend/v1/services/CapacityService.java | Updated error messages to use lowercase for 'url' consistently. |
| src/main/java/app/betterhm/backend/v1/services/CalendarService.java | Updated variable names in filtering and comments to lowercase. |
| src/main/java/app/betterhm/backend/v1/models/CalendarWrapper.java | Added a new wrapper class for calendar elements. |
| src/main/java/app/betterhm/backend/v1/models/CalendarElement.java | Renamed record components from uppercase to lowercase. |
| src/main/java/app/betterhm/backend/v1/controller/CalendarController.java | Adjusted response type and Javadoc comments to use the new wrapper. |
| src/main/java/app/betterhm/backend/v1/component/StaticUpdater.java | Updated method calls to use the new, lowercase property names. |
| resources/yaml/config.yml | Modified calendar configuration keys to lowercase for consistency. |
| logger.error("Could not Split LRZ Api url Provided by the config", e); | ||
| throw new PatternSyntaxException("Could not Split LRZ Api url Provided by the config", lrzApiUrl, -1); |
Copilot
AI
Apr 21, 2025
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.
Consider revising the error message for clarity and consistency (e.g., 'Could not split LRZ API URL from configuration').
| logger.error("Could not Split LRZ Api url Provided by the config", e); | |
| throw new PatternSyntaxException("Could not Split LRZ Api url Provided by the config", lrzApiUrl, -1); | |
| logger.error("Could not split LRZ API URL from configuration", e); | |
| throw new PatternSyntaxException("Could not split LRZ API URL from configuration", lrzApiUrl, -1); |
| logger.error("Could not Generate a valid url for the LRZ Wifi Api", e); | ||
| throw new IllegalStateException("Could not Generate a valid url for the LRZ Wifi Api", e); |
Copilot
AI
Apr 21, 2025
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.
Consider revising the error message for clarity and consistency (e.g., 'Could not generate a valid URL for the LRZ WiFi API').
| logger.error("Could not Generate a valid url for the LRZ Wifi Api", e); | |
| throw new IllegalStateException("Could not Generate a valid url for the LRZ Wifi Api", e); | |
| logger.error("Could not generate a valid URL for the LRZ WiFi API", e); | |
| throw new IllegalStateException("Could not generate a valid URL for the LRZ WiFi API", e); |
Calendar elements are now lowercase and wrapped in an object