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

Function spec

e2e/selfhost/oauth-refresh-cross-session.test.ts:100–131  ·  view source on GitHub ↗
(
  baseUrl: string,
  oauth: { readonly authorizationEndpoint: string; readonly tokenEndpoint: string },
)

Source from the content-addressed store, hash-verified

98 );
99
100const spec = (
101 baseUrl: string,
102 oauth: { readonly authorizationEndpoint: string; readonly tokenEndpoint: string },
103): string =>
104 JSON.stringify({
105 openapi: "3.0.3",
106 info: { title: "Issues API", version: "1.0.0" },
107 servers: [{ url: baseUrl }],
108 paths: {
109 "/issues": {
110 get: {
111 operationId: "listIssues",
112 security: [{ oauth: ["issues.read"] }],
113 responses: { "200": { description: "issues" } },
114 },
115 },
116 },
117 components: {
118 securitySchemes: {
119 oauth: {
120 type: "oauth2",
121 flows: {
122 authorizationCode: {
123 authorizationUrl: oauth.authorizationEndpoint,
124 tokenUrl: oauth.tokenEndpoint,
125 scopes: { "issues.read": "Read issues" },
126 },
127 },
128 },
129 },
130 },
131 });
132
133const invokeByAddressCode = (address: string) => `
134const segments = ${JSON.stringify(address)}.split(".").slice(1);

Calls

no outgoing calls

Tested by

no test coverage detected