Skip to content

No valid input for array properties #6

@nrw

Description

@nrw

When creating a resource via a commandful cli, there seems to be no valid input for setting array properties (and parent/child relationships).

For example:

Group = resourceful.define('group', function() {
  this.array('people');
});

// trying to set the value of 'people'
// via command line throws this error
{
  "schema": {
    "links": [], 
    "name": "Group", 
    "properties": {
      "id": {
        "required": false, 
        "type": "any"
      }, 
      "people": {
        "conditions": {}, 
        "messages": {}, 
        "type": "array"
      }
    }
  }, 
  "validate": {
    "errors": [
      {
        "actual": "string", 
        "attribute": "type", 
        "expected": "array", 
        "message": "must be of array type", 
        "property": "people"
      }
    ], 
    "valid": false
  }, 
  "value": {
    "id": "group_id", 
    "people": ""
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions