-
Notifications
You must be signed in to change notification settings - Fork 585
subPath UI example? #163
Comments
+1 |
+1 I'll do some digging but it looks like the actions defined in resources will intercept routes. Without a subpath solution the swagger docs would have to be hosted outside the api service. Is this correct? |
Take a look at how the sample app makes the UI available. It should apply whether it's subpaths or not. https://github.com/swagger-api/swagger-node-express/blob/master/sample-application/app.js#L104 |
I'm doing something very similar. I have a route (app.get('/')) that serves up the swagger-ui. I think the question is how do we support requests that should NOT be routed to the resource action fn. So, in the context of example application, the route "/pet/{petId}" would be handled by 'findById' spec in resources.js. But my production API defines the same route ("/pet/{petId}") and I want it to be handled by my route services; not the action defined in the resource file. Does that make sense? Is the actual/real request fulfillment logic supposed to be in the resource file? Is swagger-node-express supposed to BE the api? |
Take a look at #209 for this support. |
Is there a working UI example of using the receommended subpath approach? In particular how to adjust the relevant UI paths? I saw the closed issue #34 but don't understand the concluding comment. Thanks for your help.
The text was updated successfully, but these errors were encountered: