Summary
Define the update semantics for ScheduleUpdate when the schedule persistence and update flow are implemented.
ScheduleUpdate currently permits null for fields that are non-nullable on Schedule:
modules
module_configuration
recurrence_rule
timezone
enabled
The published OpenAPI contract currently makes these fields nullable. A client can therefore send explicit JSON null. The API contract must distinguish an omitted field from an explicitly supplied null value.
Required changes
- Decide the API behavior for explicit JSON
null values in PATCH /api/v1/schedules/{schedule_id}.
- Keep omitted fields unchanged during a partial update.
- Reject explicit
null values for fields that cannot be null on Schedule, unless the final persistence model intentionally supports null for that field.
- Implement the selected behavior in the request schema and schedule update merge/application flow.
- Update the generated OpenAPI contract if the selected behavior changes the schema.
- Add tests for omitted fields, valid field updates, and explicit
null values.
Affected areas
src/nc3_testing_platform/domains/schedules/schemas.py
src/nc3_testing_platform/domains/schedules/router.py
- Future schedule service and repository modules
api/openapi.json
- Schedule update tests
Acceptance criteria
- An omitted update field does not modify the stored
Schedule value.
- A valid supplied update field modifies the stored
Schedule value.
- An explicit
null value cannot produce a Schedule with null values for modules, module_configuration, recurrence_rule, timezone, or enabled.
- The generated OpenAPI schema matches the implemented request behavior.
- Tests cover the selected semantics.
Backlinks
Requested by: @t0kubetsu
Summary
Define the update semantics for
ScheduleUpdatewhen the schedule persistence and update flow are implemented.ScheduleUpdatecurrently permitsnullfor fields that are non-nullable onSchedule:modulesmodule_configurationrecurrence_ruletimezoneenabledThe published OpenAPI contract currently makes these fields nullable. A client can therefore send explicit JSON
null. The API contract must distinguish an omitted field from an explicitly suppliednullvalue.Required changes
nullvalues inPATCH /api/v1/schedules/{schedule_id}.nullvalues for fields that cannot be null onSchedule, unless the final persistence model intentionally supports null for that field.nullvalues.Affected areas
src/nc3_testing_platform/domains/schedules/schemas.pysrc/nc3_testing_platform/domains/schedules/router.pyapi/openapi.jsonAcceptance criteria
Schedulevalue.Schedulevalue.nullvalue cannot produce aSchedulewith null values formodules,module_configuration,recurrence_rule,timezone, orenabled.Backlinks
Requested by: @t0kubetsu