Skip to content

Commit 777e5ca

Browse files
authored
Merge pull request #61 from IKoshelev/master
Added method to get data and options from processed swagger spec without generating the code.
2 parents 3cb5133 + 0ee9bbd commit 777e5ca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/codegen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ export const CodeGen = {
2929
const options = makeOptions(opts);
3030

3131
return enhanceCode(getCode(options), options);
32+
},
33+
getDataAndOptionsForGeneration: function(opts: ProvidedCodeGenOptions) {
34+
const options = makeOptions(opts);
35+
verifyThatWeAreGeneratingForSwagger2(options);
36+
const data = getViewForSwagger2(options);
37+
return { data, options };
3238
}
3339
};
3440

0 commit comments

Comments
 (0)