-
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
feat(admin) implement inferring, endpoint key and put support #3416
Conversation
it("infers nulls from empty strings, arrays or sets", function() | ||
assert.equal(ngx.null, infer_value("", { type = "string" })) | ||
assert.equal(ngx.null, infer_value("", { type = "array" })) | ||
assert.equal(ngx.null, infer_value("", { type = "set" })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If feels weird that infer_value
returns null when it encounters "" for arrays and sets, but not for maps or records (for which it returns "" instead)
@hishamhm, what is your opinion on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
""
for maps and records should infer null
as well.
80d6729
to
2de376b
Compare
2de376b
to
de7e0f4
Compare
Nice! 👍 |
See Kong/kong#3416 Signed-off-by: Thibault Charbonnier <thibaultcha@me.com>
See Kong/kong#3416 Signed-off-by: Thibault Charbonnier <thibaultcha@me.com>
See Kong/kong#3416 Signed-off-by: Thibault Charbonnier <thibaultcha@me.com>
See Kong/kong#3416 Signed-off-by: Thibault Charbonnier <thibaultcha@me.com>
See Kong/kong#3416 Signed-off-by: Thibault Charbonnier <thibaultcha@me.com>
See Kong/kong#3416 Signed-off-by: Thibault Charbonnier <thibaultcha@me.com>
Summary
This PR enhances our new model autogenerated Admin API in several ways:
application/x-www-form-urlencoded
that takes into account information from schemasendpoint_key
parameter in schemas that can be pointed to any unique field (allows us to e.g. autogenerate/consumers/<uuid-or-username>
)PUT
support (by<uuid>
or by<schema.endpoint_key>
(aka unique)Issues resolved
Fix #3378
It will also close these when the respective entities are moved to new model:
Fix (or make obsolete) #3183
Fix (or make obsolete) #3168