I’m trying to figure out the convention used for post params. In a controller, for example, you might have the following to pattern match incoming parameters.
The key comes from the changeset you supplied to the form_for call, or from the as: key in form_for if you use the conn parameter. This is described at https://hexdocs.pm/phoenix_html/Phoenix.HTML.Form.html#functions but agree it doesn’t make it totally clear how that maps to the inbound parameters.
Basically the intent is similar to Rails (if thats a relevant observation for you). Input fields get named with an inflected name of the module used for the changeset, with the field name. So for example if the changeset is for a module User and the field you want to create for input is called email then you’ll get a form field with a name user[email]. In this case user will be a map key in the params, with sub-map that will have %{"email" => form_value, ...}.
Because those may map to fields in a struct, it should have the same convention as struct fields, which is snake_case. It is what we use in Elixir for atoms, variables, field names, etc.