-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make serving path configurable #204
base: master
Are you sure you want to change the base?
Conversation
@@ -8,7 +8,7 @@ | |||
%% Handlers | |||
-export([resource_exists/2, previously_existed/2, moved_permanently/2]). | |||
|
|||
-type state() :: #{}. | |||
-type state() :: {file, string()}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not #{file := string()}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I Just used what was already passed. So this is a fix for type spec. Dialyzer is happy now.
url: window.location.origin + "/api-docs/swagger.json", | ||
url: window.location.toString().replace("/index.html", "/swagger.json"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain this change, please?
Also, I can't remember, but are we testing this somewhat?
You might want to look into up_swagger.sh
because there's logic for this file, there.
{file, StaticFiles ++ "/index.html"}, | ||
{file, Path ++ "/index.html"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I seem to not be able to follow this change. Would you elaborate, please?
Sometimes there is a need to use a custom path for Swagger UI. It is hard-coded as api-docs at the moment. Here is proposed implementation.