jsonv-ts
Version:
JSON Schema builder and validator for TypeScript with static type inference, Hono middleware for OpenAPI generation and validation, and MCP server/client implementation. Lightweight, dependency-free, and built on Web Standards.
14 lines (13 loc) • 974 B
TypeScript
import type { ObjectSchema } from "jsonv-ts";
import * as t from "./types";
import type { RouteHandler } from "../shared";
import type { RouterRoute } from "hono/types";
export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
export declare function isObject(value: unknown): value is Record<string, unknown>;
export declare function merge(obj: any, ...sources: any[]): any;
export declare function registerPath(specs: Partial<t.Document>, route: RouterRoute, { type, value }: RouteHandler): void;
export declare function schemaToSpec(obj: ObjectSchema, target: string): Omit<t.OperationObject, "responses">;
export declare function sortParameters(parameters: t.ParameterObject[]): import("openapi-types").OpenAPIV3.ParameterObject[];
export declare const toOpenAPIPath: (path: string) => string;
export declare const capitalize: (word: string) => string;
export declare const generateOperationId: (method: string, paths: string) => string;