-
Notifications
You must be signed in to change notification settings - Fork 370
Update swagger-ui distribution #163
Comments
Would it be possible to add some sort of hooks that make it easier to customize auth? Related: |
Not sure if you are aware but you can use a custom swagger-ui distribution with swagger-tools. This will let you do whatever you want from a swagger-ui perspective. To answer your specific questions, I'm using response headers from the server to wire up the API URL for the "Try it now!" feature so I could do something like this for what you're wanting but then we're into the situation where we're putting application specific stuff into swagger-tools, something I don't want to do unless it's consumable by many. If you've got some proposal about how to do this in a more generic/pluggable way, I can do it but you already have the same mechanisms available (extra routes on your server and a custom loader for swagger-ui). |
Why do you have to maintain a copy of From my point of view I can resolve the issue like this:
I guess that's about it. It feels a little bit nasty that the JS is within |
I don't have to but the idea was to make it as simple as possible to get swagger-ui deployed. (You'd be surprised how many people struggle with this.) I didn't realize I could install swagger-ui as an NPM dependency, I'd much rather do that, but I do have a custom index.html that gets the API URL from the server. (Like you said, having JavaScript in index.html sucks but that's a swagger-ui mechanism I built on top of.) If I could figure out some way to wire things up without that, I'd love to stop shipping swagger-ui with the project. |
I set up an issue for this. See swagger-api/swagger-ui#952 and feel free to chime in if needed. I think in You'll need some sort of copy step no matter what given you have customizations in place. On the bright side you could provide multiple customized init files to pick from making it easier to adjust to various API setups. |
Ok, apparently they have a milestone for exactly this! See swagger-api/swagger-ui#804 . |
I've subscribed to the issue. In the meantime, I'm going to update swagger-ui as I always have and when that issue allows for it, I will then move the included swagger-ui out of the module and use a dependency to get the bundle in. |
Great. That should simplify things. :) |
@whitlockjc Looks like they have resolve the issue. See swagger-api/swagger-ui#804 (comment) . |
This was fixed in the last release, v0.8.6. |
@whitlockjc Any chance you could update the Swagger UI distribution in Swagger Tools? I'd like to take advantage of the multi-line (textarea) input for string array parameters -- available in latest Swagger UI but not in the version that ships with Swagger Tools. |
I will be doing that sometime next week. |
The swagger-ui distribution shipped with swagger-tools is old and needs to be updated.
The text was updated successfully, but these errors were encountered: