yii2-rest-doc
yii2-rest-doc copied to clipboard
not inherit @restdoc-link
<?php
/**
* A class.
*
* @property int $id ID
* @property string $name Some name
*/
class A extends \yii\db\ActiveRecord {
/**
* @restdoc-link $id
* @restdoc-link $name
*/
public function fields() {
return [
'id',
'name',
];
}
}
<?php
/**
* @inheritdoc
*/
class B extends A {
/**
* @inheritdoc
* @restdoc-field string $created_at Date of create
*/
public function fields() {
return [
'id',
'name',
'created_at',
];
}
}
Result fo A
class:
Attribute | Type | Description |
---|---|---|
id | int | ID |
name | string | Some name |
Result for B
class:
Attribute | Type | Description |
---|---|---|
id | ||
name | ||
created_at | string | Date of create |