Open darioteixeira opened 8 years ago
I like the idea. Implementing this may be a bit of work (I am not sure we have clean-enough interfaces to query the routing data structures), but I will take a look.
Yeah, consider it a low-priority feature that you may bump into higher priority if someone actually complains about Eliom6... :-)
Mind you, this is not a feature that I think is essential nor even important. It's just an idea for getting around the problem that Eliom6 does not enforce at the type system level that POST services must have a GET fallback.
Basically, the idea is to check at startup that all POST services have a GET service with the same path, and to issue a warning if a violation is found. Since the warning is not fatal, users who purposefully don't register GET fallbacks (RESTful use cases) will be happy. And since there is a warning, users who depend on Eliom's no-broken-links guarantees will also be happy.
Also, note that Eliom already relies on a runtime check for a similar situation: it checks at startup if all the declared services have in fact been registered.