Change request mapping to '/pid/' for PidRedirectController#30
Change request mapping to '/pid/' for PidRedirectController#30maximiliani merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR changes the base request mapping for the PidRedirectController from "/" to "/pid/", effectively moving all PID redirect endpoints under a /pid/ prefix. This change addresses the overly broad root path mapping and provides better API organization.
Key Changes:
- Modified
@RequestMappingannotation from"/"to"/pid/"on PidRedirectController class - The redirect endpoint moves from
/{pidValue}to/pid/{pidValue}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| @Controller | ||
| @RequestMapping("/") | ||
| @RequestMapping("/pid/") |
There was a problem hiding this comment.
This change modifies the base path from "/" to "/pid/", which is a breaking API change. The endpoint that was previously accessible at /{pidValue} will now be accessible at /pid/{pidValue}.
This will break existing clients that are using the old endpoint. Consider:
- Adding a deprecation period with both endpoints supported
- Documenting this breaking change in release notes
- Communicating with API consumers about the migration
Alternatively, if the old "/" mapping was too broad and conflicted with other routes, consider if this is the intended behavior.
|
|
||
| @Controller | ||
| @RequestMapping("/") | ||
| @RequestMapping("/pid/") |
There was a problem hiding this comment.
This endpoint path change lacks test coverage. There are no existing tests for PidRedirectController, and this breaking change should be validated with tests to ensure:
- The new
/pid/{pidValue}endpoint works correctly - The redirect logic continues to function as expected
- Different entity types (AtomicDataType, Attribute, Operation, TechnologyInterface, TypeProfile) are redirected properly
Consider adding integration tests for this controller to prevent regressions and validate the new routing behavior.
No description provided.