A simple API documentation package for Laravel using OpenAPI and Stoplight Elements

Overview

Laravel Stoplight Elements

Latest Version on Packagist Software License Build Status Total Downloads

Easily publish your API documentation using your OpenAPI document in your Laravel Application.

Installation

You can install this package via composer:

composer require juststeveking/laravel-stoplight-elements

Configuration

You can publish the configuration file with:

php artisan vendor:publish --provider="JustSteveKing\Laravel\LaravelStoplight\StoplightServiceProvider" --tag="config"

This is the contents of the published config file:

return [
    'title' => 'API Documentation',
    'path' => [
        'name' => env('STOPLIGHT_PATH_NAME', 'docs'),
        'url' => env('STOPLIGHT_PATH_URL', 'api/docs'),
    ],

    'openapi' => [
        'path' => env('STOPLIGHT_OPENAPI_PATH', 'https://api.apis.guru/v2/specs/github.com/1.1.4/openapi.yaml')
    ],

    'config' => [
        'router' => "hash",

        'layout' => "sidebar",
    ]
];

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

You might also like...
Backend application using Laravel 9.x REST APIs for games topup from digiflazz.com and payment gateway using xendit.co

TOPUP - Laravel 9.x REST API Documentation is still on progress. For now, you can fork this postman collection Installation Clone this project git clo

A light weight laravel package that facilitates dealing with arabic concepts using a set of classes and methods to make laravel speaks arabic

A light weight laravel package that facilitates dealing with arabic concepts using a set of classes and methods to make laravel speaks arabic! concepts like , Hijri Dates & Arabic strings and so on ..

Simple package to handle response properly in your API.

Simple package to handle response properly in your API. This package uses Fractal and is based on Build APIs You Won't Hate book.

Prerender Laravel pages using Clusteer and this nice package.
Prerender Laravel pages using Clusteer and this nice package.

Laravel Clusteer Prerender Prerender Laravel pages using Clusteer and this nice package. 🤝 Supporting If you are using one or more Renoki Co. open-so

A convenient helper for using the laravel-seo package with Filament Admin and Forms
A convenient helper for using the laravel-seo package with Filament Admin and Forms

Combine the power of Laravel SEO and Filament PHP. This package is a convenient helper for using the laravel-seo package with Filament Admin and Forms

This package was created to deal with laravel datatables and cruds using vuejs.
This package was created to deal with laravel datatables and cruds using vuejs.

datatable-cruds Installation This package was created to deal with laravel datatables and cruds using vuejs. Install the package through Composer. Run

A package for Myanmar Font, Phone and other Myanmar tools using Laravel Macro

Laravel Myanmar Tools A package for Myanmar Font, Phone and other Myanmar tools using Laravel Macro. Installation composer require pyaesoneaung/larave

REST API with auth using Laravel 8 and Sanctum

Laravel REST API with Sanctum This is an example of a REST API using auth tokens with Laravel Sanctum Usage Change the .env.example to .env and add yo

A Simple Store Front Web Application using Laravel and Bootstrap.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Comments
  • Open from local file

    Open from local file

    Hey,

    is there a way to use your package with a local file?

    I tried to use resource_path('apidoc/openapi.yaml') in your config and it seems that is doesnt work.

    404

    If I let your package on default, the default documentation looks like this:

    external

    Other than this... Thank you for your take on this, as I love Stoplight to design my APIs and only need a way to show them on my site.

    opened by K2ouMais 5
  • Installing on Laravel 8

    Installing on Laravel 8

    hi @JustSteveKing do you have any suggestions with dealing with the following composer error

      [InvalidArgumentException]                                                                                                                                                                          
      Could not find a version of package juststeveking/laravel-stoplight-elements matching your minimum-stability (dev). Require it with an explicit version constraint allowing its desired stability.  
    

    in my composer I have:

        "minimum-stability": "dev",
    

    Do I need an additional flag with the composer require for to change my minimum-stability setting?

    opened by iammikek 4
Releases(1.0.0)
Owner
Steve McDougall
Consultant CTO, Freelance Software Engineer, Community Advocate. Founder at @PHPSouthWales Co-organiser at @BlueConf CTO at @Lila-Fuches
Steve McDougall
This package extends Laravel's FormBuilder to include some (soon all) HTML5 elements

HTML5 Forms for Laravel This package extends Laravel's FormBuilder to include some (soon all) HTML5 elements. How to Install Install the braunson/lara

Braunson Yager 89 Jun 17, 2022
Custom Blade components to add sortable/drag-and-drop HTML elements in your apps.

Laravel Blade Sortable Demo Repo Installation You can install the package via composer: composer require asantibanez/laravel-blade-sortable After the

Andrés Santibáñez 370 Dec 23, 2022
🎨 Free custom elements for the WordPress plugin Oxygen Builder.

?? Custom Elements for Oxygen Builder Free custom elements for the WordPress plugin Oxygen Builder. If you find the elements useful, click on the star

Simon Vidman 62 Dec 29, 2022
Auto Generate laravel api Documentation

Laravel Dark Documentation Generator ?? You can create Documentation for your api easily by using this library Installation: Require this package with

HusseinAlaa 6 May 8, 2022
A platform to create documentation/wiki content built with PHP & Laravel

BookStack A platform for storing and organising information and documentation. Details for BookStack can be found on the official website at https://w

BookStackApp 10.7k Jan 5, 2023
GeoLocation-Package - This package helps you to know the current language of the user, the country from which he is browsing, the currency of his country, and also whether he is using it vpn

GeoLocation in PHP (API) ?? ?? ?? This package helps you to know a lot of information about the current user by his ip address ?? ?? ?? This package h

Abdullah Karam 4 Dec 8, 2022
A Laravel package to simplify using DPO Payment API in your application.

DPO (Direct Pay Online) Laravel Package The best DPO Laravel package, simple Ever This is the package that will help you add DPO Payment API to your L

Zepson Technologies 5 Nov 17, 2022
Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

Laravel Package for TMDB API Wrapper A Laravel package that provides easy access to the php-tmdb/api TMDB (The Movie Database) API wrapper. This packa

PHP - The Movie Database 151 Nov 1, 2022
This package aims to help you standardize all your API responses in a simple and structured way.

Laravel API Response This package aims to help you standardize all your API responses in a simple and structured way. By default, the stucture of the

Kode Pandai 6 Dec 6, 2022
A simple package allowing for consistent API responses throughout your Laravel application

Laravel API Response Helpers A simple package allowing for consistent API responses throughout your Laravel application. Requirements PHP ^7.4 | ^8.0

F9 Web Ltd. 441 Jan 5, 2023