Skip to content

Swap swagger ui to scalar #34841

Open
Open
@TheFox0x7

Description

@TheFox0x7

Feature Description

When browsing api docs swagger doesn't provide any kind of search, overview or navigation through the docs, limiting discoverability of api routes.

I propose we swap to scalar instead which provides navigation and more interactive system to test out api.
See demo site, to setup a view of gitea api for more realistic demo:

  1. click import url and paste https://demo.gitea.com/swagger.v1.json in there
  2. Switch to preview tab at the top

I did try integrating it myself but that bloated the end binary with 1.2MB and I'm not knowledgeable enough in JS to say if this is expected or have I did it incorrectly as the line script version fetches ~800kB (compressed).

Screenshots

General view with search:

Image

Request sending screen:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposal/acceptedWe have reviewed the proposal and agree that it should be implemented like that/at all.type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions