-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
chatfeed
committed
Jan 5, 2018
1 parent
6524e93
commit 122f571
Showing
4 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,41 @@ | ||
# yii2-doc | ||
====================== | ||
auto generate api document by using comment for yii2. | ||
|
||
Installation | ||
====================== | ||
|
||
``` | ||
composer require chatfeed/yii2-doc "*" | ||
``` | ||
|
||
Configure | ||
====================== | ||
|
||
```php | ||
'module'=>[ | ||
'doc' => [ | ||
'class' => 'cfd\doc\Module', | ||
'modelDescriptions'=>require __DIR__.'/model_description.php', | ||
'modelsMap'=>[ | ||
'\common\base_models\kds\\', | ||
] | ||
] | ||
] | ||
``` | ||
|
||
Define Customer Model | ||
====================== | ||
```php | ||
return [ | ||
'demo'=>[ | ||
['object','demo','模型'], | ||
['integer','id','ID'], | ||
['string','name','名称'], | ||
['string','desc','描述'], | ||
['integer','created_at','创建时间'], | ||
['integer','updated_at','更新时间'], | ||
] | ||
]; | ||
``` | ||
Thanks [yii2-fast-api](https://github.com/deepziyu/yii2-fast-api) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.