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
Release 10.0.2 (#419) added the UtilRequiredKeys type that produces invalid generated code when you have a schema with complex schema types (anyOf/allOf/oneOf) that reference required fields of nullable components.
How to trigger in a schema:
Have a nullable component (myObject is the schema below)
Reference component with complex schema type (TestObject in the schema below)
Mark a nested field as required ("required": ["name"], as marked in TestObject)
Release 10.0.2 (#419) added the
UtilRequiredKeys
type that produces invalid generated code when you have a schema with complex schema types (anyOf/allOf/oneOf) that reference required fields of nullable components.How to trigger in a schema:
myObject
is the schema below)TestObject
in the schema below)"required": ["name"],
as marked inTestObject
)Example schema:
Generated code from schema (utilising the nullable-3.0 test setup)
Which produces the following error
Potential workarounds:
UtilRequiredKeys
via theconfiguration.internalTemplateOptions.addUtilRequiredKeysType
UtilRequiredKeys
definition in template to handle null case via ts NonNullableThe text was updated successfully, but these errors were encountered: