/** * OpenAPI specification parser and indexer * * Why indexing: Large OpenAPI specs (GitLab has ~200 operations) need fast lookup. * Pre-indexing by operationId and path avoids linear search on every tool call. */ import type { OperationInfo, PathInfo } from '../types/openapi.js'; export declare class OpenAPIParser { private spec?; private index?; private schemaCache; load(specPath: string): Promise; /** * Detect if content is YAML format * Priority: Content-Type header > URL extension > JSON/YAML fallback */ private detectYamlFormat; /** * Build search index from OpenAPI spec * * Why upfront: Trading startup time for runtime performance. Index creation * happens once; lookups happen on every tool call. */ private buildIndex; private extractOperationInfo; private extractParameters; /** * Resolve $ref to parameter definition * * Why: GitLab spec uses shared parameter definitions (e.g., ProjectIdOrPath). * Need to resolve these refs to get actual parameter details. */ private resolveParameter; private extractRequestBody; private extractSchema; private resolveSchema; private mergeSchemaInfo; private cloneSchemaInfo; getOperation(operationId: string): OperationInfo | undefined; getPath(path: string): PathInfo | undefined; getBaseUrl(): string; /** * Get resource metadata from OpenAPI spec * * Why: Used for OAuth 2.0 Protected Resource Metadata (RFC 8707) * to provide human-readable name and documentation URL for the API. * * Returns undefined for fields not present in spec. */ getResourceMetadata(): { name?: string; documentation?: string; }; getAllOperations(): OperationInfo[]; /** * Get first security scheme from OpenAPI spec * * Why: When no profile is provided, we need to infer auth configuration from OpenAPI spec. * Returns the first security scheme defined in spec.security or components.securitySchemes. * * Returns undefined if no security is defined (public API). */ getSecurityScheme(): { type: string; scheme?: string; name?: string; in?: string; } | undefined; } //# sourceMappingURL=openapi-parser.d.ts.map