Skip to content

fix(rest): align PATCH and DELETE success status codes#3775

Open
saiteja-in wants to merge 1 commit intoeclipse-sw360:mainfrom
saiteja-in:fix/rest-status-codes-3774
Open

fix(rest): align PATCH and DELETE success status codes#3775
saiteja-in wants to merge 1 commit intoeclipse-sw360:mainfrom
saiteja-in:fix/rest-status-codes-3774

Conversation

@saiteja-in
Copy link
Contributor

Summary

  • align REST success status codes for update/delete endpoints to improve API semantics consistency
  • return 200 OK for PATCH /resource/api/vulnerabilities/{externalId} instead of 201 Created
  • return 204 No Content for successful DELETE /resource/api/packages/{id} and DELETE /resource/api/licenses/{id}

Test plan

  • reproduce pre-fix behavior in browser Network tab: PATCH vulnerability returned 201, DELETE package/license returned 200
  • verify backend changes are limited to three controllers and preserve non-success paths (409, access denied, etc.)

Closes #3774

Return 200 for vulnerability PATCH updates and 204 for successful package/license deletes to keep HTTP semantics consistent for API consumers and tooling.

Refs: eclipse-sw360#3774
Made-with: Cursor
@GMishx GMishx added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs code review needs general test This is general testing, meaning that there is no org specific issue to check for

Projects

None yet

Development

Successfully merging this pull request may close these issues.

REST API status code consistency: PATCH /vulnerabilities returns 201, DELETE /packages and /licenses return 200

2 participants