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

Function specPayload

e2e/src/workspace-write-permissions.ts:23–49  ·  view source on GitHub ↗
(slug: IntegrationSlug)

Source from the content-addressed store, hash-verified

21const unique = (prefix: string): string => `${prefix}-${randomBytes(4).toString("hex")}`;
22
23const specPayload = (slug: IntegrationSlug) => ({
24 spec: {
25 kind: "blob" as const,
26 value: JSON.stringify({
27 openapi: "3.0.3",
28 info: { title: `Permissions ${slug}`, version: "1.0.0" },
29 paths: {
30 "/ping": {
31 get: {
32 operationId: "ping",
33 tags: ["ping"],
34 responses: { "200": { description: "pong" } },
35 },
36 },
37 },
38 }),
39 },
40 slug,
41 baseUrl: "http://127.0.0.1:59999",
42 authenticationTemplate: [
43 {
44 slug: TEMPLATE,
45 type: "apiKey" as const,
46 headers: { authorization: ["Bearer ", { type: "variable" as const, name: "token" }] },
47 },
48 ],
49});
50
51const request = (
52 target: TargetShape,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected