InfyOmLabs / swagger-generator

Swagger Generator & Templates for InfyOm Laravel Generator
MIT License
118 stars 62 forks source link

Everytime I try to view there is an error #1

Closed phillipmadsen closed 8 years ago

phillipmadsen commented 8 years ago

crud.com/api/docs

:boom: retruns

ErrorException in Logger.php line 38:
Required @SWG\Info() not found

crud.com/docs

:boom: retruns

Cannot find /home/vagrant/grace/local.start/storage/docs/api-docs.json

_Do we need to run a swagger command or something?_

Also the view file that is imported into the views/vendor/ area is formatted incorrectly.

Here is part of

resources/views/vendor/jlapp/swaggervelsrc/views/index.blade.php

    <link rel="icon" type="image/png" href="/vendor/swaggervel/images/favicon-32x32.png" sizes="32x32" />
        <link rel="icon" type="image/png" href="/vendor/swaggervel/images/favicon-16x16.png" sizes="16x16" />
        <link href='/vendor/swaggervel/css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
        <link href='/vendor/swaggervel/css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
        <link href='/vendor/swaggervel/css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
        <link href='/vendor/swaggervel/css/reset.css' media='print' rel='stylesheet' type='text/css'/>
        <link href='/vendor/swaggervel/css/print.css' media='print' rel='stylesheet' type='text/css'/>
        <script src='/vendor/swaggervel/lib/jquery-1.8.0.min.js' type='text/javascript'></script>
        <script src='/vendor/swaggervel/lib/jquery.slideto.min.js' type='text/javascript'></script>
        <script src='/vendor/swaggervel/lib/jquery.wiggle.min.js' type='text/javascript'></script>
        <script src='/vendor/swaggervel/lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
        <script src='/vendor/swaggervel/lib/handlebars-2.0.0.js' type='text/javascript'></script>
        <script src='/vendor/swaggervel/lib/underscore-min.js' type='text/javascript'></script>
        <script src='/vendor/swaggervel/lib/backbone-min.js' type='text/javascript'></script>
        <script src='/vendor/swaggervel/swagger-ui.js' type='text/javascript'></script>
        <script src='/vendor/swaggervel/lib/highlight.7.3.pack.js' type='text/javascript'></script>
        <script src='/vendor/swaggervel/lib/marked.js' type='text/javascript'></script>

        <script src='/vendor/swaggervel/lib/swagger-oauth.js' type='text/javascript'></script>

        <!-- Some basic translations -->
        <!-- <script src='lang/translator.js' type='text/javascript'></script> -->
        <!-- <script src='lang/ru.js' type='text/javascript'></script> -->
        <!-- <script src='lang/en.js' type='text/javascript'></script> -->

Change into something like

 <link rel="icon" type="image/png" href="{!! url('/vendor/swaggervel/images/favicon-32x32.png') !!}" sizes="32x32" />
        <link rel="icon" type="image/png" href="{!! url('/vendor/swaggervel/images/favicon-16x16.png') !!}" sizes="16x16" />
        <link href='{!! asset('/vendor/swaggervel/css/typography.css') !!}' media='screen' rel='stylesheet' type='text/css'/>
        <link href='{!! asset('/vendor/swaggervel/css/reset.css') !!}' media='screen' rel='stylesheet' type='text/css'/>
        <link href='{!! asset('/vendor/swaggervel/css/screen.css') !!}' media='screen' rel='stylesheet' type='text/css'/>
        <link href='{!! asset('/vendor/swaggervel/css/reset.css') !!}' media='print' rel='stylesheet' type='text/css'/>
        <link href='{!! asset('/vendor/swaggervel/css/print.css') !!}' media='print' rel='stylesheet' type='text/css'/>
        <script src='{!! asset('/vendor/swaggervel/lib/jquery-1.8.0.min.js') !!}' type='text/javascript'></script>
        <script src='{!! asset('/vendor/swaggervel/lib/jquery.slideto.min.js') !!}' type='text/javascript'></script>
        <script src='{!! asset('/vendor/swaggervel/lib/jquery.wiggle.min.js') !!}' type='text/javascript'></script>
        <script src='{!! asset('/vendor/swaggervel/lib/jquery.ba-bbq.min.js') !!}' type='text/javascript'></script>
        <script src='{!! asset('/vendor/swaggervel/lib/handlebars-2.0.0.js') !!}' type='text/javascript'></script>
        <script src='{!! asset('/vendor/swaggervel/lib/underscore-min.js') !!}' type='text/javascript'></script>
        <script src='{!! asset('/vendor/swaggervel/lib/backbone-min.js') !!}' type='text/javascript'></script>
        <script src='{!! asset('/vendor/swaggervel/swagger-ui.js') !!}' type='text/javascript'></script>
        <script src='{!! asset('/vendor/swaggervel/lib/highlight.7.3.pack.js') !!}' type='text/javascript'></script>
        <script src='{!! asset('/vendor/swaggervel/lib/marked.js') !!}' type='text/javascript'></script>

        <script src='{!! asset('//vendor/swaggervel/lib/swagger-oauth.js') !!}' type='text/javascript'></script>

        <!-- Some basic translations -->
        <!-- <script src='{!! asset('/vendor/swaggervel/lang/translator.js') !!}' type='text/javascript'></script> -->
        <!-- <script src='{!! asset('/vendor/swaggervel/lang/ru.js') !!}' type='text/javascript'></script> -->
        <!-- <script src='{!! asset('/vendor/swaggervel/lang/en.js') !!}' type='text/javascript'></script> -->
fidenz-oshan commented 8 years ago

+1

try this line on comment

mitulgolakiya commented 8 years ago

@phillipmadsen @fidenz-oshan Actually, we need to add @SWG\Info() somewhere. I am working on some namespace error stuff, where we are suppose to publish AppBaseController.php. So I will add these info there and as it's a published controller, anyone can edit that info.

It will be out with some other feature on this weekend. Closing issue in reference of https://github.com/InfyOmLabs/laravel-generator/issues/101