File tree Expand file tree Collapse file tree 8 files changed +27
-4
lines changed
Expand file tree Collapse file tree 8 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,10 @@ export class ApiModel implements PhysycalFile {
4747 this . _operationId = camel ( operation ) ;
4848 }
4949
50+ get hasComments ( ) : boolean {
51+ return ! ! this . description || ! ! this . example || ! ! this . deprecated ;
52+ }
53+
5054 get queryParamsType ( ) : string {
5155 return this . queryParams ?. type ;
5256 }
Original file line number Diff line number Diff line change 11export interface PhysycalFile {
22 name : string ;
33 fileName : string ;
4+ hasComments : boolean ;
45}
Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ export class EnumModel<T = string> implements PhysycalFile {
3333 return `#/components/schemas/${ this . name } ` ;
3434 }
3535
36+ get hasComments ( ) : boolean {
37+ return ! ! this . description || ! ! this . example || ! ! this . deprecated ;
38+ }
39+
3640 get values ( ) : T [ ] {
3741 return this . _values ;
3842 }
Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ export class ModelAttributessModel {
2020 this . _typeURI = typeURI ;
2121 }
2222
23+ get hasComments ( ) : boolean {
24+ return ! ! this . description || ! ! this . example || ! ! this . deprecated ;
25+ }
26+
2327 /**
2428 * Return the type parsed, (class or primitive)
2529 */
Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ export class ModelModel implements PhysycalFile {
2727 return this . _attributes ;
2828 }
2929
30+ get hasComments ( ) : boolean {
31+ return ! ! this . description || ! ! this . example || ! ! this . deprecated ;
32+ }
33+
3034 getDependences ( store : ModelStore ) : PhysycalFile [ ] {
3135 const dependences = new Set < PhysycalFile > ( ) ;
3236
Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ export class {{groupName}}Service {
2828 ) {
2929 }
3030
31- { { #apis} }
31+ { { #apis} }
32+ { { #hasComments} }
3233 /**
3334 {{#description}}
3435 * {{description}}
@@ -40,6 +41,7 @@ export class {{groupName}}Service {
4041 * @deprecated
4142 {{/deprecated}}
4243 */
44+ { { / h a s C o m m e n t s } }
4345 { { !
4446 // Will add options and requestBody if necessary
4547 // If both, will add comma between
@@ -57,5 +59,5 @@ export class {{groupName}}Service {
5759 ) ;
5860 }
5961
60- { { / apis} }
62+ { { / apis} }
6163}
Original file line number Diff line number Diff line change 11{ { #model} }
2+ { { #hasComments} }
23/**
34{{#description}}
45 * {{description}}
1011 * @deprecated
1112{{/deprecated}}
1213 */
14+ { { / h a s C o m m e n t s } }
1315export enum { { name } } {
1416 { { #values} }
1517 '{{.}}' = '{{.}}' ,
Original file line number Diff line number Diff line change 22import { { { name } } } from './{{fileName}}' ;
33{ { / d e p e n d e n c e s } }
44
5+ { { #hasComments} }
56/**
67{{#description}}
78 * {{description}}
@@ -13,11 +14,12 @@ import { {{name}} } from './{{fileName}}';
1314 * @deprecated
1415{{/deprecated}}
1516 */
17+ { { / h a s C o m m e n t s } }
1618{ { #model} }
1719export class { { name } } {
1820
1921 { { #attributes} }
20- { { #description } }
22+ { { #hasComments } }
2123 /**
2224 {{#description}}
2325 * {{description}}
@@ -29,7 +31,7 @@ export class {{ name }} {
2931 * @deprecated
3032 {{/deprecated}}
3133 */
32- { { / d e s c r i p t i o n } }
34+ { { / h a s C o m m e n t s } }
3335 { { name } } { { #isOptional} } ?{ { / i s O p t i o n a l } } : { { t y p e } } { { # i s A r r a y } } [ ] { { / isArray } } { { #default} } = { { default} } { { / d e f a u l t } } ;
3436
3537 { { / a t t r i b u t e s } }
You can’t perform that action at this time.
0 commit comments