diff --git a/src/codegen.ts b/src/codegen.ts index 4bdd4e21..ce796134 100644 --- a/src/codegen.ts +++ b/src/codegen.ts @@ -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 }; } };