Details
-
Bug
-
Status: Closed (View Workflow)
-
TBD
-
Resolution: Done
-
None
-
CP: Roadmap backlog
-
2
-
Core: Platform
Description
Working on MODINVSTOR-392 I have faced with the issue that RMB is not able to handle readonly sub-fields, i.e.:
// Item { "status": { "description": "The status of the item", "type": "object", "properties": { "name": { "description": "Name of the status e.g. Available, Checked out, In transit", "type": "string" }, "date": { // <-- date here is readonly. "description": "Date and time when the status was last changed", "type": "string", "format": "date-time", "readonly": true } }, "additionalProperties": false } }
As you can see status.date here is read only field. however status.name is not.
The issue seems here RestVerticle.java#L1506.
RMB tries to remove the field:
((JsonObject)content).remove(cv.getPropertyPath().toString());
But cv.getPropertyPath() has status.date value, which is not valid argument for the remove method and it should be content.getJsonObject("status").remove("date") instead.
TestRail: Results
Attachments
Issue Links
- relates to
-
MODINVSTOR-392 Make item.status.date read only field.
-
- Closed
-