openfire-restAPI-plugin icon indicating copy to clipboard operation
openfire-restAPI-plugin copied to clipboard

Update System Property endpoint requires keyname twice

Open Fishbowler opened this issue 3 years ago • 1 comments

The definition for updating a System Property requires that the key of the property is provided both in the path, and in the PUT body. This is appears to only be used for checking that the user entered the value correctly twice.

To retain the restful interface, the property key makes sense to be on the path, which leaves only the property value in the body. This breaks the natural Entity pattern, which we've retained elsewhere (e.g. updating a group, where the name is both in the path and the body).

This feels "awkward" to use, but also happy to accept a close/wontfix if the consistency of pattern & usage is more important.

Fishbowler avatar Jan 13 '22 23:01 Fishbowler

I've seen the same pattern used elsewhere (group names / roster entities, I think). I agree that it's awkward. Retaining backwards compatibility is important though (although silently ignoring something that was previously required might still be considered 'compatible'?)

guusdk avatar Jan 19 '22 09:01 guusdk