-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Closed
Description
Q&A (please complete the following information)
- OS: macOS
- Browser: chrome
- Version: 106.0.5249.91 (Official Build) (arm64)
- Method of installation: npm
- Swagger-UI version: 4.14.2
- Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration
Example Swagger/OpenAPI definition:
openapi: 3.0.1
info:
title: Swagger Petstore
version: 1.0.0
tags:
- name: pet
description: Everything about your Pets
paths:
/pet:
post:
tags:
- pet
operationId: addPet
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/BodyParameter'
required: true
responses:
405:
description: Invalid input
content: {}
components:
schemas:
BodyParameter:
required:
- bodyParameter
type: object
properties:
bodyParameter:
type: string
default: defaultSwagger-UI configuration options:
window.onload = function() {
window["SwaggerUIBundle"] = window["swagger-ui-bundle"]
window["SwaggerUIStandalonePreset"] = window["swagger-ui-standalone-preset"]
// Build a system
const ui = SwaggerUIBundle({
url: "./test.yaml",
dom_id: "#swagger-ui",
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
// requestSnippetsEnabled: true,
layout: "StandaloneLayout"
})
window.ui = ui
}Describe the bug you're encountering
I cannot pass a required validation of the field which has a default value after clicking the Reset button
To reproduce...
- push
Try it out - edit Request Body parameter
- push
Reset - push
Execute - see validation error although the input field is reseted and has default value
Expected behavior
pass the validation
Screenshots
Additional context or thoughts
Metadata
Metadata
Assignees
Labels
No labels
