liuxiran commented on issue #2082:
URL: https://github.com/apache/apisix/issues/2082#issuecomment-722881856
> > Should I transform `request-validation` request?
>
> What's the correct data format for this plugin? cc @liuxiran
yep, request and response transform are also needed, we should transform the
data got from schema form to:
```json
{
"body_scheme"?: {
"type": "object",
"required": $key[], // the $key which required: true
"properties": {
[$key]: {
"type": [$valueType],
[$otherkey defined in dependencies]: [$value]
}
}
},
"header_schema"?:{
the same with body_schema
}
}
```
and transform the data got from API to
```json
{
"requestParams": [
{
"body_schema": {
"key": xxx,
"valueType": "",
....
}
},
{
"header_schema":{}
}
...
]
}
```
The reason is that fe need schema UI form to help user deine what the
parameter verify schema looks like. pass a schema definition to api.
@juzhiyuan @LiteSun
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]