-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[feature] new array
type for schema fields
#277
Conversation
- Useful for lists such as {"apikey", "key"} - Can be aliased to a comma-separated string: "apikey,key" In form-encoded mode (JSON would be a real array), the Admin API accepts the following: ```shell $ curl --url http://localhost:8001/apis/mockbin/plugins \ -d "name=keyauth" \ -d "value.key_names[1]=apikey" \ -d "value.key_names[2]=key" ``` Or: ```shell $ curl --url http://localhost:8001/apis/mockbin/plugins \ -d "name=keyauth" \ -d "value.key_names=apikey,key" \ ```
So both formats will be supported? |
That's what it says |
It should also work for curl --url http://localhost:8001/apis/mockbin/plugins \
-F "name=keyauth" \
-F "value.key_names[1]=apikey" \
-F "value.key_names[2]=key" and curl --url http://localhost:8001/apis/mockbin/plugins \
-F "name=keyauth" \
-F "value.key_names=apikey,key" |
That type of parsing happens on the Lapis side, so I'll try but it should work. |
Back in the days I had to add this to support Because for multipart data Lapis creates a table, and the value is stored inside of |
btw supporting application/json and x-www-form-urlencoded is also perfectly fine... |
I need multipart for the SSL plugin, so the users can upload their certificates |
[feature] new `array` type for schema fields
[feature] new `array` type for schema fields Former-commit-id: f8b370fea7fc518fe1e7f7ff0629b06e1250f26e
{"apikey", "key"}
"apikey,key"
In form-encoded mode (JSON would be a real array), the Admin API accepts the following:
Or: