Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor /schedule endpoint #64

Open
Gerzer opened this issue Dec 28, 2022 · 0 comments · May be fixed by #79
Open

Refactor /schedule endpoint #64

Gerzer opened this issue Dec 28, 2022 · 0 comments · May be fixed by #79
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Gerzer
Copy link
Collaborator

Gerzer commented Dec 28, 2022

Currently, the /schedule endpoint merely redirects to a schedule.json static file that contains all known schedule data. We should refactor the existing endpoint into two new endpoints:

  • /schedules for reading an array of all known schedules
  • /schedules/active for reading the currently active schedule (with an invariant that in the source of truth for all schedules, none may overlap in the axis of time)

Both of these endpoints should accept only GET requests. They also should return their respective responses directly without any redirection, preferably by implementing a proper data model in the SQLite database.

This will be a breaking change to the public API, so we’ll need to increment the API version number. We should try to batch this change with other upcoming breaking changes to minimize instability.

@Gerzer Gerzer added enhancement New feature or request good first issue Good for newcomers labels Dec 28, 2022
@Aeonoi Aeonoi self-assigned this Sep 26, 2023
@Aeonoi Aeonoi linked a pull request Oct 13, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants