Check declared schema locations for external resources
This commit is contained in:
@@ -436,7 +436,14 @@ func compileSchemaDocument(ctx context.Context, resourceURL string, document any
|
||||
}
|
||||
return nil, fmt.Errorf("register schema: %w", err)
|
||||
}
|
||||
return compileJSONSchema(ctx, resourceURL, compiler.Compile)
|
||||
root, err := compileJSONSchema(ctx, resourceURL, compiler.Compile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := checkSchemaLocations(ctx, compiler, resourceURL, document, "", root); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return root, nil
|
||||
}
|
||||
|
||||
type schemaExecutor interface {
|
||||
|
||||
Reference in New Issue
Block a user