Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Commit

Permalink
check for basePath
Browse files Browse the repository at this point in the history
  • Loading branch information
srinandan committed Jan 29, 2022
1 parent a40f1bb commit 8ac4f25
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bundlegen/generateapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ func GenerateAPIProxyDefFromOAS(name string, oasDocName string, skipPolicy bool,
return err
}

if u.Path == "" {
return fmt.Errorf("OpenAPI url is missing a path. Don't use https://api.example.com, instead try https://api.example.com/basePath")
}

apiproxy.SetBasePath(u.Path)

//set a dynamic target url
Expand Down

0 comments on commit 8ac4f25

Please sign in to comment.