pantsel / konga

More than just another GUI to Kong Admin API
MIT License
4.31k stars 826 forks source link

Allow parameters with comma on request transformer #115

Open grillorafael opened 7 years ago

grillorafael commented 7 years ago

Currently on the UI we can't have comma in the parameter but within kong request it allows us to do that.

https://getkong.org/plugins/request-transformer/

Note: if the value contains a , then the comma separated format cannot be used. 
The array notation must be used instead.

At the moment the UI breaks as two parameters instead of one.

pantsel commented 7 years ago

@grillorafael ,

Check out https://github.com/pantsel/konga#2-cant-addedit-some-plugin-properties.

You just need to press enter after every value you type. That's how konga deals with most of Kong's Api array params.

grillorafael commented 7 years ago

So I have an api parameter called eventTypes and a value can be:

eventTypes=event1,event2

screen shot 2017-10-17 at 22 08 55

what I did there was to write eventTypes:event1,event2 then hit enter. When I open the UI again that is what it shows up:

screen shot 2017-10-17 at 22 09 06

I can select comma values but it doesn't show up again and after I edit and open again and it doesn't seem to be working (passing this parameter through) it show up like that and sends only the first chip.

I can double check tomorrow

pantsel commented 7 years ago

Hmm, how about adding a chip for each eventType (eventTypes:event1 eventTypes:event2)?

That should work.

grillorafael commented 7 years ago

This would probably work but this will generate multiple parameters with the same name (Which is valid) but doesn't cover the comma separated ones

grillorafael commented 7 years ago

And btw, thanks for building Konga. Is working really well in the company here :)

pantsel commented 7 years ago

@grillorafael , thanks. Glad to help. I'll look into this issue and see what i can do about it. Thanks for the contribution with pointing it out. Obviously there are edge case scenarios that might not work as expected and I really need issues like this to point them out 👍 .

Feel free to post if you stumble across anything else. I'll deal with them asap.