Skip to content

ApiParam allowableValues string with spaces is not supported #2446

@uriparush

Description

@uriparush

Hi,
APiParam annotation has a parameter allowableValue.
This takes a comma separated string. But if i have a space in one of the values, it is stripping it off.
Which is not good. I can pass a string with spaces from the browser url. So i should be able to pass it from swaagger UI as well.

I think the issue is with this line
I found the below line in class "ApiModelProperties"
String trimmed = allowableValueString.trim().replaceAll(" ", ""); // line 67

This issue was already discovered in previous versions (Issue number #1211) and was fixed for version 2.6.0 and in some future versions the bug was recreated.

I'm currently using version 2.8.0.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions