Support for root path
See original GitHub issueHey 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:
- Created 5 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s perfect! I didn’t even notice the Host header. Thanks, Joe!
Also, these might be helpful:
https://github.com/kogosoftwarellc/open-api/issues/82 https://github.com/kogosoftwarellc/open-api/pull/83