Defines whole number fields with optional range constraints. Use for counts, IDs, quantities, or discrete numeric values. More restrictive than schema_number.
Examples
# Item quantity
schema_integer("Quantity ordered", minimum = 1)
#> $type
#> [1] "integer"
#>
#> $description
#> [1] "Quantity ordered"
#>
#> $minimum
#> [1] 1
#>
# Rating scale
schema_integer("Star rating", minimum = 1, maximum = 5)
#> $type
#> [1] "integer"
#>
#> $description
#> [1] "Star rating"
#>
#> $minimum
#> [1] 1
#>
#> $maximum
#> [1] 5
#>