The base path for the Swagger spec is set dynamically; there doesn't seem to be any way to override it. This is a problem on vagrant which rewrites URLs on the web server level, so the public URL prefix is http://dev.wiki.local.wmftest.net:<vagrant port>/api/rest_v1/ which gets internally rewritten into http://localhost:<restbase port>/dev.wiki.local.wmftest.net/v1/ and since the current logic autogenerates basePath from the URL it will end up with the latter.
Even if getDocBasePath honored an explicit basePath, it's not very clear where to set it. The data for match.value.specRoot seems to be the object defined in one of the projects/wmf_*.yaml files, which is not a great place for vagrant-specific overrides. There should be a way to set basePath somewhere in config.*.yaml and get it merged into the Swagger spec.