You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// {{{classname}}}{{#lambda.titlecase}}{{nameInCamelCase}}{{/lambda.titlecase}} {{{description}}}{{^description}}the model '{{{classname}}}'{{/description}}
284
-
type {{{classname}}}{{#lambda.titlecase}}{{nameInCamelCase}}{{/lambda.titlecase}} {{dataType}}
284
+
// value type for enums
285
+
type {{{classname}}}{{#lambda.titlecase}}{{nameInCamelCase}}{{/lambda.titlecase}} {{#isNumeric}}int{{/isNumeric}}{{^isNumeric}}string{{/isNumeric}}
285
286
286
287
// List of {{name}}
287
288
const (
@@ -304,13 +305,13 @@ var Allowed{{{classname}}}{{#lambda.titlecase}}{{nameInCamelCase}}{{/lambda.titl
304
305
}
305
306
306
307
func (v *{{{classname}}}{{#lambda.titlecase}}{{nameInCamelCase}}{{/lambda.titlecase}}) UnmarshalJSON(src []byte) error {
307
-
var value {{dataType}}
308
+
var value {{{classname}}}{{#lambda.titlecase}}{{nameInCamelCase}}{{/lambda.titlecase}}
308
309
err := json.Unmarshal(src, &value)
309
310
if err != nil {
310
311
return err
311
312
}
312
313
// Allow unmarshalling zero value for testing purposes
313
-
var zeroValue {{dataType}}
314
+
var zeroValue {{{classname}}}{{#lambda.titlecase}}{{nameInCamelCase}}{{/lambda.titlecase}}
314
315
if value == zeroValue {
315
316
return nil
316
317
}
@@ -327,7 +328,7 @@ func (v *{{{classname}}}{{#lambda.titlecase}}{{nameInCamelCase}}{{/lambda.titlec
327
328
328
329
// New{{{classname}}}{{#lambda.titlecase}}{{nameInCamelCase}}{{/lambda.titlecase}}FromValue returns a pointer to a valid {{{classname}}}{{#lambda.titlecase}}{{nameInCamelCase}}{{/lambda.titlecase}}
329
330
// for the value passed as argument, or an error if the value passed is not allowed by the enum
0 commit comments