Skip to content

Signup POST role must be an Array #1

@gregbown

Description

@gregbown

This is not a bug, just a slight oversight in the directions and perhaps some naivety on my part. The image merely implies posting the required parameters appearing to be {username, email, role, password} I was seeing the error

JSON parse error: Cannot construct instance of `java.util.HashSet` . . .  to deserialize from String value ('ROLE_ADMIN')<EOL>

Then it occurred to me surely a user can have all the roles so it must require an array

// My mistake "role" : "ROLE_ADMIN"
{
    "username": "greg",
    "email": "gregbown@yahoo.com",
    "role": ["ROLE_ADMIN"],
    "password": "4bangads"
}

I am only posting in case anyone else sees the issue. Thank your for this great example and your time on this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions