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

Feature: Group a meal's notes #34

Open
j-maas opened this issue Feb 6, 2018 · 3 comments
Open

Feature: Group a meal's notes #34

j-maas opened this issue Feb 6, 2018 · 3 comments

Comments

@j-maas
Copy link

j-maas commented Feb 6, 2018

A meal's notes could support optional groups.

Example

API

{
  "id": 260,
  "name": "Gemüse-Couscouspfanne mit Joghurt-Ingwer-Dip, dazu bunter Blattsalat",
  "notes": [
    "mensaVital"
  ],
  "notegroups": {
    "additives": [
      "Milch",
      "Gluten",
      "Farbstoff"
    ],
    "nutritional-information": [
      "Brennwert = 2144 kJ (512 kcal)",
      "Fett = 13,1g",
      "Kohlenhydrate = 70,6g",
      "Eiweiß = 19,6g"
    ]
  },
  "prices": {
    "student": 2.3,
    "employee": 3.65,
    "other": 4.6
  },
  "category": "Alternativ-Angebot"
}

Feed

<meal>
    <name>Gemüse-Couscouspfanne mit Joghurt-Ingwer-Dip, dazu bunter Blattsalat</name>
    <note>mensaVital</note>
    <note>vegetarisch</note>
    <notegroup name="additives">
        <note>Milch</note>
        <note>Gluten</note>
        <note>Farbstoff</note>
    </notegroup>
    <notegroup name="nutritional-information">
        <note>Brennwert = 2144 kJ (512 kcal)</note>
        <note>Fett = 13,1g</note>
        <note>Kohlenhydrate = 70,6g</note>
        <note>Eiweiß = 19,6g"</note>
    </notegroup>
    <price role="student">2.30</price>
    <price role="employee">3.65</price>
    <price role=other>4.60</price>
</meal>

This would be backwards-compatible, but allow for tydier notes.

@mswart
Copy link
Member

mswart commented Feb 7, 2018

The current notes implementation is very basic and should be extend.
I am unsure whether simple note groups are enough. The encoding of the nutritional-information as plain notes does not look right.
Furthermore I would like to investigate who to standardize the usage above different parsers to get comparable results.

@j-maas
Copy link
Author

j-maas commented Feb 7, 2018

Yes, I agree that the nutritional information is a bit awkward. But note groups would be a very simple, yet big improvement.

Furthermore I would like to investigate who to standardize the usage above different parsers to get comparable results.

I do not understand what you mean by that. Could you explain?

@ialokim
Copy link

ialokim commented Mar 26, 2018

The current notes implementation is very basic and should be extend.

Are there currently any plans to improve on this? I'm pretty sure there are a lot of canteens that do provide additives or nutritional information to their customers, but as for now, this can not be shown explicitly via the OpenMensa specification.

I would like to contribute on the investigation and specification update of the feed and the API and even on the server-side implementation. Where should I start?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants