mcp4openapi 0.2.8 → 0.3.1
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/README.md +143 -63
- package/dist/scripts/validate-profile.js +3 -3
- package/dist/scripts/validate-profile.js.map +1 -1
- package/dist/src/argument-normalizer.d.ts +5 -0
- package/dist/src/argument-normalizer.d.ts.map +1 -0
- package/dist/src/argument-normalizer.js +61 -0
- package/dist/src/argument-normalizer.js.map +1 -0
- package/dist/src/auth/oauth-provider.d.ts +131 -0
- package/dist/src/auth/oauth-provider.d.ts.map +1 -0
- package/dist/src/auth/oauth-provider.js +839 -0
- package/dist/src/auth/oauth-provider.js.map +1 -0
- package/dist/src/cli-config.d.ts +9 -0
- package/dist/src/cli-config.d.ts.map +1 -0
- package/dist/src/cli-config.js +111 -0
- package/dist/src/cli-config.js.map +1 -0
- package/dist/src/core/cli-config.d.ts +9 -0
- package/dist/src/core/cli-config.d.ts.map +1 -0
- package/dist/src/core/cli-config.js +125 -0
- package/dist/src/core/cli-config.js.map +1 -0
- package/dist/src/core/constants.d.ts +86 -0
- package/dist/src/core/constants.d.ts.map +1 -0
- package/dist/src/core/constants.js +86 -0
- package/dist/src/core/constants.js.map +1 -0
- package/dist/src/core/errors.d.ts +59 -0
- package/dist/src/core/errors.d.ts.map +1 -0
- package/dist/src/core/errors.js +119 -0
- package/dist/src/core/errors.js.map +1 -0
- package/dist/src/core/filtering.d.ts +19 -0
- package/dist/src/core/filtering.d.ts.map +1 -0
- package/dist/src/core/filtering.js +292 -0
- package/dist/src/core/filtering.js.map +1 -0
- package/dist/src/core/index.d.ts +26 -0
- package/dist/src/core/index.d.ts.map +1 -0
- package/dist/src/core/index.js +276 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/core/lib.d.ts +8 -0
- package/dist/src/core/lib.d.ts.map +1 -0
- package/dist/src/core/lib.js +7 -0
- package/dist/src/core/lib.js.map +1 -0
- package/dist/src/core/logger.d.ts +59 -0
- package/dist/src/core/logger.d.ts.map +1 -0
- package/dist/src/core/logger.js +197 -0
- package/dist/src/core/logger.js.map +1 -0
- package/dist/src/core/metrics.d.ts +97 -0
- package/dist/src/core/metrics.d.ts.map +1 -0
- package/dist/src/core/metrics.js +273 -0
- package/dist/src/core/metrics.js.map +1 -0
- package/dist/src/core/naming-warnings.d.ts +23 -0
- package/dist/src/core/naming-warnings.d.ts.map +1 -0
- package/dist/src/core/naming-warnings.js +83 -0
- package/dist/src/core/naming-warnings.js.map +1 -0
- package/dist/src/core/naming.d.ts +58 -0
- package/dist/src/core/naming.d.ts.map +1 -0
- package/dist/src/core/naming.js +510 -0
- package/dist/src/core/naming.js.map +1 -0
- package/dist/src/errors.d.ts +6 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/errors.js +15 -6
- package/dist/src/errors.js.map +1 -1
- package/dist/src/filtering.d.ts +19 -0
- package/dist/src/filtering.d.ts.map +1 -0
- package/dist/src/filtering.js +292 -0
- package/dist/src/filtering.js.map +1 -0
- package/dist/src/generated-schemas.d.ts +290 -79
- package/dist/src/generated-schemas.d.ts.map +1 -1
- package/dist/src/generated-schemas.js +17 -2
- package/dist/src/generated-schemas.js.map +1 -1
- package/dist/src/http-transport-config.d.ts +6 -0
- package/dist/src/http-transport-config.d.ts.map +1 -0
- package/dist/src/http-transport-config.js +47 -0
- package/dist/src/http-transport-config.js.map +1 -0
- package/dist/src/http-transport.d.ts +63 -13
- package/dist/src/http-transport.d.ts.map +1 -1
- package/dist/src/http-transport.js +1045 -482
- package/dist/src/http-transport.js.map +1 -1
- package/dist/src/index.d.ts +1 -6
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -170
- package/dist/src/index.js.map +1 -1
- package/dist/src/interceptors.d.ts +1 -0
- package/dist/src/interceptors.d.ts.map +1 -1
- package/dist/src/interceptors.js +73 -63
- package/dist/src/interceptors.js.map +1 -1
- package/dist/src/lib.d.ts +1 -7
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/src/lib.js +1 -6
- package/dist/src/lib.js.map +1 -1
- package/dist/src/logger.d.ts +5 -0
- package/dist/src/logger.d.ts.map +1 -1
- package/dist/src/logger.js +9 -1
- package/dist/src/logger.js.map +1 -1
- package/dist/src/mcp/mcp-server-manager.d.ts +20 -0
- package/dist/src/mcp/mcp-server-manager.d.ts.map +1 -0
- package/dist/src/mcp/mcp-server-manager.js +38 -0
- package/dist/src/mcp/mcp-server-manager.js.map +1 -0
- package/dist/src/mcp/mcp-server.d.ts +205 -0
- package/dist/src/mcp/mcp-server.d.ts.map +1 -0
- package/dist/src/mcp/mcp-server.js +1473 -0
- package/dist/src/mcp/mcp-server.js.map +1 -0
- package/dist/src/mcp-server-manager.d.ts +20 -0
- package/dist/src/mcp-server-manager.d.ts.map +1 -0
- package/dist/src/mcp-server-manager.js +38 -0
- package/dist/src/mcp-server-manager.js.map +1 -0
- package/dist/src/mcp-server.d.ts +28 -0
- package/dist/src/mcp-server.d.ts.map +1 -1
- package/dist/src/mcp-server.js +406 -109
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/metrics.d.ts +11 -0
- package/dist/src/metrics.d.ts.map +1 -1
- package/dist/src/metrics.js +61 -0
- package/dist/src/metrics.js.map +1 -1
- package/dist/src/oauth-provider.d.ts +5 -0
- package/dist/src/oauth-provider.d.ts.map +1 -1
- package/dist/src/oauth-provider.js +29 -1
- package/dist/src/oauth-provider.js.map +1 -1
- package/dist/src/openapi/openapi-parser.d.ts +70 -0
- package/dist/src/openapi/openapi-parser.d.ts.map +1 -0
- package/dist/src/openapi/openapi-parser.js +458 -0
- package/dist/src/openapi/openapi-parser.js.map +1 -0
- package/dist/src/profile/profile-loader.d.ts +78 -0
- package/dist/src/profile/profile-loader.d.ts.map +1 -0
- package/dist/src/profile/profile-loader.js +490 -0
- package/dist/src/profile/profile-loader.js.map +1 -0
- package/dist/src/profile/profile-registry.d.ts +19 -0
- package/dist/src/profile/profile-registry.d.ts.map +1 -0
- package/dist/src/profile/profile-registry.js +43 -0
- package/dist/src/profile/profile-registry.js.map +1 -0
- package/dist/src/profile/profile-resolver.d.ts +41 -0
- package/dist/src/profile/profile-resolver.d.ts.map +1 -0
- package/dist/src/profile/profile-resolver.js +324 -0
- package/dist/src/profile/profile-resolver.js.map +1 -0
- package/dist/src/profile/startup-profile.d.ts +17 -0
- package/dist/src/profile/startup-profile.d.ts.map +1 -0
- package/dist/src/profile/startup-profile.js +30 -0
- package/dist/src/profile/startup-profile.js.map +1 -0
- package/dist/src/profile/startup-validation.d.ts +11 -0
- package/dist/src/profile/startup-validation.d.ts.map +1 -0
- package/dist/src/profile/startup-validation.js +21 -0
- package/dist/src/profile/startup-validation.js.map +1 -0
- package/dist/src/profile-loader.d.ts +1 -0
- package/dist/src/profile-loader.d.ts.map +1 -1
- package/dist/src/profile-loader.js +14 -3
- package/dist/src/profile-loader.js.map +1 -1
- package/dist/src/profile-registry.d.ts +18 -0
- package/dist/src/profile-registry.d.ts.map +1 -0
- package/dist/src/profile-registry.js +26 -0
- package/dist/src/profile-registry.js.map +1 -0
- package/dist/src/profile-resolver.d.ts +19 -0
- package/dist/src/profile-resolver.d.ts.map +1 -0
- package/dist/src/profile-resolver.js +167 -0
- package/dist/src/profile-resolver.js.map +1 -0
- package/dist/src/proxy-executor.d.ts.map +1 -1
- package/dist/src/proxy-executor.js +7 -0
- package/dist/src/proxy-executor.js.map +1 -1
- package/dist/src/startup-profile.d.ts +17 -0
- package/dist/src/startup-profile.d.ts.map +1 -0
- package/dist/src/startup-profile.js +30 -0
- package/dist/src/startup-profile.js.map +1 -0
- package/dist/src/startup-validation.d.ts +11 -0
- package/dist/src/startup-validation.d.ts.map +1 -0
- package/dist/src/startup-validation.js +21 -0
- package/dist/src/startup-validation.js.map +1 -0
- package/dist/src/testing/dynamic-mock-server.d.ts +24 -0
- package/dist/src/testing/dynamic-mock-server.d.ts.map +1 -0
- package/dist/src/testing/dynamic-mock-server.js +138 -0
- package/dist/src/testing/dynamic-mock-server.js.map +1 -0
- package/dist/src/testing/request-assertions.d.ts +5 -0
- package/dist/src/testing/request-assertions.d.ts.map +1 -0
- package/dist/src/testing/request-assertions.js +165 -0
- package/dist/src/testing/request-assertions.js.map +1 -0
- package/dist/src/testing/template-utils.d.ts +10 -0
- package/dist/src/testing/template-utils.d.ts.map +1 -0
- package/dist/src/testing/template-utils.js +72 -0
- package/dist/src/testing/template-utils.js.map +1 -0
- package/dist/src/testing/test-http-utils.d.ts +1 -1
- package/dist/src/testing/test-http-utils.d.ts.map +1 -1
- package/dist/src/testing/test-http-utils.js +1 -1
- package/dist/src/testing/test-http-utils.js.map +1 -1
- package/dist/src/testing/test-loader.d.ts +6 -0
- package/dist/src/testing/test-loader.d.ts.map +1 -0
- package/dist/src/testing/test-loader.js +212 -0
- package/dist/src/testing/test-loader.js.map +1 -0
- package/dist/src/testing/test-schema.d.ts +1270 -0
- package/dist/src/testing/test-schema.d.ts.map +1 -0
- package/dist/src/testing/test-schema.js +76 -0
- package/dist/src/testing/test-schema.js.map +1 -0
- package/dist/src/tool-filter/compat.d.ts +49 -0
- package/dist/src/tool-filter/compat.d.ts.map +1 -0
- package/dist/src/tool-filter/compat.js +72 -0
- package/dist/src/tool-filter/compat.js.map +1 -0
- package/dist/src/tool-filter/config/env-config-parser.d.ts +38 -0
- package/dist/src/tool-filter/config/env-config-parser.d.ts.map +1 -0
- package/dist/src/tool-filter/config/env-config-parser.js +103 -0
- package/dist/src/tool-filter/config/env-config-parser.js.map +1 -0
- package/dist/src/tool-filter/config/header-config-parser.d.ts +37 -0
- package/dist/src/tool-filter/config/header-config-parser.d.ts.map +1 -0
- package/dist/src/tool-filter/config/header-config-parser.js +118 -0
- package/dist/src/tool-filter/config/header-config-parser.js.map +1 -0
- package/dist/src/tool-filter/errors.d.ts +18 -0
- package/dist/src/tool-filter/errors.d.ts.map +1 -0
- package/dist/src/tool-filter/errors.js +21 -0
- package/dist/src/tool-filter/errors.js.map +1 -0
- package/dist/src/tool-filter/filter/filter-engine.d.ts +45 -0
- package/dist/src/tool-filter/filter/filter-engine.d.ts.map +1 -0
- package/dist/src/tool-filter/filter/filter-engine.js +94 -0
- package/dist/src/tool-filter/filter/filter-engine.js.map +1 -0
- package/dist/src/tool-filter/filter/filter-rules.d.ts +44 -0
- package/dist/src/tool-filter/filter/filter-rules.d.ts.map +1 -0
- package/dist/src/tool-filter/filter/filter-rules.js +72 -0
- package/dist/src/tool-filter/filter/filter-rules.js.map +1 -0
- package/dist/src/tool-filter/filter/global-tool-filter.d.ts +40 -0
- package/dist/src/tool-filter/filter/global-tool-filter.d.ts.map +1 -0
- package/dist/src/tool-filter/filter/global-tool-filter.js +92 -0
- package/dist/src/tool-filter/filter/global-tool-filter.js.map +1 -0
- package/dist/src/tool-filter/filter/session-tool-filter.d.ts +29 -0
- package/dist/src/tool-filter/filter/session-tool-filter.d.ts.map +1 -0
- package/dist/src/tool-filter/filter/session-tool-filter.js +69 -0
- package/dist/src/tool-filter/filter/session-tool-filter.js.map +1 -0
- package/dist/src/tool-filter/index.d.ts +25 -0
- package/dist/src/tool-filter/index.d.ts.map +1 -0
- package/dist/src/tool-filter/index.js +30 -0
- package/dist/src/tool-filter/index.js.map +1 -0
- package/dist/src/tool-filter/integration/tool-filter-service.d.ts +44 -0
- package/dist/src/tool-filter/integration/tool-filter-service.d.ts.map +1 -0
- package/dist/src/tool-filter/integration/tool-filter-service.js +68 -0
- package/dist/src/tool-filter/integration/tool-filter-service.js.map +1 -0
- package/dist/src/tool-filter/operation/operation-classifier.d.ts +20 -0
- package/dist/src/tool-filter/operation/operation-classifier.d.ts.map +1 -0
- package/dist/src/tool-filter/operation/operation-classifier.js +26 -0
- package/dist/src/tool-filter/operation/operation-classifier.js.map +1 -0
- package/dist/src/tool-filter/operation/operation-detector.d.ts +30 -0
- package/dist/src/tool-filter/operation/operation-detector.d.ts.map +1 -0
- package/dist/src/tool-filter/operation/operation-detector.js +96 -0
- package/dist/src/tool-filter/operation/operation-detector.js.map +1 -0
- package/dist/src/tool-filter/operation/operation-resolver.d.ts +22 -0
- package/dist/src/tool-filter/operation/operation-resolver.d.ts.map +1 -0
- package/dist/src/tool-filter/operation/operation-resolver.js +32 -0
- package/dist/src/tool-filter/operation/operation-resolver.js.map +1 -0
- package/dist/src/tool-filter/regex/regex-compiler.d.ts +22 -0
- package/dist/src/tool-filter/regex/regex-compiler.d.ts.map +1 -0
- package/dist/src/tool-filter/regex/regex-compiler.js +56 -0
- package/dist/src/tool-filter/regex/regex-compiler.js.map +1 -0
- package/dist/src/tool-filter/regex/regex-validator.d.ts +24 -0
- package/dist/src/tool-filter/regex/regex-validator.d.ts.map +1 -0
- package/dist/src/tool-filter/regex/regex-validator.js +58 -0
- package/dist/src/tool-filter/regex/regex-validator.js.map +1 -0
- package/dist/src/tool-filter/types.d.ts +92 -0
- package/dist/src/tool-filter/types.d.ts.map +1 -0
- package/dist/src/tool-filter/types.js +5 -0
- package/dist/src/tool-filter/types.js.map +1 -0
- package/dist/src/tool-filter/utils.d.ts +11 -0
- package/dist/src/tool-filter/utils.d.ts.map +1 -0
- package/dist/src/tool-filter/utils.js +13 -0
- package/dist/src/tool-filter/utils.js.map +1 -0
- package/dist/src/tool-filter.d.ts +65 -0
- package/dist/src/tool-filter.d.ts.map +1 -0
- package/dist/src/tool-filter.js +471 -0
- package/dist/src/tool-filter.js.map +1 -0
- package/dist/src/tool-generator.d.ts +1 -0
- package/dist/src/tool-generator.d.ts.map +1 -1
- package/dist/src/tool-generator.js +15 -6
- package/dist/src/tool-generator.js.map +1 -1
- package/dist/src/tooling/composite-executor.d.ts +77 -0
- package/dist/src/tooling/composite-executor.d.ts.map +1 -0
- package/dist/src/tooling/composite-executor.js +198 -0
- package/dist/src/tooling/composite-executor.js.map +1 -0
- package/dist/src/tooling/dag-executor.d.ts +49 -0
- package/dist/src/tooling/dag-executor.d.ts.map +1 -0
- package/dist/src/tooling/dag-executor.js +138 -0
- package/dist/src/tooling/dag-executor.js.map +1 -0
- package/dist/src/tooling/proxy-executor.d.ts +86 -0
- package/dist/src/tooling/proxy-executor.d.ts.map +1 -0
- package/dist/src/tooling/proxy-executor.js +501 -0
- package/dist/src/tooling/proxy-executor.js.map +1 -0
- package/dist/src/tooling/tool-generator.d.ts +67 -0
- package/dist/src/tooling/tool-generator.d.ts.map +1 -0
- package/dist/src/tooling/tool-generator.js +222 -0
- package/dist/src/tooling/tool-generator.js.map +1 -0
- package/dist/src/transport/http-client-factory.d.ts +65 -0
- package/dist/src/transport/http-client-factory.d.ts.map +1 -0
- package/dist/src/transport/http-client-factory.js +143 -0
- package/dist/src/transport/http-client-factory.js.map +1 -0
- package/dist/src/transport/http-transport-config.d.ts +6 -0
- package/dist/src/transport/http-transport-config.d.ts.map +1 -0
- package/dist/src/transport/http-transport-config.js +63 -0
- package/dist/src/transport/http-transport-config.js.map +1 -0
- package/dist/src/transport/http-transport.d.ts +329 -0
- package/dist/src/transport/http-transport.d.ts.map +1 -0
- package/dist/src/transport/http-transport.js +2584 -0
- package/dist/src/transport/http-transport.js.map +1 -0
- package/dist/src/transport/interceptors.d.ts +119 -0
- package/dist/src/transport/interceptors.d.ts.map +1 -0
- package/dist/src/transport/interceptors.js +413 -0
- package/dist/src/transport/interceptors.js.map +1 -0
- package/dist/src/transport/profile-index.d.ts +84 -0
- package/dist/src/transport/profile-index.d.ts.map +1 -0
- package/dist/src/transport/profile-index.js +405 -0
- package/dist/src/transport/profile-index.js.map +1 -0
- package/dist/src/types/http-transport.d.ts +26 -0
- package/dist/src/types/http-transport.d.ts.map +1 -1
- package/dist/src/types/openapi.d.ts +3 -0
- package/dist/src/types/openapi.d.ts.map +1 -1
- package/dist/src/types/profile.d.ts +16 -1
- package/dist/src/types/profile.d.ts.map +1 -1
- package/dist/src/validation/argument-normalizer.d.ts +6 -0
- package/dist/src/validation/argument-normalizer.d.ts.map +1 -0
- package/dist/src/validation/argument-normalizer.js +70 -0
- package/dist/src/validation/argument-normalizer.js.map +1 -0
- package/dist/src/validation/jsonrpc-validator.d.ts +27 -0
- package/dist/src/validation/jsonrpc-validator.d.ts.map +1 -0
- package/dist/src/validation/jsonrpc-validator.js +58 -0
- package/dist/src/validation/jsonrpc-validator.js.map +1 -0
- package/dist/src/validation/schema-validator.d.ts +30 -0
- package/dist/src/validation/schema-validator.d.ts.map +1 -0
- package/dist/src/validation/schema-validator.js +128 -0
- package/dist/src/validation/schema-validator.js.map +1 -0
- package/dist/src/validation/validation-utils.d.ts +49 -0
- package/dist/src/validation/validation-utils.d.ts.map +1 -0
- package/dist/src/validation/validation-utils.js +139 -0
- package/dist/src/validation/validation-utils.js.map +1 -0
- package/html/profile-index.html +386 -0
- package/package.json +10 -3
- package/profile-schema.json +77 -3
- package/profiles/gitlab/developer-profile-oauth.json +1520 -0
- package/profiles/gitlab/developer-profile-oauth.test.json +3432 -0
- package/profiles/gitlab/developer-profile.json +1508 -0
- package/profiles/gitlab/developer-profile.test.json +3432 -0
- package/profiles/gitlab/openapi.yaml +6891 -0
- package/profiles/n8n/openapi.yaml +2441 -0
- package/profiles/n8n/profile-optimized.json +965 -0
- package/profiles/n8n/profile-optimized.test.json +1078 -0
- package/profiles/n8n/profile.json +1033 -0
- package/profiles/n8n/profile.test.json +983 -0
- package/profiles/n8n-nodes/openapi.yaml +24 -0
- package/profiles/n8n-nodes/profile-nodes.json +44 -0
- package/profiles/n8n-nodes/profile-nodes.test.json +91 -0
- package/profiles/semgrep/openapi.yaml +4706 -0
- package/profiles/semgrep/profile.json +692 -0
- package/profiles/semgrep/profile.test.json +471 -0
- package/profiles/youtrack/openapi.json +16976 -0
- package/profiles/youtrack/profile.json +608 -0
- package/profiles/youtrack/profile.test.json +1926 -0
- package/dist/src/testing/fixtures.d.ts +0 -684
- package/dist/src/testing/fixtures.d.ts.map +0 -1
- package/dist/src/testing/fixtures.js +0 -528
- package/dist/src/testing/fixtures.js.map +0 -1
- package/dist/src/testing/mock-gitlab-server.d.ts +0 -43
- package/dist/src/testing/mock-gitlab-server.d.ts.map +0 -1
- package/dist/src/testing/mock-gitlab-server.js +0 -1026
- package/dist/src/testing/mock-gitlab-server.js.map +0 -1
- package/dist/src/testing/mock-semgrep-server.d.ts +0 -32
- package/dist/src/testing/mock-semgrep-server.d.ts.map +0 -1
- package/dist/src/testing/mock-semgrep-server.js +0 -213
- package/dist/src/testing/mock-semgrep-server.js.map +0 -1
- package/dist/src/testing/mock-youtrack-server.d.ts +0 -11
- package/dist/src/testing/mock-youtrack-server.d.ts.map +0 -1
- package/dist/src/testing/mock-youtrack-server.js +0 -152
- package/dist/src/testing/mock-youtrack-server.js.map +0 -1
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="{{lang}}">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>{{title}}</title>
|
|
7
|
+
<style nonce="{{nonce}}">
|
|
8
|
+
:root {
|
|
9
|
+
color-scheme: light;
|
|
10
|
+
--bg: #f6f2ea;
|
|
11
|
+
--bg-accent: #efe7da;
|
|
12
|
+
--ink: #1f1f1f;
|
|
13
|
+
--muted: #615d56;
|
|
14
|
+
--card: #ffffff;
|
|
15
|
+
--accent: #b15a2b;
|
|
16
|
+
--accent-2: #2b5aa3;
|
|
17
|
+
--border: #e1d8cc;
|
|
18
|
+
--shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
|
|
19
|
+
}
|
|
20
|
+
* { box-sizing: border-box; }
|
|
21
|
+
body {
|
|
22
|
+
margin: 0;
|
|
23
|
+
font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
|
|
24
|
+
color: var(--ink);
|
|
25
|
+
background: radial-gradient(1200px 600px at 10% -20%, #fbe5d6 0%, transparent 60%),
|
|
26
|
+
radial-gradient(800px 600px at 90% 0%, #dbe9ff 0%, transparent 55%),
|
|
27
|
+
var(--bg);
|
|
28
|
+
}
|
|
29
|
+
header {
|
|
30
|
+
padding: 48px 40px 32px;
|
|
31
|
+
}
|
|
32
|
+
h1 {
|
|
33
|
+
font-size: 36px;
|
|
34
|
+
margin: 0 0 8px;
|
|
35
|
+
letter-spacing: -0.02em;
|
|
36
|
+
}
|
|
37
|
+
p {
|
|
38
|
+
margin: 0;
|
|
39
|
+
color: var(--muted);
|
|
40
|
+
line-height: 1.6;
|
|
41
|
+
}
|
|
42
|
+
main {
|
|
43
|
+
display: grid;
|
|
44
|
+
grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
|
|
45
|
+
gap: 24px;
|
|
46
|
+
padding: 0 40px 48px;
|
|
47
|
+
}
|
|
48
|
+
.panel {
|
|
49
|
+
background: var(--card);
|
|
50
|
+
border-radius: 16px;
|
|
51
|
+
border: 1px solid var(--border);
|
|
52
|
+
box-shadow: var(--shadow);
|
|
53
|
+
padding: 24px;
|
|
54
|
+
}
|
|
55
|
+
.profiles {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
gap: 12px;
|
|
59
|
+
}
|
|
60
|
+
.profile-item {
|
|
61
|
+
padding: 12px 14px;
|
|
62
|
+
border-radius: 12px;
|
|
63
|
+
border: 1px solid transparent;
|
|
64
|
+
background: var(--bg-accent);
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
transition: border-color 0.2s ease, transform 0.2s ease;
|
|
67
|
+
}
|
|
68
|
+
.profile-item:hover {
|
|
69
|
+
border-color: var(--accent);
|
|
70
|
+
transform: translateY(-1px);
|
|
71
|
+
}
|
|
72
|
+
.profile-item.active {
|
|
73
|
+
border-color: var(--accent);
|
|
74
|
+
background: #fff5ec;
|
|
75
|
+
}
|
|
76
|
+
.profile-title {
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
margin-bottom: 4px;
|
|
79
|
+
}
|
|
80
|
+
.profile-subtitle {
|
|
81
|
+
font-size: 13px;
|
|
82
|
+
color: var(--muted);
|
|
83
|
+
overflow: hidden;
|
|
84
|
+
text-overflow: ellipsis;
|
|
85
|
+
display: -webkit-box;
|
|
86
|
+
-webkit-line-clamp: 2;
|
|
87
|
+
-webkit-box-orient: vertical;
|
|
88
|
+
}
|
|
89
|
+
.detail-grid {
|
|
90
|
+
display: grid;
|
|
91
|
+
gap: 18px;
|
|
92
|
+
}
|
|
93
|
+
.tab-row {
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-wrap: wrap;
|
|
96
|
+
gap: 8px;
|
|
97
|
+
margin-bottom: 8px;
|
|
98
|
+
}
|
|
99
|
+
.tab {
|
|
100
|
+
border: 1px solid var(--border);
|
|
101
|
+
background: #fff;
|
|
102
|
+
padding: 6px 12px;
|
|
103
|
+
border-radius: 999px;
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
font-size: 13px;
|
|
106
|
+
color: var(--muted);
|
|
107
|
+
}
|
|
108
|
+
.tab.active {
|
|
109
|
+
color: var(--accent);
|
|
110
|
+
border-color: var(--accent);
|
|
111
|
+
background: #fff5ec;
|
|
112
|
+
font-weight: 600;
|
|
113
|
+
}
|
|
114
|
+
.detail-card {
|
|
115
|
+
border: 1px solid var(--border);
|
|
116
|
+
border-radius: 12px;
|
|
117
|
+
padding: 16px;
|
|
118
|
+
background: #fff;
|
|
119
|
+
}
|
|
120
|
+
.detail-card h3 {
|
|
121
|
+
margin: 0 0 8px;
|
|
122
|
+
font-size: 16px;
|
|
123
|
+
}
|
|
124
|
+
.tag-list {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-wrap: wrap;
|
|
127
|
+
gap: 8px;
|
|
128
|
+
margin-top: 8px;
|
|
129
|
+
}
|
|
130
|
+
.tag {
|
|
131
|
+
background: #f1efe9;
|
|
132
|
+
color: #2d2b28;
|
|
133
|
+
border-radius: 999px;
|
|
134
|
+
padding: 4px 10px;
|
|
135
|
+
font-size: 12px;
|
|
136
|
+
border: 1px solid var(--border);
|
|
137
|
+
}
|
|
138
|
+
code, pre {
|
|
139
|
+
font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
|
|
140
|
+
}
|
|
141
|
+
pre {
|
|
142
|
+
background: #0f172a;
|
|
143
|
+
color: #e2e8f0;
|
|
144
|
+
padding: 14px;
|
|
145
|
+
border-radius: 12px;
|
|
146
|
+
overflow-x: auto;
|
|
147
|
+
line-height: 1.6;
|
|
148
|
+
}
|
|
149
|
+
.snippets {
|
|
150
|
+
display: grid;
|
|
151
|
+
gap: 16px;
|
|
152
|
+
}
|
|
153
|
+
.snippet-header {
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: space-between;
|
|
157
|
+
gap: 12px;
|
|
158
|
+
}
|
|
159
|
+
.snippet-meta {
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
gap: 8px;
|
|
163
|
+
}
|
|
164
|
+
.format-pill {
|
|
165
|
+
border: 1px solid var(--border);
|
|
166
|
+
border-radius: 999px;
|
|
167
|
+
padding: 2px 8px;
|
|
168
|
+
font-size: 11px;
|
|
169
|
+
color: var(--muted);
|
|
170
|
+
background: #f7f4ef;
|
|
171
|
+
text-transform: uppercase;
|
|
172
|
+
letter-spacing: 0.05em;
|
|
173
|
+
}
|
|
174
|
+
.copy-btn {
|
|
175
|
+
border: 1px solid var(--border);
|
|
176
|
+
background: #fff;
|
|
177
|
+
color: var(--accent-2);
|
|
178
|
+
border-radius: 999px;
|
|
179
|
+
padding: 6px 12px;
|
|
180
|
+
cursor: pointer;
|
|
181
|
+
font-size: 12px;
|
|
182
|
+
}
|
|
183
|
+
.notice {
|
|
184
|
+
background: #fff8f1;
|
|
185
|
+
border: 1px solid #f6d5bd;
|
|
186
|
+
padding: 12px;
|
|
187
|
+
border-radius: 12px;
|
|
188
|
+
color: #7a3f1e;
|
|
189
|
+
}
|
|
190
|
+
@media (max-width: 960px) {
|
|
191
|
+
main {
|
|
192
|
+
grid-template-columns: 1fr;
|
|
193
|
+
padding: 0 20px 40px;
|
|
194
|
+
}
|
|
195
|
+
header {
|
|
196
|
+
padding: 36px 20px 24px;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
</style>
|
|
200
|
+
</head>
|
|
201
|
+
<body>
|
|
202
|
+
<header>
|
|
203
|
+
<h1>{{title}}</h1>
|
|
204
|
+
<p>{{subtitle}}</p>
|
|
205
|
+
</header>
|
|
206
|
+
<main>
|
|
207
|
+
<section class="panel">
|
|
208
|
+
<div class="profiles" id="profile-list"></div>
|
|
209
|
+
</section>
|
|
210
|
+
<section class="panel">
|
|
211
|
+
<div class="detail-grid" id="profile-detail">
|
|
212
|
+
<noscript>
|
|
213
|
+
<div class="notice">{{noscript}}</div>
|
|
214
|
+
</noscript>
|
|
215
|
+
</div>
|
|
216
|
+
</section>
|
|
217
|
+
</main>
|
|
218
|
+
|
|
219
|
+
<script type="application/json" id="profile-data" nonce="{{nonce}}">{{profile_data}}</script>
|
|
220
|
+
<script type="application/json" id="i18n-data" nonce="{{nonce}}">{{i18n_data}}</script>
|
|
221
|
+
|
|
222
|
+
<script nonce="{{nonce}}">
|
|
223
|
+
const profileData = JSON.parse(document.getElementById('profile-data').textContent || '[]');
|
|
224
|
+
const i18n = JSON.parse(document.getElementById('i18n-data').textContent || '{}');
|
|
225
|
+
|
|
226
|
+
const listEl = document.getElementById('profile-list');
|
|
227
|
+
const detailEl = document.getElementById('profile-detail');
|
|
228
|
+
|
|
229
|
+
function escapeHtml(value) {
|
|
230
|
+
return String(value)
|
|
231
|
+
.replace(/&/g, '&')
|
|
232
|
+
.replace(/</g, '<')
|
|
233
|
+
.replace(/>/g, '>')
|
|
234
|
+
.replace(/"/g, '"')
|
|
235
|
+
.replace(/'/g, ''');
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function renderTags(items) {
|
|
239
|
+
if (!items || items.length === 0) {
|
|
240
|
+
return `<div class="profile-subtitle">${escapeHtml(i18n.noEnvVars || '')}</div>`;
|
|
241
|
+
}
|
|
242
|
+
const tags = items.map(item => `<span class="tag">${escapeHtml(item)}</span>`).join('');
|
|
243
|
+
return `<div class="tag-list">${tags}</div>`;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function buildSnippet(template, profile) {
|
|
247
|
+
return template
|
|
248
|
+
.replace(/__PROFILE_ID__/g, profile.profileId)
|
|
249
|
+
.replace(/__PROFILE_NAME__/g, profile.profileName)
|
|
250
|
+
.replace(/__PROFILE_URL__/g, profile.mcpUrl)
|
|
251
|
+
.replace(/__PROFILE_SSE_URL__/g, profile.sseUrl);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function renderSnippets(profile, activeAuth) {
|
|
255
|
+
const blocks = [];
|
|
256
|
+
const order = ['vscode', 'cursor', 'jetbrains', 'claude'];
|
|
257
|
+
const snippets = profile.snippets || {};
|
|
258
|
+
for (const entry of snippets) {
|
|
259
|
+
if (!entry || !entry.key) continue;
|
|
260
|
+
if (activeAuth && entry.authKey && entry.authKey !== activeAuth) continue;
|
|
261
|
+
if (!order.some(prefix => entry.key.startsWith(prefix))) continue;
|
|
262
|
+
const title = entry.label || entry.key;
|
|
263
|
+
const format = entry.format || '';
|
|
264
|
+
const snippet = buildSnippet(entry.content, profile);
|
|
265
|
+
const encodedSnippet = encodeURIComponent(snippet);
|
|
266
|
+
blocks.push(`
|
|
267
|
+
<div class="detail-card">
|
|
268
|
+
<div class="snippet-header">
|
|
269
|
+
<h3>${escapeHtml(title)}</h3>
|
|
270
|
+
<div class="snippet-meta">
|
|
271
|
+
${format ? `<span class="format-pill">${escapeHtml(format)}</span>` : ''}
|
|
272
|
+
<button class="copy-btn" data-copy="${encodedSnippet}">${escapeHtml(i18n.copy || '')}</button>
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
<pre><code>${escapeHtml(snippet)}</code></pre>
|
|
276
|
+
</div>
|
|
277
|
+
`);
|
|
278
|
+
}
|
|
279
|
+
return blocks.join('');
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
function buildProfileTitle(profile) {
|
|
283
|
+
const parts = [profile.profileId, profile.profileName, ...(profile.profileAliases || [])];
|
|
284
|
+
const seen = new Set();
|
|
285
|
+
const unique = [];
|
|
286
|
+
for (const part of parts) {
|
|
287
|
+
if (!part) continue;
|
|
288
|
+
const key = String(part);
|
|
289
|
+
if (seen.has(key)) continue;
|
|
290
|
+
seen.add(key);
|
|
291
|
+
unique.push(key);
|
|
292
|
+
}
|
|
293
|
+
if (unique.length === 0) return '';
|
|
294
|
+
if (unique.length === 1) return unique[0];
|
|
295
|
+
return `${unique[0]} (${unique.slice(1).join(', ')})`;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
function renderDetail(profile) {
|
|
299
|
+
const title = buildProfileTitle(profile);
|
|
300
|
+
const description = profile.description || i18n.noDescription || '';
|
|
301
|
+
const authTabs = profile.authTabs || [];
|
|
302
|
+
const activeAuth = authTabs.length > 0 ? authTabs[0].key : null;
|
|
303
|
+
detailEl.innerHTML = `
|
|
304
|
+
<div class="detail-card">
|
|
305
|
+
<h3>${escapeHtml(i18n.profileLabel || '')}</h3>
|
|
306
|
+
<div class="profile-title">${escapeHtml(title)}</div>
|
|
307
|
+
<div class="profile-subtitle">${escapeHtml(description)}</div>
|
|
308
|
+
</div>
|
|
309
|
+
<div class="detail-card">
|
|
310
|
+
<h3>${escapeHtml(i18n.endpointLabel || '')}</h3>
|
|
311
|
+
<p><strong>MCP</strong>: ${escapeHtml(profile.mcpUrl)}</p>
|
|
312
|
+
<p><strong>SSE</strong>: ${escapeHtml(profile.sseUrl)}</p>
|
|
313
|
+
</div>
|
|
314
|
+
<div class="detail-card">
|
|
315
|
+
<div class="tab-row" id="auth-tabs">
|
|
316
|
+
${authTabs.map(tab => `
|
|
317
|
+
<button class="tab${tab.key === activeAuth ? ' active' : ''}" data-auth="${escapeHtml(tab.key)}">
|
|
318
|
+
${escapeHtml(tab.label)}
|
|
319
|
+
</button>
|
|
320
|
+
`).join('')}
|
|
321
|
+
</div>
|
|
322
|
+
<div class="snippets" id="snippet-list">
|
|
323
|
+
${renderSnippets(profile, activeAuth)}
|
|
324
|
+
</div>
|
|
325
|
+
</div>
|
|
326
|
+
`;
|
|
327
|
+
|
|
328
|
+
const tabRow = detailEl.querySelector('#auth-tabs');
|
|
329
|
+
const snippetList = detailEl.querySelector('#snippet-list');
|
|
330
|
+
if (tabRow && snippetList) {
|
|
331
|
+
tabRow.addEventListener('click', event => {
|
|
332
|
+
const target = event.target;
|
|
333
|
+
if (!(target instanceof HTMLElement)) return;
|
|
334
|
+
const authKey = target.getAttribute('data-auth');
|
|
335
|
+
if (!authKey) return;
|
|
336
|
+
tabRow.querySelectorAll('.tab').forEach(tab => {
|
|
337
|
+
tab.classList.toggle('active', tab.getAttribute('data-auth') === authKey);
|
|
338
|
+
});
|
|
339
|
+
snippetList.innerHTML = renderSnippets(profile, authKey);
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
function renderList(activeId) {
|
|
345
|
+
listEl.innerHTML = '';
|
|
346
|
+
profileData.forEach(profile => {
|
|
347
|
+
const title = buildProfileTitle(profile);
|
|
348
|
+
const item = document.createElement('div');
|
|
349
|
+
item.className = 'profile-item' + (profile.profileId === activeId ? ' active' : '');
|
|
350
|
+
item.innerHTML = `
|
|
351
|
+
<div class="profile-title">${escapeHtml(title)}</div>
|
|
352
|
+
<div class="profile-subtitle">${escapeHtml(profile.description || i18n.noDescription || '')}</div>
|
|
353
|
+
`;
|
|
354
|
+
item.addEventListener('click', () => {
|
|
355
|
+
renderList(profile.profileId);
|
|
356
|
+
renderDetail(profile);
|
|
357
|
+
});
|
|
358
|
+
listEl.appendChild(item);
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
if (profileData.length > 0) {
|
|
363
|
+
renderList(profileData[0].profileId);
|
|
364
|
+
renderDetail(profileData[0]);
|
|
365
|
+
} else {
|
|
366
|
+
detailEl.innerHTML = `<div class="notice">${escapeHtml(i18n.noProfiles || '')}</div>`;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
document.addEventListener('click', event => {
|
|
370
|
+
const target = event.target;
|
|
371
|
+
if (!(target instanceof HTMLElement)) return;
|
|
372
|
+
if (!target.matches('[data-copy]')) return;
|
|
373
|
+
const text = target.getAttribute('data-copy');
|
|
374
|
+
if (!text) return;
|
|
375
|
+
const decoded = decodeURIComponent(text);
|
|
376
|
+
navigator.clipboard?.writeText(decoded).then(() => {
|
|
377
|
+
target.textContent = i18n.copied || '';
|
|
378
|
+
setTimeout(() => { target.textContent = i18n.copy || ''; }, 1200);
|
|
379
|
+
}).catch(() => {
|
|
380
|
+
target.textContent = i18n.copyFailed || '';
|
|
381
|
+
setTimeout(() => { target.textContent = i18n.copy || ''; }, 1200);
|
|
382
|
+
});
|
|
383
|
+
});
|
|
384
|
+
</script>
|
|
385
|
+
</body>
|
|
386
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp4openapi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Universal MCP server that generates tools from any OpenAPI specification",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"dist",
|
|
16
|
+
"html",
|
|
17
|
+
"profiles",
|
|
16
18
|
"profile-schema.json",
|
|
17
19
|
"README.md",
|
|
18
20
|
"LICENSE.md"
|
|
@@ -28,7 +30,7 @@
|
|
|
28
30
|
"test:ui": "vitest --ui",
|
|
29
31
|
"coverage": "vitest run --coverage",
|
|
30
32
|
"typecheck": "tsc --noEmit",
|
|
31
|
-
"lint": "eslint
|
|
33
|
+
"lint": "eslint . --ext .ts,.js,.mjs,.cjs",
|
|
32
34
|
"generate-schemas": "node scripts/generate-schemas.js",
|
|
33
35
|
"validate": "npm run build && node dist/scripts/validate-profile.js",
|
|
34
36
|
"validate:schema": "npm run build && node dist/scripts/validate-schema.js",
|
|
@@ -56,17 +58,19 @@
|
|
|
56
58
|
"url": "https://github.com/davidruzicka/mcp4openapi/issues"
|
|
57
59
|
},
|
|
58
60
|
"dependencies": {
|
|
59
|
-
"@modelcontextprotocol/sdk": "
|
|
61
|
+
"@modelcontextprotocol/sdk": "1.25.2",
|
|
60
62
|
"dotenv": "^17.2.3",
|
|
61
63
|
"escape-html": "^1.0.3",
|
|
62
64
|
"express": "^5.2.1",
|
|
63
65
|
"express-rate-limit": "^8.2.1",
|
|
64
66
|
"openapi-types": "^12.1.3",
|
|
65
67
|
"prom-client": "^15.1.3",
|
|
68
|
+
"qs": "^6.14.1",
|
|
66
69
|
"yaml": "^2.6.1",
|
|
67
70
|
"zod": "^3.24.1"
|
|
68
71
|
},
|
|
69
72
|
"devDependencies": {
|
|
73
|
+
"@eslint/js": "^9.39.2",
|
|
70
74
|
"@mswjs/http-middleware": "^0.10.3",
|
|
71
75
|
"@types/escape-html": "^1.0.4",
|
|
72
76
|
"@types/express": "^5.0.3",
|
|
@@ -87,6 +91,9 @@
|
|
|
87
91
|
"vite": "^6.0.5",
|
|
88
92
|
"vitest": "^3.2.4"
|
|
89
93
|
},
|
|
94
|
+
"overrides": {
|
|
95
|
+
"hono": "4.11.7"
|
|
96
|
+
},
|
|
90
97
|
"engines": {
|
|
91
98
|
"node": ">=18"
|
|
92
99
|
}
|
package/profile-schema.json
CHANGED
|
@@ -11,6 +11,24 @@
|
|
|
11
11
|
"description": "Unique identifier for this profile",
|
|
12
12
|
"examples": ["gitlab-developer", "github-readonly", "custom-api"]
|
|
13
13
|
},
|
|
14
|
+
"profile_id": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Short ID used for selecting a profile via MCP4_PROFILE or --profile",
|
|
17
|
+
"examples": ["gitlab", "semgrep", "youtrack"]
|
|
18
|
+
},
|
|
19
|
+
"profile_aliases": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"description": "Alternate IDs that can be used to select this profile via MCP4_PROFILE or --profile",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
},
|
|
25
|
+
"examples": [["gitlab-developer", "gitlab-default"]]
|
|
26
|
+
},
|
|
27
|
+
"openapi_spec_path": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "OpenAPI spec path used when launching by profile without MCP4_OPENAPI_SPEC_PATH",
|
|
30
|
+
"examples": ["./openapi.yaml", "../specs/openapi.json"]
|
|
31
|
+
},
|
|
14
32
|
"description": {
|
|
15
33
|
"type": "string",
|
|
16
34
|
"description": "Human-readable description of what this profile provides"
|
|
@@ -188,9 +206,21 @@
|
|
|
188
206
|
"required": ["type", "description"],
|
|
189
207
|
"properties": {
|
|
190
208
|
"type": {
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
|
|
209
|
+
"description": "Parameter data type",
|
|
210
|
+
"oneOf": [
|
|
211
|
+
{
|
|
212
|
+
"type": "string",
|
|
213
|
+
"enum": ["string", "integer", "number", "boolean", "array", "object"]
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"type": "array",
|
|
217
|
+
"items": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"enum": ["string", "integer", "number", "boolean", "array", "object"]
|
|
220
|
+
},
|
|
221
|
+
"minItems": 1
|
|
222
|
+
}
|
|
223
|
+
]
|
|
194
224
|
},
|
|
195
225
|
"description": {
|
|
196
226
|
"type": "string",
|
|
@@ -218,6 +248,20 @@
|
|
|
218
248
|
},
|
|
219
249
|
"minItems": 1
|
|
220
250
|
},
|
|
251
|
+
"minLength": {
|
|
252
|
+
"type": "integer",
|
|
253
|
+
"description": "Minimum length for string parameters",
|
|
254
|
+
"minimum": 0
|
|
255
|
+
},
|
|
256
|
+
"maxLength": {
|
|
257
|
+
"type": "integer",
|
|
258
|
+
"description": "Maximum length for string parameters",
|
|
259
|
+
"minimum": 0
|
|
260
|
+
},
|
|
261
|
+
"pattern": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"description": "Regex pattern for string parameters"
|
|
264
|
+
},
|
|
221
265
|
"items": {
|
|
222
266
|
"type": "object",
|
|
223
267
|
"description": "Item type for array parameters",
|
|
@@ -237,6 +281,36 @@
|
|
|
237
281
|
},
|
|
238
282
|
"example": {
|
|
239
283
|
"description": "Example value for documentation"
|
|
284
|
+
},
|
|
285
|
+
"object_entries_to_array": {
|
|
286
|
+
"type": "object",
|
|
287
|
+
"description": "Convert an object map into an array of objects using key/value fields",
|
|
288
|
+
"required": ["key_field", "value_field"],
|
|
289
|
+
"properties": {
|
|
290
|
+
"key_field": {
|
|
291
|
+
"type": "string",
|
|
292
|
+
"description": "Field name to store the object key"
|
|
293
|
+
},
|
|
294
|
+
"value_field": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"description": "Field name to store the object value"
|
|
297
|
+
},
|
|
298
|
+
"wrap_value_field": {
|
|
299
|
+
"type": "string",
|
|
300
|
+
"description": "Optional wrapper field name for non-object values"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
"array_item_to_object": {
|
|
305
|
+
"type": "object",
|
|
306
|
+
"description": "Convert primitive array items into objects using the provided field",
|
|
307
|
+
"required": ["key_field"],
|
|
308
|
+
"properties": {
|
|
309
|
+
"key_field": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"description": "Field name to store the array item value"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
240
314
|
}
|
|
241
315
|
}
|
|
242
316
|
},
|