File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,34 @@ Currently supported modifiers:
120120
121121The modifiers are also customizable via the [ configuration file] ( #configuration-file ) .
122122
123+ In case you are adding a ` custom modifier ` to a parameter that does not have value in the values file
124+ you must add one of the ` supported modifiers ` as last modifier.
125+
126+ Example:
127+
128+ Values file
129+
130+ ``` yaml
131+ # @param noDefaultValue [number, nullable] Description
132+ # noDefaultValue: 1
133+ ```
134+
135+ Custom configuration snippet:
136+
137+ ``` json
138+ {
139+ ...
140+ "modifiers" : {
141+ "array" : " array" ,
142+ "object" : " object"
143+ "string" : " string"
144+ "nullable" : " nullable" ,
145+ "number" : " number"
146+ },
147+ ...
148+ }
149+ ```
150+
123151## Configuration file
124152
125153The configuration file has the following structure:
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ function applyModifiers(param, config) {
3636 // modifier specifies the default value.
3737 break ;
3838 default :
39- throw new Error ( `Unknown modifier: ${ modifier } ` ) ;
39+ throw new Error ( `Unknown modifier: ${ modifier } for parameter ${ param . name } ` ) ;
4040 }
4141 } ) ;
4242 }
You can’t perform that action at this time.
0 commit comments