question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v3 spec rendered as v2 on re-initialization

See original GitHub issue

Q&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…

  1. open https://codesandbox.io/s/yk6zo1w3kx
  2. hit the “initialize” button
  3. observe OAS3 badge disappearing

Expected behavior

The spec should be detected as OAS3 on subsequent calls to SwaggerUI or SwaggerUIBundle.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
shockeycommented, Sep 20, 2018

I agree - my apologies @brudnyhenry, we took the wrong direction with your ticket!

This has been highly prioritized, so it should be fixed soon 😄

1reaction
shockeycommented, Sep 29, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found