Open LuoPQ opened 6 years ago
Correct, they haven't been implemented in v3 (yet?)
You can use the private layoutActions
API if you'd like to get this functionality today.
@shockey how should I do with layoutActions
, could you plz give me an exmaple?
Sure.
To expand/collapse a tag:
// talk about a specific tag on the page with:
// ["operations-tags", (tag name)]
ui.layoutActions.show(["operations-tag", "pet"], true) // show
ui.layoutActions.show(["operations-tag", "pet"], false) // hide
To expand/collapse an operation:
// talk about a specific operation on the page with:
// ["operations", (tag that operation is under), (operationId)]
ui.layoutActions.show(["operations", "pet", "addPet"], true) // show
ui.layoutActions.show(["operations", "pet", "addPet"], false) // hide
Do note that since this is a private API, it may change between minor versions (e.g. between 3.13.1
and 3.14.0
). Plan accordingly!
is there a way to hide all tags?
We can use Docs.expandOperation or Docs.expandEndpointListForResource to expand a section in the old version, but I can't find some functions like these, are they removed in new SwaggerUI?