Skip to content
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

stack trace in later versions of 2.0rc #1340

Closed
jnardone opened this issue Aug 4, 2020 · 7 comments
Closed

stack trace in later versions of 2.0rc #1340

jnardone opened this issue Aug 4, 2020 · 7 comments

Comments

@jnardone
Copy link

jnardone commented Aug 4, 2020

Starting in 2.0.0-rc32 or rc33 our generated documentation (which comes out of joi-to-swagger) the content no longer renders.

It simply shows

TypeError: Cannot read property 'style' of undefined
    at new e (https://mysite.io/static/redoc/redoc.standalone.js:2:742095)
    at https://mysite.io/static/redoc/redoc.standalone.js:2:749211
    at Array.map (<anonymous>)
    at e.get (https://mysite.io/static/redoc/redoc.standalone.js:2:749187)
    at e.get (https://mysite.io/static/redoc/redoc.standalone.js:2:723358)
    at https://mysite.io/static/redoc/redoc.standalone.js:2:911527
    at hs (https://mysite.io/static/redoc/redoc.standalone.js:2:498576)
    at sl (https://mysite.io/static/redoc/redoc.standalone.js:2:487712)
    at il (https://mysite.io/static/redoc/redoc.standalone.js:2:487637)
    at Ks (https://mysite.io/static/redoc/redoc.standalone.js:2:484667)

Is this a known problem? How would I troubleshoot this? The stack trace with the minified assets that we serve this with are not easy to dig through. Is there documentation on how to investigate the problem?

@KillerCodeMonkey
Copy link

KillerCodeMonkey commented Aug 5, 2020

same issue here. Setting the redoc-cli version to 0.9.8 fixed the issue for us.

So everything seems to work with redoc 2.0.0-rc.29

@pkat
Copy link

pkat commented Aug 6, 2020

I'm seeing the same error on versions between 2.0.0-rc.33 to 2.0.0-rc.36.

2.0.0-rc.31 works fine and does not show the error.

@jnardone
Copy link
Author

jnardone commented Aug 6, 2020

I can confirm this broke after rc32 for us.

@adamaltman
Copy link
Member

Can you provide us with any reproduction? (Are you able to share an OpenAPI definition that reproduces the error?)

@jnardone
Copy link
Author

Here's a copy of our .json file which works with .32 and not later.

1340.json.zip

@RomanHotsiy
Copy link
Member

You openapi definition is invalid. Parameter in can't have value "route". It should be "path". I added a fallback so redoc doesn't crash.

You can use openapi-cli to validate your definition before passing it to redoc.

@jnardone
Copy link
Author

jnardone commented Aug 19, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@adamaltman @jnardone @pkat @KillerCodeMonkey @RomanHotsiy and others