Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

subPath UI example? #163

Closed
jimgeiger opened this issue Sep 11, 2014 · 5 comments
Closed

subPath UI example? #163

jimgeiger opened this issue Sep 11, 2014 · 5 comments

Comments

@jimgeiger
Copy link

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.

@dmitrijs-balcers
Copy link
Contributor

+1

@nmartin867
Copy link

+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?

@fehguy
Copy link
Contributor

fehguy commented Nov 25, 2014

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

@nmartin867
Copy link

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?

@fehguy
Copy link
Contributor

fehguy commented Jun 3, 2015

Take a look at #209 for this support.

@fehguy fehguy closed this as completed Jun 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants