Skip to content

[Feature Request] Support stoplightio/elements as new openapi ui #272

@miss85246

Description

@miss85246

Is your feature request related to a problem? Please describe your use case.
I’ve recently been using sanic-ext to generate my OpenAPI documentation.
I found that neither Swagger UI nor Redoc supports auto-generated code samples (such as curl, Python, etc.), which can be very useful in many cases.

While trying out Stoplight Elements, I discovered that it not only has a clean and modern UI, but also supports code samples, live request testing, and more.
I found it incredibly helpful and strongly recommend considering it for integration into sanic-ext.

Describe the solution you'd like
There is no need to change how openapi.json is generated.
Only a UI-level adaptation is needed to support Stoplight Elements as a new frontend interface option.

Additional context

  1. A new element.html file can be added to the openapi/ui/ template directory, and the blueprint that serves the UI needs some minor modification to support this mode.
  2. I have already replaced redoc.html locally and successfully verified that Stoplight Elements can be used as the UI for viewing the API documentation.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions