question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set request parameter templates with [] inside do not pass Expressions matching check

See original GitHub issue

When adding a Set query param template using the feign.RequestTemplate#query(java.lang.String, java.lang.Iterable<java.lang.String>) method, we pass a query with a name containing [] and a corresponding template value, for example name = "ids[]" and then a List containing {ids[]} value. This causes an issue as a template containing [] does not pass the entry -> entry.getKey().matcher(expression).matches() filter in feign.template.Expressions#create method against the SimpleExpression pattern, created as follows: Pattern.compile("(\\w[-\\w.]*[ ]*)(:(.+))?"), SimpleExpression.class;

As an http call to [requestUrl]?ids[]=1,2,3 would work, it should probably work via Feign as well.

This issue causes the following issue in Spring Cloud OpenFeign: https://github.com/spring-cloud/spring-cloud-openfeign/issues/143 that has been reported to us by the users.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kdavisk6commented, Apr 28, 2019

@OlgaMaciaszek

I’ll check with the others, but I think we can release a patched 10.2.1 sometime in the next week.

1reaction
OlgaMaciaszekcommented, Mar 28, 2019

@kdavisk6 Yes, that’ll probably be the best solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Template parameters and template arguments
When the name of a non-type template parameter is used in an expression within the body of the class template, it is an...
Read more >
Set up request and response data mappings using the API ...
In the Mapping Templates area, choose an option for Request body passthrough to configure how the method request body of an unmapped content...
Read more >
Tutorial: Use parameter files to deploy your ARM template
Use parameter files that contain the values to use for deploying your Azure Resource Manager template (ARM template).
Read more >
Matching a C++ lambda expression in templates
It seems your concern is about restricting the object received to have the operator() defined. This problem is easily solvable with expression ......
Read more >
Qute Reference Guide - Quarkus
For an expression that does not start with a namespace the current context ... In Quarkus, a variant is set automatically for templates...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found