Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Swagger UI #511

Closed
LordRahl90 opened this issue Nov 20, 2017 · 2 comments
Closed

Access Swagger UI #511

LordRahl90 opened this issue Nov 20, 2017 · 2 comments

Comments

@LordRahl90
Copy link

Please how do i access the generated swagger UI????
Thanks

@skys215
Copy link
Contributor

skys215 commented Nov 21, 2017

infyom/swagger-generator will only insert swagger style comments in the generated source code. It won't generate any page that let you allow to see the apis.
So you need to:

  1. Install Swaggervel
    composer require slampenny/Swaggervel=dev-master
  2. After installing, add Jlapp\Swaggervel\SwaggervelServiceProvider::class in to provider section in config/app.php.
  3. Run php artisan vendor:publish --provider="Jlapp\Swaggervel\SwaggervelServiceProvider"
  4. Now you can see routes in the php artisan route:list, which is /docs and /api/docs

AFAIK, Swaggervel is not compatible with Laravel 5.4 and above yet. You need to remove the \Blade::setContentTags and \Blade::setEscapedContentTags from vendor/jlapp/swaggervel/src/Jlapp/Swaggervel/routes.php

When I used swaggervel first time, there's a bug with the document of the generated model file if I has run the vendor:publish infyom/laravel-generator. The definition of the model was not generated. I don't know it has fixed or not.

I forgot that I have replied the same question here

@mitulgolakiya
Copy link
Member

#413 duplicate of

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants