Skip to content

Commit

Permalink
bugfix: modify json schema definition for plugin request-validation (#…
Browse files Browse the repository at this point in the history
…2451)

fix #2432 .
  • Loading branch information
fukiki authored Oct 19, 2020
1 parent 26ad5cf commit cb04193
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions apisix/plugins/request-validation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,21 @@ local io = io

local schema = {
type = "object",
properties = {
body_schema = {type = "object"},
header_schema = {type = "object"}
},
anyOf = {
{required = {"body_schema"}},
{required = {"header_schema"}}
{
title = "Body schema",
properties = {
body_schema = {type = "object"}
},
required = {"body_schema"}
},
{
title = "Header schema",
properties = {
header_schema = {type = "object"}
},
required = {"header_schema"}
}
}
}

Expand Down

0 comments on commit cb04193

Please sign in to comment.