Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Swagger Ui Laravel Package

swagger-api/swagger-ui

Swagger UI renders interactive API docs from your OpenAPI (Swagger) spec, letting teams and consumers explore endpoints without implementation details. Available as npm packages (swagger-ui, swagger-ui-dist) and Docker for easy hosting and bundling.

View on GitHub
Deep Wiki
Context7

Setting up a dev environment

SwaggerUI includes a development server that provides hot module reloading and unminified stack traces, for easier development.

Prerequisites

  • git, any version
  • Node.js >=24.14.0 and npm >=11.9.0 are the minimum required versions that this repo runs on, but we always recommend using the latest version of Node.js.

Steps

  1. git clone https://github.com/swagger-api/swagger-ui.git
  2. cd swagger-ui
  3. npm install
  4. npx husky init (optional)
  5. npm run dev
  6. Wait a bit
  7. Open http://localhost:3200/

Using your own local api definition with local dev build

You can specify a local file in dev-helpers/dev-helper-initializer.js by changing the url parameter. This local file MUST be located in the dev-helpers directory or a subdirectory. As a convenience and best practice, we recommend that you create a subdirectory, dev-helpers/examples, which is already specified in .gitignore.

replace

url: "https://petstore.swagger.io/v2/swagger.json",

with

url: "./examples/your-local-api-definition.yaml",

Files in dev-helpers should NOT be committed to git. The exception is if you are fixing something in index.html, oauth2-redirect.html, dev-helper-initializer.js, or introducing a new support file.

Bonus points

  • Swagger UI includes an ESLint rule definition. If you use a graphical editor, consider installing an ESLint plugin, which will point out syntax and style errors for you as you code.
    • The linter runs as part of the PR test sequence, so don't think you can get away with not paying attention to it!
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport