diegoceccarelli / json-wikipedia

Json Wikipedia, contains code to convert the Wikipedia xml dump into a json/avro dump
Apache License 2.0
252 stars 42 forks source link

Fix language enum issue #61

Open diegoceccarelli opened 2 years ago

diegoceccarelli commented 2 years ago

Commit 58d4b1e9608fcb883ab0d4cc7291e01492e94b7f introduced a regression: now languages are not just strings but proper values of an enum but in the enum in avro I specied only Italian and English.

Requesting a language other than "it" or "en" will produce an error accessing to the enum as kindly observed by @fabriziorizzo in https://github.com/diegoceccarelli/json-wikipedia/issues/60.

This PR should fix the issue. I won't commit it in the master now because I want to add tests and more documentation, and check with @fabriziorizzo that the change works.