bug: can not set the request-validation plugin
- Why do you submit this issue?
- [ ] Question or discussion
- [x] Bug
- [ ] Requirements
- [ ] Feature or performance improvement
- [ ] Other
Plug-in options cannot enter content
{"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"}
working on this. @idbeta related issue #764 .
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"}
@juzhiyuan should we fix this bug in milestone 2.2?
Yep, the code mirror feature will fix this.
will be fixed in #815