code: public function getRequiredParams()
      {
          $params = [];
          foreach ($this->params() as $k => $v) {
              if (!is_numeric($k)) {
                  if (!is_array($v)) {
                      $v = [];
                  }
                  $v['field'] = $k;
              }
              if (!isset($v['field'])) {
                  continue;
              }
              if (!empty($v['required'])) {
                  $params[] = $v['field'];
              }
          }
  
          return $params;
      }
docs: Get required params.
  
  @return [[@doctodo return_type:getRequiredParams]] [[@doctodo return_description:getRequiredParams]]