-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Open
Description
Q&A (please complete the following information)
- OS: macOS
- Browser: chrome
- Version: latest
- Method of installation: source code debug
- Swagger-UI version: latest
- Swagger/OpenAPI version: Swagger 2.0, OpenAPI 3.0
Content & configuration
The code to get the validation error list in src/core/components/param-body.jsx
// line 110 - 111
let parameter = specSelectors ? specSelectors.parameterWithMetaByIdentity(pathMethod, param) : param
let errors = parameter.get("errors", List())seems can't get the error list set in the [VALIDATE_PARAMS] reducer. While I changed it to
// line 111
let errors = param.get("errors", List())to get the error list directly from the param variable, and it worked.
I think this may be a defect and don't know why this specSelectors.parameterWithMetaByIdentity(pathMethod, param) is necessary. Please take a look.
Example Swagger/OpenAPI definition:
# your YAML hereSwagger-UI configuration options:
SwaggerUI({
// your config options here
})?yourQueryStringConfig
Describe the bug you're encountering
To reproduce...
Steps to reproduce the behavior:
- Go to 'petstore'
- Scroll down to 'any api with additional body parameter'
- Change it's json body to any invalid format
- Click on
Execute
Expected behavior
There would be some feedback on the page
Screenshots
Additional context or thoughts
If the param-body gets the errors correctly, there would be a hint on the page indicating the param error for #6295.
And if the error messages can be displayed on the page, it would be even better.
Metadata
Metadata
Assignees
Labels
No labels