Skip to content

Commit

Permalink
removed unused function parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobm-splunk authored and daveshanley committed Mar 11, 2024
1 parent 6bf90bb commit 27192a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions paths/paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
func FindPath(request *http.Request, document *v3.Document) (*v3.PathItem, []*errors.ValidationError, string) {
var validationErrors []*errors.ValidationError

basePaths := getBasePaths(request, document)
basePaths := getBasePaths(document)
stripped := StripRequestPath(request, document)

reqPathSegments := strings.Split(stripped, "/")
Expand Down Expand Up @@ -193,7 +193,7 @@ pathFound:
}
}

func getBasePaths(request *http.Request, document *v3.Document) []string {
func getBasePaths(document *v3.Document) []string {
// extract base path from document to check against paths.
var basePaths []string
for _, s := range document.Servers {
Expand All @@ -209,7 +209,7 @@ func getBasePaths(request *http.Request, document *v3.Document) []string {
// StripRequestPath strips the base path from the request path, based on the server paths provided in the specification
func StripRequestPath(request *http.Request, document *v3.Document) string {

basePaths := getBasePaths(request, document)
basePaths := getBasePaths(document)

// strip any base path
stripped := stripBaseFromPath(request.URL.Path, basePaths)
Expand Down

0 comments on commit 27192a3

Please sign in to comment.