Skip to content

Commit

Permalink
Updating namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
onavascuez committed Nov 8, 2021
1 parent 8430a84 commit a176b85
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
@@ -1,9 +1,8 @@
language: php

php:
- 5.4
- 5.5
- 5.6
- 7.3
- hhvm

before_script:
Expand Down
8 changes: 4 additions & 4 deletions README.md
@@ -1,10 +1,10 @@
# Swaggervel (Swagger integration for Laravel 5)
# Swaggervel (Swagger integration for Laravel)
This package combines [Swagger-php](https://github.com/zircote/swagger-php) and [swagger-ui](https://github.com/swagger-api/swagger-ui) into one Laravel-friendly package.
When you run your app in debug mode, Swaggervel will scan your app folder (or any folder that is set under the "app-dir" variable in the packages config), generate swagger json files and deposit them to the doc-dir folder (default is `/docs`). Files are then served by swagger-ui under the api-docs director.

## Installation
- Execute `composer require appointer/swaggervel --dev` within your laravel root directory
- Add `Appointer\Swaggervel\SwaggervelServiceProvider::class` to your providers array in `app/config/app.php` above your route provider, to avoid any catch-all routes
- Execute `composer require onavascuez/swaggervel --dev` within your laravel root directory
- Add `Onavascuez\Swaggervel\SwaggervelServiceProvider::class` to your providers array in `app/config/app.php` above your route provider, to avoid any catch-all routes
- Run `php artisan vendor:publish --tag=public` to push swagger-ui to your public folder (can be found in public/vendor/swaggervel).
- Optionally run `php artisan vendor:publish --tag=config` to push the swaggervel default config into your application's config directory.
- Optionally run `php artisan vendor:publish --tag=views` to push the swaggervel index view file into `resources/views/vendor/swaggervel`.
Expand All @@ -20,7 +20,7 @@ All options are well commented within the swaggervel.php config file.
The actual Swagger spec is beyond the scope of this package. All Swaggervel does is package up swagger-php and swagger-ui in a Laravel-friendly fashion, and tries to make it easy to serve. For info on how to use swagger-php [look here](http://zircote.com/swagger-php/). For good examples of swagger-php in action [look here](https://github.com/zircote/swagger-php/tree/master/Examples).

## Further Notes
This package is a fork of [slampenny/Swaggervel](https://github.com/slampenny/Swaggervel), as it is no longer maintained.
This package is a fork of [onavascuez/swaggervel](https://github.com/onavascuez/swaggervel), as it is no longer maintained.

## TODO
- the handling of the /doc call is still really inconsistent, as you cannot change the file name (api-docs.json), but are able to change the file you acces when using the /doc route.
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -24,13 +24,13 @@
},
"autoload": {
"psr-0": {
"Appointer\\Swaggervel": "src/"
"Onavascuez\\Swaggervel": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"Appointer\\Swaggervel\\SwaggervelServiceProvider"
"Onavascuez\\Swaggervel\\SwaggervelServiceProvider"
]
}
}
Expand Down
@@ -1,4 +1,4 @@
<?php namespace Appointer\Swaggervel\Http\Controllers;
<?php namespace Onavascuez\Swaggervel\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Http\Response;
Expand Down
File renamed without changes.
@@ -1,6 +1,6 @@
<?php

namespace Appointer\Swaggervel;
namespace Onavascuez\Swaggervel;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Route;
Expand Down Expand Up @@ -52,7 +52,7 @@ public function boot()
], 'views');

if (!$this->app->routesAreCached()) {
Route::group(['namespace' => 'Appointer\Swaggervel\Http\Controllers'], function () {
Route::group(['namespace' => 'Onavascuez\Swaggervel\Http\Controllers'], function () {
require __DIR__ . '/Http/routes.php';
});
}
Expand Down

0 comments on commit a176b85

Please sign in to comment.