Skip to content

Commit

Permalink
Added method to get data and options without generating the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
IKoshelev committed Feb 16, 2019
1 parent 3cb5133 commit 0ee9bbd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ export const CodeGen = {
const options = makeOptions(opts);

return enhanceCode(getCode(options), options);
},
getDataAndOptionsForGeneration: function(opts: ProvidedCodeGenOptions) {
const options = makeOptions(opts);
verifyThatWeAreGeneratingForSwagger2(options);
const data = getViewForSwagger2(options);
return { data, options };
}
};

Expand Down

0 comments on commit 0ee9bbd

Please sign in to comment.