Page MenuHomePhabricator

Specify a minimum for timing-related fields in EditAttemptStep MEP schema
Closed, DeclinedPublic

Description

Ya I betcha you could add minimum: 0 to the field. https://json-schema.org/understanding-json-schema/reference/numeric.html

When EditAttemptStep schema is ported to MEP from meta.wikimedia.org as part of T238230, fields like ready_timing, loaded_timing, etc. should include a lower bound on allowed values since "time elapsed" should never be negative (conceptually).

If there are other fields that would benefit from specific restrictions like that, to prevent invalid data from being marked as valid then this task should be expanded to cover those as well.