File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,9 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error {
5454 { {/discriminator} }
5555 { {^discriminator} }
5656 match := 0
57- { {! Workaround in case oneOf contains enums and strings. The enum value would match with both. } }
58- { {! The workaround adds a regex check for the string (in case the api spec provides a regex) } }
57+ { {! BEGIN - Workaround in case oneOf contains enums and strings. The enum value would match with both. } }
58+ { {! This workaround adds a regex check for the string (in case the api spec provides a regex) } }
59+ { {! Ticket: STACKITSDK-226 Issue in openapi-generator: https://github.com/OpenAPITools/openapi-generator/issues/21751 } }
5960 { {#composedSchemas.oneOf} }
6061 { {#dataType} }
6162 // try to unmarshal data into { {#lambda.type-to-name} }{ {{.} }}{ {/lambda.type-to-name} }
@@ -78,6 +79,7 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error {
7879
7980 { {/dataType} }
8081 { {/composedSchemas.oneOf} }
82+ { {! END - Workaround in case oneOf contains enums and strings. The enum value would match with both. } }
8183 if match > 1 { // more than 1 match
8284 // reset to nil
8385 {{#oneOf} }
You can’t perform that action at this time.
0 commit comments