nextcloud / tables

🍱 Nextcloud tables app
https://apps.nextcloud.com/apps/tables
GNU Affero General Public License v3.0
143 stars 24 forks source link

Remove manual json_decode in API endpoints #1206

Open provokateurin opened 2 months ago

provokateurin commented 2 months ago

In case the user wants to use endpoints where they have to send complex data they need to send it as the JSON body. Allowing to send string data and then manually decoding it is unnecessary and leads to suboptimal OpenAPI specifications. Removing that also allows typing the parameter as array which increases safety over manually checking it since the method would never be called if the input data didn't match.

blizzz commented 2 months ago

Ack, would be a breaking change though. But we can deprecate it and log a debug entry every time this is the case for so long.