Skip to content

Fail to mount an API with default values on mutually_exclusive params #1717

Open
@gencer

Description

@gencer

Definition:

params do
   optional :folder, type: String, default: nil
   optional :tag, type: Array, default: nil
   exactly_one_of :folder, :tag
end

header:

Content-Type: application/json;

request body:

{
	"tag": [1,2,3]
}

or

{
	"folder": "/hello"
}

got:

{
	"error": "folder, tag are mutually exclusive"
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions