apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

bug: can not set the request-validation plugin

Open idbeta opened this issue 6 years ago • 5 comments

  • Why do you submit this issue?
  • [ ] Question or discussion
  • [x] Bug
  • [ ] Requirements
  • [ ] Feature or performance improvement
  • [ ] Other

Plug-in options cannot enter content image {"code":0,"message":"","data":{"anyOf":[{"properties":{"body_schema":{"type":"object"}},"required":["body_schema"],"title":"Body schema"},{"properties":{"header_schema":{"type":"object"}},"required":["header_schema"],"title":"Header schema"}],"type":"object"},"request_id":"07f60628-7eb0-46e3-8cbf-ad5aeaa4a2f0"}

idbeta avatar Nov 12 '20 09:11 idbeta

working on this. @idbeta related issue #764 .

LiteSun avatar Nov 12 '20 09:11 LiteSun

2.1.1 version post data

{"name":"test","uris":["/test"],"methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],"plugins":{"request-validation":{"requestParams":[{"body_schema":{"key":"payload","valueType":"string","required":true}}]}},"vars":[],"upstream":{"type":"roundrobin","timeout":{"connect":6000,"send":6000,"read":6000},"nodes":[{"host":"127.0.0.1","port":7000,"weight":1}]}}

return

{"code":10000,"message":"schema validate failed: (root): Must validate at least one schema (anyOf)\n(root): body_schema is required","data":null,"request_id":"27c19b83-6276-47a6-b21d-e82d18673f8d"}

idbeta avatar Dec 03 '20 10:12 idbeta

@juzhiyuan should we fix this bug in milestone 2.2?

membphis avatar Dec 03 '20 12:12 membphis

Yep, the code mirror feature will fix this.

juzhiyuan avatar Dec 03 '20 14:12 juzhiyuan

will be fixed in #815

juzhiyuan avatar Dec 09 '20 11:12 juzhiyuan