Open p-spacek opened 6 months ago
fix the issue when a default value is an array with object items
this schema
{ type: 'object', properties: { garage: { type: 'array', items: { type: 'object', }, default: [ { car: { engine: { fuel: 'gasoline' }, wheel: [1, 2], }, }, { car: { engine: { fuel: 'diesel' }, }, }, ], }, },
produced invalid yaml before:
garage: - [Object object]
after fix:
garage: - car: engine: fuel: gasoline wheel: - 1 - 2 - car: engine: fuel: diesel
after the fix, it will correctly process the default value with the object array
added tests
coverage: 84.201% (+0.03%) from 84.174% when pulling ce643a9b89c84d3d457637840481bb2da74c101c on jigx-com:fix/array-default-value into 7203630540f35c88731bcf03ac41ca90b5919125 on redhat-developer:main.
What does this PR do?
fix the issue when a default value is an array with object items
this schema
produced invalid yaml before:
after fix:
after the fix, it will correctly process the default value with the object array
Is it tested? How?
added tests