feat: add PATCH method to metadata endpoints#284
Merged
Conversation
Signed-off-by: Jon Galipienzo <[email protected]>
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #284 +/- ##
==========================================
+ Coverage 45.82% 45.84% +0.01%
==========================================
Files 128 128
Lines 8558 8561 +3
==========================================
+ Hits 3922 3925 +3
Misses 4300 4300
Partials 336 336
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
haritzsaiz
pushed a commit
that referenced
this pull request
Sep 2, 2025
Signed-off-by: haritz <[email protected]>
haritzsaiz
pushed a commit
that referenced
this pull request
Sep 2, 2025
Signed-off-by: haritz <[email protected]>
haritzsaiz
pushed a commit
that referenced
this pull request
Sep 2, 2025
Signed-off-by: haritz <[email protected]>
This was referenced Sep 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR adds a PATCH method as a second option for every metadata update endpoint. Since the endpoints apply JSON patches, using HTTP PATCH rather than PUT would better reflect a partial update operation.
Updates
PATCH /cas/:id/metadataroute to update or patch metadata for a specific CA.PATCH /certificates/:sn/metadataroute to update or patch metadata for a specific certificate.PATCH /devices/:id/metadataroute to update or patch metadata for a specific device.Fixes
Return "device not found" error when Device doesn't exist on
UpdateDeviceMetadataoperation.