Forum Discussion
SiKing
12 years agoCommunity Expert
Hi.
You are correct! This is a feature that is used primarily on the server to have two resources assigned to the same one URL!. So you are able to have URL like http://server.test/{param} and if I need the server to be able to handle numbers with one method and anything else with another method, in the WADL I will have two resources. One will have a URL like http://server.test/{param} to handle the "anything else", and the second will have a URL like http://server.test/{param:[0-9]+} to handle numbers only - the stuff after the colon is obviously a regex.
When SoapUI parses such a WADL it correctly generates the two methods and correctly extracts both URLs. The problem is that the second (numbers only) method has a resource parameter named as only "param" and it does not know what to do with the values that I specify - they never get substituted correctly. Worse: even if I correct the parameter name to match the extracted URL: "param:[0-9]+", SoapUI is still not able to make the connection.
There is no problem with Swagger, and there is nothing that I am expecting to hear from them. They made a fix to the framework (I do not know the bug number) and they are able to handle to above case correctly.
SmartBear Support wrote: Also, as Shadid mention, your required format seems to be used for server side validation of incoming request to the REST API.
You are correct! This is a feature that is used primarily on the server to have two resources assigned to the same one URL!. So you are able to have URL like http://server.test/{param} and if I need the server to be able to handle numbers with one method and anything else with another method, in the WADL I will have two resources. One will have a URL like http://server.test/{param} to handle the "anything else", and the second will have a URL like http://server.test/{param:[0-9]+} to handle numbers only - the stuff after the colon is obviously a regex.
When SoapUI parses such a WADL it correctly generates the two methods and correctly extracts both URLs. The problem is that the second (numbers only) method has a resource parameter named as only "param" and it does not know what to do with the values that I specify - they never get substituted correctly. Worse: even if I correct the parameter name to match the extracted URL: "param:[0-9]+", SoapUI is still not able to make the connection.
There is no problem with Swagger, and there is nothing that I am expecting to hear from them. They made a fix to the framework (I do not know the bug number) and they are able to handle to above case correctly.
Related Content
- 10 months ago
- 5 years ago
Recent Discussions
- 5 days ago
- 10 days ago