Skip to content

Add OpenAPI powered documentation to your Laravel application with Swagger-PHP.

Notifications You must be signed in to change notification settings

bump-sh-examples/laravel-code-first

Repository files navigation

Laravel Code First

A quick "Hello World" Laravel application, but for generating OpenAPI, using the Laravel extension Swagger-PHP.

This repository was built as sample code for the Bump.sh guide on Generating OpenAPI docs for Laravel with Swagger-PHP.

Usage

Clone the repository down to give it a try.

# Set everything up
$ composer install

# Export the OpenAPI
$ ./vendor/bin/openapi app -o openapi.yaml

# Take a look at the generated OpenAPI
cat openapi.yaml

Preview how the API reference docs look on Bump.sh.

License

The contents of this repository are licensed under CC BY-NC-SA 4.0.