Forum Discussion

d95776's avatar
d95776
New Member
5 years ago

what's the best way to customize cancel button behavior

We include the example data in our swagger file. After the swagger file is loaded into swagger UI, when an end user clicks "Try it out" button, the example data shows up as the default values of each fields (parameters, headers, or body). For now so far, so good. 

Then the end user may modify the example values to what ever he/she likes and runs the execution. That's good too.

now the end user wants to recover all of the tests data back to the example data we provided in the swagger file. How can we achieve that? I tried the cancel button but the cancel button does not recover the test data back to the example values and whatever the user entered data are maintained by swagger UI. Here are my questions:

1. where does swagger UI store the end user entered data such that from where we can recover them to the example values?

2. what's the best way or recommended way to customize the cancel button in swagger UI to meet our end user requirements?

 

No RepliesBe the first to reply