You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
openapi: 3.0.3info:
title: Test APIversion: 1.0.0paths:
/users:
post:
summary: Create a userdescription: Create a user, one of various waysrequestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/UserSource'responses:
'204':
description: Successfully opened document'400':
description: Invalid requestcontent:
application/json:
schema:
properties:
output:
type: stringexample: "Invalid request"components:
schemas:
UserSource:
type: objectproperties:
name:
description: Full nametype: stringexample: "John Smith"badgeid:
description: Badge numbertype: integerformat: uint32example: 959310email:
description: E-mailtype: stringexample: "jsmith@business.com"minProperties: 1maxProperties: 1
Describe the bug you're encountering
When the Reset button is used on a Try It Out form with optional parameters with default values, it creates a strange invalid state on the form.
'Send empty value' checkbox becomes checked, even though the form values were reset to their defaults
-> normally, the checkbox is greyed out / off, when there is a value in the field (as it has no purpose if the field is populated)
The request it builds does not reflect the state of the fields - it doesn't send the repopulated default values, and it also doesn't send empty values (contrary to the checkbox states). If you manually re-enter one of the form values, it will send only that parameter, although the form looks like it would send all of them.
To reproduce...
Steps to reproduce the behavior:
Try the provided yaml, e.g. in Swagger Editor online
Expand the single POST request
Click 'Try It Out'
Click 'Reset'
Expected behavior
(1) Parameters should be reset to their default values in the UI
(2) "Send empty value" should be unchecked and disabled for all fields with default values set
(3) Clicking Execute should build a request with all parameters set to their values seen in the form
(Instead, only (1) is true.)
Screenshots
The text was updated successfully, but these errors were encountered:
(Note: the screenshot shows the state after I've taken two additional steps after the repro, to show how the request gets generated):
5. Re-enter "Badge number"
6. Click "Execute"
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
Describe the bug you're encountering
When the Reset button is used on a Try It Out form with optional parameters with default values, it creates a strange invalid state on the form.
-> normally, the checkbox is greyed out / off, when there is a value in the field (as it has no purpose if the field is populated)
To reproduce...
Steps to reproduce the behavior:
Expected behavior
(1) Parameters should be reset to their default values in the UI
(2) "Send empty value" should be unchecked and disabled for all fields with default values set
(3) Clicking Execute should build a request with all parameters set to their values seen in the form
(Instead, only (1) is true.)
Screenshots
The text was updated successfully, but these errors were encountered: