sbuttgereit

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

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.

Where Next?

Popular in Discussions Top

New
restack_oslo
Hello, Please pardon me for any faux paux. I am 46 and this is my first time on a forum of any kind. I wanted to to get answers from tho...
New
und0ck3d
Hello everyone! A few days ago I’ve created a topic here about how people were creating CMSs with Elixir and Phoenix. I’ve been studying...
New
Crowdhailer
I’ve been hearing much about the new formatter and it’s something I have been keen to try. I find examples buy far the most illuminating...
248 19760 150
New
chuck
Let me start by stating an assumption: Phoenix is a great approach to building REST APIs. There are many reasons for this, but I will ass...
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New
mikl
I wanted to capitalize a string, and tried using String.capitalize(). That generally works well, until you try to capitalize a word like...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31525 112
New

We're in Beta

About us Mission Statement