Many people use gin route groups to separate endpoints at a high level or to support multiple API versions (i.e. v1 & v2). Swagger doesn't have anything built in to apply router path prefixes to groups of handlers.
Even in the code sample, the handler annotation includes the prefix:
Obviously this is fragile. It would be nice if gin-swagger could interrogate the gin router and dynamically update the swagger docs that are produced.
Does anyone know of a workaround?
If not, is it feasible to add this to gin-swagger?
Many people use gin route groups to separate endpoints at a high level or to support multiple API versions (i.e. v1 & v2). Swagger doesn't have anything built in to apply router path prefixes to groups of handlers.
Even in the code sample, the handler annotation includes the prefix:
which has been set by the route group:
Obviously this is fragile. It would be nice if gin-swagger could interrogate the gin router and dynamically update the swagger docs that are produced. Does anyone know of a workaround? If not, is it feasible to add this to gin-swagger?