ensi/laravel-serve-stoplight

Laravel serve stoplight

0.2.0 2024-06-26 12:50 UTC

This package is auto-updated.

Last update: 2024-11-27 09:25:47 UTC


README

Latest Version on Packagist Tests Total Downloads

The package allows you to output the Stoplight UI by configuring only the paths to your openapi3 configs

Based on stoplight/elements

Installation

You can install the package via composer:

composer require ensi/laravel-serve-stoplight

Publish config file like this:

php artisan vendor:publish --provider="Ensi\LaravelServeStoplight\ServeStoplightServiceProvider"

Configure config/serve-stoplight.php

Version Compatibility

Basic usage

By default, the v1 specification is available at docs/oas (the same full path as docs/oas/v1).

If you need to open a specification of another version, use the docs/os/{version} path, for example, docs/os/v2

Contributing

Please see CONTRIBUTING for details.

Update stoplight

For update stoplight:

  1. update stoplight-resources/web-components.min.js from https://unpkg.com/@stoplight/elements/web-components.min.js
  2. update stoplight-resources/styles.min.css from https://unpkg.com/@stoplight/elements/styles.min.css
  3. update current Stoplight version on Version Compatibility

Testing

  1. composer install
  2. composer test

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

The MIT License (MIT). Please see License File for more information.