-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Required Header Param Resets State without Executing #4845
Comments
It actually looks like none of the params are being used. Even optional ones. The params appear in the UI, but don't get used in the CURL request. It's really strange, maybe I'm doing something wrong. Still trying to troubleshoot this. |
My issue must be related to #4745 I was using iframes with swagger 2, but hoped I'd be able to move away from it since I'm using react and this is built with react now.... I'll try with the old iframe approach though. |
I'm using react 16, but since this requires 15, i guess there isn't a clean way to provide my custom layout component from within my project. Seems best solution is using an iframe with the dist bundle and css to hide all the unwanted pieces of the UI. |
@calmdev, you're correct - React 16 currently has some problems with Swagger UI. Check back in a couple of months: we're currently having some internal discussions about creating a specific flavor of the UI/Editor module for React users, which exposes a component that you can use regardless of your React version. |
That'd be great. I'll keep any eye out for it. For now, I've forked the repo to create a custom standalone build that's loaded using an iframe. |
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
Swagger-UI configuration options:
Describe the bug you're encountering
When a required header is added to list of parameters the state is reset when Execute is clicked.
To reproduce...
Steps to reproduce the behavior:
Expected behavior
The request is executed and includes use of the required header.
Screenshots
Additional context or thoughts
Setting the header param to
required: false
executes the request, but doesn't include the header.The text was updated successfully, but these errors were encountered: