-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Description
Prerequisites
- OS: macOS
- Browser: chrome
- Version: 67
- Method of installation: npm
- Swagger-UI version: 3.17.3
- Swagger/OpenAPI version: OpenAPI 3.0
Content & configuration
Swagger UI is used inside react component. React version is ^16.3.2
Example Swagger/OpenAPI definition: https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml
Swagger-UI configuration options:
SwaggerUI({
dom_id: "#swagger",
url: spec_url,
})Describe the bug you're encountering
Impossible to specify the required parameter for routes like /get/{petId}. The UI just remove it when I'm clicking on Try it Out -> Execute button.
To reproduce...
Steps to reproduce the behavior:
- Click on any route with required parameter. E.g. /pet/{petId}
- Click "Try it out" button
- Specify pet id
- Click on "execute" button
- See error - pet id was removed, petId field is red. UI doesn't send any http request
Expected behavior
UI sends the HTTP request and display the results
Screenshots
Additional context or thoughts
This is most visible issue that have direct impact on functionality. However, there are tons of JS errors in the chrome console. They appear on almost every stage: page load, authorization modal window, submiting requests, etc.
I think most of problems come from different react versions used in app and swagger ui
Other related issues: textarea with console curl command always show curl -X "undefined" instead of actual command(HTTP request is different)