invalid_field: InvalidField | Invalid field for type user: name
Is this incorrect or missing something?



9 Replies
It is a bug that you're seeing
name
in the docs
only public attributes are shown
š¤
Do you possibly have multiple resources w/ the same json api type?
Looking at the code, that should only be showing public attributes š¤
and
And you're on the latest versions of packages?
I ran
mix deps.update --all
and only igniter
was updated: igniter 0.6.13 => 0.6.14
š¤ š¤ š¤
What happens if you make name public?
Is it necessary to explicitly define whether an attribute is public or private?
it defaults to private
so yes š
for example
thats how we generate that value, using only public attributes
How to define as public?
Ah, I discovered:
attribute :name, :string, public?: true
Has anyone ever discussed this? It didn't seem very intuitive to me. Maybe I'm just tired. Could you point me to where I can find this information in the documentation?it probably needs to be front loaded somewhere if this is the only place, but it is described here: https://hexdocs.pm/ash/sensitive-data.html#public-private-attributes