-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No valid input for array properties #6
Comments
The Array type isn't supported yet in commandful As for relationships, they are half implemented. It should be possible to use relational resources and set the foreign key via the prompt. What should be added is an additional prompt to create a new relational resource, versus having to manually set and get the ids through two commands. Should be easy to add both, just haven't gotten around to it yet. |
Thanks for the quick response. I'll hold my breath waiting for the new features. :) |
@nrw - What behavior are you trying to get out of the Array type? Are you trying to store an array of strings, or are you trying to create a relationship between two resources and store an array of objects? |
In the example above, I'm trying to store an array of strings. I'd certainly like to have an interface for adding children, too. You said relationships are partially implemented. Is this piece done? I'd love to see an example use. |
@nrw - Understood. I'm working on both right now. Trying to determine the best user-experience for the case of adding items to an Array. I'm thinking, it should continually prompt for new values until the user types a special word like |
In the interest of avoiding reserving a word, here's a thought: If the user submits a blank value, prompt something to this effect:
Is that a better idea? |
Was my first thought. I dislike that because it increases the amount of reading and key-strokes by a factor of three. The reserved word could be an empty value. I'll roll with this idea and see how it feels. If it doesn't work I might go back and do a menu option instead. Thanks. |
Created ticket in prompt for array type flatiron/prompt#54 |
I'm glad to try whatever you come up with. :) Some thoughts about the interface (i wrote these out for myself and they seemed worth sharing. i'm sure there is a better idea out there.) No value +
|
I've got a good start to adding both of these new features to commandful, but I'm now blocked on both by: flatiron/prompt#54 ( since foreign keys are stored in typed arrays ) Once we clear that issue up I'll pull in the new prompt and push my commandful changes. |
When creating a resource via a
commandful
cli, there seems to be no valid input for settingarray
properties (andparent
/child
relationships).For example:
The text was updated successfully, but these errors were encountered: