You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a custom parameter type that resembles the built-in "string" parameter type. I want to allow enclosing the parameter in either single or double quotes. In the built-in "string" parameter type, this is achieved by using 2 regexes for the parameter type: one for eclosing it in single quotes and one for enclosing it in double quotes. However, the io.cucumber.java.ParameterType annotation only allows a single regex, although the io.cucumber.cucumberexpressions.ParameterType class does support multiple regexes.
✨ What's your proposed solution?
Change the return type of io.cucumber.java.ParameterType#value to String[] instead of String to allow multiple regexes to be provided to io.cucumber.cucumberexpressions.ParameterType
⛏ Have you considered any alternatives or workarounds?
No response
📚 Any additional context?
No response
The text was updated successfully, but these errors were encountered:
I tried, but I ran into some unexpected behavior where all capturing groups of all supplied regexes are passed as arguments to the @ParamaterType annotated method, whereas I would expect that only the capturing groups of the first matching regex would be passed as arguments. Idk whether this is intended behavior, but unfortunately I don't have enough time to diver deeper into it.
For now I worked around my issue by combining the two regexes into one.
🤔 What's the problem you're trying to solve?
I have a custom parameter type that resembles the built-in "string" parameter type. I want to allow enclosing the parameter in either single or double quotes. In the built-in "string" parameter type, this is achieved by using 2 regexes for the parameter type: one for eclosing it in single quotes and one for enclosing it in double quotes. However, the io.cucumber.java.ParameterType annotation only allows a single regex, although the io.cucumber.cucumberexpressions.ParameterType class does support multiple regexes.
✨ What's your proposed solution?
Change the return type of io.cucumber.java.ParameterType#value to String[] instead of String to allow multiple regexes to be provided to io.cucumber.cucumberexpressions.ParameterType
⛏ Have you considered any alternatives or workarounds?
No response
📚 Any additional context?
No response
The text was updated successfully, but these errors were encountered: