apisix
apisix copied to clipboard
help request: customize error msg when using `request-validation` plugin for validation
Description
request-validation 插件作为验证,是否可以为 字段 自定义错误信息
如: title 我想显示 标题不正确
我似乎没有找到相关的文档
apache/apisix-dashboard#2479
Environment
官方docker镜像: apache/apisix:2.14.1-centos
docker pull apache/apisix:2.14.1-centos
- APISIX version (run
apisix version):/usr/local/openresty/luajit/bin/luajit ./apisix/cli/apisix.lua version 2.14.1 - Operating system (run
uname -a): - OpenResty / Nginx version (run
openresty -Vornginx -V): - etcd version, if relevant (run
curl http://127.0.0.1:9090/v1/server_info): - APISIX Dashboard version, if relevant:
v2.13 - Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run
luarocks --version):
try: https://github.com/apache/apisix/blob/master/docs/en/latest/terminology/plugin.md#plugin-common-configuration
try: https://github.com/apache/apisix/blob/master/docs/en/latest/terminology/plugin.md#plugin-common-configuration
这个作用域好像是建立在插件上,但是如何给出验证不过的字段然后定义错误信息呢? 如下
title不正确,我想给出的提示语: 标题不正确description不正确,我想给出的提示语: 描述信息错误
这个作用域好像是建立在插件上,但是如何给出验证不过的字段然后定义错误信息呢? 如下
title不正确,我想给出的提示语: 标题不正确description不正确,我想给出的提示语: 描述信息错误
I remember that jsonschema validation failure can give details, so maybe we can throw out the details.
I remember that jsonschema validation failure can give details, so maybe we can throw out the details.
Maybe we can take care of this detailed information.
IMHO The JSON schema validation failure error message is not so straightforward and it's lenthy.
This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.
这个 issue 是否活跃?