"use strict";var u=(e,t,r)=>new Promise((s,i)=>{var a=n=>{try{o(r.next(n))}catch(c){i(c)}},p=n=>{try{o(r.throw(n))}catch(c){i(c)}},o=n=>n.done?s(n.value):Promise.resolve(n.value).then(a,p);o((r=r.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./tscodegen-DUJe0_td.cjs"),v=require("@apidevtools/swagger-parser"),A=require("swagger2openapi"),S=["positional","object"];function g(e,t,r){return new l.ApiGenerator(e,t,r).generateApi()}function d(e){return l.printFile(e)}function b(r){return u(this,arguments,function*(e,t={}){var{doc:s,isConverted:i}=yield f(e);const a=g(s,t,i),{title:p,version:o}=s.info,n=["$&",p,o].filter(Boolean).join(` * `);return d(a).replace(/^\/\*\*/,n)})}function y(e){return"openapi"in e&&e.openapi.startsWith("3")}function f(e){return u(this,null,function*(){const t=yield v.bundle(e);return y(t)?{doc:t,isConverted:!1}:{doc:(yield A.convertObj(t,{})).openapi,isConverted:!0}})}exports.cg=l.tscodegen;exports.generateAst=g;exports.generateSource=b;exports.optsArgumentStyles=S;exports.parseSpec=f;exports.printAst=d; //# sourceMappingURL=index.cjs.map