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

fix(api): schema violation when validating valid plugin configuration #11091

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

catbro666
Copy link
Contributor

@catbro666 catbro666 commented Jun 21, 2023

Summary

parse_params should not call normalize_nested_params for application/json. Otherwise, the key-value pair of custom_fields_by_lua will be converted into a nested table if the key contains dot character(s), which will cause schema violation when calling /schemas/plugins/validate

Checklist

  • The Pull Request has tests
  • There's an entry in the CHANGELOG

Full changelog

  • Fix an issue where /schemas/plugins/validate endpoint fails to validate valid plugin configuration when the key of custom_fields_by_lua contains dot character(s).

Issue reference

Fix FTI-5070

…json`

otherwise, the key-value pair of `custom_fields_by_lua` will be converted
into nested table if the key contains dot character(s), which will cause
schema violation when calling `/schemas/plugins/validate`

Fix [FTI-5070](https://konghq.atlassian.net/browse/FTI-5070)
@catbro666 catbro666 force-pushed the fix-parse-params-application-json branch from b768b39 to 762f9e7 Compare June 21, 2023 06:02
@catbro666 catbro666 changed the title fix(api): should not call normalize_nested_params for application/json fix(api): schema violation when validating valid plugin configuration Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants