Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Switch to Eat API #1370

Open
kordianbruck opened this issue Nov 25, 2020 · 2 comments
Open

Switch to Eat API #1370

kordianbruck opened this issue Nov 25, 2020 · 2 comments
Assignees

Comments

@kordianbruck
Copy link
Member

We should use the eat API to fetch any data for new food related things

@Liqs-v2
Copy link
Contributor

Liqs-v2 commented Nov 26, 2021

I'd be interested in looking into this, might also be related to another cafeteria issue.. Is this still an open problem?

@Liqs-v2 Liqs-v2 self-assigned this Dec 8, 2021
@Liqs-v2
Copy link
Contributor

Liqs-v2 commented Dec 8, 2021

Alright I did some digging and the plan for now looks as follows:

Cafeteria eat-api migration

Parsing

Fetch all dishes using combined/combined once on startup and parse it to fit the current database table structure.

  • The tables themselves will need to be changed to reflect the additional and different data provided.
  • The Entities need to be expanded as the new response structure is more nested and complex.
  • Once the eat-api data is parsed into the list of data entities, pass to EatAPIParser, that maps data to database structure
    • This means serialization classes and database entity classes are no longer the same
  • Then store in DB using menuDao.

This ensure backwards compatibility as it keeps the way data is accessed the same and only if chosen, new fields can be used.

However views will also need to be updated, as the ingredient annotations for example changed drastically.

I will try to keep this updated, while there is no PR yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants