guljahang/swaglite

Lightweight Swagger alternative for Laravel

Maintainers

Package info

github.com/GuljahanG/swaglite

Language:JavaScript

pkg:composer/guljahang/swaglite

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-06-26 17:48 UTC

This package is auto-updated.

Last update: 2026-06-26 18:42:08 UTC


README

Lightweight API documentation for Laravel.

Features

  • Interactive API documentation
  • Execute API requests directly from the browser
  • Path parameters (/users/{id})
  • JSON request bodies
  • GET, POST, PUT, PATCH and DELETE support
  • Search endpoints instantly
  • Dark mode support
  • Attribute-based documentation
  • Lightweight and zero external dependencies

Installation

composer require guljahang/swaglite

Publish the package assets:

php artisan vendor:publish --tag=swaglite-assets

Access the Documentation

After installing the package, start your Laravel application and open:

http://localhost:8000/swaglite

Usage

Response Documentation

#[SwagResponse(
    status: 200,
    description: 'Success'
)]
public function index()
{
    return User::all();
}

Path Parameters

#[SwagParameter(
    name: 'id',
    in: 'path',
    required: true,
    example: 1
)]
public function show($id)
{
    return User::findOrFail($id);
}

Request Body

#[SwagParameter(
    name: 'name',
    in: 'body',
    required: true
)]
#[SwagParameter(
    name: 'email',
    in: 'body',
    required: true
)]
public function store(Request $request)
{
    return $request->all();
}

Supported Methods

  • GET
  • POST
  • PUT
  • PATCH
  • DELETE

Screenshots

Light Mode

SwagLite Light Mode

Dark Mode

SwagLite Dark Mode

License

MIT