<%_ if (position === 'import') { _%>
<%_ } _%>
<%_ if (position === 'method') { _%>
  <%_ if (clientTheme === 'vben') { _%>
  // prettier-ignore
  generate(): Promise<any> {
    return new Promise<any>((resolve, reject) => {
      defHttp.get({url: `${apiUrl}/generate`})
        .then(res => { resolve(res); })
       .catch(err => { reject(err);});
    });
  },
  <%_ } _%>
  <%_ if (clientTheme === 'antd') { _%>

export async funcation generate(): Promise<any> {
  return request<any>(`${apiUrl}/generate`);
}
  <%_ } _%>
  <%_ if (clientFramework === 'angular' && clientTheme === 'alain') { _%>

  generate(): Observable<any> {
    return this.http.get<any>(`${this.resourceUrl}/generate`);
  }
  <%_ } _%>
<%_ } _%>
