Skip to content

feat: add PATCH method to metadata endpoints#284

Merged
jjrodrig merged 1 commit intomainfrom
feat/update-metadata-patch
Jul 15, 2025
Merged

feat: add PATCH method to metadata endpoints#284
jjrodrig merged 1 commit intomainfrom
feat/update-metadata-patch

Conversation

@jgalipienzo
Copy link
Contributor

@jgalipienzo jgalipienzo commented Jul 15, 2025

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

  • CA Metadata Endpoint: added PATCH /cas/:id/metadata route to update or patch metadata for a specific CA.
  • Certificate Metadata Endpoint: added PATCH /certificates/:sn/metadata route to update or patch metadata for a specific certificate.
  • Device Metadata Endpoint: added PATCH /devices/:id/metadata route to update or patch metadata for a specific device.

Fixes

Return "device not found" error when Device doesn't exist on UpdateDeviceMetadata operation.

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Jul 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.84%. Comparing base (83575f6) to head (76ddf3e).
Report is 3 commits behind head on main.

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              
Flag Coverage Δ
backend 59.38% <100.00%> (+0.02%) ⬆️
connector-awsiot 4.91% <ø> (ø)
core 61.97% <ø> (ø)
monolithic 0.00% <ø> (ø)
sdk 0.00% <ø> (ø)
shared-http 7.07% <ø> (ø)
storage-postgres 57.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jgalipienzo jgalipienzo marked this pull request as ready for review July 15, 2025 15:11
@jgalipienzo jgalipienzo requested a review from jjrodrig July 15, 2025 15:11
@jjrodrig jjrodrig merged commit 797ec29 into main Jul 15, 2025
37 checks passed
@jjrodrig jjrodrig deleted the feat/update-metadata-patch branch July 15, 2025 19:11
haritzsaiz pushed a commit that referenced this pull request Sep 2, 2025
haritzsaiz pushed a commit that referenced this pull request Sep 2, 2025
haritzsaiz pushed a commit that referenced this pull request Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants