Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
import { parseLiteralValues } from './parse-literal-values';
import { parseSchema } from './parse-schema';
import type { JsonSchemaObject, Refs, Serializable } from '../types';
export const parseConst = (jsonSchema: JsonSchemaObject & { const: Serializable }, refs: Refs) => {
const { const: value, ...baseSchema } = jsonSchema;
return parseSchema(baseSchema, { ...refs, seen: new Map(refs.seen) }, true).and(
parseLiteralValues([value])
);
};