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

Don't generate the storage/docs/api-docs.json file #68

Open
aureliomachados opened this issue Apr 25, 2016 · 11 comments
Open

Don't generate the storage/docs/api-docs.json file #68

aureliomachados opened this issue Apr 25, 2016 · 11 comments

Comments

@aureliomachados
Copy link

When i access localhost:8000/docs: Cannot find /home/aurelio/laravel/laravelgenerator/storage/docs/api-docs.json

I made all configurations, step by step, but when i generate some resource the api-docs.json is not created.

obs: my storage directory is free to write and read.

@GNum116
Copy link

GNum116 commented Jun 2, 2016

Me too

@krisbrkrunch
Copy link

Ive not been able to get any kind of automatic generation going only option for me was to do manual annotations in the php files then run command line ./vendor/bin/swagger -o /storage/docs to get the json generated.

@mhetreramesh
Copy link

I am also facing same issue! Does anyone has facing this issue.. Any solution?

@3tgame
Copy link

3tgame commented Aug 4, 2016

add some notations,visit the http:localhost:8000/api-docs url

@rilefitra
Copy link

I am also facing same issue

1 similar comment
@ansezz
Copy link

ansezz commented Sep 18, 2016

I am also facing same issue

@hillelcoren
Copy link

I was able to fix this by setting APP_DEBUG=true in my .env file

@o0JoeCool0o
Copy link

o0JoeCool0o commented Dec 12, 2016

FYI I created an automatic annotation generator called swaggertater that scans your output of php artisan route:list and then scans your classes for input variables and generates some annotations! Its written in objective c and currently only works on mac. I use it on my dev environment and then I upload the annotations.php file to my prod server. https://github.com/krisbray/SwaggerTater and see my updated fork of swaggervel here https://github.com/krisbray/Swaggervel

@w0rd-driven
Copy link
Contributor

The route defined by the config line https://github.com/slampenny/Swaggervel/blob/master/src/config/swaggervel.php#L29 is what generates the storage/docs/api-docs.json file. You'll need to make some annotations as @3tgame mentions.

I honestly found this a little confusing so my route definitions are as follows:

    /*
      |--------------------------------------------------------------------------
      | Relative path to access parsed swagger annotations.
      |--------------------------------------------------------------------------
    */
    'doc-route' => 'docs-json',

    /*
      |--------------------------------------------------------------------------
      | Relative path to access swagger ui.
      |--------------------------------------------------------------------------
    */
    'api-docs-route' => 'docs',

Going to /docs gets the Swagger UI I normally expect. Going to /docs-json gives me the JSON the UI consumes. This is one area that confused me initially and the naming is a little unfortunate as I don't really have a good permanent alternative. Changing the route somewhat signifies intent.

@o0JoeCool0o
Copy link

Yes I use SwaggerTater above to make those annotations now automatically. I also set the autogen to true so after SwaggerTater is finished it generates the api-docs.js file and I have even edited my Swaggervel instance to run it on load of the docs page so I have FULLY automated api page now all of my functions just show up with parameters any time I add or change them I dont have to do any edits.

@thiernosow219
Copy link

bonjour a vous sil vous plait j'arrive pas a documenter mes api avec swagger avez vous uune solution

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