forked from loafle/openapi-generator-original
[typescript-angular] Add support for marking model properties with @deprecated (#18417)
* [typescript-angular] Add support for marking model properties with @deprecated * Add generated samples * Only add comment if description or deprecated is set. And split description/deprecated on two lines if both are set. * Update samples with generated output * Fix indention * Update samples * Remove whitespace * Update samples
This commit is contained in:
parent
a724c754bc
commit
99b5fe9f9c
@ -2,9 +2,17 @@ export interface {{classname}}{{#allParents}}{{#-first}} extends {{/-first}}{{{.
|
||||
{{#vars}}
|
||||
{{#description}}
|
||||
/**
|
||||
* {{{.}}}
|
||||
* {{{description}}}
|
||||
{{#deprecated}}
|
||||
* @deprecated
|
||||
{{/deprecated}}
|
||||
*/
|
||||
{{/description}}
|
||||
{{^description}}
|
||||
{{#deprecated}}
|
||||
/** @deprecated */
|
||||
{{/deprecated}}
|
||||
{{/description}}
|
||||
{{#isReadOnly}}readonly {{/isReadOnly}}{{{name}}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}} | null{{/isNullable}};
|
||||
{{/vars}}
|
||||
}{{>modelGenericEnums}}
|
||||
|
@ -24,6 +24,7 @@ export interface Pet {
|
||||
tags?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @deprecated
|
||||
*/
|
||||
status?: Pet.StatusEnum;
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ export interface Pet {
|
||||
tags?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @deprecated
|
||||
*/
|
||||
status?: Pet.StatusEnum;
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ export interface Pet {
|
||||
tags?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @deprecated
|
||||
*/
|
||||
status?: Pet.StatusEnum;
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ export interface Pet {
|
||||
tags?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @deprecated
|
||||
*/
|
||||
status?: Pet.StatusEnum;
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ export interface Pet {
|
||||
tags?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @deprecated
|
||||
*/
|
||||
status?: Pet.StatusEnum;
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ export interface Pet {
|
||||
tags?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @deprecated
|
||||
*/
|
||||
status?: Pet.StatusEnum;
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ export interface Pet {
|
||||
tags?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @deprecated
|
||||
*/
|
||||
status?: Pet.StatusEnum;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user