elysiajs / elysia-swagger

A plugin for Elysia to auto-generate Swagger page
MIT License
90 stars 46 forks source link

fix: 🐛 prevent failed to fetch spec from URL error #154

Open jimmy-guzman opened 1 month ago

jimmy-guzman commented 1 month ago

There was a regression introduced with Fix nested path issue in Swagger and Scalar config #146 which was meant to fix #135, when path is either "/" or "" it leads to Failed to fetch spec from URL or ERR_NAME_NOT_RESOLVED because the url becomes "http://json/".

I can create a new issue but it might address #151

I also noticed that excludePaths might not be working as intended for when path is either "/" or "" but that's always been the behavior so I didn't address that.