docusaurus-openapi-docs icon indicating copy to clipboard operation
docusaurus-openapi-docs copied to clipboard

API call made on show params

Open Pratosh22 opened this issue 10 months ago • 4 comments

Describe the bug

When show optional parameters is clicked on request form, it makes an API call, which is not expected.

Expected behavior

API call should not be made, it should be made only on pressing the SEND API BUTTON

Current behavior

API call made on clicking show optional params

Possible solution

Set Response action is dispatched, which should ideally not be dispatched in this case

Screenshots

https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/assets/76246084/7031f864-1556-4035-9a14-4f85593fbcc9

Your Environment

  • Version used: 2.1.3
  • Operating System and version (desktop or mobile):MacOS

Pratosh22 avatar Apr 10 '24 19:04 Pratosh22

@blindaa121 seems similar to #796, any idea why we're just noticing this issue? Is it reproducible on pan.dev?

sserrata avatar Apr 12 '24 14:04 sserrata

@sserrata Hmm.. yeah let me look into this one. Issue is reproducible on pan.dev as well

blindaa121 avatar Apr 12 '24 17:04 blindaa121

Hi @sserrata @blindaa121 the issue here is that this button are in form tag and their default types are type="submit". We need to check and change them to type="button" or remove the form tag :).

stakoov avatar Apr 16 '24 13:04 stakoov

@blindaa121 Are you still working on this one?

sserrata avatar Jun 28 '24 15:06 sserrata