UNPKG

@opendoc/openapi-shaking

Version:

Remove the useless components and paths of openapi document.

7 lines (6 loc) 218 B
import { OpenAPIV3 } from 'openapi-types'; export function isValidMethod(method) { if (typeof method !== 'string') return false; return Object.values(OpenAPIV3.HttpMethods).some((m) => m === method); }