45 lines
No EOL
1 KiB
Text
45 lines
No EOL
1 KiB
Text
export interface {{classname}} {{#parent}}extends models.{{{parent}}} {{/parent}}{
|
|
{{#additionalPropertiesType}}
|
|
[key: string]: {{{additionalPropertiesType}}}{{#hasVars}} | any{{/hasVars}};
|
|
|
|
{{/additionalPropertiesType}}
|
|
{{#vars}}
|
|
{{#description}}
|
|
/**
|
|
* {{{description}}}
|
|
*/
|
|
{{/description}}
|
|
{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{/isEnum}};
|
|
|
|
{{/vars}}
|
|
}
|
|
export class {{classname}}Exception implements Error{
|
|
|
|
constructor(obj:{{classname}}, message?:string){
|
|
{{#vars}}
|
|
this.item = obj;
|
|
{{/vars}}
|
|
|
|
}
|
|
|
|
message: string;
|
|
stack: string;
|
|
name: string;
|
|
|
|
item: {{classname}};
|
|
}
|
|
|
|
{{#hasEnums}}
|
|
export namespace {{classname}} {
|
|
{{#vars}}
|
|
{{#isEnum}}
|
|
export enum {{enumName}} {
|
|
{{#allowableValues}}
|
|
{{#enumVars}}
|
|
{{{name}}} = <any> {{{value}}}{{^-last}},{{/-last}}
|
|
{{/enumVars}}
|
|
{{/allowableValues}}
|
|
}
|
|
{{/isEnum}}
|
|
{{/vars}}
|
|
}{{/hasEnums}} |