PHPackages                             creatify/swagger-builder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. creatify/swagger-builder

ActiveLibrary[API Development](/categories/api)

creatify/swagger-builder
========================

Generate Swagger Yaml And Json Files Based On Php Array

2.0.0(3y ago)382PHP

Since Apr 29Pushed 3y ago1 watchersCompare

[ Source](https://github.com/dev-hatem/swagger-builder)[ Packagist](https://packagist.org/packages/creatify/swagger-builder)[ RSS](/packages/creatify-swagger-builder/feed)WikiDiscussions master Synced today

READMEChangelog (3)DependenciesVersions (4)Used By (0)

[![pacakge](https://github.com/dev-hatem/swagger-builder/raw/master/screenshots/docs.png)](https://github.com/dev-hatem/swagger-builder/blob/master/screenshots/docs.png)

Swagger Builder
===============

[](#swagger-builder)

Generate awesome swagger docs for your apis from php array

Installation
------------

[](#installation)

Use the package manager [composer](https://getcomposer.org/) to install foobar.

```
composer require creatify/swagger-builder
```

Usage
-----

[](#usage)

```
# register the package service provider in config/app.php in providers array
```

```
Creatify\SwaggerBuilder\Providers\SwaggerBuilderServiceProvider::class,
```

```
# publish the needed files
```

```
php artisan vendor:publish --provider="Creatify\SwaggerBuilder\Providers\SwaggerBuilderServiceProvider"
```

```
php artisan vendor:publish --tag=swagger-builder
```

##### run the below command to start build your docs and select file format

[](#run-the-below-command-to-start-build-your-docs-and-select-file-format)

```
php artisan swagger:build
```

```
# make new directory to save the php array which contain the structure of your endpoints
 by default the path in public/swagger/endpoints
```

```
# make new php file which represents your endpoints with the below structure
```

```
