Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basePath not taken into account for v1 spec (resource listing) #346

Closed
sberryman opened this issue Apr 2, 2015 · 2 comments
Closed

basePath not taken into account for v1 spec (resource listing) #346

sberryman opened this issue Apr 2, 2015 · 2 comments

Comments

@sberryman
Copy link
Contributor

SwaggerSpecConverter.prototype.convert() is not taking into account the basePath for a resourceListing.

in /lib/client.js (https://github.com/swagger-api/swagger-js/blob/master/lib/client.js#L182-L183) you are passing in self.url which I'm sure is fine for almost everyone but not for hapi-swagger's output.

I did a simple test of setting the docLocation by adding the following AFTER line 34:
https://github.com/swagger-api/swagger-js/blob/master/lib/spec-converter.js#L34

// basePath
if (obj.basePath) {
  this.setDocumentationLocation(obj.basePath);
}

Once this was added, everything worked like a charm.

@fehguy
Copy link
Contributor

fehguy commented Apr 2, 2015

hmm could you send a PR and we can test?

@sberryman
Copy link
Contributor Author

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants