File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -630,6 +630,26 @@ describe('Zod', () => {
630630
631631 describe . only ( 'with z.record' , ( ) => {
632632 it ( 'should work with additionalProperties for records' , async ( ) => {
633+ /*
634+ {
635+ type: 'object',
636+ properties: {
637+ id: { type: 'string' },
638+ options: {
639+ type: 'object',
640+ additionalProperties: {
641+ type: 'object',
642+ properties: { label: { type: 'string' } },
643+ required: [ 'label' ],
644+ additionalProperties: false
645+ }
646+ }
647+ },
648+ required: [ 'id', 'options' ],
649+ additionalProperties: false,
650+ '$schema': 'http://json-schema.org/draft-07/schema#'
651+ }
652+ */
633653 const schema = z . object ( {
634654 id : z . string ( ) ,
635655 options : z . record (
@@ -642,8 +662,6 @@ describe('Zod', () => {
642662 )
643663 } ) ;
644664
645- console . dir ( zod ( schema ) . jsonSchema , { depth : 10 } ) ; //debug
646-
647665 let row = {
648666 id : '1' ,
649667 options : {
You can’t perform that action at this time.
0 commit comments