diff --git a/fw/index.ts b/fw/index.ts index c76417af..9002a232 100644 --- a/fw/index.ts +++ b/fw/index.ts @@ -1,8 +1,8 @@ -import fsRoutes from 'fs-routes'; -import OpenAPIDefaultSetter from 'openapi-default-setter'; -import OpenAPIRequestCoercer from 'openapi-request-coercer'; -import OpenAPIRequestValidator from 'openapi-request-validator'; -import OpenAPIResponseValidator from 'openapi-response-validator'; +// import fsRoutes from 'fs-routes'; +// import OpenAPIDefaultSetter from 'openapi-default-setter'; +// import OpenAPIRequestCoercer from 'openapi-request-coercer'; +// import OpenAPIRequestValidator from 'openapi-request-validator'; +// import OpenAPIResponseValidator from 'openapi-response-validator'; import OpenAPISchemaValidator from 'openapi-schema-validator'; import OpenAPISecurityHandler from 'openapi-security-handler'; import { OpenAPI, OpenAPIV2, OpenAPIV3 } from 'openapi-types'; @@ -13,7 +13,7 @@ import { OpenAPIFrameworkAPIContext, OpenAPIFrameworkArgs, OpenAPIFrameworkConstructorArgs, - OpenAPIFrameworkOperationContext, + // OpenAPIFrameworkOperationContext, OpenAPIFrameworkPathContext, OpenAPIFrameworkPathObject, OpenAPIFrameworkVisitor, @@ -55,7 +55,7 @@ export { OpenAPIFrameworkPathContext, OpenAPIFrameworkPathObject, OpenAPIFrameworkAPIContext, - OpenAPIFrameworkOperationContext, + // OpenAPIFrameworkOperationContext, }; export default class OpenAPIFramework implements IOpenAPIFramework { public readonly apiDoc; diff --git a/fw/types.ts b/fw/types.ts index 95d06858..9670a711 100644 --- a/fw/types.ts +++ b/fw/types.ts @@ -1,7 +1,7 @@ -import { IOpenAPIDefaultSetter } from 'openapi-default-setter'; -import { IOpenAPIRequestCoercer } from 'openapi-request-coercer'; -import { IOpenAPIRequestValidator } from 'openapi-request-validator'; -import { IOpenAPIResponseValidator } from 'openapi-response-validator'; +// import { IOpenAPIDefaultSetter } from 'openapi-default-setter'; +// import { IOpenAPIRequestCoercer } from 'openapi-request-coercer'; +// import { IOpenAPIRequestValidator } from 'openapi-request-validator'; +// import { IOpenAPIResponseValidator } from 'openapi-response-validator'; import { IOpenAPISecurityHandler, SecurityHandlers, @@ -110,28 +110,28 @@ export interface OpenAPIFrameworkPathContext { getPathDoc(): any; } -export interface OpenAPIFrameworkOperationContext { - additionalFeatures: any[]; - allowsFeatures: boolean; - apiDoc: any; - basePaths: BasePath[]; - consumes: string[]; - features: { - coercer?: IOpenAPIRequestCoercer; - defaultSetter?: IOpenAPIDefaultSetter; - requestValidator?: IOpenAPIRequestValidator; - responseValidator?: IOpenAPIResponseValidator; - securityHandler?: IOpenAPISecurityHandler; - }; - methodName: string; - methodParameters: any[]; - operationDoc: any; - operationHandler: any; - path: string; -} +// export interface OpenAPIFrameworkOperationContext { +// additionalFeatures: any[]; +// allowsFeatures: boolean; +// apiDoc: any; +// basePaths: BasePath[]; +// consumes: string[]; +// features: { +// coercer?: IOpenAPIRequestCoercer; +// // defaultSetter?: IOpenAPIDefaultSetter; +// requestValidator?: IOpenAPIRequestValidator; +// // responseValidator?: IOpenAPIResponseValidator; +// securityHandler?: IOpenAPISecurityHandler; +// }; +// methodName: string; +// methodParameters: any[]; +// operationDoc: any; +// operationHandler: any; +// path: string; +// } export interface OpenAPIFrameworkVisitor { visitApi?(context: OpenAPIFrameworkAPIContext): void; visitPath?(context: OpenAPIFrameworkPathContext): void; - visitOperation?(context: OpenAPIFrameworkOperationContext): void; + // visitOperation?(context: OpenAPIFrameworkOperationContext): void; } diff --git a/fw/util.ts b/fw/util.ts index 8b4191ba..a1c629b6 100644 --- a/fw/util.ts +++ b/fw/util.ts @@ -1,11 +1,11 @@ import { OpenAPIV3 } from 'openapi-types'; -import { Logger } from 'ts-log'; -import { URL } from 'url'; +// import { Logger } from 'ts-log'; +// import { URL } from 'url'; import BasePath from './base.path'; -import { IOpenAPIFramework } from './types'; -const difunc = require('difunc'); +// import { IOpenAPIFramework } from './types'; +// const difunc = require('difunc'); const fs = require('fs'); -const isDir = require('is-dir'); +// const isDir = require('is-dir'); const jsYaml = require('js-yaml'); const path = require('path');