nomasystems / erf

:pencil: A design-first Erlang REST Framework.
https://nomasystems.github.io/erf/
Apache License 2.0
29 stars 2 forks source link

feat: erf debug utilities #68

Open javiergarea opened 3 months ago

javiergarea commented 3 months ago

Generated code is hard to debug even for developers familiar with the source. Since the exported modules are generated based on the provided OpenAPI Spec, it's not easy for users to ask for traces of the proper functions. Developers usually either add debug traces to the whole generated modules or write them to files for further inspection.

A more convenient way of debugging the routing/validation process is required. A possible solution would be providing an erf_dbg module exposing some methods that, given known parameters such as the operationId, would add convenient debug traces on generated modules.