Did you import the Swagger spec or write the code by yourself?

Indeed, "Path" or "query" aproach does make difference inside the Intersystems structure.

Example:

Class REST.Demo Extends %CSP.REST
{ XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap]
{
<Routes>
<Route Url="/Demo/:in" Method="GET" Call="GetPath" Cors="true"/>
<Route Url="/Demo" Method="GET" Call="GetQuery" Cors="true"/>
</Routes>
} ClassMethod GetPath(in As %String) As %Status
{
Set outJSON = ##class(%ZEN.proxyObject).%New()
Set outJSON.in = in
Write outJSON.%ToJSON()
Quit $$$OK
} ClassMethod GetQuery(
pInput As %Library.AbstractStream,
Output pOutput As %Stream.Object) As %Status
{
Set outJSON = ##class(%ZEN.proxyObject).%New()
Set outJSON.Country = $Get( %request.Data( "Country", "1") )
Write outJSON.%ToJSON()
Quit $$$OK
} }