Skip to content

Either document that /metadata/json:submit can be used to _update_ documents or prohibit that usage #1184

@eecavanna

Description

@eecavanna

Today, I learned that the POST /metadata/json:submit endpoint could be used to update documents (by their id), not just insert documents. Given that the endpoint lacks documentation, I didn't learn this until I read this comment and then tried it out locally (I was able to update an existing document).

To do:

  • Determine whether the ability to update documents via that endpoint is necessary (prohibiting updates will simplify development). Ask stakeholders (e.g. @aclum).
  • If it is necessary: The current referential integrity check may be inadequate (the referential integrity check was designed under the incorrect assumption that the endpoint could only be used to insert documents). In this case, revisit the referential integrity check.
  • If it is necessary: Document it (i.e. updating documents) as an option, in the endpoint's documentation that appears on Swagger UI.
  • If it is not necessary: Prohibit it and simplify the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions