-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add swagger ui to render api docs #1418
Conversation
Hi @bashofmann. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The placement IMHO is fine. The other option would be to move it to the left and make it I'd also hide the sidebar when viewing the API. We can make kubermatic logo a link to main projects view. |
Absolutely agree with @floreks. |
+1 to |
I addressed the comments above, renamed the link to "API", moved it to the left of the footer, disabled the sidenav and made the link configurable. |
/test all |
When I add the routerlink to the logo in the NavigationComponent, I get the following error running the tests, no idea how to fix this one though:
|
I think I found it :). |
Can you regenerate |
*ngIf="showApiDocs()"> | ||
<div class="km-separator">–</div> | ||
<a routerLink="api" | ||
matTooltip="API"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't tooltip with the same message redundant?
@cschieder @maciaszczykm should we elaborate tooltip message here or remove it completely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be fine with both.
I took the package-lock.json from master, ran
|
To regenerate:
This provides the best result. ~500 lines are reasonable as it also adds the whole dependency tree of added dep. |
That seems to have made the diff even larger for me :/ |
😂 Looks like it have just swapped order of dependencies. It does that sometimes, but if you have followed my steps then it's fine. It's better to regenerate it from scratch after adding dependency. Are there any audit issues reported ( |
|
Should I update cypress in this PR? |
The other audit issue has been fixed in remarkable, but not released yet: jonschlinkert/remarkable#357. Fortunately it does not seem to be a problem in swagger: swagger-api/swagger-ui#5152. |
Why does adding Or do you mean that the route must not start with |
Ok, so the solution is quite simple. I've had to look into the code. Simply remove |
/test all |
Codecov Report
@@ Coverage Diff @@
## master #1418 +/- ##
==========================================
- Coverage 73.4% 73.19% -0.22%
==========================================
Files 205 206 +1
Lines 6288 6316 +28
Branches 582 591 +9
==========================================
+ Hits 4616 4623 +7
- Misses 1428 1452 +24
+ Partials 244 241 -3
Continue to review full report at Codecov.
|
Please rebase as the base of your branch does not contain some of the e2e fixes. |
/test all |
* Rename link * Make API link configurable in config * Link header logo to /projects * Inject document instead of using global window * Remove unnecessary polyfill
…ontroller routing /api to the kubermatic-api
a98143a
to
72abd78
Compare
Rebase done |
Can we fix the lag on the sidebar animation when you go to the API docs somehow? Also on the API page please add the usual shading to the card |
I added the box-shadow, but I'm not sure how I could improve the sidebar animation, the problem is likely that the rendering of the swagger UI that happens at the same time as the animation introduces this lag. |
/retest |
/lgtm |
LGTM label has been added. Git tree hash: 826cb5e0208f596c936f815ac8c2f146f9f154c4
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: floreks The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test pull-dashboard-e2e-test |
What this PR does / why we need it:
Add swagger ui to render api docs.
This depends on kubermatic/kubermatic#3890.
What we are not sure yet: Where would be the best place to add the link to it, Footer or SideNav?
Fixes: #1411
Release note: