gnostic
gnostic copied to clipboard
When the field type is uint, it is invalid when setting the minimum to 0
proro
uint32 mediNum = 2 [
(validate.rules).uint32 = {gte: 0, lte: 16777215},
(openapi.v3.property) = {
title: "number";
description: "number";
type: "integer";
minimum: 0;
maximum: 16777215;
}
];
yaml
mediNum:
title: number
maximum: 1.6777215e+07
type: integer
description: number
format: uint32
My guess here is that since minimum is 0, which is the default for uint in protocol buffers, it isn't getting serialized out to the yaml.
Probably need some way to tell the difference between an unset default 0, and a purposely set default 0, and write it out when it is purposely set.
@timburks what do you think? Maybe mark the fields as optional or something?