Hi,
I have worked on Swagger codegen[Language java] where i was able to
generate the models and handlers .I was able to create the Test cases and
run the test script using the auto-generated code.Now i was to replicate
the same kind of test cases using node.js.
Using swagger-js-codegeni wrote the code
var fs = require('fs');
var CodeGen = require('swagger-js-codegen').CodeGen;
var file = 'swagger/spec.json';
var swagger = JSON.parse(fs.readFileSync(file, 'UTF-8'));
var nodejsSourceCode = CodeGen.getNodeCode({ className: 'Test', swagger:
swagger });
var angularjsSourceCode = CodeGen.getAngularCode({ className: 'Test',
swagger: swagger });
var reactjsSourceCode = CodeGen.getReactCode({ className: 'Test', swagger:
swagger });
var tsSourceCode = CodeGen.getTypescriptCode({ className: 'Test', swagger:
swagger, imports: ['../../typings/tsd.d.ts'] });
console.log(nodejsSourceCode);
It generates a test case .But if i have to run the testcase how to run .I
am using webstrom.
If i can generate test cases for node.js please tell how to do.
Kinldy help.
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.