fix: inappropriate handling of escaped query arguments
The list(s) endpoints receive a JSON encoded list of URLs as a query
param. Because it's a query param, it's escaped, so the json_decode
method can't decode it without first calling urldecode.
Also, the POST versions were accessing the elments as if they were the
strings, rather than objects of the shape {'url':'<url>'}.
| Q | A |
|---|---|
| Bug fix? | yes |
| New feature? | yes/no |
| BC breaks? | yes/no |
| Deprecations? | yes/no |
| Tests pass? | yes/no |
| Documentation | yes/no |
| Translation | yes/no |
| CHANGELOG.md | yes/no |
| License | MIT |
Fixes #6928 Tested locally on my instance. I hope the CI will catch any pieces lost in translation :)
I've checked it locally and in fact, it's just the OpenAPI example which is wrong.
It's not [{'url': 'http://...'}, {'url': 'http://...'}] but it must be ['http://...', 'http://...'] instead.
The array must be an array of urls. Try it on your side with the proper array and you'll see it'll works as expected.
All in all, you spotted a problem in the API document. Can you convert bad array to the proper one? Thanks
@Oppen @j0k3r do we agree that this, "as is", should be closed, and a PR fixing the API documentation should replace it?
@yguedidi yep!