golang newb here ;)
I'm using gin, with an example API being:
// @Summary GET proxied request
// @Produce json
// @Router /exampleapp/proxy/{proxy+} [get]
func getter(c *gin.Context) {
handleRequest(c)
}
func main() {
r := gin.Default()
group := r.Group("/exampleapp")
group.GET("/proxy/*path", getter)
r.Run(":8088")
}
I am using swaggo/swag to generate a swagger file from the above annotations, I want it to output swagger.json like this:
"/exampleapp/proxy/{proxy+}": {
"get": {
"produces": [
"application/json"
],
"summary": "GET proxied request"
}
}
but I can't get the + to escape correctly, currently getting
"/exampleapp/proxy/{proxy": {
"get": {
"produces": [
"application/json"
],
"summary": "GET proxied request"
}
}
Have tried variations of \\
, \+
but can't quite get it. Whats the correct way to escape that +?
This is so I can use proxying on AWS APIGW