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

enabled_in_cluster should be an empty JSON array #2982

Closed
hbagdi opened this issue Oct 24, 2017 · 1 comment
Closed

enabled_in_cluster should be an empty JSON array #2982

hbagdi opened this issue Oct 24, 2017 · 1 comment
Labels
good first issue Issues that beginners/volunteers can easily help with. task/bug

Comments

@hbagdi
Copy link
Member

hbagdi commented Oct 24, 2017

Summary

enabled_in_cluster field in GET / should return an empty JSON array if there are no plugins configured. Currently, returns an empty JSON Object instead.

Steps To Reproduce

  1. Start kong
  2. GET / on admin API port

The plugins.enabled_in_cluster field is a JSON object if there are no plugins configured in Kong.

.
.
"plugins": {
        "enabled_in_cluster": {},
        "available_on_server": 
.
.

But it returns an array of strings if there is a single (or multiple) plugins present:

.
.
"plugins": {
        "enabled_in_cluster": [
            "rate-limiting"
        ],
        "available_on_server": 
.
.

This should be consistent and return an empty array in the former case as (de)serialization gets more complicated for an SDK library.

Additional Details & Logs

  • Kong version 0.11.0
  • Operating System macOs
@kikito kikito added the good first issue Issues that beginners/volunteers can easily help with. label Nov 1, 2017
@thibaultcha
Copy link
Member

@hbagdi Thank you for the fix! It will be included in our next release.

thibaultcha pushed a commit that referenced this issue Nov 2, 2017
Fix #2982

Signed-off-by: Thibault Charbonnier <thibaultcha@me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that beginners/volunteers can easily help with. task/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants