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
My JTD schemas contain records that have either only additionalAttributes: true (i.e. no fixed internal structure) or optionalAttributes with additionalAttributes: true (where we want type safety for some attributes and pass others through). Serialization always fails in the first case and also in the second if no optionalAttributes are set in the data. This issue is very likely related to #2001 but that one only mentions optionalProperties.
What version of Ajv are you using? Does the issue happen if you use the latest version?
8.11.2
Are you going to resolve the issue?
Would love to test if this is resolved by #2028. Can't get the build to work on my machine, getting some TS errors on npm install.
The text was updated successfully, but these errors were encountered:
My JTD schemas contain records that have either only
additionalAttributes: true
(i.e. no fixed internal structure) oroptionalAttributes
withadditionalAttributes: true
(where we want type safety for some attributes and pass others through). Serialization always fails in the first case and also in the second if nooptionalAttributes
are set in the data. This issue is very likely related to #2001 but that one only mentionsoptionalProperties
.What version of Ajv are you using? Does the issue happen if you use the latest version?
8.11.2
Ajv options object
not dependent on options
JSON Schema
schema1
Same result with
optionalProperties
instead ofproperties
(schema2)schema3
Sample data
Your code
https://runkit.com/fabianeichinger/637bc56844c590000adfb57d
Serialization output
serialize1:
{"a":1"b":2}
serialize2:
{"a":1"b":2}
serialize3:
{,"a":1,"b":2}
What results did you expect?
Valid JSON
Are you going to resolve the issue?
Would love to test if this is resolved by #2028. Can't get the build to work on my machine, getting some TS errors on npm install.
The text was updated successfully, but these errors were encountered: