Currently when an object has a String type in the schema it's possible to control the minimum and maximum length of those strings using the min_length or max_length attribute parameters. This is currently not possible for numbers.
Describe the Use Case
It would be good to be able to specify ranges, i.e for ports 1-65535, or vlans 1-4094, or just an attribute that has to be a positive number or between some other range.
I don't know if we need all combinations such as:
ge
gt
le
lt
I think one for each boundary would be enough. It might be tempting to reuse the settings from Strings i.e min_length and max_length to avoid having a huge number of options but I think both of those sound wrong for numbers.
Another consideration is if we want to have something for additional restrictions. I'm not sure it's still a thing but at least in the Cisco world the vlans 1002 -> 1005 were reserved and couldn't be used. Do we need an ability to exclude specific ranges? If so how should this be defined?
Component
API Server / GraphQL
Describe the Feature Request
Currently when an object has a String type in the schema it's possible to control the minimum and maximum length of those strings using the
min_length
ormax_length
attribute parameters. This is currently not possible for numbers.Describe the Use Case
It would be good to be able to specify ranges, i.e for ports 1-65535, or vlans 1-4094, or just an attribute that has to be a positive number or between some other range.
I don't know if we need all combinations such as:
I think one for each boundary would be enough. It might be tempting to reuse the settings from Strings i.e
min_length
andmax_length
to avoid having a huge number of options but I think both of those sound wrong for numbers.Another consideration is if we want to have something for additional restrictions. I'm not sure it's still a thing but at least in the Cisco world the vlans 1002 -> 1005 were reserved and couldn't be used. Do we need an ability to exclude specific ranges? If so how should this be defined?
Additional Information
No response