-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Use plain form parameters when valuing the properties of a plugin #70
Comments
The solution I decided to adopt is to set the plugins properties using the dot notation like curl -d 'name=ratelimiting&api_id=ID&value.period=second&value.limit=10' http://127.0.0.1:8001/plugins/ |
I don't like |
Since schemas can support sub-schemas, and sub-schemas could support other sub-schemas (since they're just plain schemas), using just the property name is not enough and could cause name clashes. Using dot-notation fixes this problem, for example:
|
This commit fixes a problem when tracing TCP traffic, and adds an integration test which exercises that branch.
This commit fixes a problem when tracing TCP traffic, and adds an integration test which exercises that branch.
Right now the plugin-related properties are sent as a JSON object in a
value
form field, like:curl -d 'name=ratelimiting&api_id=ID&value={"period":"second", "limit": 10}' http://127.0.0.1:8001/plugins/
I believe that accepting those parameters in plain form values instead of encoding them into a JSON object will make the interface cleaner, so the same request becomes:
curl -d 'name=ratelimiting&api_id=ID&period=second&limit=10' http://127.0.0.1:8001/plugins/
Internally nothing will change in the way we validate the schema. Thoughts? @thibaultcha
The text was updated successfully, but these errors were encountered: