You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is confusing. I read through Kong's documentation about the structure of schema.lua and added lines from their sample which were missing to see if perhaps the new version mandates them. I even tried modifying the example to remove the use of local variables and inserted the information from colon_string_record and colon_string_array down in the "main" section to make it align with how Kong's document describes. I even thought maybe there was something about non-alpha characters in the config field name, so I changed 'rename_body_key' to 'bodykeys', but I still get the same error.
{"config.bodykeys":"bodykeys is an unknown field"}
I've attached the version of schema.lua that I tried ... I assume the braces all line up, else I would have got some error when Kong tried to load plug-in code.
It's been a while since I ran the plugin and there is a possibility that something has changed in the latest versions of Kong, can't say for sure since I'm not actively using it.
Are you sure you are providing the configuration correctly when loading the plugin using --data "config.rename_body_key.json=userId:uID"? Perhaps you could add some debug messages to see the value of the missing key. You'll be able to see those messages when the body of the plugin is executed in the terminal.
You're welcome to open a PR if you find what works for you :)
Hi,
I have successful loaded the plugin but when I tried to apply it to any resource, I keep getting:
{"config.rename_body_key":"rename_body_key is an unknown field"}
Thanks!
The text was updated successfully, but these errors were encountered: