File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ export class ModelAttributessModel {
5555 * Return a fake array with "arrayLevels" elements to print it in mustache.js
5656 */
5757 get arrayLevelsRepeater ( ) : any [ ] {
58+ if ( ! this . arrayLevels ) return null ;
5859 return new Array ( this . arrayLevels ) . fill ( true ) ;
5960 }
6061
Original file line number Diff line number Diff line change @@ -65,16 +65,22 @@ This file implement `TemplateConfigI` interface (`src/models/template-config.mod
6565
6666### api.?
6767
68+ > Main model file: [ models/api.model.ts] ( ../src/models/api.model.ts )
69+
6870File used as template to generate each ` Api ` class.
6971
7072An API class is composed by some ` endpoints ` which share the ` same 1rst "tag" ` .
7173
7274### model.?
7375
76+ > Main model file: [ models/model.model.ts] ( ../src/models/model.model.ts )
77+
7478File used to generate ` each model ` .
7579
7680It's exported in a shared folder with all models.
7781
7882### enumModel.?
7983
84+ > Main model file: [ models/enum.model.ts] ( ../src/models/enum.model.ts )
85+
8086Same as ` model ` but for ` enums ` .
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import { {{name}} } from './{{fileName}}';
1818{ { #model} }
1919export class { { name } } {
2020
21- { { #attributes} }
21+ { { #attributes} }
2222 { { #hasComments} }
2323 /**
2424 {{#description}}
@@ -32,10 +32,13 @@ export class {{ name }} {
3232 {{/deprecated}}
3333 */
3434 { { / h a s C o m m e n t s } }
35- { { name } } { { #isOptional} } ?{ { / i s O p t i o n a l } } : { { t y p e } } { { # i s A r r a y
36- } } { { #arrayLevelsRepeater} } [ ] { { / a r r a y L e v e l s R e p e a t e r } } { {
37- / i s A r r a y } } { { # d e f a u l t } } = { { d e f a u l t } } { { / default} } ;
35+ { { name } } { {
36+ #isOptional} } ?{ { / isOptional
37+ } } : { { type} } { {
38+ #arrayLevelsRepeater} } [ ] { { / arrayLevelsRepeater
39+ } } { { #default} } = { { default} } { { / default
40+ } } ;
3841
39- { { / a t t r i b u t e s } }
42+ { { / attributes } }
4043}
4144{ { / model } }
You can’t perform that action at this time.
0 commit comments