Skip to content
Permalink
Browse files

feat(schema) allow conditional validators to mark fields as required

  • Loading branch information...
kikito authored and hishamhm committed Jul 27, 2018
1 parent 909914a commit 6d1707c41d0a0c0b72c32498c642f80b53f34168
Showing with 1 addition and 1 deletion.
  1. +1 −1 kong/db/schema/metaschema.lua
@@ -88,7 +88,7 @@ table.insert(field_schema, { keys = { type = "record", fields = field_schema
table.insert(field_schema, { values = { type = "record", fields = field_schema } })
table.insert(field_schema, { fields = fields_array })

local conditional_validators = {}
local conditional_validators = { required = { type = "boolean" } }

This comment has been minimized.

Copy link
@thibaultcha

thibaultcha Aug 1, 2018

Member

Was no unit test provided for this change?

for _, field in ipairs(validators) do
table.insert(conditional_validators, field)
end

0 comments on commit 6d1707c

Please sign in to comment.
You can’t perform that action at this time.