Skip to content

Commit

Permalink
Fixing bug with host replace and bumping version
Browse files Browse the repository at this point in the history
  • Loading branch information
djfdyuruiry committed May 20, 2018
1 parent 2965096 commit c876c35
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 66 deletions.
109 changes: 48 additions & 61 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swagger2-postman-generator",
"version": "2.1.0",
"version": "2.1.1",
"description": "Use Swagger v2 JSON Collections to generate Postman v1 collections which include sample request bodies",
"main": "swagger2-postman-generator.js",
"scripts": {
Expand All @@ -21,9 +21,9 @@
},
"homepage": "https://github.com/djfdyuruiry/swagger2-postman-generator#readme",
"dependencies": {
"swagger2-to-json": "^1.1.0",
"swagger2-to-object": "^1.0.8",
"swagger2-to-postman": "^1.1.7",
"swagger2-to-json": "^1.1.1",
"swagger2-to-object": "^1.0.9",
"swagger2-to-postman": "^1.1.9",
"sync-request": "^4.1.0"
}
}
2 changes: 1 addition & 1 deletion swagger2-postman-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function processPostmanCollection (postmanCollection, swaggerSpec, options) {
}

request.url = request.url.replace(/[hH][tT][tT][pP][sS]{0,1}:\/\//, "{{scheme}}://");
request.url = request.url.replace(/:\/\/.+?\//, "://{{host}}:{{port}}/");
request.url = request.url.replace(/:\/\/[^/]*/, "://{{host}}:{{port}}");

populateRequestJsonIfDefined(request, swaggerSpec, swaggerRefsLookup, options);

Expand Down

0 comments on commit c876c35

Please sign in to comment.