Typed array attributes from `ash.gen.resource`
Hey guys, can array attributes be typed in Ash via generators?
When I run this:
I get something like this:
project/lib/my_app/my_domain/my_thing.ex
I tried doing
--attribute my_list:{:array,:string}
but it gives me a compile error about array not being a recognized attribute modifier5 Replies
Yeah we probably need to add a modifier for it
Please open an issue or a PR
Alright, thanks!
I don't even know how to use the thing yet so for now it'll be just an issue, I'll owe you a PR 😄
Is it a bug report or a feature proposal?
GitHub
Generate typed array attributes from
ash.gen.resource
· Issue #2...Code of Conduct I agree to follow this project's Code of Conduct AI Policy I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue. Is your fea...
made something
as always - not sure about the approach. I wish there was something like find and pop for lists. 🐛
the example you gave is tricky, because the attribute option is a csv and is split by comma. which makes
{array,string}
also split. my solution makes it be used like so: list_string:string:array:required
Yeah as long as it works I don't care about the syntax. I just assumed it already existed because that is the only way it didn't give me an error so I thought it was parsing the arguments ok but not doing anything about it
I like th
array[string]
suggestion though. Sounds more idiomatic
Thanks BTW 🙌