Forum Discussion

raajrk's avatar
raajrk
New Member
8 days ago

Multiple path params not working

Hi Folks, Recently I have encountered an issue where I have two path parameters for an api endpoint where both are mandatory, but when we execute the api via swagger and pass the value for them, for 1st param its fetching fine but for 2nd one its returning the name of the paramater. Below are the details.

For Example:

I have passed 2 values for 2 fields named as budget_name and partition_name as budget1 and partition1

but when I logged(print) them, I got budget1 [which is correct] and {partition1} [not correct its treating field name as value].

 

1 Reply

  • When working with multiple path parameters in web development, ensuring they work correctly requires careful attention to the route definitions and how the parameters are handled within the application. Here are some common issues and their solutions that might help troubleshoot the problem:

    Common Issues and Solutions

    1. Route Definition: Ensure that the route is defined correctly to accept multiple path parameters. The syntax can vary depending on the framework you are using. Here are examples for some common frameworks.