-
Notifications
You must be signed in to change notification settings - Fork 1
REST controller for managing help and documentation resources. --> Don't Merge #101
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
base: develop
Are you sure you want to change the base?
Conversation
src/main/java/com/publicissapient/kpidashboard/apis/appsetting/rest/HelpController.java
Outdated
Show resolved
Hide resolved
src/main/java/com/publicissapient/kpidashboard/apis/appsetting/rest/HelpController.java
Outdated
Show resolved
Hide resolved
src/main/java/com/publicissapient/kpidashboard/apis/appsetting/rest/HelpController.java
Outdated
Show resolved
Hide resolved
src/main/java/com/publicissapient/kpidashboard/apis/appsetting/rest/HelpController.java
Outdated
Show resolved
Hide resolved
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 22088979 | Triggered | Generic High Entropy Secret | 4d2fa17 | src/main/resources/application.properties | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
| ## Help & Support Configuration - End | ||
|
|
||
| ## Potential Economic Benefits Configuration - Start | ||
| peb.totalDevelopers=30 |
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.
Use the convention of specifying the property names by having a hyphen separator.
| ## Help & Support Configuration - End | ||
|
|
||
| ## Potential Economic Benefits Configuration - Start | ||
| peb.totalDevelopers=30 |
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.
Add a grouping for these properties. peb.configuration for example or something relevant
| ## Potential Economic Benefits Configuration - Start | ||
| peb.totalDevelopers=30 | ||
| peb.avgCostPerDeveloper=100000.00 | ||
| peb.timeDuration=Per Year |
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.
The duration shouldn't be a string. Try using the TemporalAggregationUnit (my recommendation) or ChronoUnit enum or if it is a string then make sure that it easily mapped to any of these two enums
| executive.dashboard.timeout.minutes=3 | ||
|
|
||
| ## Help & Support Configuration - Start | ||
| help.productDocumentationUrl=https://docs.example.com/product |
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.
Please apply the review from the peb properties to these ones as well at least on the naming convention
| public class HelpAndSupportController { | ||
|
|
||
| @Autowired | ||
| private HelpConfig helpConfig; |
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.
Use the constructor based injection along with @requiredargsconstructor
| @Autowired | ||
| private HelpConfig helpConfig; | ||
|
|
||
| public void setHelpConfig(HelpConfig helpConfig) { |
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.
Use Lombok annotations
| resourceLinks.put("raiseTicket", helpConfig.getRaiseTicketUrl() != null ? helpConfig.getRaiseTicketUrl() : ""); | ||
| resourceLinks.put("supportChannel", helpConfig.getSupportChannelUrl() != null ? helpConfig.getSupportChannelUrl() : ""); | ||
| log.info("Help configuration retrieved successfully"); | ||
| return ResponseEntity.ok(new ServiceResponse(true, "Help and Support configuration retrieved successfully", resourceLinks)); |
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.
Create a DTO instead of using a map
| @RequestMapping("/help") | ||
| @Tag(name = "Help", description = "Endpoints for managing support and documentation resources") | ||
| @Slf4j | ||
| public class HelpAndSupportController { |
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.
Why is it help controller when this is actually an endpoint for managing documentations?
@RequestMapping("/documentation") and then have the required endpoints beneath it
| @Autowired | ||
| private PEBConfig pebConfig; | ||
|
|
||
| public void setPebConfig(PEBConfig pebConfig) { |
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.
Please apply the same review comments as received for "HelpAndSupportController"
No description provided.