sbuttgereit
Phoenix.HTML.Form documentation
This is a bit of a silly question, probably nit-picky, and ultimately not too important.
I’m reviewing the Phoenix.HTML.Form documentation and something struck me as odd in the documentation: as expected the module’s struct is represented by a typespec t/0 defining the type of the struct (Phoenix.HTML.Form — Phoenix.HTML v4.3.0)… but the explanatory documentation of the struct appears separately in the “Functions” section under “%Phoenix.HTML.Form{}” (Phoenix.HTML.Form — Phoenix.HTML v4.3.0).
My question is why this bifurcation in the documentation for this struct? Is there some rationale or standard that I’m missing about documenting structs that would lead to this split? I do notice that one of the struct fields, action is left undocumented, but the split has me wondering if the action field is intentionally undocumented (maybe it’s not to be considered “public”) or if the typespec has been updated and the explanatory documentation just hasn’t been maybe because there’s two places seemingly documenting the same thing. Is the typespec in the docs only there because the typespec exists?
Just curious…
Most Liked
woylie
I would expect this @doc to be a @typedoc placed right before the @type: phoenix_html/lib/phoenix_html/form.ex at v3.3.1 · phoenixframework/phoenix_html · GitHub. Then the struct would not appear under the Functions header.
Popular in Discussions
Other popular topics
Latest Phoenix Threads
Chat & Discussions>Discussions
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security









