diff --git a/util.go b/util.go index 53a6113..8b7ef8f 100644 --- a/util.go +++ b/util.go @@ -32,8 +32,7 @@ var ( // ColonPath accepts a swagger path. // -// e.g. /api/orgs/{org} and returns a colon identified path -// +// e.g. /api/org/{org} and returns a colon identified path // e.g. /api/org/:org func ColonPath(path string) string { matches := rePath.FindAllStringSubmatch(path, -1) diff --git a/util_test.go b/util_test.go index 891924e..d669b96 100644 --- a/util_test.go +++ b/util_test.go @@ -78,3 +78,8 @@ func Test_makeName(t *testing.T) { }) } } + +func Test_makeRef(t *testing.T) { + assert.Equal(t, "#/definitions/test1", makeRef("test1")) + assert.Equal(t, "#/definitions/HelloWorld", makeRef("HelloWorld")) +}