File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -54,8 +54,11 @@ 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+ // Workaround until upstream issue is fixed:
60+ // https://github.com/OpenAPITools/openapi-generator/issues/21751
61+ // Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226
5962 { {#composedSchemas.oneOf} }
6063 { {#dataType} }
6164 // try to unmarshal data into { {#lambda.type-to-name} }{ {{.} }}{ {/lambda.type-to-name} }
@@ -78,6 +81,7 @@ func (dst *{{classname}}) UnmarshalJSON(data []byte) error {
7881
7982 { {/dataType} }
8083 { {/composedSchemas.oneOf} }
84+ { {! END - Workaround in case oneOf contains enums and strings. The enum value would match with both. } }
8185 if match > 1 { // more than 1 match
8286 // reset to nil
8387 {{#oneOf} }
You can’t perform that action at this time.
0 commit comments