import ts from "typescript" ; import type { OpenApi } from "../../../types" ; import { Factory } from "../../TsGenerator" ; export const generatePropertySignatures = ( _entryPoint , _currentPoint , factory , securitySchema ) : ts . PropertySignature [ ] => { const signatures = [ factory . PropertySignature . create ( { name : "type" , optional : false , type : factory . LiteralTypeNode . create ( { value : securitySchema . type } ) , } ) , factory . PropertySignature . create ( { name : "name" , optional : false , type : factory . LiteralTypeNode . create ( { value : securitySchema . name } ) , } ) , factory . PropertySignature . create ( { name : "in" , optional : false , type : factory . LiteralTypeNode . create ( { value : securitySchema . in } ) , } ) , factory . PropertySignature . create ( { name : "openIdConnectUrl" , optional : false , type : factory . LiteralTypeNode . create ( { value : securitySchema . openIdConnectUrl } ) , } ) , ] ; return signatures ; } ; export const generateInterface = ( entryPoint , currentPoint , factory , name , securitySchema ) : ts . InterfaceDeclaration => { return factory . InterfaceDeclaration . create ( { export : true , name , comment : securitySchema . description , members : generatePropertySignatures ( entryPoint , currentPoint , factory , securitySchema ) , } ) ; } ;