Giter Site home page Giter Site logo

rawahamid / jheckdoc-laravel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jericizon/jheckdoc-laravel

0.0 0.0 0.0 1.32 MB

Laravel api document generator

Home Page: https://jheckdoc-laravel-demo.herokuapp.com/api/documentation

License: MIT License

JavaScript 12.44% PHP 21.36% Hack 9.46% Blade 0.58% Vue 56.11% CSS 0.07%

jheckdoc-laravel's Introduction

JheckDoc Laravel logo

Jheckdoc laravel

MIT License GitHub last commit

Simple laravel api document generator



Dashboard preview

Demo page:

https://jheckdoc-laravel-demo.herokuapp.com/api/documentation

Installation

You can install the package via composer

composer require jheckdoc/jheckdoc-laravel

Usage

Generate json file

php artisan jheckdoc:generate

Publish config files

$ php artisan vendor:publish --tag=jheckdoc-config

Parameters

Name Type Description
@jheckdocInfo String TThis is required for details of api documentation. Sample header
@jheckdoc String This is required to add on top of each codeblocks. Sample annotation
method String Your desired route method, Sample GET, POST, PUT, DELETE, OPTIONS
route String Your api endpoint. Note: no need to put the full url
name String Enter desired name for your endpoint
description String Description of your endpoint
headers Object For custom headers
params Object Enter parameters for your endpoint
responses Object Server responses

Api documentation detail information (required)

/*@jheckdocInfo
{
    "version": "1.0.0",
    "title":"Jheckdoc API",
    "description" : "Sample description of api",
    "contact" : "[email protected]",
    "servers": [
        {
            "url" : "https://jheckdoc.com",
            "description": "Production api server"
        },
        {
            "url" : "https://dev.jheckdoc.com",
            "description": "Development api server"
        }
    ]
}
*/

Sample annotation

Each code block requires a valid json format. Please see Sample annotations for more.

/*@jheckdoc
    {
        "method" : "POST",
        "route" : "/v1/users/login",
        "name":"User login",
        "description": "Login to get authorization token.",
        "group":"user",
        "headers":{
            "Content-Type": {
                "required": true,
                "value":"application/x-www-form-urlencoded"
            }
        },
        "params" : {
            "email" :{
                "type":"string",
                "description": "Enter E-mail address",
                "required" : true
            },
            "password" :{
                "type":"string",
                "description": "Enter Password",
                "required" : true
            }
        },
        "responses": {
            "200": {
                "description": "Success"
            },
            "401": {
                "description": "Unauthenticated"
            }
        }
    }
*/

View api docs (default)

http://localhost:8000/api/documentation

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, pelase use issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Copyright (c) 2020, Jeric

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

jheckdoc-laravel's People

Contributors

jericizon 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.