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

Can't define defaults and one_of options for plugin configurations #93

Open
jphorec opened this issue Feb 14, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@jphorec
Copy link

jphorec commented Feb 14, 2022

When creating Lua plugins you can specify default and one_of values as such:

{
  my_param = {type = "string", one_of = { "One", "Two", "Three" }, default = "One"}
}

It would be nice if the go-pdk had an optional KongConfig struct that let you define these values on a Config and create schema outputs here https://github.com/Kong/go-pdk/blob/master/server/rpc.go#L169 in the same manner as the Lua schema definition above.

@rhzs
Copy link

rhzs commented Feb 17, 2022

sorry, noob question, what are the benefits of schema output? How can I use it?
Does the config field in struct with Go Doc doc.go enough?

@gszr gszr added the enhancement New feature or request label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants