@@ -205,20 +205,20 @@ export const SchemaNodeMethods = {
205
205
/**
206
206
* @returns for $ref, the corresponding SchemaNode or undefined
207
207
*/
208
- getRef ( $ref : string ) : SchemaNode | undefined {
208
+ getNodeRef ( $ref : string ) : SchemaNode | undefined {
209
209
const node = this as SchemaNode ;
210
210
return node . compileSchema ( { $ref } ) . resolveRef ( ) ;
211
211
} ,
212
212
213
- getRootNode ( ) {
213
+ getNodeRoot ( ) {
214
214
const node = this as SchemaNode ;
215
215
return node . context . rootNode ;
216
216
} ,
217
217
218
218
/**
219
219
* @returns child node identified by property as SchemaNode
220
220
*/
221
- getChild ( key : string | number , data ?: unknown , options : GetNodeOptions = { } ) : OptionalNodeOrError {
221
+ getNodeChild ( key : string | number , data ?: unknown , options : GetNodeOptions = { } ) : OptionalNodeOrError {
222
222
options . path = options . path ?? [ ] ;
223
223
224
224
options . withSchemaWarning = options . withSchemaWarning ?? false ;
@@ -227,7 +227,7 @@ export const SchemaNodeMethods = {
227
227
228
228
let node = this as SchemaNode ;
229
229
if ( node . reducers . length ) {
230
- const result = node . reduceSchema ( data , { key, path, pointer } ) ;
230
+ const result = node . reduceNode ( data , { key, path, pointer } ) ;
231
231
if ( result . error ) {
232
232
return result ;
233
233
}
@@ -248,7 +248,7 @@ export const SchemaNodeMethods = {
248
248
249
249
const referencedNode = node . resolveRef ( { path } ) ;
250
250
if ( referencedNode !== node ) {
251
- return referencedNode . getChild ( key , data , options ) ;
251
+ return referencedNode . getNodeChild ( key , data , options ) ;
252
252
}
253
253
254
254
if ( options . createSchema === true ) {
@@ -292,7 +292,7 @@ export const SchemaNodeMethods = {
292
292
/**
293
293
* @returns SchemaNode with a reduced JSON Schema matching the given data
294
294
*/
295
- reduceSchema (
295
+ reduceNode (
296
296
data : unknown ,
297
297
options : { key ?: string | number ; pointer ?: string ; path ?: ValidationPath } = { }
298
298
) : OptionalNodeOrError {
@@ -381,7 +381,7 @@ export const SchemaNodeMethods = {
381
381
* Register a JSON Schema as a remote-schema to be resolved by $ref, $anchor, etc
382
382
* @returns the current node (not the remote schema-node)
383
383
*/
384
- addRemote ( url : string , schema : JsonSchema ) : SchemaNode {
384
+ addRemoteSchema ( url : string , schema : JsonSchema ) : SchemaNode {
385
385
// @draft >= 6
386
386
schema . $id = joinId ( schema . $id || url ) ;
387
387
const { context } = this as SchemaNode ;
0 commit comments