Closed franciscogouveia closed 9 years ago
Thanks you.
Based on the version of the ui, I assume this is Swagger 1.2?
Correct.
I'm using hapi-swaggered, which is Swagger 1.2 compliant.
Okay, I'm not sure if this is an issue with swagger-ui or swagger-js, but @fehguy would be able to say.
By the way, did you happen to check the browser's console and see if that's the actual URL being used?
I confirmed now, it is the actual URL being used:
:+1:
Example
{
"swaggerVersion": "1.2",
"basePath": "http://localhost:8000",
"resourcePath": "/foo",
"produces": ["application/json"],
"apis": [{
"path": "/foo/{foo}/a/{fooA}/b/{fooB}",
"operations": [{
"method": "GET",
"nickname": "get_foo_foo_a_fooA_b_fooB",
"parameters": [{
"required": true,
"type": "string",
"name": "foo",
"paramType": "path"
}, {
"required": true,
"type": "string",
"name": "fooA",
"paramType": "path"
}, {
"required": true,
"type": "string",
"name": "fooB",
"paramType": "path"
}],
"type": "void"
}]
}],
"models": {}
}
this has been addressed in the develop_2.0 branch
I've initially opened this issue on hapi-swaggered-ui plugin, but I think this makes more sense here.
Problem:
With such a request:
/this/{test}/is/{testABC}/a/{testABCDEF}/test/{other}/of/{otherABC}/swagger/{otherDEF}/ui
The swagger-ui generates the right parameters in the UI.
But, when I press the
Try it
button, the value of the parametertest
is placed on all the{test*}
andother
is placed on all the{other*}
, in the Request URL.Example:
I made a screenshot:
The expected result should be:
http://192.168.2.51:80/this/id1/is/id2/a/id3/test/id4/of/id5/swagger/id6/ui
I confirmed in the hapi-swaggered-ui's node_modules folder that the swagger-ui version that is being used is 2.0.24.