Use URI path parameters on the response template
See original GitHub issueIs it possible to use URL parameters in path and insert them in the response template, as URL queries?
For some mocks, I see the need to insert values coming from the URL path.
For example:
- URI:
/v1/test/.*/example
- Request: GET
/v1/test/dummy/example
- Response:
dummy
Maybe something like the following:
{
"request": {
"uri": {
"match": "/v1/test/.*/example"
},
"method": "get",
},
"response": {
"status": 200,
"text": {
"template": "{$req.uri.param[0]}"
},
"headers": {
"Content-Type": "application/json"
}
}
},
Thanks.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
how to use URI templates to change path parameters in a ...
1 Answer 1 ... If you are using .build for filling the template, you have to provide the values one by one like...
Read more >Add URI Parameters to Spring WebClient Requests - amitph
A guide to add Request URI parameters - path parameters & query parameters to the requests made by Spring WebFlux WebClient.
Read more >URI Templates - Apiary Help
URI Templates are handy for expressing variables within a URL, such as a path variable or a query variable. This is done through...
Read more >The @Path Annotation and URI Path Templates
The @Path annotation identifies the URI path template to which the resource responds, and is specified at the class level of a resource....
Read more >Understanding the URI Param and Query Param With RAML
URI parameter (Path Param) is basically used to identify a specific resource or resources whereas Query Parameter is used to sort/filter those ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@wapcrazut Your feature request has been included in release 1.4.0. https://github.com/dreamhead/moco/blob/master/moco-doc/apis.md#path-2
This feature is not supported for now.
I do want to implement this feature, that’s like Spring RequestMapping parsing, as following: