question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for root path

See original GitHub issue

Hey Joe! Thank you for continuing to work on this… it’s one of my favorite API frameworks to work with!

I’m developing some serverless APIs in Google Cloud, and there is always a relative base path. For example, in {domain}/api1/v1/path/to/resource, /api1 is the root path, but I don’t want to add it to basePath, or I’ll get /api1/api1/v1/.... When I use petstore, all requests are made to /v1/..., without the /api1 root.

Is there a way around this currently? If not, can I add a rootPath (or whatever we want to call it) field that will be inserted when generating the basePath?

req.apiDoc.basePath = req.baseUrl + rootPath + basePath;

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
srogers202commented, Jul 13, 2018

That’s perfect! I didn’t even notice the Host header. Thanks, Joe!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support root-relative paths in endpoint paths in Swagger UI
It assumes a relative path off of the current UI /some/root/path/swagger/swagger/v1/swagger.json . The only way I can get this to work is ...
Read more >
About Tool Content Root Path | AutoCAD Architecture 2021
Setting a tool content root path can help you keep your tools consistent with standards if the project or the standards drawings are...
Read more >
The website root path for www.mydomain.com could not be ...
Hi, I'm using shared folder in my Site Root Directory. (\\somefolder) It was working before this. Today I notice there is this error:...
Read more >
What Is a Root Folder or Root Directory? - Lifewire
The root folder, aka root directory, is the highest folder in any folder-based hierarchy. For example, the root folder of the C drive...
Read more >
Knowledge Hub Help - Root Path Examples
The following examples demonstrate how root paths for XML and JSON files should be formatted when loading these data source types into Knowledge...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found