mswart / pyopenmensa

Python wrapper and helper for openmensa api and feed
http://pyom.devtation.de/
GNU Lesser General Public License v3.0
9 stars 7 forks source link

Only allow price roles mentioned in the specification #5

Closed cyroxx closed 9 years ago

cyroxx commented 10 years ago

In the current version of the OpenMensa Feed specification (v2, see XSD here), only the following price roles are valid: pupil, student, employee, other.

However, when building a feed, pyopenmensa does not enforce that restriction: The result is that during development, the feed builders gracefully accept any role name as input and you will only see your mistake when trying to add your new canteen feed to openmensa.org which complains about XML validation errors. I have already run into this problem.

I think that only the specified role names should be accepted in order to get only feeds that are valid according to the specification.