-
Notifications
You must be signed in to change notification settings - Fork 694
Labels
affects/8.8Issue is affecting 8.8 minor versionsIssue is affecting 8.8 minor versionscomponent/c8-apiAll things unified C8 API, e.g. C8 RESTAll things unified C8 API, e.g. C8 RESTkind/bugCategorizes an issue or PR as a bugCategorizes an issue or PR as a buglikelihood/highA recurring issueA recurring issueseverity/lowMarks a bug as having little to no noticeable impact for the userMarks a bug as having little to no noticeable impact for the userversion:8.8.0-alpha8version:8.8.0-alpha8-rc1version:dryrun-8.8.0-alpha6-rc999
Description
Description
The UserController implements PUT, but the spec specifies PATCH:
Implementation:
@CamundaPutMapping(path = "/{username}")
public CompletableFuture<ResponseEntity<Object>> updateUser(
@PathVariable final String username, @RequestBody final UserUpdateRequest userUpdateRequest) {
return RequestMapper.toUserUpdateRequest(userUpdateRequest, username)
.fold(RestErrorMapper::mapProblemToCompletedResponse, this::updateUser);
}
Specification:
/users/{username}:
...
patch:
tags:
- User
operationId: updateUser
summary: Update user
description: |
Updates a user.
Steps to reproduce
- Examine the specification
- Examine the implementation
Current behavior
The controller implementation does not match the specification.
Expected behavior
The controller implementation matches the specification.
Environment
SM
Version
This is on main.
Rootcause
No response
Solution ideas
Change the controller, or change the spec. Since the method name is updateUser
, probably the controller should implement PATCH.
However, the current implementation seems to be a complete replacement, which is a PUT. The Java client and test also implement PUT.
If we allow users to update just an email address for a user (that sounds like a valid scenario), then we should change this to PATCH and allow partial Request Dtos.
Dev -> QA handover
- Resources:
- Versions to validate:
- Release version (in which version this feature will be released):
Links
Metadata
Metadata
Assignees
Labels
affects/8.8Issue is affecting 8.8 minor versionsIssue is affecting 8.8 minor versionscomponent/c8-apiAll things unified C8 API, e.g. C8 RESTAll things unified C8 API, e.g. C8 RESTkind/bugCategorizes an issue or PR as a bugCategorizes an issue or PR as a buglikelihood/highA recurring issueA recurring issueseverity/lowMarks a bug as having little to no noticeable impact for the userMarks a bug as having little to no noticeable impact for the userversion:8.8.0-alpha8version:8.8.0-alpha8-rc1version:dryrun-8.8.0-alpha6-rc999
Type
Projects
Status
Done