Skip to content

Commit

Permalink
add comment about Reason to SchemaError
Browse files Browse the repository at this point in the history
  • Loading branch information
ori-shalom committed Jan 16, 2023
1 parent ba76412 commit 7949cb5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions openapi3/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -1927,10 +1927,12 @@ func (schema *Schema) compilePattern() (err error) {
}

type SchemaError struct {
Value interface{}
reversePath []string
Schema *Schema
SchemaField string
Value interface{}
reversePath []string
Schema *Schema
SchemaField string
// Reason is a human-readable message describing the error.
// The message should never include the original value to prevent leakage of potentially sensitive inputs in error messages.
Reason string
Origin error
customizeMessageError func(err *SchemaError) string
Expand Down

0 comments on commit 7949cb5

Please sign in to comment.