Given a type of
export interface ObjectPartialFieldUpdate {
tags?: Record<string, string | null> | null
}
it outputs the following rules
"tags": {"dataType":"union","subSchemas":[{"ref":"Record_string.string-or-null_"},{"dataType":"enum","enums":[null]}]},
where the Record_string.string-or-null_ is of type
"type": {"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"dataType":"string"},"validators":{}},
which is incorrect as it does not allow null values in the record itself
Current workaround is to generate the type as
export interface ObjectPartialFieldUpdate {
tags?: { [key: string]: string | null } | null
}
which generates the rule type of
"tags": {"dataType":"union","subSchemas":[{"dataType":"nestedObjectLiteral","nestedProperties":{},"additionalProperties":{"dataType":"union","subSchemas":[{"dataType":"string"},{"dataType":"enum","enums":[null]}]}},{"dataType":"enum","enums":[null]}]},
which allows us to pass the follwoing payload
Given a type of
it outputs the following rules
where the
Record_string.string-or-null_is of typewhich is incorrect as it does not allow null values in the record itself
Current workaround is to generate the type as
which generates the rule type of
which allows us to pass the follwoing payload