-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty uris or host results in object {} instead of array [] in postgres database #2309
Comments
One other note. I originally was using JSON in a patch request to change from having a uri to an empty list of uris. |
Ah thanks for the report. While inelegant, this should eventually not be an issue for Kong. Since Lua makes no distinction between lists and hash tables, those will be inferred to empty Lua tables (empty lists) when retrieved by Kong. Eventually, using |
Thanks for the update. I found it as I was passing the JSON to a javascript application and it was expecting an array. So it displayed [object] instead of the list of values. For now I updated my code to convert {} to []. |
We'll take care of it when upgrading to the new OpenResty 1.11.2.3 |
We could fix this one now! |
Is this fixed now? I see know my using 1.11.2.4 now? |
@mynameisgv This hasn't been addressed, but considering the harmless nature of the bug, and our recent (unreleased) work on improving our DAO, it is unlikely that we will address it. |
Given that a). API are not longer a thing, and b). the new DAO codebase takes care of this, I'm going to close this stale, legacy issue :) |
Summary
Empty uris or host results in object {} instead of array [] in postgres database
Steps To Reproduce
curl -i -X POST --url http://localhost:8001/apis/ --data 'name=example-api1' --data 'hosts=example.com1' --data 'upstream_url=http://httpbin.org' --data 'uris='
Additional Details & Logs
The text was updated successfully, but these errors were encountered: