Skip to content
Snippets Groups Projects

refactor schedule REST API

Merged Konrad Mohrfeldt requested to merge kmohrf/schedule-api-refactor into master
  1. Apr 24, 2022
    • Konrad Mohrfeldt's avatar
      fix: align schedule create/update conflict responses with documentation · 3af360ec
      Konrad Mohrfeldt authored
      The conflict responses should be send with an HTTP 409 status code as
      they’re defined in our documentation. This was not the case as the
      dashboard couldn’t handle these error codes, but is now fixed in
      dashboard@4a07ad9e.
      3af360ec
    • Konrad Mohrfeldt's avatar
      feat: allow single request scheduling · 293c78c5
      Konrad Mohrfeldt authored
      Until now the steering API client was expected to submit two requests.
      
      1. The initial schedule request, with a `schedule` object
      2. A second schedule request, with an additional `solutions` object
      
      This `solutions` object was empty, if no conflicts arose from the
      submitted schedule in the first place. But instead of just creating the
      requested schedule if no conflicts were detected we still required that
      second round-trip, introducing possible race conditions in the client,
      if another successful scheduling request was made between requests.
      
      From now on the steering API will create schedules if no conflicts have
      been detected and will only require the client to submit solutions if
      there really are conflicts to solve.
      293c78c5
    • Konrad Mohrfeldt's avatar
      refactor: update schedule REST API attribute names and documentation · 51be0fbe
      Konrad Mohrfeldt authored
      The following attribute names were marked as deprecated in the schedule
      request and have been replaced by their new names:
      
        dstart → first_date
        until → last_date
        tstart → start_time
        tend → end_time
        byweekday → by_weekday
      
      Apart from that this commit fixes a few documentation errors.
      51be0fbe
Loading