Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct definition of MultipleOf and ExclusiveMaximum. #116

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/schemas/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ type Type struct {
Version string `json:"$schema,omitempty"` // Section 6.1.
Ref string `json:"$ref,omitempty"` // Section 7.
// RFC draft-wright-json-schema-validation-00, section 5.
MultipleOf int `json:"multipleOf,omitempty"` // Section 5.1.
MultipleOf float64 `json:"multipleOf,omitempty"` // Section 5.1.
Maximum float64 `json:"maximum,omitempty"` // Section 5.2.
ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty"` // Section 5.3.
ExclusiveMaximum float64 `json:"exclusiveMaximum,omitempty"` // Section 5.3.
Minimum float64 `json:"minimum,omitempty"` // Section 5.4.
ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty"` // Section 5.5.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExclusiveMinimum should be a number, too

MaxLength int `json:"maxLength,omitempty"` // Section 5.6.
Expand Down