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

Swagger documentation method expanding links do not work #2211

Closed
kyyberi opened this issue Mar 1, 2017 · 7 comments
Closed

Swagger documentation method expanding links do not work #2211

kyyberi opened this issue Mar 1, 2017 · 7 comments

Comments

@kyyberi
Copy link

kyyberi commented Mar 1, 2017

Steps

  1. Visit https://nightly.apinf.io
  2. Navigate to "Ampersand test" API documentation tab
  3. Try to click links identified in the below pic.
    kuvakaappaus 2017-03-01 15-14-48

Actual Result

Nothing happens.

Expected Result

It should list the methods as below for APIs operations list (from swaggerhub documentation viewer):
kuvakaappaus 2017-03-01 15-23-16

@kyyberi kyyberi added the bug label Mar 1, 2017
@marla-singer
Copy link
Contributor

marla-singer commented Mar 2, 2017

@kyyberi @bajiat Checked a browser console. It throws the errors:

  • When you open an API page with uploaded swagger doc, an error is
    Uncaught TypeError: $.param.fragment is not a function(…)
  • When you click on a link, an error is
    Cannot read property 'pushState' of undefined(…)

Tried to find the same bugs. Could find this one swagger-api/swagger-ui#551 (comment)

@philippeluickx
Copy link
Contributor

From #2102

Getting error in my console when clicking show/hide (Swagger viewer):

35d5778….js?meteor_js_resource=true:21
Uncaught TypeError: Cannot read property 'pushState' of undefined()
toggleEndpointListForResource @ 35d5778….js?meteor_js_resource=true:21
callDocs @ 35d5778….js?meteor_js_resource=true:22
dispatch @ 35d5778….js?meteor_js_resource=true:30
m.handle @ 35d5778….js?meteor_js_resource=true:30

Update: also same error when clicking on "POST" or "GET" etc. when trying to close it.

@marla-singer
Copy link
Contributor

@brylie Now we have the three different required jQuery:

  1. jquery-bbq module installs and uses the local jQuery library version 1.x (the first one)
  2. swagger-ui-browserify module installs and uses the local jQuery library version 1.x (the second one). But this module needs to use the patched jquery by jquery-bbq ($.param.fragment function)
  3. jQuery module by 2.x version is installed in our project.

The solution is downgrade jQuery version in our project and re-install node packages. In this case, jquery-bbq and swagger-ui-browserify will not install jQuery on local folder and will use jQuery from our project.

@brylie
Copy link
Contributor

brylie commented Mar 20, 2017

The solution is downgrade jQuery version in our project and re-install node packages.

I am not sure that we should choose that solution. In general, we are trying to keep our dependencies up to date, so downgrading jQuery would be contrary to those efforts.

@brylie
Copy link
Contributor

brylie commented Mar 20, 2017

For reference, we have opened an upstream issue regarding jQuery BBQ, which was closed some time ago. I requested the issue be re-opened.

@marla-singer
Copy link
Contributor

@bajiat We can close it because that was resolved also on apinf.io site because we are using a new Swagger UI

@bajiat
Copy link
Contributor

bajiat commented Jun 21, 2017

Closing as per suggestion.

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

No branches or pull requests

5 participants