Bind schema selections throughout execution
This commit is contained in:
@@ -51,18 +51,17 @@ func prepareSmokeInferenceCase(
|
||||
),
|
||||
}, nil
|
||||
case domain.SmokeTestStructuredOutput:
|
||||
validator := validate.NewFSValidator(smokeSchemaFS, ".")
|
||||
jsonPlan, err := validator.PrepareValidation(ctx, domain.OutputContract{
|
||||
validator := validate.NewValidator()
|
||||
jsonPlan, err := validator.PrepareValidation(ctx, validate.Input{Contract: domain.OutputContract{
|
||||
Format: domain.FormatJSON, ValidationMode: domain.ValidationJSON,
|
||||
})
|
||||
}})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%w: prepare private JSON validation: %w", ErrValidation, err)
|
||||
}
|
||||
plan, err := validator.PrepareValidation(ctx, domain.OutputContract{
|
||||
plan, err := validator.PrepareValidation(ctx, validate.Input{Contract: domain.OutputContract{
|
||||
Format: domain.FormatJSON,
|
||||
ValidationMode: domain.ValidationJSONSchema,
|
||||
SchemaPath: smokeStructuredSchemaPath,
|
||||
})
|
||||
}, File: &domain.ResourceBinding{FS: smokeSchemaFS, Path: smokeStructuredSchemaPath}})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%w: prepare private structured-output schema: %w", ErrValidation, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user