This template is modified from the original one, to handle multiple status-code handling of response. Don't ask me how they work, I don't quite understand them in depth...
37 lines
No EOL
862 B
Text
37 lines
No EOL
862 B
Text
{{#stringEnums}}
|
|
/**
|
|
* {{#lambda.indented_star_1}}{{{unescapedDescription}}}{{/lambda.indented_star_1}}
|
|
* @export
|
|
* @enum {string}
|
|
*/
|
|
export enum {{classname}} {
|
|
{{#allowableValues}}
|
|
{{#enumVars}}
|
|
{{#enumDescription}}
|
|
/**
|
|
* {{enumDescription}}
|
|
*/
|
|
{{/enumDescription}}
|
|
{{{name}}} = {{{value}}}{{^-last}},{{/-last}}
|
|
{{/enumVars}}
|
|
{{/allowableValues}}
|
|
}
|
|
{{/stringEnums}}{{^stringEnums}}
|
|
/**
|
|
* {{#lambda.indented_star_1}}{{{unescapedDescription}}}{{/lambda.indented_star_1}}
|
|
* @export
|
|
*/
|
|
export const {{classname}} = {
|
|
{{#allowableValues}}
|
|
{{#enumVars}}
|
|
{{#enumDescription}}
|
|
/**
|
|
* {{enumDescription}}
|
|
*/
|
|
{{/enumDescription}}
|
|
{{{name}}}: {{{value}}}{{^-last}},{{/-last}}
|
|
{{/enumVars}}
|
|
{{/allowableValues}}
|
|
} as const;
|
|
export type {{classname}} = typeof {{classname}}[keyof typeof {{classname}}];
|
|
{{/stringEnums}} |