Skip to main content
There’s no site-wide settings screen. The macro is configured individually, the first time you insert it on a page and any time afterward you choose to edit it.

Better Swagger UI macro

Renders an OpenAPI or Swagger document as an interactive Swagger UI panel. Choose OpenAPI document type first — it determines whether you provide a URL or paste the document directly, and only the matching field is required.
FieldRequiredNotes
OpenAPI document typeURL or Content. Default: URL
URLWhen type is URLMust start with http:// or https://
ContentWhen type is ContentThe OpenAPI/Swagger document as a JSON or YAML string. Not validated — invalid content fails silently in the viewer
AuthorizationNonone (default), Basic, or Api Key — pre-fills credentials so Swagger UI can authorize Try it out requests automatically on load
Login / PasswordWhen Authorization is BasicStored in the macro config
Api KeyWhen Authorization is Api KeyStored in the macro config
Validator URLNoDefault: https://validator.swagger.io/validator. Clear it to disable the validation badge
LayoutNoDefault: BaseLayout — the name of a Swagger UI plugin component to use as the top-level layout. Leave as is unless a custom plugin registers another layout
Default Model Expand DepthNoDefault: 1. How many levels of a schema model are expanded by default; -1 expands fully
FilterNoDefault: empty (disabled). When set, shows a filter box in the top bar pre-filled with this value
ExpansionNolist (default), full, or none — default expansion of tags and operations
Model RenderingNoexample (default) or alpha — which tab is active by default in the request/response body section
Supported Submit MethodsNoMulti-select of get, put, post, delete, options, head, patch, trace. Default: all selected. Removing a method hides Try it out for operations of that method only — it doesn’t remove them from the list
DisplayNoCheckboxes, all off by default — see below
With OpenAPI document type set to URL, the form shows the URL field:
Better Swagger UI macro configuration form with document type set to URL
With it set to Content, the URL field is replaced by the Content text area:
Better Swagger UI macro configuration form with document type set to Content

Display options

OptionDefaultEffect
Display Operation IdOffShows the spec’s operationId alongside each operation name
Display Request DurationOffShows elapsed time after a Try it out request completes
Show ExtensionsOffShows vendor extension (x-) fields on operations, parameters, responses, and schemas
Show Common ExtensionsOffShows parameter validation constraints (pattern, maxLength, minLength, maximum, minimum)
Request Snippets EnabledOffReplaces the legacy curl snippet with the richer multi-language request snippet panel
Better Swagger UI macro configuration Display options
Fields left empty, or checkboxes left unchecked, aren’t saved to the macro’s config — Swagger UI falls back to its own built-in defaults for anything not explicitly set.

Permissions

Anyone with edit access to a Confluence page can insert the macro and change its configuration. Page viewers without edit access only see the rendered output.