Is it possible to change the rendering for Open API Specs in the new Edge API Portals?

For example, I'd like to change the initial view for the response to show the "Model" as default, rather than "Example Value".

6245-screen-shot-2018-01-05-at-114231-am.png

I discovered that I can use 3.x themes from https://www.npmjs.com/package/swagger-ui-themes by adding the css file to Assets and then add this in the Custom Code section in settings, which gets added to the bottom of every page:

<link type="text/css" rel="stylesheet" href="files/theme-newspaper.css">

But was wondering if there was a way to set "Model" active via some custom script.

0 3 595
3 REPLIES 3

@Kurt Kanaskie , I don't think it's possible. @marshg@google.com might know more about same.

Clever discovery on the theme hack!

We have not exposed any customization for Swagger UI to date, but it is something we're still considering.

You can control some behavior by looking at the swagger-ui.css. For example if you wanted to turn of the "Models" section at the bottom of the page, you could add the following to Custom Code:

<style media="screen" type="text/css">
.swagger-ui section.models {
  visibility: hidden;
}
</style>