Open NoBrainSkull opened 1 year ago
@NoBrainSkull Although I like the idea of generating doc as well, this would go beyond the original proposal of the library and I'm not sure it would be something everyone would llke so I need to put more thought into that. Maybe that would be acceptable as an opt-in? Maybe if people specify the third argument as a string then it might make sense. Or maybe we could have something like
@schemadoc """
...
"""
That would automatically generate the @moduledoc
like you described. I'm not sure how would be a good way of doing or if we should do it at all, however, I do like the idea. I think adding the ### Fields
with the metadata we are already extracting can be a really good thing, so there is value to the idea.
Will have to think more about it. Thanks for the idea! Proposal PRs are welcome, but maybe we should discuss a little bit more before jumping into implementation.
@bamorim thank you for considering the idea. To provide more fuel to it :
@moduledoc
and simply append our generated field's documentation to it (this is done only if at least one field is documented). This avoid adding extra args to the main macros definitions (which is less cumbersome)
Hello,
I'd love to expand this module philosophy to the documentation of the schema. Would you consider adding an option to the DSL to specify details about each field ?
Maybe something like :
This would generate somehing like :
As you know, we can very much define module attributes in macros. I'd be glad to do a pull request if you are open to the idea :)
Thanks