Skip to content

MCR-3889 REST API v2 validate object against XML schema on PUT - #3192

Merged
kkrebs merged 2 commits into
2023.06.xfrom
issues/MCR-3889-REST_PUT_object_not_schema_validated
Oct 28, 2026
Merged

kkrebs merged 2 commits into
2023.06.xfrom
issues/MCR-3889-REST_PUT_object_not_schema_validated

Conversation

@sebhofmann

Copy link
Copy Markdown
Member

Link to jira

PUT /objects/{id} parsed the body with the non validating parser, so a body that violates the XML schema was accepted as long as MCRObject.validate() passed. It now uses the validating parser, like POST does. An invalid body is answered with 400 and MCROBJECT_INVALID through the existing error handling.

PUT /objects/{id}/metadata is not changed, see the ticket.

Pull Request Checklist (Author)

Ticket & Documentation

  • The issue in the ticket is clearly described and the solution is documented.

Bugfix-Specific Checks

  • Minimal code changes were made (no refactoring).
  • This PR truly fixes only the reported bug.

Testing

  • I have tested the changes locally. (module compiles, tests not run yet, no test added)

@sebhofmann
sebhofmann requested a review from rsteph-de October 26, 2026 16:23
@sebhofmann
sebhofmann force-pushed the issues/MCR-3889-REST_PUT_object_not_schema_validated branch from 794f128 to 33994fd Compare October 26, 2026 16:24
@sebhofmann
sebhofmann changed the base branch from main to 2023.06.x October 26, 2026 16:24
@kkrebs
kkrebs merged commit 30a88a4 into 2023.06.x Oct 28, 2026
3 checks passed
@kkrebs
kkrebs deleted the issues/MCR-3889-REST_PUT_object_not_schema_validated branch October 28, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants