Skip to content

Make layout configurable in Swagger UI#704

Merged
zorbash merged 1 commit into
open-api-spex:masterfrom
joshk:patch-1
Jul 6, 2026
Merged

Make layout configurable in Swagger UI#704
zorbash merged 1 commit into
open-api-spex:masterfrom
joshk:patch-1

Conversation

@joshk

@joshk joshk commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

This allows users to configure the Swagger UI layout with:

get("/swaggerui", OpenApiSpex.Plug.SwaggerUI, path: "/api/openapi", layout: "BaseLayout")

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates OpenApiSpex.Plug.SwaggerUI to allow callers to configure the Swagger UI layout via plug options (e.g., layout: "BaseLayout"), instead of always using "StandaloneLayout".

Changes:

  • Adds support for :layout in the generated Swagger UI JS config, with "StandaloneLayout" as the default when not provided.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/open_api_spex/plug/swagger_ui.ex
Comment thread lib/open_api_spex/plug/swagger_ui.ex
@zorbash zorbash merged commit b2ed58b into open-api-spex:master Jul 6, 2026
9 checks passed
@zorbash

zorbash commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Thanks @joshk !

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants