openapi-modifier
Version:
This package allows you to automate the process of modifying OpenAPI specifications by applying a set of predefined rules
15 lines (14 loc) • 611 B
TypeScript
import { OpenAPIV3, OpenAPIV3_1 } from 'openapi-types';
import { LoggerI } from './logger/interface';
type OpenAPIDocumentT = OpenAPIV3.Document | OpenAPIV3_1.Document;
type OpenAPIFileContextT = {
sourcePath: string;
sourceExtension: '.json' | '.yaml' | '.yml';
};
type OpenAPIFileT = {
context: OpenAPIFileContextT;
document: OpenAPIDocumentT;
};
declare const readInputFile: (baseLogger: LoggerI, inputPath: string) => OpenAPIFileT;
declare const writeOutputFile: (baseLogger: LoggerI, outputPath: string, file: OpenAPIFileT) => void;
export { OpenAPIFileT, readInputFile, writeOutputFile };