Giter Site home page Giter Site logo

php-gen-doc-api's Introduction

php-gen-doc-api

Build Status Coverage Status Dependency Status Latest Stable Version

Generate documentation for PHP API with Annotations. No dependency. No framework required.

Preview

You can see a sample generated documentation based on class Client on http://zckrs.github.io/php-gen-doc-api/

Requirements

No dependency. No framework required. View on Packagist.org

You just need PHP >= 5.3.2.

Installation

The recommended installation is via composer. Just add the following line to your composer.json :

{
    ...
    "require": {
        ...
        "zckrs/php-gen-doc-api": "@dev"
    }
}
$ php composer.phar update

Usage

  • Duplicate the genDocApi.php file in your project root for example.
  • Set options in this new file.
  • Execute it via CLI : php genDocApi.php
  • You get a new HTML file. (With default options stored in web/index.html)

Options

output_file

The name of the generated file (default : index.html).

output_dir

The directory to store the html file (default : /web).

template_dir

The directory to store the views (default : /src/Resources/views).

You can override view. See how to custom output HTML

asset_dir

The directory to store the assets (default : /src/Resources/assets).

You can override asset. See how to custom output HTML

Annotations

Custom output HTML

What includes in default layout.html :
  • Bootstrap v3.1.1
  • jQuery v1.10.2
  • Google Code Prettify
How to custom output HTML:
  1. Create a main directory for views.
  2. Define option template_dir in genDocApi.php.
  3. Put custom view with same model tree. Details Views
  4. Each view contains some {{ variables }}

Known issues

If you have some problems or improvements, contact me via GitHub.

Acknowledgment

This project is inspired by Calinrada's php-apidoc based on Swagger and use Extractor.php written by Eriknyk

php-gen-doc-api's People

Contributors

calinrada avatar gromnan avatar kbsali avatar miniche avatar pvullioud avatar

Watchers

 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.