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

WIP(swagger-ui): Upgrade to v3 #209

Closed
wants to merge 2 commits into from

Conversation

STRML
Copy link
Member

@STRML STRML commented Apr 7, 2017

This is a work in progress; please don't merge yet.

V3 brings with it some major changes. Most of the changes are great.

Issues blocking release in loopback-component-explorer:

The npm package no longer exports a bundle. I'm not sure if this is intentional. For this reason, I've added a dev-only script to copy from github releases.

@bajtos
Copy link
Member

bajtos commented Apr 10, 2017

Great stuff, @STRML! Let us know when the pull request is ready for review.

@STRML
Copy link
Member Author

STRML commented Apr 10, 2017

Will do. We'll want to wait a few weeks for Swagger-UI v3 to stabilize. Minor releases are still shipping some pretty fundamental bugfixes. But after that, it should be quite nice.

zelima added a commit to datopian/datahub-docs-tech that referenced this pull request Apr 26, 2017
- typo fix in side menu
- intro text taks about publishing flow
- API link to the internal docs (explained)
- removed datastore link as does not belong there

Note: that exact Links for the API docs are not yet there as Swagger 3.0 Do not support shebang URLs at this moment. There is an existing PR for this and hopefully will be fixed soon strongloop/loopback-component-explorer#209
@shockey
Copy link

shockey commented May 2, 2017

Hi everyone! Jumping in from Swagger-land to share some good news....

The npm package no longer exports a bundle. I'm not sure if this is intentional. For this reason, I've added a dev-only script to copy from github releases.

In 3.0.7 we started maintaining a swagger-ui-dist package that exports our entire dist folder, in the style of 2.x 😄

@bajtos
Copy link
Member

bajtos commented Jul 25, 2017

@STRML ping, what's the status of this pull request? Has Swagger-UI v3 stabilized yet?

@bajtos
Copy link
Member

bajtos commented Sep 11, 2017

Hey @STRML, what's the status of this pull request? Are you still keen to get it finished? Should we close it as abandoned?

@STRML
Copy link
Member Author

STRML commented Sep 11, 2017

Hey - I definitely want to get this through, had really just gotten busy and forgotten about it, and the earlier dist issue required a hack I really didn't want to get merged.

Now that it's resolved I'm going to take another look today and push up something mergeable.

@STRML STRML force-pushed the feature/swagger-ui-3 branch 2 times, most recently from 9efe75f to 731b5f0 Compare September 11, 2017 12:24
@bajtos bajtos added the stale label Sep 11, 2017
@STRML
Copy link
Member Author

STRML commented Sep 11, 2017

Ok, the latest push gets us to a working setup, and we're much more in-line with base Swagger-UI (fewer customizations).

Swagger-UI 3 has a lot more customizability than previous versions, so I've added the ability to write options to window.swaggerUIOptions. These options will take priority over the defaults.

screen shot 2017-09-11 at 7 51 31 am

screen shot 2017-09-11 at 7 51 37 am

Syntax highlighting is partially in (microlight is running) but it's very limited (swagger-api/swagger-ui#3189). Additionally, highlightSizeThreshold is still not in.

Authorization is an issue.

We're going to require strongloop/loopback-swagger#65 be fixed (securityDefinitions) in order for the native "Authorize" popup to show:

screen shot 2017-09-11 at 7 58 33 am

screen shot 2017-09-11 at 7 58 37 am

@stale stale bot removed the stale label Sep 11, 2017
@bajtos
Copy link
Member

bajtos commented Sep 12, 2017

@STRML thank you for the update, looks like there is quite a lot of work needed to make this happen. From custom style to authorization support. Do you have bandwidth to implement these changes?

@STRML
Copy link
Member Author

STRML commented Sep 12, 2017

Not particularly, across all projects. If you guys can find some help to do the rest of the work on loopback-swagger such that we have all the fields we need, I can finish the rest here.

@sebastianhaas
Copy link

I might also be able to help out, if there are some marked-off tasks that are good for contribution.

@bajtos bajtos mentioned this pull request Sep 15, 2017
@bajtos
Copy link
Member

bajtos commented Oct 5, 2017

@sebastianhaas thank you for the offer. Could you perhaps take a look at strongloop/loopback-swagger#65? I think that's the biggest blocker right now.

@stale
Copy link

stale bot commented Dec 4, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 4, 2017
@sebastianhaas
Copy link

Your stale bot is very annoying.

@fraxken
Copy link

fraxken commented Jan 30, 2018

Any news about this upgrade ? Thanks for your awesome work !

@STRML
Copy link
Member Author

STRML commented Jan 30, 2018

strongloop/loopback-swagger#65 is a blocker.

@STRML
Copy link
Member Author

STRML commented Feb 27, 2018

Just a status report: nothing has really changed since #209 (comment) - swagger-ui still has the missing syntax highlight features and threshold, and we still need to properly export authSchema to move forward with authorization (which would be a pretty major regression blocking release).

@bajtos
Copy link
Member

bajtos commented Mar 1, 2018

Thank you for the update, @STRML.

The main focus of the IBM team is on LoopBack 4 now, we don't have bandwidth to help with upgrading swagger-ui to v3 and/or improving loopback-swagger to correctly export authSchema. We are relying on the community to drive the progress here.

@stale
Copy link

stale bot commented Apr 30, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 30, 2018
@stale
Copy link

stale bot commented May 14, 2018

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

@bajtos
Copy link
Member

bajtos commented Sep 24, 2018

The npm package no longer exports a bundle. I'm not sure if this is intentional. For this reason, I've added a dev-only script to copy from github releases.

FWIW, we are successfully using https://www.npmjs.com/package/swagger-ui-dist in the upcoming 4.0 version of LoopBack.

@bajtos bajtos mentioned this pull request Sep 24, 2018
rufuspollock pushed a commit to datopian/tech.datopian.com that referenced this pull request Aug 28, 2020
- typo fix in side menu
- intro text taks about publishing flow
- API link to the internal docs (explained)
- removed datastore link as does not belong there

Note: that exact Links for the API docs are not yet there as Swagger 3.0 Do not support shebang URLs at this moment. There is an existing PR for this and hopefully will be fixed soon strongloop/loopback-component-explorer#209
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants