imjoey opened a new issue #2432:
URL: https://github.com/apache/apisix/issues/2432
Part of #2082 .
Current request-validation schema definition is shown as below:
```json
{
"anyOf": [
{
"required": [
"body_schema"
]
},
{
"required": [
"header_schema"
]
}
],
"properties": {
"body_schema": {
"type": "object"
},
"header_schema": {
"type": "object"
}
},
"type": "object"
}
```
The definition should be changed to:
```json
{
"anyOf":[
{
"title": "Body schema",
"properties":{
"body_schema":{
"type":"object"
}
},
"required":[
"body_schema"
]
},
{
"title": "Header schema",
"properties":{
"header_schema":{
"type":"object"
}
},
"required":[
"header_schema"
]
}
],
"type": "object"
}
```
**BTW**:
Honestly, after the schema has been updated, we are still not be able to
input anything for `header_schema` and `body_schema` fields. See the snapshot
below:

The reason is that both `body_schema` and `header_schema` are of `object`
type without any `properties` defined, while the react-jsonschema-form library
will not show any input fields for them. I tried to refer to
https://react-jsonschema-form.readthedocs.io/en/v1.8.1/form-customization/ ,
unfortunately there seems no way to make use of `uiSchema` to solve this
problem.
After discussed with @liuxiran , in order to make it happen that we could
define the schema on the web, we also need to customize the dashboard UI, as
well as well design the `header_schema` and `body_schema` data structures
submitted to APISIX. That could be committed to dashboard project following
this issue got fixed.
----------------------------------------------------------------
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]