MCPcopy
hub / github.com/swaggo/swag / TestParseRouterCommentWithDollarSign

Function TestParseRouterCommentWithDollarSign

operation_test.go:166–176  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

164}
165
166func TestParseRouterCommentWithDollarSign(t *testing.T) {
167 t.Parallel()
168
169 comment := `/@Router /customer/get-wishlist/{wishlist_id}$move [post]`
170 operation := NewOperation(nil)
171 err := operation.ParseComment(comment, nil)
172 assert.NoError(t, err)
173 assert.Len(t, operation.RouterProperties, 1)
174 assert.Equal(t, "/customer/get-wishlist/{wishlist_id}$move", operation.RouterProperties[0].Path)
175 assert.Equal(t, "POST", operation.RouterProperties[0].HTTPMethod)
176}
177
178func TestParseRouterCommentWithParens(t *testing.T) {
179 t.Parallel()

Callers

nothing calls this directly

Calls 2

ParseCommentMethod · 0.95
NewOperationFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…