mnehmos.trace.mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1662 -0
- package/dist/adapters/bootstrap.d.ts +29 -0
- package/dist/adapters/bootstrap.d.ts.map +1 -0
- package/dist/adapters/bootstrap.js +46 -0
- package/dist/adapters/bootstrap.js.map +1 -0
- package/dist/adapters/errors.d.ts +94 -0
- package/dist/adapters/errors.d.ts.map +1 -0
- package/dist/adapters/errors.js +107 -0
- package/dist/adapters/errors.js.map +1 -0
- package/dist/adapters/graphql/index.d.ts +9 -0
- package/dist/adapters/graphql/index.d.ts.map +1 -0
- package/dist/adapters/graphql/index.js +9 -0
- package/dist/adapters/graphql/index.js.map +1 -0
- package/dist/adapters/graphql/sdl-parser.d.ts +74 -0
- package/dist/adapters/graphql/sdl-parser.d.ts.map +1 -0
- package/dist/adapters/graphql/sdl-parser.js +559 -0
- package/dist/adapters/graphql/sdl-parser.js.map +1 -0
- package/dist/adapters/grpc/adapter.d.ts +76 -0
- package/dist/adapters/grpc/adapter.d.ts.map +1 -0
- package/dist/adapters/grpc/adapter.js +362 -0
- package/dist/adapters/grpc/adapter.js.map +1 -0
- package/dist/adapters/grpc/index.d.ts +10 -0
- package/dist/adapters/grpc/index.d.ts.map +1 -0
- package/dist/adapters/grpc/index.js +12 -0
- package/dist/adapters/grpc/index.js.map +1 -0
- package/dist/adapters/grpc/proto-parser.d.ts +76 -0
- package/dist/adapters/grpc/proto-parser.d.ts.map +1 -0
- package/dist/adapters/grpc/proto-parser.js +523 -0
- package/dist/adapters/grpc/proto-parser.js.map +1 -0
- package/dist/adapters/grpc/type-converter.d.ts +43 -0
- package/dist/adapters/grpc/type-converter.d.ts.map +1 -0
- package/dist/adapters/grpc/type-converter.js +270 -0
- package/dist/adapters/grpc/type-converter.js.map +1 -0
- package/dist/adapters/grpc/types.d.ts +85 -0
- package/dist/adapters/grpc/types.d.ts.map +1 -0
- package/dist/adapters/grpc/types.js +7 -0
- package/dist/adapters/grpc/types.js.map +1 -0
- package/dist/adapters/index.d.ts +39 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +50 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/adapters/mcp.d.ts +23 -0
- package/dist/adapters/mcp.d.ts.map +1 -0
- package/dist/adapters/mcp.js +293 -0
- package/dist/adapters/mcp.js.map +1 -0
- package/dist/adapters/openapi/adapter.d.ts +213 -0
- package/dist/adapters/openapi/adapter.d.ts.map +1 -0
- package/dist/adapters/openapi/adapter.js +557 -0
- package/dist/adapters/openapi/adapter.js.map +1 -0
- package/dist/adapters/openapi/convert.d.ts +120 -0
- package/dist/adapters/openapi/convert.d.ts.map +1 -0
- package/dist/adapters/openapi/convert.js +363 -0
- package/dist/adapters/openapi/convert.js.map +1 -0
- package/dist/adapters/openapi/index.d.ts +39 -0
- package/dist/adapters/openapi/index.d.ts.map +1 -0
- package/dist/adapters/openapi/index.js +48 -0
- package/dist/adapters/openapi/index.js.map +1 -0
- package/dist/adapters/openapi/parser.d.ts +95 -0
- package/dist/adapters/openapi/parser.d.ts.map +1 -0
- package/dist/adapters/openapi/parser.js +171 -0
- package/dist/adapters/openapi/parser.js.map +1 -0
- package/dist/adapters/registry.d.ts +116 -0
- package/dist/adapters/registry.d.ts.map +1 -0
- package/dist/adapters/registry.js +246 -0
- package/dist/adapters/registry.js.map +1 -0
- package/dist/adapters/trpc/adapter.d.ts +159 -0
- package/dist/adapters/trpc/adapter.d.ts.map +1 -0
- package/dist/adapters/trpc/adapter.js +223 -0
- package/dist/adapters/trpc/adapter.js.map +1 -0
- package/dist/adapters/trpc/extractor.d.ts +218 -0
- package/dist/adapters/trpc/extractor.d.ts.map +1 -0
- package/dist/adapters/trpc/extractor.js +708 -0
- package/dist/adapters/trpc/extractor.js.map +1 -0
- package/dist/adapters/trpc/index.d.ts +31 -0
- package/dist/adapters/trpc/index.d.ts.map +1 -0
- package/dist/adapters/trpc/index.js +40 -0
- package/dist/adapters/trpc/index.js.map +1 -0
- package/dist/adapters/trpc/parser.d.ts +119 -0
- package/dist/adapters/trpc/parser.d.ts.map +1 -0
- package/dist/adapters/trpc/parser.js +128 -0
- package/dist/adapters/trpc/parser.js.map +1 -0
- package/dist/compare/index.d.ts +33 -0
- package/dist/compare/index.d.ts.map +1 -0
- package/dist/compare/index.js +261 -0
- package/dist/compare/index.js.map +1 -0
- package/dist/core/types.d.ts +188 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +9 -0
- package/dist/core/types.js.map +1 -0
- package/dist/extract/index.d.ts +26 -0
- package/dist/extract/index.d.ts.map +1 -0
- package/dist/extract/index.js +44 -0
- package/dist/extract/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +674 -0
- package/dist/index.js.map +1 -0
- package/dist/languages/base.d.ts +57 -0
- package/dist/languages/base.d.ts.map +1 -0
- package/dist/languages/base.js +6 -0
- package/dist/languages/base.js.map +1 -0
- package/dist/languages/bootstrap.d.ts +10 -0
- package/dist/languages/bootstrap.d.ts.map +1 -0
- package/dist/languages/bootstrap.js +25 -0
- package/dist/languages/bootstrap.js.map +1 -0
- package/dist/languages/go/handlers/chi.d.ts +24 -0
- package/dist/languages/go/handlers/chi.d.ts.map +1 -0
- package/dist/languages/go/handlers/chi.js +205 -0
- package/dist/languages/go/handlers/chi.js.map +1 -0
- package/dist/languages/go/handlers/gin.d.ts +24 -0
- package/dist/languages/go/handlers/gin.d.ts.map +1 -0
- package/dist/languages/go/handlers/gin.js +156 -0
- package/dist/languages/go/handlers/gin.js.map +1 -0
- package/dist/languages/go/handlers/stdlib.d.ts +19 -0
- package/dist/languages/go/handlers/stdlib.d.ts.map +1 -0
- package/dist/languages/go/handlers/stdlib.js +112 -0
- package/dist/languages/go/handlers/stdlib.js.map +1 -0
- package/dist/languages/go/index.d.ts +18 -0
- package/dist/languages/go/index.d.ts.map +1 -0
- package/dist/languages/go/index.js +20 -0
- package/dist/languages/go/index.js.map +1 -0
- package/dist/languages/go/parser.d.ts +33 -0
- package/dist/languages/go/parser.d.ts.map +1 -0
- package/dist/languages/go/parser.js +95 -0
- package/dist/languages/go/parser.js.map +1 -0
- package/dist/languages/go/struct-extractor.d.ts +59 -0
- package/dist/languages/go/struct-extractor.d.ts.map +1 -0
- package/dist/languages/go/struct-extractor.js +483 -0
- package/dist/languages/go/struct-extractor.js.map +1 -0
- package/dist/languages/go/tag-parser.d.ts +62 -0
- package/dist/languages/go/tag-parser.d.ts.map +1 -0
- package/dist/languages/go/tag-parser.js +108 -0
- package/dist/languages/go/tag-parser.js.map +1 -0
- package/dist/languages/go/type-converter.d.ts +32 -0
- package/dist/languages/go/type-converter.d.ts.map +1 -0
- package/dist/languages/go/type-converter.js +226 -0
- package/dist/languages/go/type-converter.js.map +1 -0
- package/dist/languages/go/types.d.ts +153 -0
- package/dist/languages/go/types.d.ts.map +1 -0
- package/dist/languages/go/types.js +6 -0
- package/dist/languages/go/types.js.map +1 -0
- package/dist/languages/import-resolver.d.ts +645 -0
- package/dist/languages/import-resolver.d.ts.map +1 -0
- package/dist/languages/import-resolver.js +1278 -0
- package/dist/languages/import-resolver.js.map +1 -0
- package/dist/languages/index.d.ts +34 -0
- package/dist/languages/index.d.ts.map +1 -0
- package/dist/languages/index.js +93 -0
- package/dist/languages/index.js.map +1 -0
- package/dist/languages/json-schema.d.ts +40 -0
- package/dist/languages/json-schema.d.ts.map +1 -0
- package/dist/languages/json-schema.js +188 -0
- package/dist/languages/json-schema.js.map +1 -0
- package/dist/languages/python-ast/index.d.ts +8 -0
- package/dist/languages/python-ast/index.d.ts.map +1 -0
- package/dist/languages/python-ast/index.js +7 -0
- package/dist/languages/python-ast/index.js.map +1 -0
- package/dist/languages/python-ast/parser.d.ts +174 -0
- package/dist/languages/python-ast/parser.d.ts.map +1 -0
- package/dist/languages/python-ast/parser.js +1205 -0
- package/dist/languages/python-ast/parser.js.map +1 -0
- package/dist/languages/python-ast/type-resolver.d.ts +75 -0
- package/dist/languages/python-ast/type-resolver.d.ts.map +1 -0
- package/dist/languages/python-ast/type-resolver.js +421 -0
- package/dist/languages/python-ast/type-resolver.js.map +1 -0
- package/dist/languages/python-ast/types.d.ts +216 -0
- package/dist/languages/python-ast/types.d.ts.map +1 -0
- package/dist/languages/python-ast/types.js +6 -0
- package/dist/languages/python-ast/types.js.map +1 -0
- package/dist/languages/python.d.ts +55 -0
- package/dist/languages/python.d.ts.map +1 -0
- package/dist/languages/python.js +311 -0
- package/dist/languages/python.js.map +1 -0
- package/dist/languages/typescript.d.ts +272 -0
- package/dist/languages/typescript.d.ts.map +1 -0
- package/dist/languages/typescript.js +1381 -0
- package/dist/languages/typescript.js.map +1 -0
- package/dist/patterns/base.d.ts +146 -0
- package/dist/patterns/base.d.ts.map +1 -0
- package/dist/patterns/base.js +89 -0
- package/dist/patterns/base.js.map +1 -0
- package/dist/patterns/errors.d.ts +172 -0
- package/dist/patterns/errors.d.ts.map +1 -0
- package/dist/patterns/errors.js +185 -0
- package/dist/patterns/errors.js.map +1 -0
- package/dist/patterns/extractors.d.ts +170 -0
- package/dist/patterns/extractors.d.ts.map +1 -0
- package/dist/patterns/extractors.js +305 -0
- package/dist/patterns/extractors.js.map +1 -0
- package/dist/patterns/graphql/apollo-client.d.ts +80 -0
- package/dist/patterns/graphql/apollo-client.d.ts.map +1 -0
- package/dist/patterns/graphql/apollo-client.js +800 -0
- package/dist/patterns/graphql/apollo-client.js.map +1 -0
- package/dist/patterns/graphql/apollo-server.d.ts +55 -0
- package/dist/patterns/graphql/apollo-server.d.ts.map +1 -0
- package/dist/patterns/graphql/apollo-server.js +523 -0
- package/dist/patterns/graphql/apollo-server.js.map +1 -0
- package/dist/patterns/graphql/index.d.ts +11 -0
- package/dist/patterns/graphql/index.d.ts.map +1 -0
- package/dist/patterns/graphql/index.js +12 -0
- package/dist/patterns/graphql/index.js.map +1 -0
- package/dist/patterns/graphql/types.d.ts +213 -0
- package/dist/patterns/graphql/types.d.ts.map +1 -0
- package/dist/patterns/graphql/types.js +16 -0
- package/dist/patterns/graphql/types.js.map +1 -0
- package/dist/patterns/http-clients/axios.d.ts +148 -0
- package/dist/patterns/http-clients/axios.d.ts.map +1 -0
- package/dist/patterns/http-clients/axios.js +652 -0
- package/dist/patterns/http-clients/axios.js.map +1 -0
- package/dist/patterns/http-clients/fetch.d.ts +88 -0
- package/dist/patterns/http-clients/fetch.d.ts.map +1 -0
- package/dist/patterns/http-clients/fetch.js +364 -0
- package/dist/patterns/http-clients/fetch.js.map +1 -0
- package/dist/patterns/http-clients/index.d.ts +36 -0
- package/dist/patterns/http-clients/index.d.ts.map +1 -0
- package/dist/patterns/http-clients/index.js +50 -0
- package/dist/patterns/http-clients/index.js.map +1 -0
- package/dist/patterns/http-clients/property-access.d.ts +46 -0
- package/dist/patterns/http-clients/property-access.d.ts.map +1 -0
- package/dist/patterns/http-clients/property-access.js +818 -0
- package/dist/patterns/http-clients/property-access.js.map +1 -0
- package/dist/patterns/http-clients/type-inference.d.ts +48 -0
- package/dist/patterns/http-clients/type-inference.d.ts.map +1 -0
- package/dist/patterns/http-clients/type-inference.js +293 -0
- package/dist/patterns/http-clients/type-inference.js.map +1 -0
- package/dist/patterns/http-clients/types.d.ts +168 -0
- package/dist/patterns/http-clients/types.d.ts.map +1 -0
- package/dist/patterns/http-clients/types.js +10 -0
- package/dist/patterns/http-clients/types.js.map +1 -0
- package/dist/patterns/http-clients/url-extractor.d.ts +53 -0
- package/dist/patterns/http-clients/url-extractor.d.ts.map +1 -0
- package/dist/patterns/http-clients/url-extractor.js +338 -0
- package/dist/patterns/http-clients/url-extractor.js.map +1 -0
- package/dist/patterns/index.d.ts +44 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +49 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/patterns/python/aiohttp.d.ts +21 -0
- package/dist/patterns/python/aiohttp.d.ts.map +1 -0
- package/dist/patterns/python/aiohttp.js +188 -0
- package/dist/patterns/python/aiohttp.js.map +1 -0
- package/dist/patterns/python/httpx.d.ts +20 -0
- package/dist/patterns/python/httpx.d.ts.map +1 -0
- package/dist/patterns/python/httpx.js +183 -0
- package/dist/patterns/python/httpx.js.map +1 -0
- package/dist/patterns/python/index.d.ts +32 -0
- package/dist/patterns/python/index.d.ts.map +1 -0
- package/dist/patterns/python/index.js +63 -0
- package/dist/patterns/python/index.js.map +1 -0
- package/dist/patterns/python/property-access.d.ts +27 -0
- package/dist/patterns/python/property-access.d.ts.map +1 -0
- package/dist/patterns/python/property-access.js +132 -0
- package/dist/patterns/python/property-access.js.map +1 -0
- package/dist/patterns/python/requests.d.ts +19 -0
- package/dist/patterns/python/requests.d.ts.map +1 -0
- package/dist/patterns/python/requests.js +239 -0
- package/dist/patterns/python/requests.js.map +1 -0
- package/dist/patterns/python/types.d.ts +95 -0
- package/dist/patterns/python/types.d.ts.map +1 -0
- package/dist/patterns/python/types.js +43 -0
- package/dist/patterns/python/types.js.map +1 -0
- package/dist/patterns/registry.d.ts +181 -0
- package/dist/patterns/registry.d.ts.map +1 -0
- package/dist/patterns/registry.js +304 -0
- package/dist/patterns/registry.js.map +1 -0
- package/dist/patterns/rest/express.d.ts +78 -0
- package/dist/patterns/rest/express.d.ts.map +1 -0
- package/dist/patterns/rest/express.js +289 -0
- package/dist/patterns/rest/express.js.map +1 -0
- package/dist/patterns/rest/fastify.d.ts +93 -0
- package/dist/patterns/rest/fastify.d.ts.map +1 -0
- package/dist/patterns/rest/fastify.js +420 -0
- package/dist/patterns/rest/fastify.js.map +1 -0
- package/dist/patterns/rest/index.d.ts +31 -0
- package/dist/patterns/rest/index.d.ts.map +1 -0
- package/dist/patterns/rest/index.js +45 -0
- package/dist/patterns/rest/index.js.map +1 -0
- package/dist/patterns/rest/middleware.d.ts +25 -0
- package/dist/patterns/rest/middleware.d.ts.map +1 -0
- package/dist/patterns/rest/middleware.js +219 -0
- package/dist/patterns/rest/middleware.js.map +1 -0
- package/dist/patterns/rest/path-parser.d.ts +50 -0
- package/dist/patterns/rest/path-parser.d.ts.map +1 -0
- package/dist/patterns/rest/path-parser.js +137 -0
- package/dist/patterns/rest/path-parser.js.map +1 -0
- package/dist/patterns/rest/response-inference.d.ts +44 -0
- package/dist/patterns/rest/response-inference.d.ts.map +1 -0
- package/dist/patterns/rest/response-inference.js +218 -0
- package/dist/patterns/rest/response-inference.js.map +1 -0
- package/dist/patterns/rest/types.d.ts +102 -0
- package/dist/patterns/rest/types.d.ts.map +1 -0
- package/dist/patterns/rest/types.js +10 -0
- package/dist/patterns/rest/types.js.map +1 -0
- package/dist/patterns/types.d.ts +105 -0
- package/dist/patterns/types.d.ts.map +1 -0
- package/dist/patterns/types.js +11 -0
- package/dist/patterns/types.js.map +1 -0
- package/dist/report/index.d.ts +11 -0
- package/dist/report/index.d.ts.map +1 -0
- package/dist/report/index.js +55 -0
- package/dist/report/index.js.map +1 -0
- package/dist/tools/contract-comments.d.ts +48 -0
- package/dist/tools/contract-comments.d.ts.map +1 -0
- package/dist/tools/contract-comments.js +130 -0
- package/dist/tools/contract-comments.js.map +1 -0
- package/dist/tools/index.d.ts +6 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +6 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/scaffold.d.ts +38 -0
- package/dist/tools/scaffold.d.ts.map +1 -0
- package/dist/tools/scaffold.js +373 -0
- package/dist/tools/scaffold.js.map +1 -0
- package/dist/trace/index.d.ts +28 -0
- package/dist/trace/index.d.ts.map +1 -0
- package/dist/trace/index.js +45 -0
- package/dist/trace/index.js.map +1 -0
- package/dist/types.d.ts +135 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +22 -0
- package/dist/types.js.map +1 -0
- package/dist/watch/cache.d.ts +41 -0
- package/dist/watch/cache.d.ts.map +1 -0
- package/dist/watch/cache.js +230 -0
- package/dist/watch/cache.js.map +1 -0
- package/dist/watch/index.d.ts +9 -0
- package/dist/watch/index.d.ts.map +1 -0
- package/dist/watch/index.js +7 -0
- package/dist/watch/index.js.map +1 -0
- package/dist/watch/project.d.ts +128 -0
- package/dist/watch/project.d.ts.map +1 -0
- package/dist/watch/project.js +152 -0
- package/dist/watch/project.js.map +1 -0
- package/dist/watch/watcher.d.ts +76 -0
- package/dist/watch/watcher.d.ts.map +1 -0
- package/dist/watch/watcher.js +235 -0
- package/dist/watch/watcher.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 📋 OpenAPI Schema Adapter
|
|
3
|
+
* Extracts and converts OpenAPI/Swagger specifications to NormalizedSchema
|
|
4
|
+
*
|
|
5
|
+
* This adapter implements the SchemaAdapter interface for OpenAPI 3.x
|
|
6
|
+
* specifications. It supports extraction of:
|
|
7
|
+
* - Full endpoints (request + all responses)
|
|
8
|
+
* - Request body schemas
|
|
9
|
+
* - Response schemas by status code
|
|
10
|
+
* - Component schemas
|
|
11
|
+
* - File-level extraction (first endpoint)
|
|
12
|
+
*
|
|
13
|
+
* @module adapters/openapi/adapter
|
|
14
|
+
*/
|
|
15
|
+
import SwaggerParser from '@apidevtools/swagger-parser';
|
|
16
|
+
import { parseOpenAPIRef } from './parser.js';
|
|
17
|
+
import { convertToNormalizedSchema, convertToNormalizedType, convertParametersToSchema, } from './convert.js';
|
|
18
|
+
/**
|
|
19
|
+
* Schema adapter for OpenAPI 3.x specifications.
|
|
20
|
+
*
|
|
21
|
+
* Implements the SchemaAdapter interface to extract schemas from
|
|
22
|
+
* OpenAPI/Swagger specifications. Uses `@apidevtools/swagger-parser`
|
|
23
|
+
* for parsing and validation.
|
|
24
|
+
*
|
|
25
|
+
* @implements {SchemaAdapter}
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* import { OpenAPIAdapter } from './adapter.js';
|
|
30
|
+
* import { registerAdapter } from '../registry.js';
|
|
31
|
+
*
|
|
32
|
+
* // Register the adapter
|
|
33
|
+
* registerAdapter(new OpenAPIAdapter());
|
|
34
|
+
*
|
|
35
|
+
* // Extract an endpoint schema
|
|
36
|
+
* const adapter = new OpenAPIAdapter();
|
|
37
|
+
* const schema = await adapter.extract({
|
|
38
|
+
* source: 'openapi',
|
|
39
|
+
* id: 'endpoint:GET:/users/{id}@./api.yaml'
|
|
40
|
+
* });
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export class OpenAPIAdapter {
|
|
44
|
+
/** Adapter kind identifier */
|
|
45
|
+
kind = 'openapi';
|
|
46
|
+
/**
|
|
47
|
+
* Check if this adapter supports the given schema reference.
|
|
48
|
+
*
|
|
49
|
+
* @param ref - The schema reference to check
|
|
50
|
+
* @returns True if the ref source is 'openapi'
|
|
51
|
+
*/
|
|
52
|
+
supports(ref) {
|
|
53
|
+
return ref.source === 'openapi';
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Extract a schema from an OpenAPI specification.
|
|
57
|
+
*
|
|
58
|
+
* Parses the ref ID to determine what to extract:
|
|
59
|
+
* - `file:` - Extract first endpoint from spec
|
|
60
|
+
* - `endpoint:` - Full endpoint schema (request + responses)
|
|
61
|
+
* - `request:` - Request body schema only
|
|
62
|
+
* - `response:` - Specific response by status code
|
|
63
|
+
* - `schema:` - Named component schema
|
|
64
|
+
*
|
|
65
|
+
* @param ref - The schema reference specifying what to extract
|
|
66
|
+
* @returns Promise resolving to the normalized schema
|
|
67
|
+
* @throws {Error} If the ref ID is invalid or extraction fails
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* // Extract a full endpoint
|
|
72
|
+
* const schema = await adapter.extract({
|
|
73
|
+
* source: 'openapi',
|
|
74
|
+
* id: 'endpoint:GET:/users/{id}@./api.yaml'
|
|
75
|
+
* });
|
|
76
|
+
*
|
|
77
|
+
* // Extract a component schema
|
|
78
|
+
* const schema = await adapter.extract({
|
|
79
|
+
* source: 'openapi',
|
|
80
|
+
* id: 'schema:User@./api.yaml'
|
|
81
|
+
* });
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
async extract(ref) {
|
|
85
|
+
const parsed = parseOpenAPIRef(ref.id);
|
|
86
|
+
if (!parsed) {
|
|
87
|
+
throw new Error(`Invalid OpenAPI ref ID: ${ref.id}`);
|
|
88
|
+
}
|
|
89
|
+
const api = await this.loadSpec(parsed.specPath);
|
|
90
|
+
switch (parsed.type) {
|
|
91
|
+
case 'file':
|
|
92
|
+
return this.extractFirstEndpoint(api, parsed.specPath, ref);
|
|
93
|
+
case 'endpoint':
|
|
94
|
+
return this.extractEndpoint(api, parsed.method, parsed.path, ref, parsed.specPath);
|
|
95
|
+
case 'request':
|
|
96
|
+
return this.extractRequest(api, parsed.method, parsed.path, ref);
|
|
97
|
+
case 'response':
|
|
98
|
+
return this.extractResponse(api, parsed.method, parsed.path, parsed.statusCode, ref);
|
|
99
|
+
case 'schema':
|
|
100
|
+
return this.extractComponentSchema(api, parsed.schemaName, ref, parsed.specPath);
|
|
101
|
+
default:
|
|
102
|
+
throw new Error(`Unknown OpenAPI ref type: ${parsed.type}`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* List all endpoints in an OpenAPI specification.
|
|
107
|
+
*
|
|
108
|
+
* Scans the paths object and returns a SchemaRef for each
|
|
109
|
+
* method/path combination found. Handles errors gracefully
|
|
110
|
+
* by returning an empty array per ADR guidelines.
|
|
111
|
+
*
|
|
112
|
+
* @param basePath - Path to the OpenAPI specification file
|
|
113
|
+
* @returns Promise resolving to array of endpoint SchemaRefs
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* ```typescript
|
|
117
|
+
* const refs = await adapter.list('./api.yaml');
|
|
118
|
+
* // [
|
|
119
|
+
* // { source: 'openapi', id: 'endpoint:GET:/users@./api.yaml' },
|
|
120
|
+
* // { source: 'openapi', id: 'endpoint:POST:/users@./api.yaml' },
|
|
121
|
+
* // ...
|
|
122
|
+
* // ]
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
async list(basePath) {
|
|
126
|
+
try {
|
|
127
|
+
const api = await this.loadSpec(basePath);
|
|
128
|
+
const refs = [];
|
|
129
|
+
const paths = api.paths || {};
|
|
130
|
+
for (const [path, pathItem] of Object.entries(paths)) {
|
|
131
|
+
if (!pathItem)
|
|
132
|
+
continue;
|
|
133
|
+
const methods = ['get', 'post', 'put', 'delete', 'patch', 'options', 'head'];
|
|
134
|
+
for (const method of methods) {
|
|
135
|
+
if (pathItem[method]) {
|
|
136
|
+
refs.push({
|
|
137
|
+
source: 'openapi',
|
|
138
|
+
id: `endpoint:${method.toUpperCase()}:${path}@${basePath}`,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return refs;
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
// Per ADR, list() should handle errors gracefully
|
|
147
|
+
return [];
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// ============================================================================
|
|
151
|
+
// Private: Spec Loading
|
|
152
|
+
// ============================================================================
|
|
153
|
+
/**
|
|
154
|
+
* Load and validate an OpenAPI specification.
|
|
155
|
+
*
|
|
156
|
+
* Uses swagger-parser to validate the spec and resolve references.
|
|
157
|
+
*
|
|
158
|
+
* @param specPath - Path to the specification file
|
|
159
|
+
* @returns Promise resolving to the parsed OpenAPI document
|
|
160
|
+
* @throws {Error} If the spec cannot be loaded or is invalid
|
|
161
|
+
*/
|
|
162
|
+
async loadSpec(specPath) {
|
|
163
|
+
try {
|
|
164
|
+
const api = await SwaggerParser.validate(specPath);
|
|
165
|
+
return api;
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
throw new Error(`Failed to load OpenAPI spec: ${specPath} - ${error}`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
// ============================================================================
|
|
172
|
+
// Private: Extraction Methods
|
|
173
|
+
// ============================================================================
|
|
174
|
+
/**
|
|
175
|
+
* Extract the first endpoint from a spec.
|
|
176
|
+
*
|
|
177
|
+
* Used for `file:` refs that don't specify a specific endpoint.
|
|
178
|
+
*
|
|
179
|
+
* @param api - The parsed OpenAPI document
|
|
180
|
+
* @param specPath - Path to the spec file
|
|
181
|
+
* @param ref - The original schema reference
|
|
182
|
+
* @returns The normalized schema for the first endpoint
|
|
183
|
+
* @throws {Error} If no endpoints are found
|
|
184
|
+
*/
|
|
185
|
+
extractFirstEndpoint(api, specPath, ref) {
|
|
186
|
+
const paths = api.paths || {};
|
|
187
|
+
for (const [path, pathItem] of Object.entries(paths)) {
|
|
188
|
+
if (!pathItem)
|
|
189
|
+
continue;
|
|
190
|
+
const methods = ['get', 'post', 'put', 'delete', 'patch'];
|
|
191
|
+
for (const method of methods) {
|
|
192
|
+
if (pathItem[method]) {
|
|
193
|
+
return this.extractEndpoint(api, method.toUpperCase(), path, ref, specPath);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
throw new Error(`No endpoints found in spec: ${specPath}`);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Extract a full endpoint schema (request + responses).
|
|
201
|
+
*
|
|
202
|
+
* Creates a normalized schema with two top-level properties:
|
|
203
|
+
* - `request`: Path params, query params, headers, and body
|
|
204
|
+
* - `responses`: All response schemas keyed by status code
|
|
205
|
+
*
|
|
206
|
+
* @param api - The parsed OpenAPI document
|
|
207
|
+
* @param method - HTTP method (GET, POST, etc.)
|
|
208
|
+
* @param path - API path (/users/{id})
|
|
209
|
+
* @param ref - The original schema reference
|
|
210
|
+
* @param specPath - Path to the spec file
|
|
211
|
+
* @returns The normalized endpoint schema
|
|
212
|
+
* @throws {Error} If path or method not found
|
|
213
|
+
*/
|
|
214
|
+
extractEndpoint(api, method, path, ref, specPath) {
|
|
215
|
+
const pathItem = api.paths?.[path];
|
|
216
|
+
if (!pathItem) {
|
|
217
|
+
throw new Error(`Path not found: ${path}`);
|
|
218
|
+
}
|
|
219
|
+
const operation = pathItem[method.toLowerCase()];
|
|
220
|
+
if (!operation) {
|
|
221
|
+
throw new Error(`Method ${method} not found for path ${path}`);
|
|
222
|
+
}
|
|
223
|
+
const operationName = operation.operationId || `${method.toLowerCase()} ${path}`;
|
|
224
|
+
// Build request schema (path, query, headers, body)
|
|
225
|
+
const requestSchema = this.buildRequestSchema(api, operation, pathItem, ref);
|
|
226
|
+
// Build responses schema (keyed by status code)
|
|
227
|
+
const responsesSchema = this.buildResponsesSchema(operation, ref);
|
|
228
|
+
// Location info for source mapping
|
|
229
|
+
const location = {
|
|
230
|
+
file: specPath,
|
|
231
|
+
line: 1, // OpenAPI doesn't preserve line info
|
|
232
|
+
};
|
|
233
|
+
return {
|
|
234
|
+
name: operationName,
|
|
235
|
+
properties: {
|
|
236
|
+
request: {
|
|
237
|
+
type: { kind: 'object', schema: requestSchema },
|
|
238
|
+
optional: false,
|
|
239
|
+
nullable: false,
|
|
240
|
+
readonly: false,
|
|
241
|
+
deprecated: operation.deprecated || false,
|
|
242
|
+
},
|
|
243
|
+
responses: {
|
|
244
|
+
type: { kind: 'object', schema: responsesSchema },
|
|
245
|
+
optional: false,
|
|
246
|
+
nullable: false,
|
|
247
|
+
readonly: false,
|
|
248
|
+
deprecated: false,
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
required: ['request', 'responses'],
|
|
252
|
+
source: ref,
|
|
253
|
+
location,
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Build the request schema for an endpoint.
|
|
258
|
+
*
|
|
259
|
+
* Combines path-level and operation-level parameters into
|
|
260
|
+
* a structured schema with path, query, headers, and body sections.
|
|
261
|
+
*
|
|
262
|
+
* @param api - The parsed OpenAPI document
|
|
263
|
+
* @param operation - The operation object
|
|
264
|
+
* @param pathItem - The path item object
|
|
265
|
+
* @param ref - The original schema reference
|
|
266
|
+
* @returns The request schema
|
|
267
|
+
*/
|
|
268
|
+
buildRequestSchema(api, operation, pathItem, ref) {
|
|
269
|
+
const properties = {};
|
|
270
|
+
const required = [];
|
|
271
|
+
// Combine path-level and operation-level parameters
|
|
272
|
+
const allParams = [
|
|
273
|
+
...(pathItem.parameters || []),
|
|
274
|
+
...(operation.parameters || []),
|
|
275
|
+
];
|
|
276
|
+
// Path parameters (always required)
|
|
277
|
+
const pathParams = allParams.filter(p => p.in === 'path');
|
|
278
|
+
if (pathParams.length > 0) {
|
|
279
|
+
const pathSchema = convertParametersToSchema(pathParams, ref);
|
|
280
|
+
properties['path'] = {
|
|
281
|
+
type: { kind: 'object', schema: pathSchema },
|
|
282
|
+
optional: false,
|
|
283
|
+
nullable: false,
|
|
284
|
+
readonly: false,
|
|
285
|
+
deprecated: false,
|
|
286
|
+
};
|
|
287
|
+
required.push('path');
|
|
288
|
+
}
|
|
289
|
+
// Query parameters (optional section)
|
|
290
|
+
const queryParams = allParams.filter(p => p.in === 'query');
|
|
291
|
+
if (queryParams.length > 0) {
|
|
292
|
+
const querySchema = convertParametersToSchema(queryParams, ref);
|
|
293
|
+
properties['query'] = {
|
|
294
|
+
type: { kind: 'object', schema: querySchema },
|
|
295
|
+
optional: true,
|
|
296
|
+
nullable: false,
|
|
297
|
+
readonly: false,
|
|
298
|
+
deprecated: false,
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
// Header parameters (optional section)
|
|
302
|
+
const headerParams = allParams.filter(p => p.in === 'header');
|
|
303
|
+
if (headerParams.length > 0) {
|
|
304
|
+
const headerSchema = convertParametersToSchema(headerParams, ref);
|
|
305
|
+
properties['headers'] = {
|
|
306
|
+
type: { kind: 'object', schema: headerSchema },
|
|
307
|
+
optional: true,
|
|
308
|
+
nullable: false,
|
|
309
|
+
readonly: false,
|
|
310
|
+
deprecated: false,
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
// Request body (if present)
|
|
314
|
+
if (operation.requestBody) {
|
|
315
|
+
const requestBody = operation.requestBody;
|
|
316
|
+
const content = requestBody.content;
|
|
317
|
+
const jsonContent = content?.['application/json'];
|
|
318
|
+
if (jsonContent?.schema) {
|
|
319
|
+
const bodySchema = this.dereferenceSchema(api, jsonContent.schema);
|
|
320
|
+
properties['body'] = {
|
|
321
|
+
type: convertToNormalizedType(bodySchema),
|
|
322
|
+
optional: !requestBody.required,
|
|
323
|
+
nullable: false,
|
|
324
|
+
readonly: false,
|
|
325
|
+
deprecated: false,
|
|
326
|
+
};
|
|
327
|
+
if (requestBody.required) {
|
|
328
|
+
required.push('body');
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
return {
|
|
333
|
+
properties,
|
|
334
|
+
required,
|
|
335
|
+
source: ref,
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Build the responses schema for an endpoint.
|
|
340
|
+
*
|
|
341
|
+
* Creates a schema with status codes as property keys,
|
|
342
|
+
* each containing the response body schema.
|
|
343
|
+
*
|
|
344
|
+
* @param operation - The operation object
|
|
345
|
+
* @param ref - The original schema reference
|
|
346
|
+
* @returns The responses schema
|
|
347
|
+
*/
|
|
348
|
+
buildResponsesSchema(operation, ref) {
|
|
349
|
+
const properties = {};
|
|
350
|
+
const required = [];
|
|
351
|
+
if (operation.responses) {
|
|
352
|
+
for (const [status, response] of Object.entries(operation.responses)) {
|
|
353
|
+
const resp = response;
|
|
354
|
+
const content = resp.content;
|
|
355
|
+
const jsonContent = content?.['application/json'];
|
|
356
|
+
if (jsonContent?.schema) {
|
|
357
|
+
properties[status] = {
|
|
358
|
+
type: convertToNormalizedType(jsonContent.schema),
|
|
359
|
+
optional: false,
|
|
360
|
+
nullable: false,
|
|
361
|
+
readonly: false,
|
|
362
|
+
deprecated: false,
|
|
363
|
+
description: resp.description,
|
|
364
|
+
};
|
|
365
|
+
required.push(status);
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
// Response without body (like 204 No Content)
|
|
369
|
+
properties[status] = {
|
|
370
|
+
type: { kind: 'primitive', value: 'null' },
|
|
371
|
+
optional: false,
|
|
372
|
+
nullable: true,
|
|
373
|
+
readonly: false,
|
|
374
|
+
deprecated: false,
|
|
375
|
+
description: resp.description,
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
return {
|
|
381
|
+
properties,
|
|
382
|
+
required,
|
|
383
|
+
source: ref,
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Extract just the request body schema for an endpoint.
|
|
388
|
+
*
|
|
389
|
+
* @param api - The parsed OpenAPI document
|
|
390
|
+
* @param method - HTTP method
|
|
391
|
+
* @param path - API path
|
|
392
|
+
* @param ref - The original schema reference
|
|
393
|
+
* @returns The request body schema
|
|
394
|
+
* @throws {Error} If no request body is defined
|
|
395
|
+
*/
|
|
396
|
+
extractRequest(api, method, path, ref) {
|
|
397
|
+
const pathItem = api.paths?.[path];
|
|
398
|
+
if (!pathItem) {
|
|
399
|
+
throw new Error(`Path not found: ${path}`);
|
|
400
|
+
}
|
|
401
|
+
const operation = pathItem[method.toLowerCase()];
|
|
402
|
+
if (!operation) {
|
|
403
|
+
throw new Error(`Method ${method} not found for path ${path}`);
|
|
404
|
+
}
|
|
405
|
+
if (!operation.requestBody) {
|
|
406
|
+
throw new Error(`No request body for ${method} ${path}`);
|
|
407
|
+
}
|
|
408
|
+
const requestBody = operation.requestBody;
|
|
409
|
+
const content = requestBody.content;
|
|
410
|
+
const jsonContent = content?.['application/json'];
|
|
411
|
+
if (!jsonContent?.schema) {
|
|
412
|
+
throw new Error(`No JSON schema in request body for ${method} ${path}`);
|
|
413
|
+
}
|
|
414
|
+
const bodySchema = this.dereferenceSchema(api, jsonContent.schema);
|
|
415
|
+
return convertToNormalizedSchema(bodySchema, ref);
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Extract a response schema by status code.
|
|
419
|
+
*
|
|
420
|
+
* @param api - The parsed OpenAPI document
|
|
421
|
+
* @param method - HTTP method
|
|
422
|
+
* @param path - API path
|
|
423
|
+
* @param statusCode - Response status code (e.g., '200')
|
|
424
|
+
* @param ref - The original schema reference
|
|
425
|
+
* @returns The response body schema
|
|
426
|
+
* @throws {Error} If response not found
|
|
427
|
+
*/
|
|
428
|
+
extractResponse(api, method, path, statusCode, ref) {
|
|
429
|
+
const pathItem = api.paths?.[path];
|
|
430
|
+
if (!pathItem) {
|
|
431
|
+
throw new Error(`Path not found: ${path}`);
|
|
432
|
+
}
|
|
433
|
+
const operation = pathItem[method.toLowerCase()];
|
|
434
|
+
if (!operation) {
|
|
435
|
+
throw new Error(`Method ${method} not found for path ${path}`);
|
|
436
|
+
}
|
|
437
|
+
const response = operation.responses?.[statusCode];
|
|
438
|
+
if (!response) {
|
|
439
|
+
throw new Error(`Response ${statusCode} not found for ${method} ${path}`);
|
|
440
|
+
}
|
|
441
|
+
const content = response.content;
|
|
442
|
+
const jsonContent = content?.['application/json'];
|
|
443
|
+
if (!jsonContent?.schema) {
|
|
444
|
+
// Response without body - return empty schema
|
|
445
|
+
return {
|
|
446
|
+
properties: {},
|
|
447
|
+
required: [],
|
|
448
|
+
source: ref,
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
const responseSchema = this.dereferenceSchema(api, jsonContent.schema);
|
|
452
|
+
return convertToNormalizedSchema(responseSchema, ref);
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Extract a component schema by name.
|
|
456
|
+
*
|
|
457
|
+
* @param api - The parsed OpenAPI document
|
|
458
|
+
* @param schemaName - Name of the component schema
|
|
459
|
+
* @param ref - The original schema reference
|
|
460
|
+
* @param specPath - Path to the spec file
|
|
461
|
+
* @returns The component schema
|
|
462
|
+
* @throws {Error} If schema not found
|
|
463
|
+
*/
|
|
464
|
+
extractComponentSchema(api, schemaName, ref, specPath) {
|
|
465
|
+
const schemas = api.components?.schemas;
|
|
466
|
+
if (!schemas) {
|
|
467
|
+
throw new Error(`No component schemas in spec: ${specPath}`);
|
|
468
|
+
}
|
|
469
|
+
const schema = schemas[schemaName];
|
|
470
|
+
if (!schema) {
|
|
471
|
+
throw new Error(`Schema not found: ${schemaName}`);
|
|
472
|
+
}
|
|
473
|
+
const dereferenced = this.dereferenceSchema(api, schema);
|
|
474
|
+
const normalized = convertToNormalizedSchema(dereferenced, ref, schemaName);
|
|
475
|
+
normalized.location = {
|
|
476
|
+
file: specPath,
|
|
477
|
+
line: 1,
|
|
478
|
+
};
|
|
479
|
+
return normalized;
|
|
480
|
+
}
|
|
481
|
+
// ============================================================================
|
|
482
|
+
// Private: Reference Resolution
|
|
483
|
+
// ============================================================================
|
|
484
|
+
/**
|
|
485
|
+
* Dereference a schema by resolving $ref if present.
|
|
486
|
+
*
|
|
487
|
+
* Recursively resolves references in the schema tree, including:
|
|
488
|
+
* - Top-level $ref
|
|
489
|
+
* - allOf, oneOf, anyOf members
|
|
490
|
+
* - Array items
|
|
491
|
+
* - Object properties
|
|
492
|
+
*
|
|
493
|
+
* @param api - The parsed OpenAPI document
|
|
494
|
+
* @param schema - The schema to dereference
|
|
495
|
+
* @returns The dereferenced schema object
|
|
496
|
+
*/
|
|
497
|
+
dereferenceSchema(api, schema) {
|
|
498
|
+
// Handle direct $ref
|
|
499
|
+
if ('$ref' in schema) {
|
|
500
|
+
const refPath = schema.$ref;
|
|
501
|
+
const parts = refPath.split('/');
|
|
502
|
+
if (parts[0] === '#' && parts[1] === 'components' && parts[2] === 'schemas') {
|
|
503
|
+
const schemaName = parts[3];
|
|
504
|
+
const resolved = api.components?.schemas?.[schemaName];
|
|
505
|
+
if (resolved) {
|
|
506
|
+
return this.dereferenceSchema(api, resolved);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
// Return empty object if ref can't be resolved
|
|
510
|
+
return { type: 'object' };
|
|
511
|
+
}
|
|
512
|
+
// Handle allOf by dereferencing each member
|
|
513
|
+
if (schema.allOf) {
|
|
514
|
+
const dereferencedAllOf = schema.allOf.map(s => this.dereferenceSchema(api, s));
|
|
515
|
+
return {
|
|
516
|
+
...schema,
|
|
517
|
+
allOf: dereferencedAllOf,
|
|
518
|
+
};
|
|
519
|
+
}
|
|
520
|
+
// Handle oneOf
|
|
521
|
+
if (schema.oneOf) {
|
|
522
|
+
const dereferencedOneOf = schema.oneOf.map(s => this.dereferenceSchema(api, s));
|
|
523
|
+
return {
|
|
524
|
+
...schema,
|
|
525
|
+
oneOf: dereferencedOneOf,
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
// Handle anyOf
|
|
529
|
+
if (schema.anyOf) {
|
|
530
|
+
const dereferencedAnyOf = schema.anyOf.map(s => this.dereferenceSchema(api, s));
|
|
531
|
+
return {
|
|
532
|
+
...schema,
|
|
533
|
+
anyOf: dereferencedAnyOf,
|
|
534
|
+
};
|
|
535
|
+
}
|
|
536
|
+
// Handle array items
|
|
537
|
+
if (schema.type === 'array' && schema.items) {
|
|
538
|
+
return {
|
|
539
|
+
...schema,
|
|
540
|
+
items: this.dereferenceSchema(api, schema.items),
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
// Handle object properties
|
|
544
|
+
if (schema.properties) {
|
|
545
|
+
const dereferencedProps = {};
|
|
546
|
+
for (const [name, prop] of Object.entries(schema.properties)) {
|
|
547
|
+
dereferencedProps[name] = this.dereferenceSchema(api, prop);
|
|
548
|
+
}
|
|
549
|
+
return {
|
|
550
|
+
...schema,
|
|
551
|
+
properties: dereferencedProps,
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
return schema;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../src/adapters/openapi/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,aAAa,MAAM,6BAA6B,CAAC;AASxD,OAAO,EAAE,eAAe,EAAmB,MAAM,aAAa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