Giter Site home page Giter Site logo

darkonline-l5-swagger's Introduction

darkonline-L5-Swagger

multiple ui generation in swager

This doucment is for the user of darkonlin/l5-swagger for multiple ui generation

Installation

composer require "darkaonline/l5-swagger:5.6.*"

To get started, first publish L5-Swagger's config and view files into your own project:

php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider"

publish config if not available

php artisan l5-swagger:publish-config

Mobile and web documentation seperation in config/l5-swagger.php

for web added default as it is and for mobile added mobile

     'api' => [
            /*
            |--------------------------------------------------------------------------
            | Edit to set the this group's title, will override global title
            |--------------------------------------------------------------------------
            */
           'separated_doc' => true
            ],
    'default' => [
        'api' => [
            /*
            |--------------------------------------------------------------------------
            | Edit to set the this group's title, will override global title
            |--------------------------------------------------------------------------
            */
            'title' => 'Laravel Web API Documentation UI',
        ],
        'routes' => [
            /*
            |--------------------------------------------------------------------------
            | Route for accessing this group api documentation interface
            |--------------------------------------------------------------------------
            */
            'api' => 'api/documentation',
        ],
        'paths' => [
            /*
            |--------------------------------------------------------------------------
            | Absolute path to location where parsed swagger annotations will be stored
            |--------------------------------------------------------------------------
            */
            'docs' => storage_path('api-docs'),
            /*
            |--------------------------------------------------------------------------
            | File name of the generated json documentation file
            |--------------------------------------------------------------------------
            */
            'docs_json' => 'default-api-docs.json',
            /*
            |--------------------------------------------------------------------------
            | Absolute path to directory containing the swagger annotations are stored.
            |--------------------------------------------------------------------------
            */
            'annotations' => base_path('app/'),
        ],
    ],
    'mobile' => [
        'api' => [
            /*
            |--------------------------------------------------------------------------
            | Edit to set the this group's title, will override global title
            |--------------------------------------------------------------------------
            */
            'title' => 'Laravel Mobile API Documentation UI',
        ],
        'routes' => [
            /*
            |--------------------------------------------------------------------------
            | Route for accessing this group api documentation interface
            |--------------------------------------------------------------------------
            */
            'api' => 'mobapi/documentation',
        ],
        'paths' => [
            /*
            |--------------------------------------------------------------------------
            | Absolute path to location where parsed swagger annotations will be stored
            |--------------------------------------------------------------------------
            */
            'docs' => storage_path('api-docs'),
            /*
            |--------------------------------------------------------------------------
            | File name of the generated json documentation file
            |--------------------------------------------------------------------------
            */
            'docs_json' => 'mobile-api-docs.json',
            /*
            |--------------------------------------------------------------------------
            | Absolute path to directory containing the swagger annotations are stored.
            |--------------------------------------------------------------------------
            */
            'annotations' => base_path('app/'),
        ],
    ],

copy the vendor/darkonline

Generate the doucmentation

php artisan l5-swagger:generate

Changed the generated json file in storage/api-docs folder as required

URL

localhost/api/documentation localhost/mobapi/documenation

References

DarkaOnLine/L5-Swagger#149 https://github.com/DarkaOnLine/L5-Swagger/compare/master...rswork:5.4.x-multidoc

Future Help Required

-- change in the plugin without editing vendor files

-- seperate base url Without editingjson file.

darkonline-l5-swagger's People

Contributors

rupeszh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.