You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The func.yaml JSON schema is generated with github.com/alecthomas/jsonschema. Its number-keyword handling stores minimum/maximum as int (Type.Minimum int, reflect.go:60) and parses the tag value with strconv.Atoi — for both the jsonschema tag (numbericKeywords, reflect.go:614) and the jsonschema_extras tag (extraKeywords). A fractional minimum such as 0.01 fails to parse, the error is discarded, and the emitted schema gets minimum: 0.
As a result, schema-based validation is looser than the runtime ValidateScale. For example scale.kpa.target requires >= 0.01 at runtime, but the generated schema only enforces > 0 (via an exclusiveMinimum: true workaround), so a value like 0.001 passes the published schema/func_yaml-schema.json while ValidateScale rejects it at deploy time.
This is a pre-existing, generator-wide limitation affecting any fractional minimum (not specific to the scale fields): the library simply cannot express a non-integer minimum.
Possible fixes
Post-process the generated schema in schema/generator/main.go to set fractional minima after reflection (targeted, but per-field).
Switch to a jsonschema library / tag path that supports float minima, then regenerate schema/func_yaml-schema.json so schema validation matches ValidateScale.
Activity
akshat-lakhera commentedon Nov 18, 2026
Hi @matejvasek, I would like to work on this issue and preserve fractional minimum values in the schema generator. Could you please assign it to me?
/assign
akshat-lakhera commentedon Nov 18, 2026
/unassign
Unassigning as PR #4067 is already open for this.