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 Rest API documentation takes long time to load #56

Closed
aedelmann opened this issue Mar 9, 2016 · 4 comments · Fixed by #120
Closed

Swagger Rest API documentation takes long time to load #56

aedelmann opened this issue Mar 9, 2016 · 4 comments · Fixed by #120

Comments

@aedelmann
Copy link
Contributor

When accessing http://vorto.eclipse.org/repo/#/api, it takes ~30 seconds to load.

@aedelmann
Copy link
Contributor Author

seems like the swagger-ui.js is quite big in size (couple of MB) which takes quite a bit to download.
To resolve this, I would suggest to preload it on landing page, where it is not required immediately and has time in the background to be downloaded.

@aedelmann
Copy link
Contributor Author

Alternatively, it should be redistributed as part of the repo.

@nagavijays
Copy link

Is it possible to use different UI instead of the default.
Can I suggest https://github.com/Orange-OpenSource/angular-swagger-ui.
License: MIT
On initial test it took ~11 seconds with 6 REST endpoints.

Following are the scripts/styles used for testing. Not sure which one has got Eclipse CQ approved.

<script src="webjars/jquery/2.1.1/jquery.js"></script>
<script src="webjars/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script type="text/javascript" src="webjars/bootstrap-material-design/0.3.0/js/ripples.min.js"></script>
<script type="text/javascript" src="webjars/bootstrap-material-design/0.3.0/js/material.min.js"></script>
<script type="text/javascript" src="webjars/angularjs/1.3.8/angular.min.js"></script>
<script type="text/javascript" src="webjars/angularjs/1.3.8/angular-route.min.js"></script>
<script type="text/javascript" src="webjars/angularjs/1.3.8/angular-resource.min.js"></script>
<script type="text/javascript" src="webjars/angularjs/1.3.8/angular-sanitize.min.js"></script>
<script type="text/javascript" src="webjars/angular-swagger-ui/0.2.7/dist/scripts/swagger-ui.min.js"></script>

<link rel="stylesheet" href="webjars/bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="webjars/bootstrap-material-design/0.3.0/css/ripples.min.css">
<link rel="stylesheet" href="webjars/bootstrap-material-design/0.3.0/css/roboto.min.css">
<link rel="stylesheet" href="webjars/bootstrap-material-design/0.3.0/css/material.min.css">
<link rel="stylesheet" href="webjars/angular-swagger-ui/0.2.7/dist/css/swagger-ui.min.css">

See comparison results with current and angular-swagger ui.

Angular Swagger Results:
angular-swagger

Current Results:
swagger-ui

PS: This also solves one more issue #57

@nagavijays
Copy link

Replaced with angular swagger ui for better responsiveness.
Created pull request. CQ needs to be created.

nagavijays pushed a commit to bosch-io/vorto that referenced this issue Mar 23, 2016
…se#57, closes eclipse#56 and eclipse#57

Signed-off-by: Nagavijay Sivakumar <nagavijay.sivakumar@bosch-si.com>
nagavijays pushed a commit to bosch-io/vorto that referenced this issue Mar 23, 2016
…se#57, closes eclipse#56 and eclipse#57

Signed-off-by: Nagavijay Sivakumar <nagavijay.sivakumar@bosch-si.com>
nagavijays pushed a commit to bosch-io/vorto that referenced this issue Mar 23, 2016
…se#57, closes

eclipse#56 and eclipse#57

Signed-off-by: Nagavijay Sivakumar <nagavijay.sivakumar@bosch-si.com>
nagavijays pushed a commit to bosch-io/vorto that referenced this issue Mar 24, 2016
…se#57, closes

eclipse#56 and eclipse#57

Signed-off-by: Nagavijay Sivakumar <nagavijay.sivakumar@bosch-si.com>

Removed iframe resizer javascript. No longer used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants