Skip to content

Don't allow empty ("") enums #292

Description

@AlexJoom

An empty string is accepted for an enum. The most appropriate solution would be to silently reject the empty string. I’ve managed to pass this value, along with another valid string, as an array of Scientific Domains for an Organisation (by accident) and it was accepted (on post, “” was sent 7 times, along with “planning and scheduling”). This happened on a fresh and clean local installation of the API. I confirmed by simply doing this afterwards:


curl -X 'GET' \
  'http://localhost:81/scientific_domains/v1' \
  -H 'accept: application/json'


[
  "",
  "planning and scheduling"
]

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingprioritySomething identified as having a higher priority

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions