pelias / wof-admin-lookup

Who's on First Admin Lookup for the Pelias Geocoder
https://pelias.io
MIT License
9 stars 24 forks source link

added config validation #82

Closed trescube closed 7 years ago

trescube commented 7 years ago

We should discuss this. The tradition has been to put configValidation in the main entry point so the module can't even be loaded if the configuration is invalid, that doesn't work the same way in this module since pelias config can be passed to the individual create functions. We should probably go with dependency injection so to the create function gets only what it needs instead of hosting the entire pelias config internally.

orangejulius commented 7 years ago

We've had a couple discussions around the interface to wof-admin-lookup. One suggestion is to encapsulate all the setup of admin lookup into one function. That would really help since the config validation logic would live there too.