Skip to content

Commit

Permalink
fixes after rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
  • Loading branch information
fenollp committed Dec 3, 2022
1 parent 5aa9aaf commit 4854d04
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions openapi3/validation_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ func EnableSchemaFormatValidation() ValidationOption {
}
}

// DisableSchemaDefaultsValidation disables schemas' default field validation.
func DisableSchemaDefaultsValidation() ValidationOption {
return func(options *ValidationOptions) {
options.schemaDefaultsValidationDisabled = true
}
}

// DisableSchemaFormatValidation does the opposite of EnableSchemaFormatValidation.
// By default, schema format validation is disabled.
func DisableSchemaFormatValidation() ValidationOption {
Expand All @@ -54,6 +47,22 @@ func DisableSchemaPatternValidation() ValidationOption {
}
}

// EnableSchemaDefaultsValidation dies the opposite of DisableSchemaDefaultsValidation.
// By default, schema default values are validated against their schema.
func EnableSchemaDefaultsValidation() ValidationOption {
return func(options *ValidationOptions) {
options.schemaDefaultsValidationDisabled = false
}
}

// DisableSchemaDefaultsValidation disables schemas' default field validation.
// By default, schema default values are validated against their schema.
func DisableSchemaDefaultsValidation() ValidationOption {
return func(options *ValidationOptions) {
options.schemaDefaultsValidationDisabled = true
}
}

// EnableExamplesValidation does the opposite of DisableExamplesValidation.
// By default, all schema examples are validated.
func EnableExamplesValidation() ValidationOption {
Expand Down

0 comments on commit 4854d04

Please sign in to comment.