Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import java.util.*;

@Controller
@RequestMapping("/")
@RequestMapping("/pid/")
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Adding a deprecation period with both endpoints supported
  2. Documenting this breaking change in release notes
  3. 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.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. The new /pid/{pidValue} endpoint works correctly
  2. The redirect logic continues to function as expected
  3. 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.

Copilot uses AI. Check for mistakes.
@Log
public class PidRedirectController {

Expand Down Expand Up @@ -163,4 +163,4 @@ private Optional<String> determineRedirectPathBase(String entityPid, List<String
.map(entity -> Ascii.toLowerCase(entity.getClass().getSimpleName()) + "s") // Determine path base
.findFirst(); // Take the first one that matches
}
}
}