Skip to content

Commit fba053e

Browse files
its-hammer-timedaveshanley
authored andcommitted
Fix Options During Validator Creation
1 parent 788fde5 commit fba053e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

validator.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ func NewValidatorFromV3Model(m *v3.Document, opts ...config.Option) Validator {
9090
v := &validator{options: options, v3Model: m}
9191

9292
// create a new parameter validator
93-
v.paramValidator = parameters.NewParameterValidator(m, opts...)
93+
v.paramValidator = parameters.NewParameterValidator(m, config.WithExistingOpts(options))
9494

9595
// create aq new request body validator
96-
v.requestValidator = requests.NewRequestBodyValidator(m, opts...)
96+
v.requestValidator = requests.NewRequestBodyValidator(m, config.WithExistingOpts(options))
9797

9898
// create a response body validator
99-
v.responseValidator = responses.NewResponseBodyValidator(m, opts...)
99+
v.responseValidator = responses.NewResponseBodyValidator(m, config.WithExistingOpts(options))
100100

101101
// warm the schema caches by pre-compiling all schemas in the document
102102
// (warmSchemaCaches checks for nil cache and skips if disabled)

0 commit comments

Comments
 (0)