digitalocean-api-java icon indicating copy to clipboard operation
digitalocean-api-java copied to clipboard

Tags can only be one word

Open pennal opened this issue 5 years ago • 1 comments

If one of the tags has a space, or any other character other than letters and numbers, the tags are not applied AT ALL to the droplet on creation.

When the tags are just one word then all the tags are successfully applied. If even one of them contains a space then ALL of the tags are not applied.

I tried encoding the values using URLEncoder.encode(tag, StandardCharsets.UTF_8) but it does not help.

Very minimal example:

// setup
Client client = new DigitalOceanClient("XXXXXX");
Region region = // slug=fra1
Size size = // slug=s-1vcpu-1gb
Image image = // slug=docker-18-04

// Droplet creation
Droplet droplet = new Droplet();
droplet.setName("test-tags");
droplet.setRegion(region);
droplet.setSize(slug);
droplet.setImage(image);

// Works
List<String> tags = List.of("tag1", "tag2");

// Does not work
List<String> tags = List.of("tag 1", "tag 2");


droplet.setTags(tags);
client.createDroplet(droplet);

pennal avatar Feb 12 '21 18:02 pennal

Hi, is there any update on this?

pennal avatar Mar 02 '21 14:03 pennal