Skip to content

Commit

Permalink
comment out unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Carmine DiMascio committed Mar 21, 2019
1 parent 3c53036 commit 37db050
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
14 changes: 7 additions & 7 deletions fw/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -13,7 +13,7 @@ import {
OpenAPIFrameworkAPIContext,
OpenAPIFrameworkArgs,
OpenAPIFrameworkConstructorArgs,
OpenAPIFrameworkOperationContext,
// OpenAPIFrameworkOperationContext,
OpenAPIFrameworkPathContext,
OpenAPIFrameworkPathObject,
OpenAPIFrameworkVisitor,
Expand Down Expand Up @@ -55,7 +55,7 @@ export {
OpenAPIFrameworkPathContext,
OpenAPIFrameworkPathObject,
OpenAPIFrameworkAPIContext,
OpenAPIFrameworkOperationContext,
// OpenAPIFrameworkOperationContext,
};
export default class OpenAPIFramework implements IOpenAPIFramework {
public readonly apiDoc;
Expand Down
48 changes: 24 additions & 24 deletions fw/types.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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;
}
10 changes: 5 additions & 5 deletions fw/util.ts
Original file line number Diff line number Diff line change
@@ -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');

Expand Down

0 comments on commit 37db050

Please sign in to comment.