TeamDynamixApiCommands.java (6 edits):
- "ExternalId" → "ExternalID" in the patchTeamDynamixUser field comparison (line 875)
- "SecurityRoleId" → "SecurityRoleID" in the patchTeamDynamixUser field comparison (line 879)
- Added leading / to PATCH path: operationNode.put("path", "/" + fieldToUpdate) (line 903)
- Added leading / to IsActive PATCH path: operationNode.put("path", "/IsActive") (line 912)
- "ExternalId" → "ExternalID" in first fieldsToUpdate map (line 407)
- "SecurityRoleId" → "SecurityRoleID" in first fieldsToUpdate map (line 409)
- "ExternalId" → "ExternalID" in second fieldsToUpdate map (line 440)
- "SecurityRoleId" → "SecurityRoleID" in second fieldsToUpdate map (line 442)
TeamDynamixMockServiceHandler.java (3 edits):
- Added leading / stripping logic after reading the path from the JSON Patch operation
- "ExternalId" → "ExternalID" in path mapping (line 271)
- "SecurityRoleId" → "SecurityRoleID" in path mapping (line 277)
These changes ensure:
- PATCH operations send RFC 6902 compliant paths with leading / (e.g., "/FirstName" instead of "FirstName")
- Field name casing matches the TeamDynamix API exactly (ExternalID, SecurityRoleID — both with uppercase "ID")
- The mock handler strips the leading / so all its downstream field matching continues to work correctly
- The fieldsToUpdate map keys match the updated comparisons in patchTeamDynamixUser, so updates won't be silently skipped