diff --git a/openapi3/schema.go b/openapi3/schema.go index 2a672ceb1..85b0e0388 100644 --- a/openapi3/schema.go +++ b/openapi3/schema.go @@ -814,6 +814,12 @@ func (schema *Schema) visitJSON(settings *schemaValidationSettings, value interf switch value := value.(type) { case bool: return schema.visitJSONBoolean(settings, value) + case int: + return schema.visitJSONNumber(settings, float64(value)) + case int32: + return schema.visitJSONNumber(settings, float64(value)) + case int64: + return schema.visitJSONNumber(settings, float64(value)) case float64: return schema.visitJSONNumber(settings, value) case string: