yii2-rest-doc icon indicating copy to clipboard operation
yii2-rest-doc copied to clipboard

not inherit @restdoc-link

Open 4irik opened this issue 8 years ago • 0 comments

<?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

4irik avatar May 14 '16 08:05 4irik