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

Function spec

e2e/scenarios/oauth-refresh-rejected.test.ts:71–103  ·  view source on GitHub ↗
(
  baseUrl: string,
  oauth: { readonly authorizationEndpoint: string; readonly tokenEndpoint: string },
)

Source from the content-addressed store, hash-verified

69 );
70
71const spec = (
72 baseUrl: string,
73 oauth: { readonly authorizationEndpoint: string; readonly tokenEndpoint: string },
74): string =>
75 JSON.stringify({
76 openapi: "3.0.3",
77 info: { title: "Issues API", version: "1.0.0" },
78 servers: [{ url: baseUrl }],
79 paths: {
80 "/issues": {
81 get: {
82 operationId: "listIssues",
83 summary: "List issues",
84 security: [{ oauth: ["issues.read"] }],
85 responses: { "200": { description: "issues" } },
86 },
87 },
88 },
89 components: {
90 securitySchemes: {
91 oauth: {
92 type: "oauth2",
93 flows: {
94 authorizationCode: {
95 authorizationUrl: oauth.authorizationEndpoint,
96 tokenUrl: oauth.tokenEndpoint,
97 scopes: { "issues.read": "Read issues" },
98 },
99 },
100 },
101 },
102 },
103 });
104
105const invokeByAddressCode = (address: string, args: unknown) => `
106const segments = ${JSON.stringify(address)}.split(".").slice(1);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected