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

Missing options: apisSorter, docExpansion #3037

Closed
nash4ever opened this issue May 5, 2017 · 5 comments
Closed

Missing options: apisSorter, docExpansion #3037

nash4ever opened this issue May 5, 2017 · 5 comments

Comments

@nash4ever
Copy link

swagger-ui version: 3.x
apisSorter and docExpansion options are not supported.
I see that these features are second-tier priority, but what does it mean, when will you add these options to the swagger ui?
I only need these 2 basic options to be able to use the new version of swagger ui.
Is there any workaround?

Thanks for your help.

@webron
Copy link
Contributor

webron commented May 5, 2017

It means that support for those would come after we add support for version 3.0 of the spec. Unfortunately, we don't have the capacity to work on everything at once. Should anyone submit a PR to add the functionality, we'll review and merge if proper.

@zak905
Copy link

zak905 commented May 7, 2017

It would be nice to have some programmatic workaround in the meanwhile.

@zak905
Copy link

zak905 commented May 8, 2017

This can toggle all the expand/collapse : $(".expand-operation").trigger("click");
but It can only be triggered when swagger is fully loaded. is there any event or promise that is returned when swagger ui finishes loading ?

@zak905
Copy link

zak905 commented May 8, 2017

this is the best solution I found so far:

 function checkSwaggerLoaded() {
        var elem = document.getElementById("swagger-ui");
        if (elem.childElementCount > 0 && document.querySelector("#swagger-ui .info .title").innerText != "Loading...") {
            $(".expand-operation").trigger("click");
        } else {
         console.log("timeout");
            setTimeout(checkSwaggerLoaded, 200);
        }
        return;
    }

@webron
Copy link
Contributor

webron commented May 30, 2017

Duplicate of #2990 and #2799.

@webron webron closed this as completed May 30, 2017
@lock lock bot locked and limited conversation to collaborators Jul 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants