Repository navigation
Closed
Labels
priority: lowLow prioritytype flag: breaking changeProposed change breaks current APItype flag: spec changeProposed change requires spec changestype: featureNew feature or requestworkload: hoursLikely takes hours to resolve
Description
Why?
Some responses of the registry's write endpoints (cloud_registry/api/additions.openapi.yaml) don't follow HTTP semantics:
POST /servicesreturns200with the new ID as body; a successful create should return201 Createdwith aLocationheader pointing to/services/{serviceId}.PUT /services/{serviceId}returns200both when it creates a new entry and when it replaces an existing one; clients cannot tell which happened. Creating should return201.
This changes the API contract, so clients (in particular the ELIXIR Cloud UI) must be checked and updated at the same time. It is deliberately scheduled after #62, which already changes the write endpoints.
How?
- Spec (additions only):
201withLocationheader forPOST /services;201(created) and200(replaced) forPUT /services/{serviceId}. Keep the ID as response body for compatibility. - Controllers: return the matching status and header; distinguish create from replace in
PUT(replace_one(..., upsert=True)reportsupserted_id). - Tests for both cases (Tests: app-level test harness with fixtures #71).
- Check the UI and any scripts that call the API; note the change in the changelog/release notes.
Acceptance criteria
-
POST /servicesreturns201with aLocationheader that resolves to the new entry. -
PUTreturns201on create and200on replace. - The UI works with the new responses.
Metadata
Metadata
Assignees
Labels
priority: lowLow prioritytype flag: breaking changeProposed change breaks current APItype flag: spec changeProposed change requires spec changestype: featureNew feature or requestworkload: hoursLikely takes hours to resolve
Activity