[swagger ui] Wrong request path constructed

31 views
Skip to first unread message

Jürgen Zimmermann

unread,
Feb 22, 2015, 7:32:59 AM2/22/15
to swagger-sw...@googlegroups.com
I'm using Swagger 1.5.1-M1 and Swagger UI 2.1.8-M1. When I click at "Try it out!" for a resource with @GET and @Path(("/{id:[1-9]\\d*}")), then I get a 400 error when I provide 501 as a parameter value. The problem is that the request path should be https://localhost:8443/shop/rest/katalog/501, but it is https://localhost:8443/shop/rest/katalog/{id:[1-9]\d*}.
I'll attach a screenshot to visualize the issue.
wrong-request-path.png

Ron Ratovsky

unread,
Feb 23, 2015, 11:23:24 AM2/23/15
to swagger-sw...@googlegroups.com
That's because the generated spec is wrong. You should open an issue on swagger-core about it.
It should produce a path with {id} and a pattern to limit the structure.

On Sun, Feb 22, 2015 at 2:32 PM, Jürgen Zimmermann <juergen.z...@hs-karlsruhe.de> wrote:
I'm using Swagger 1.5.1-M1 and Swagger UI 2.1.8-M1. When I click at "Try it out!" for a resource with @GET and @Path(("/{id:[1-9]\\d*}")), then I get a 400 error when I provide 501 as a parameter value. The problem is that the request path should be https://localhost:8443/shop/rest/katalog/501, but it is https://localhost:8443/shop/rest/katalog/{id:[1-9]\d*}.
I'll attach a screenshot to visualize the issue.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------
Reply all
Reply to author
Forward
0 new messages