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

Expand all on Response Schema #211

Open
sixers opened this issue Feb 23, 2017 · 12 comments
Open

Expand all on Response Schema #211

sixers opened this issue Feb 23, 2017 · 12 comments

Comments

@sixers
Copy link

sixers commented Feb 23, 2017

I have a deeply nested response schema. Currently it's very cumbersome to see the full schema, I need to click on each nested object. ReDoc has "expand all" on example response, does it also support the same on the schema?

@RomanHotsiy
Copy link
Member

Hey @sixers,
at the moment ReDoc doesn't support this.

I've added feature badge to this issue. Most likely this feature will be shipped in a few weeks.

@sixers
Copy link
Author

sixers commented May 17, 2017

Hey, any update on this?

@RomanHotsiy
Copy link
Member

@sixers unfortunately no.
I'm quite busy with other things around ReDoc right now ("Try it out" feature).

I will try to get this done asap. If you don't see it during the next two weeks, ping me again. Thanks

@Sadere
Copy link

Sadere commented Jul 20, 2017

Kind of a workaround, not a very good one tho

.collapser { display: none !important; } .ellipsis { display: none !important; } .collapsible { display: block !important; }

@yyfearth
Copy link

yyfearth commented Nov 9, 2017

Maybe also provide the similar function as the examples on the right.
Including both "Expand All" and "Collapse All" for the schema, which will be quite useful for deep nested schemas.

@ali-arslan-1
Copy link

I suppose it would be better to have an option which can be passed along expandResponses to define the level to which it should be expanded.

@piggydoughnut
Copy link

is there any update on this? I would really appreciate this feature too.

@benbro
Copy link

benbro commented May 15, 2019

Possible workaround. Not sure if it has negative effect:

<body>
    <redoc spec-url='openapi.yaml'></redoc>
    <script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
    <script>
        setTimeout(function() {
          var els = document.querySelectorAll('.collapsible .collapsed');
          for(el of els) {
            el.classList.remove('collapsed');
          }
        }, 100);
    </script>
</body>

@cmeeren
Copy link

cmeeren commented Jul 31, 2019

Would be great to see support for this!

In the meantime, here's my workaround, using the callback of Redoc.init to trigger a click on all td elements.

Redoc.init(
  "spec.yaml",
  {
    // your props here
  },
  document.getElementById("redoc-container"),
  function () {
    var els = document.querySelectorAll('td');
    for (el of els) {
      el.click();
    }
  })

@matter-it-does
Copy link

Yes please

this will pave the way for exporting to html and then to pdf with everything expanded

@michaelcilibrasi
Copy link

Has there been any progress on this? It seems it's been "the next two weeks" since 2017

@lornajane
Copy link
Contributor

Thanks for checking in! No progress to report I'm afraid - but this issue will be updated when we have some news.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests