Skip to content

Empty query parameter leads to collection of null #3435

@dsvensson

Description

@dsvensson

Consider the following endpoint:

	@GET
	fun listStuff(@QueryParam("id") ids: Set<UUID>): List<Stuff> {
		...
	}

When issuing curl http://localhost/liststuff?id= .. that is, id without a value. The Set<UUID> ids will be a set that contains one null item.

I've tried adding @NotEmpty Set<UUID>, and Set<@NotNull UUID> and various permutations, without getting the endpoint to reject the request.

Is this a known limitation or am I missing something?

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