Skip to content

Creates Open API spec for a Laravel JSON:API

Notifications You must be signed in to change notification settings

neondigital/openapi-spec-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAPI v3 Spec Generator

Designed to work with Laravel JSON:API

!!! Disclaimer: this project is work in progress and likely contains many bugs, etc !!!

TODO

  • Command to generate to storage folder
  • Get basic test suite running with GitHub Actions
  • Add extra operation descriptons via config
  • Add in tags & x-tagGroups (via config)
  • Consider ->readonly() etc in routes
  • Remove links in payload data when saving resources
  • Fix includes and relations
  • Tidy up the code!!
  • Add tests

🙏 Based upon initial prototype by martianatwork

Usage

Install package

composer install neondigital/openapi-spec-generator

Publish the config file

php artisan vendor:publish --provider="LaravelJsonApi\OpenApiSpec\OpenApiServiceProvider"

Generate the Open API spec

php artisan jsonapi:openapi:generate v1

Generating Documentation

A quick way to preview your documentation is to use Speccy. Ensure you have installed Speccy globally and then you can use the following command.

speccy serve storage/app/v1_openapi.yaml

About

Creates Open API spec for a Laravel JSON:API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages