Skip to content
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

compatibility with Kong 0.14.1 #6

Open
waltari2001 opened this issue Oct 9, 2019 · 2 comments
Open

compatibility with Kong 0.14.1 #6

waltari2001 opened this issue Oct 9, 2019 · 2 comments

Comments

@waltari2001
Copy link

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!

@sec23206
Copy link

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.

schema.lua.txt

@gpetrousov
Copy link
Owner

Hi guys,

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants