typescript-angular.apiInterface.mustache Maven / Gradle / Ivy
{{>licenseInfo}}
{{#useHttpClient}}
import { HttpHeaders } from '@angular/common/http';
{{/useHttpClient}}
{{^useHttpClient}}
import { Headers } from '@angular/http';
{{/useHttpClient}}
{{^useRxJS6}}
import { Observable } from 'rxjs/Observable';
{{/useRxJS6}}
{{#useRxJS6}}
import { Observable } from 'rxjs';
{{/useRxJS6}}
{{#imports}}
import { {{classname}} } from '../model/models';
{{/imports}}
import { Configuration } from '../configuration';
{{#operations}}
{{#useSingleRequestParameter}}
{{#operation}}
{{#allParams.0}}
export interface {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams {
{{#allParams}}
{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}{{#isNullable}} | null{{/isNullable}};
{{/allParams}}
}
{{/allParams.0}}
{{/operation}}
{{/useSingleRequestParameter}}
{{#description}}
/**
* {{&description}}
*/
{{/description}}
export interface {{classname}}Interface {
defaultHeaders: {{#useHttpClient}}Http{{/useHttpClient}}Headers;
configuration: Configuration;
{{^useHttpClient}}[others: string]: any;{{/useHttpClient}}
{{#operation}}
/**
* {{summary}}
* {{notes}}
{{^useSingleRequestParameter}}
{{#allParams}}* @param {{paramName}} {{description}}
{{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}* @param requestParameters
{{/allParams.0}}{{/useSingleRequestParameter}}*/
{{nickname}}({{^useSingleRequestParameter}}{{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}{{/useSingleRequestParameter}}{{#useSingleRequestParameter}}{{#allParams.0}}requestParameters: {{#prefixParameterInterfaces}}{{classname}}{{/prefixParameterInterfaces}}{{operationIdCamelCase}}RequestParams, {{/allParams.0}}{{/useSingleRequestParameter}}extraHttpRequestParams?: any): Observable<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}{}{{/returnType}}>;
{{/operation}}
}
{{/operations}}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy