fix(OpenApiType): Prevent making misktakes with empty JSON objects#244
fix(OpenApiType): Prevent making misktakes with empty JSON objects#244provokateurin wants to merge 1 commit intomainfrom
Conversation
Signed-off-by: provokateurin <kate@provokateurin.de>
75f8f8f to
5babd74
Compare
Well looking at the error:
I know what the problem is… But we can not fix it. Changing this is a breaking API change that might even break out mobile apps. Also returning When |
Why would it be one?
I'd actually think it's the opposite, since the clients probably expect
No the case anymore since almost two years (for exactly this reason): nextcloud/server#38745 |
|
Just thought of another edge-case that isn't handled by this change: |
|
And something like |
This was always the case since 6 years on the API so clients check for it. I asked Ivan for a pointer to the code. |
Fixes #26
While this is the right approach to achieve correctness, it results in many changes (albeit simple, they are very repetitive) and for example core has this diff:
With this Talk has 16 new errors and the rest of server (without core) has 35 new errors in total. So I'm not really sure if it's worth it, especially because it is not so easy to understand why it is necessary, if you are not already familiar with the topic, so it might be harder for community people (but ofc documentation will be added).