glennjones/hapi-swagger — pull request #16 by thiagogalesi4e (2014-02-13 18:55:29+00:00)
Title: Added configurable path prefix size

Hi

Based on our use cases, we have added configurable path prefix sizes to hapi-swagger

What this does is make the endpoints not based uniquely on the first path element but possibly on more elements (for example, suppose you have multiple API versions in your system, or just a common prefix, so you can consider more than one path element for their uniqueness)

While doing this we have come across a bug in swagger.js, in case your discoveryUrl contains something different than docs (in our case it was api-docs) so the replace is based on that and not hardcoded as it is today

Also added a small test file that's running with the other existing tests.