UNPKG

openapi-modifier

Version:

This package allows you to automate the process of modifying OpenAPI specifications by applying a set of predefined rules

80 lines (79 loc) 2.86 kB
import { RuleProcessorT } from '../../core/rules/processor-models'; import { z } from 'zod'; declare const configSchema: z.ZodObject<{ endpointDescriptor: z.ZodOptional<z.ZodUnion<[z.ZodObject<{ path: z.ZodString; method: z.ZodString; }, "strict", z.ZodTypeAny, { path: string; method: string; }, { path: string; method: string; }>, z.ZodString]>>; parameterDescriptor: z.ZodOptional<z.ZodObject<{ name: z.ZodString; in: z.ZodUnion<[z.ZodLiteral<"query">, z.ZodLiteral<"header">, z.ZodLiteral<"path">, z.ZodLiteral<"cookie">]>; correction: z.ZodOptional<z.ZodString>; }, "strict", z.ZodTypeAny, { name: string; in: "path" | "query" | "header" | "cookie"; correction?: string | undefined; }, { name: string; in: "path" | "query" | "header" | "cookie"; correction?: string | undefined; }>>; patchMethod: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"deepmerge">, z.ZodLiteral<"merge">]>>; schemaDiff: z.ZodOptional<z.ZodAny>; objectDiff: z.ZodOptional<z.ZodObject<{ name: z.ZodOptional<z.ZodString>; in: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"query">, z.ZodLiteral<"header">, z.ZodLiteral<"path">, z.ZodLiteral<"cookie">]>>; required: z.ZodOptional<z.ZodBoolean>; }, "strict", z.ZodTypeAny, { name?: string | undefined; in?: "path" | "query" | "header" | "cookie" | undefined; required?: boolean | undefined; }, { name?: string | undefined; in?: "path" | "query" | "header" | "cookie" | undefined; required?: boolean | undefined; }>>; }, "strict", z.ZodTypeAny, { endpointDescriptor?: string | { path: string; method: string; } | undefined; parameterDescriptor?: { name: string; in: "path" | "query" | "header" | "cookie"; correction?: string | undefined; } | undefined; patchMethod?: "deepmerge" | "merge" | undefined; schemaDiff?: any; objectDiff?: { name?: string | undefined; in?: "path" | "query" | "header" | "cookie" | undefined; required?: boolean | undefined; } | undefined; }, { endpointDescriptor?: string | { path: string; method: string; } | undefined; parameterDescriptor?: { name: string; in: "path" | "query" | "header" | "cookie"; correction?: string | undefined; } | undefined; patchMethod?: "deepmerge" | "merge" | undefined; schemaDiff?: any; objectDiff?: { name?: string | undefined; in?: "path" | "query" | "header" | "cookie" | undefined; required?: boolean | undefined; } | undefined; }>; declare const processor: RuleProcessorT<typeof configSchema>; export default processor; export { configSchema };