Inconsistent type inference for additionalProperties
when properties
is also defined
#199
Labels
enhancement
New feature or request
Encountering a bug in
json-schema-to-ts
version 3.1.0 where the handling ofadditionalProperties
does not work as expected whenproperties
is also provided. Instead of assigning the designated type to additional properties, they are treated asunknown
.Example to reproduce:
Expected behavior:
Actual behavior:
The expected behavior would be to treat all additional properties as
string
orstring | undefined
(which makes more sense when it comes to dealing with the unknown and type compliant to the non required additional properties), aligning with the specifiedadditionalProperties
type.The text was updated successfully, but these errors were encountered: