Download the PHP package pahanini/yii2-rest-doc without Composer

On this page you can find all versions of the php package pahanini/yii2-rest-doc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package yii2-rest-doc

Yii2 Rest Controller Documentator

Build Status StyleCI Latest Stable Version Total Downloads Latest Unstable Version License

About

Create precise documentation to your Yii2 API REST controllers. Library parses your code and generates objects with meta data that could be used with any template engine to generate great API docs.

You do not need to edit documentation when you change you code. Just rebuild you docs with this tool.

Install

Template example (twig)

Data available in template

List of data automatically extracted from code:

List of special tags:

Inheritance is also supported. Use @inherited or @inheritdoc tags.

Controller

Model

To describe model's fields you can use two approaches.

Link to property tag.

If you already have phpDocumentator @property tag you can use it to describe API field. Model's doc block example:

Separate field description

If you do not have @property tag or API field is not directly connected with property use @restdoc-field tag.

Example:

Extra fields

Use @restdoc-extraField and @restdoc-extraLink for extra fields.

Sort fields

Use @restdoc-sortField to sort field according to your code.

Skip fields

Use @restdoc-ignore to skip field.

Integrate With Slate

Slate is probably one of the best tools to generate nice API. So you can use this tool to create index.md file for slate. You can use on afterAction event to automatically start slate.

Example:

Rationale

Creating of Yii2 controllers is an easy task, but supporting of documentation in actual state is often boring and tough challenge. Using automatic tool like phpDocumentator or swagger makes life easier but its still require to describe all models fields and rules using tags or comments.

In other hand Yii2 controllers and models keep a lot of information about internal structure like actions,
field names, scenarios for update and insert operations. This package extracts such an information from REST controllers and models and using this data along with phpdocumentator tags automatically generates index.md for slate or any other documentation file.


All versions of yii2-rest-doc with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
ext-curl Version *
yiisoft/yii2 Version *
phpdocumentor/reflection Version >=3.0.0
phpdocumentor/reflection-docblock Version ~2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pahanini/yii2-rest-doc contains the following files

Loading the files please wait ....