Skip to content

Commit

Permalink
Issue postmanlabs#155- add pure Java generator
Browse files Browse the repository at this point in the history
  • Loading branch information
virenderm01 committed May 28, 2020
1 parent ad51688 commit e08a9eb
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@ typings/

out/

newmanResponses.json
newmanResponses.json

#history of files
.history
29 changes: 29 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"-u",
"tdd",
"--timeout",
"999999",
"--colors",
"${workspaceFolder}/codegens/java-native/npm"
],
"internalConsoleOptions": "openOnSessionStart",
"skipFiles": [
"<node_internals>/**"
]
}
]


}
36 changes: 36 additions & 0 deletions codegens/java-native/test/unit/dummy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

var expect = require('chai').expect,
sdk = require('postman-collection'),
sanitize = require('../../lib/util').sanitize,
convert = require('../../lib/index').convert,
getOptions = require('../../lib/index').getOptions,
mainCollection = require('../../../../test/codegen/newman/fixtures/basicCollection.json');



var request = new sdk.Request({
"method": "POST",
"header": [],
"body": {
"mode": "file",
"file": {
"src": "dummy.png"
}
},
"url": {
"raw": "https://postman-echo.com/post",
"protocol": "https",
"host": [
"postman-echo",
"com"
],
"path": [
"post"
]
}
});
convert(request, {}, function (error, snippet) {
console.log("snippet executed");
console.log(snippet);

});

0 comments on commit e08a9eb

Please sign in to comment.