Skip to content

Similar endpoints #49

@jgbrittos

Description

@jgbrittos

When I ran this code from Router class in Playgrounds always print "matches" for similar endpoints. In my case, Ambassador is returning the same JSON response to both endpoints and I don't know why...Is there a chance that similar endpoints make Ambassador confused? (Sometimes work sometimes don't)

`
let path = "foo/bar/10/xyz"
let searchPath = "foo/bar/10/xyz/asd"
let regex = try! NSRegularExpression(pattern: path, options: [])
let matches = regex.matches(in: searchPath, options: [], range: NSRange(location: 0, length: searchPath.count))

if !matches.isEmpty {
print("match")
} else {
print("no match")
}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions