/** * Test Generation from OpenAPI specs. * * Reads an OpenAPI/Swagger spec and generates AgentProbe test cases * for each endpoint the agent might call as a tool. */ export interface OpenAPISpec { openapi?: string; swagger?: string; info: { title: string; version: string; description?: string; }; paths: Record>; servers?: Array<{ url: string; }>; } export interface OpenAPIOperation { operationId?: string; summary?: string; description?: string; parameters?: OpenAPIParameter[]; requestBody?: { content?: Record; required?: boolean; }; responses?: Record; tags?: string[]; } export interface OpenAPIParameter { name: string; in: 'query' | 'path' | 'header' | 'cookie'; required?: boolean; schema?: { type?: string; enum?: any[]; default?: any; example?: any; }; description?: string; } export interface GeneratedEndpointTest { name: string; input: string; mocks: Record; expect: { tool_called: string; tool_args_match?: Record; }; tags: string[]; } export interface OpenAPITestSuite { name: string; description: string; agent: string; tests: GeneratedEndpointTest[]; } /** * Load and parse an OpenAPI spec from file (JSON or YAML). */ export declare function loadOpenAPISpec(filePath: string): OpenAPISpec; /** * Generate tests from an OpenAPI spec. */ export declare function generateFromOpenAPI(spec: OpenAPISpec, agentName: string): OpenAPITestSuite; /** * Format generated tests as YAML. */ export declare function formatOpenAPITests(suite: OpenAPITestSuite): string; //# sourceMappingURL=openapi.d.ts.map