v3 spec rendered as v2 on re-initialization
See original GitHub issueQ&A (please complete the following information)
- OS: macOS 10.14
- Browser: Firefox, Chrome
- Version: 57, 68
- Method of installation: npm
- Swagger-UI version: 3.18.3
- Swagger/OpenAPI version: OpenAPI 3.0.1
Describe the bug you’re encountering
When initially loading below example, the spec is detected as 3.0, but after calling SwaggerUIBundle
a second time, the spec is detected as 2.0 as seen by the OAS3 badge disappearing and the authorization functionality not working. I observe this bug in a react application where it shows on every component mount after the first one. I tried with both swagger-ui
and swagger-ui-dist
, both seem affected.
To reproduce…
- open https://codesandbox.io/s/yk6zo1w3kx
- hit the “initialize” button
- observe OAS3 badge disappearing
Expected behavior
The spec should be detected as OAS3 on subsequent calls to SwaggerUI
or SwaggerUIBundle
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How to test whether right template is rendered (RSpec Rails)?
If you want to test that the controller renders the correct template you would do it in a controller spec instead. require 'rails_helper'...
Read more >Previous render sometimes leaking into next test #716 - GitHub
I'm using: @testing-library/react version: 12.0.0; Testing Framework and version: jest 26.6.3; DOM Environment: jsdom ...
Read more >MockRender - advanced rendering in Angular tests - ng-mocks
Advanced rendering in Angular tests is provided via MockRender function. MockRender helps when you want to assert Inputs , Outputs ...
Read more >Manage render files in Final Cut Pro - Apple Support
In Final Cut Pro, render all or part of a project so that it plays back in real time at high quality. Delete...
Read more >reCAPTCHA v3 - Google Developers
reCAPTCHA v3 returns a score for each request without user friction. The score is based on interactions with your site and enables you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I agree - my apologies @brudnyhenry, we took the wrong direction with your ticket!
This has been highly prioritized, so it should be fixed soon 😄
Spent some time on this over the week - no resolution yet.
Current line of thought is that object inheritance is affecting the plugin source (possibly the
delete
statements in dc9e5ad9), so that we get a different result the second time around.