22
33declare module '@rjsf/core' {
44 import * as React from 'react' ;
5- import { JSONSchema6 , JSONSchema6Type } from 'json-schema' ;
5+ import { JSONSchema7 , JSONSchema7Type } from 'json-schema' ;
66
77 type ErrorSchema = {
88 [ k : string ] : ErrorSchema ;
99 } ;
1010
1111 export interface FormProps < T > {
12- schema : JSONSchema6 ;
12+ schema : JSONSchema7 ;
1313 disabled ?: boolean ;
1414 uiSchema ?: UiSchema ;
1515 formData ?: T ;
@@ -96,7 +96,7 @@ declare module '@rjsf/core' {
9696 Exclude < keyof React . HTMLAttributes < HTMLElement > , 'onBlur' | 'onFocus' >
9797 > {
9898 id : string ;
99- schema : JSONSchema6 ;
99+ schema : JSONSchema7 ;
100100 value : any ;
101101 required : boolean ;
102102 disabled : boolean ;
@@ -115,7 +115,7 @@ declare module '@rjsf/core' {
115115
116116 export interface FieldProps < T = any >
117117 extends Pick < React . HTMLAttributes < HTMLElement > , Exclude < keyof React . HTMLAttributes < HTMLElement > , 'onBlur' > > {
118- schema : JSONSchema6 ;
118+ schema : JSONSchema7 ;
119119 uiSchema : UiSchema ;
120120 idSchema : IdSchema ;
121121 formData : T ;
@@ -156,7 +156,7 @@ declare module '@rjsf/core' {
156156 disabled : boolean ;
157157 displayLabel : boolean ;
158158 fields : Field [ ] ;
159- schema : JSONSchema6 ;
159+ schema : JSONSchema7 ;
160160 uiSchema : UiSchema ;
161161 formContext : any ;
162162 } ;
@@ -185,7 +185,7 @@ declare module '@rjsf/core' {
185185 onAddClick : ( event : any ) => ( event : any ) => void ;
186186 readonly : boolean ;
187187 required : boolean ;
188- schema : JSONSchema6 ;
188+ schema : JSONSchema7 ;
189189 uiSchema : UiSchema ;
190190 title : string ;
191191 formContext : any ;
@@ -205,7 +205,7 @@ declare module '@rjsf/core' {
205205 readonly : boolean ;
206206 } [ ] ;
207207 required : boolean ;
208- schema : JSONSchema6 ;
208+ schema : JSONSchema7 ;
209209 uiSchema : UiSchema ;
210210 idSchema : IdSchema ;
211211 formData : T ;
@@ -224,7 +224,7 @@ declare module '@rjsf/core' {
224224 errorSchema : FormValidation ;
225225 errors : AjvError [ ] ;
226226 formContext : any ;
227- schema : JSONSchema6 ;
227+ schema : JSONSchema7 ;
228228 uiSchema : UiSchema ;
229229 } ;
230230
@@ -234,7 +234,7 @@ declare module '@rjsf/core' {
234234 errors : AjvError [ ] ;
235235 errorSchema : FormValidation ;
236236 idSchema : IdSchema ;
237- schema : JSONSchema6 ;
237+ schema : JSONSchema7 ;
238238 uiSchema : UiSchema ;
239239 status ?: string ;
240240 }
@@ -270,7 +270,7 @@ declare module '@rjsf/core' {
270270}
271271
272272declare module '@rjsf/core/lib/components/fields/SchemaField' {
273- import { JSONSchema6 } from 'json-schema' ;
273+ import { JSONSchema7 } from 'json-schema' ;
274274 import { FieldProps , UiSchema , IdSchema , FormValidation } from '@rjsf/core' ;
275275
276276 export type SchemaFieldProps < T = any > = Pick <
@@ -282,41 +282,41 @@ declare module '@rjsf/core/lib/components/fields/SchemaField' {
282282}
283283
284284declare module '@rjsf/core/lib/utils' {
285- import { JSONSchema6 , JSONSchema6Definition , JSONSchema6Type , JSONSchema6TypeName } from 'json-schema' ;
285+ import { JSONSchema7 , JSONSchema7Definition , JSONSchema7Type , JSONSchema7TypeName } from 'json-schema' ;
286286 import { FieldProps , UiSchema , IdSchema , PathSchema , Widget } from '@rjsf/core' ;
287287
288288 export const ADDITIONAL_PROPERTY_FLAG : string ;
289289
290290 export function getDefaultRegistry ( ) : FieldProps [ 'registry' ] ;
291291
292- export function getSchemaType ( schema : JSONSchema6 ) : string ;
292+ export function getSchemaType ( schema : JSONSchema7 ) : string ;
293293
294294 export function getWidget (
295- schema : JSONSchema6 ,
295+ schema : JSONSchema7 ,
296296 widget : Widget ,
297297 registeredWidgets ?: { [ name : string ] : Widget } ,
298298 ) : Widget | Error ;
299299
300300 export function hasWidget (
301- schema : JSONSchema6 ,
301+ schema : JSONSchema7 ,
302302 widget : Widget ,
303303 registeredWidgets ?: { [ name : string ] : Widget } ,
304304 ) : boolean ;
305305
306306 export function computeDefaults < T = any > (
307- schema : JSONSchema6 ,
308- parentDefaults : JSONSchema6 [ 'default' ] [ ] ,
307+ schema : JSONSchema7 ,
308+ parentDefaults : JSONSchema7 [ 'default' ] [ ] ,
309309 definitions : FieldProps [ 'registry' ] [ 'definitions' ] ,
310310 rawFormData ?: T ,
311311 includeUndefinedValues ?: boolean ,
312- ) : JSONSchema6 [ 'default' ] [ ] ;
312+ ) : JSONSchema7 [ 'default' ] [ ] ;
313313
314314 export function getDefaultFormState < T = any > (
315- schema : JSONSchema6 ,
315+ schema : JSONSchema7 ,
316316 formData : T ,
317317 definitions ?: FieldProps [ 'registry' ] [ 'definitions' ] ,
318318 includeUndefinedValues ?: boolean ,
319- ) : T | JSONSchema6 [ 'default' ] [ ] ;
319+ ) : T | JSONSchema7 [ 'default' ] [ ] ;
320320
321321 export function getUiOptions ( uiSchema : UiSchema ) : UiSchema [ 'ui:options' ] ;
322322
@@ -328,60 +328,60 @@ declare module '@rjsf/core/lib/utils' {
328328
329329 export function orderProperties ( properties : [ ] , order : [ ] ) : [ ] ;
330330
331- export function isConstant ( schema : JSONSchema6 ) : boolean ;
331+ export function isConstant ( schema : JSONSchema7 ) : boolean ;
332332
333- export function toConstant ( schema : JSONSchema6 ) : JSONSchema6Type | JSONSchema6 [ 'const' ] | Error ;
333+ export function toConstant ( schema : JSONSchema7 ) : JSONSchema7Type | JSONSchema7 [ 'const' ] | Error ;
334334
335- export function isSelect ( _schema : JSONSchema6 , definitions ?: FieldProps [ 'registry' ] [ 'definitions' ] ) : boolean ;
335+ export function isSelect ( _schema : JSONSchema7 , definitions ?: FieldProps [ 'registry' ] [ 'definitions' ] ) : boolean ;
336336
337- export function isMultiSelect ( schema : JSONSchema6 , definitions ?: FieldProps [ 'registry' ] [ 'definitions' ] ) : boolean ;
337+ export function isMultiSelect ( schema : JSONSchema7 , definitions ?: FieldProps [ 'registry' ] [ 'definitions' ] ) : boolean ;
338338
339339 export function isFilesArray (
340- schema : JSONSchema6 ,
340+ schema : JSONSchema7 ,
341341 uiSchema : UiSchema ,
342342 definitions ?: FieldProps [ 'registry' ] [ 'definitions' ] ,
343343 ) : boolean ;
344344
345- export function isFixedItems ( schema : JSONSchema6 ) : boolean ;
345+ export function isFixedItems ( schema : JSONSchema7 ) : boolean ;
346346
347- export function allowAdditionalItems ( schema : JSONSchema6 ) : boolean ;
347+ export function allowAdditionalItems ( schema : JSONSchema7 ) : boolean ;
348348
349- export function optionsList ( schema : JSONSchema6 ) : { label : string ; value : string } [ ] ;
349+ export function optionsList ( schema : JSONSchema7 ) : { label : string ; value : string } [ ] ;
350350
351- export function guessType ( value : any ) : JSONSchema6TypeName ;
351+ export function guessType ( value : any ) : JSONSchema7TypeName ;
352352
353353 export function stubExistingAdditionalProperties < T = any > (
354- schema : JSONSchema6 ,
354+ schema : JSONSchema7 ,
355355 definitions ?: FieldProps [ 'registry' ] [ 'definitions' ] ,
356356 formData ?: T ,
357- ) : JSONSchema6 ;
357+ ) : JSONSchema7 ;
358358
359359 export function resolveSchema < T = any > (
360- schema : JSONSchema6Definition ,
360+ schema : JSONSchema7Definition ,
361361 definitions ?: FieldProps [ 'registry' ] [ 'definitions' ] ,
362362 formData ?: T ,
363- ) : JSONSchema6 ;
363+ ) : JSONSchema7 ;
364364
365365 export function retrieveSchema < T = any > (
366- schema : JSONSchema6Definition ,
366+ schema : JSONSchema7Definition ,
367367 definitions ?: FieldProps [ 'registry' ] [ 'definitions' ] ,
368368 formData ?: T ,
369- ) : JSONSchema6 ;
369+ ) : JSONSchema7 ;
370370
371371 export function deepEquals < T > ( a : T , b : T ) : boolean ;
372372
373373 export function shouldRender ( comp : React . Component , nextProps : any , nextState : any ) : boolean ;
374374
375375 export function toIdSchema < T = any > (
376- schema : JSONSchema6Definition ,
376+ schema : JSONSchema7Definition ,
377377 id : string ,
378378 definitions : FieldProps [ 'registry' ] [ 'definitions' ] ,
379379 formData ?: T ,
380380 idPredix ?: string ,
381381 ) : IdSchema | IdSchema [ ] ;
382382
383383 export function toPathSchema < T = any > (
384- schema : JSONSchema6Definition ,
384+ schema : JSONSchema7Definition ,
385385 name : string | undefined ,
386386 definitions : FieldProps [ 'registry' ] [ 'definitions' ] ,
387387 formData ?: T ,
@@ -412,22 +412,22 @@ declare module '@rjsf/core/lib/utils' {
412412 step ?: number ;
413413 }
414414
415- export function rangeSpec ( schema : JSONSchema6 ) : IRangeSpec ;
415+ export function rangeSpec ( schema : JSONSchema7 ) : IRangeSpec ;
416416
417417 export function getMatchingOption (
418418 formData : any ,
419- options : JSONSchema6 [ ] ,
419+ options : JSONSchema7 [ ] ,
420420 definitions : FieldProps [ 'registry' ] [ 'definitions' ] ,
421421 ) : number ;
422422}
423423
424424declare module '@rjsf/core/lib/validate' {
425- import { JSONSchema6Definition } from 'json-schema' ;
425+ import { JSONSchema7Definition } from 'json-schema' ;
426426 import { AjvError , ErrorSchema , FormProps } from '@rjsf/core' ;
427427
428428 export default function validateFormData < T = any > (
429429 formData : T ,
430- schema : JSONSchema6Definition ,
430+ schema : JSONSchema7Definition ,
431431 customValidate ?: FormProps < T > [ 'validate' ] ,
432432 transformErrors ?: FormProps < T > [ 'transformErrors' ] ,
433433 additionalMetaSchemas ?: FormProps < T > [ 'additionalMetaSchemas' ] ,
0 commit comments