Skip to content
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

swagger on Firebase Cloud Functions #325

Open
lopezjuanma96 opened this issue Dec 15, 2022 · 2 comments
Open

swagger on Firebase Cloud Functions #325

lopezjuanma96 opened this issue Dec 15, 2022 · 2 comments

Comments

@lopezjuanma96
Copy link

I have some Cloud Functions deployed on Firebase and I wanted to add some documentation to it.

For some reason, after setting an endpoint for 'docs', if I accessed the URL normally it would redirect to a similar URL but with the last slice of the path removed, you can read the whole process I went through [https://stackoverflow.com/questions/74803435/setting-up-swagger-ui-in-firebase-functions-server/74813031#74813031](on this Stack Overflow post), but basically if swagger ui was served on endpoint 'something/docs' accessing the URL 'https://base.url/something/docs' would redirect to 'https://base.url/docs' which is an invalid endpoint (and also would raise some Firebase issues, you can read about them on the Stack Overflow post.

After many tests, I found out this redirection did not happen if you add an extra forward slash to the URL, so in the case above, the documentation loads no problem if you go to 'https://base.url/something/docs/'.

I could not find why this is or if there's another way to solve it. I believe it only happens on Firebase too.

@scottie1984
Copy link
Owner

Maybe this will help? #140 (comment)

@lopezjuanma96
Copy link
Author

Mmm should test it, haven't touched that project since I wrote the issue, but I will test it as soon as i can and tell you! thanks for the response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants