MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / pingSpec

Function pingSpec

e2e/local/toolkits-mcp.test.ts:24–67  ·  view source on GitHub ↗
(baseUrl: string)

Source from the content-addressed store, hash-verified

22const unique = (prefix: string) => `${prefix}_${randomBytes(4).toString("hex")}`;
23
24const pingSpec = (baseUrl: string): string =>
25 JSON.stringify({
26 openapi: "3.0.3",
27 info: { title: "Local Toolkit Ping API", version: "1.0.0" },
28 servers: [{ url: baseUrl }],
29 paths: {
30 "/ping/{id}": {
31 get: {
32 operationId: "getPing",
33 summary: "Return a ping payload",
34 security: [{ apiKey: [] }],
35 parameters: [
36 {
37 name: "id",
38 in: "path",
39 required: true,
40 schema: { type: "string" },
41 },
42 ],
43 responses: {
44 "200": {
45 description: "A ping payload",
46 content: {
47 "application/json": {
48 schema: {
49 type: "object",
50 properties: {
51 id: { type: "string" },
52 path: { type: "string" },
53 },
54 },
55 },
56 },
57 },
58 },
59 },
60 },
61 },
62 components: {
63 securitySchemes: {
64 apiKey: { type: "apiKey", in: "header", name: "x-e2e-token" },
65 },
66 },
67 });
68
69const closeServer = (server: Server): Promise<void> =>
70 new Promise((resolve) => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected