You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just stumbled across nitro and tried it out. For me it is very important to have auto-generated swagger docs. I set up nitro serving the OpenAPI spec, everything just works - extremely nice!
I didn't see any issues that described this topic already, if I missed it I'm sorry.'
Now that being said, I saw a route that I didn't understand where it came from. This is my folder structure:
The logger is just a basic middleware that console logs the method, path and status of the request.
Now these are the routes, that showed up in the swagger definition:
The first route in App Routes seemed suspicious, turns out its the middleware.
I was curious if any of you have also encountered this behavior or maybe know how to prevent middlewares from being added to the swagger docs.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey Guys,
I've just stumbled across nitro and tried it out. For me it is very important to have auto-generated swagger docs. I set up nitro serving the OpenAPI spec, everything just works - extremely nice!
I didn't see any issues that described this topic already, if I missed it I'm sorry.'
Now that being said, I saw a route that I didn't understand where it came from. This is my folder structure:
The logger is just a basic middleware that console logs the method, path and status of the request.

Now these are the routes, that showed up in the swagger definition:
The first route in App Routes seemed suspicious, turns out its the middleware.
I was curious if any of you have also encountered this behavior or maybe know how to prevent middlewares from being added to the swagger docs.
Thank you already in advance!
Beta Was this translation helpful? Give feedback.
All reactions