Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bump-sh-examples/laravel-code-first

Add OpenAPI powered documentation to your Laravel application with Swagger-PHP.
https://github.com/bump-sh-examples/laravel-code-first

api api-code-first api-documentation api-documentation-tool api-rest code-first laravel laravel-framework laravel10 oas3 openapi swagger

Last synced: 7 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# Laravel Code First

A quick "Hello World" Laravel application, but for generating OpenAPI, using the Laravel extension [Swagger-PHP](https://zircote.github.io/swagger-php/).

This repository was built as sample code for the Bump.sh guide on [Generating OpenAPI docs for Laravel with Swagger-PHP](https://docs.bump.sh/guides/openapi/code-first-laravel/).

## 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](https://bump.sh/bump-examples/hub/code-samples/doc/laravel-code-first).

## License

The contents of this repository are licensed under [CC BY-NC-SA
4.0](./LICENSE_CC-BY-NC-SA-4.0).