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

Function operationServers

packages/plugins/openapi/src/sdk/extract.ts:486–496  ·  view source on GitHub ↗
(
  pathItem: PathItemObject,
  operation: OperationObject,
  docServers: readonly ServerInfo[],
)

Source from the content-addressed store, hash-verified

484const extractServers = (doc: ParsedDocument): ServerInfo[] => extractServerList(doc.servers);
485
486const operationServers = (
487 pathItem: PathItemObject,
488 operation: OperationObject,
489 docServers: readonly ServerInfo[],
490): readonly ServerInfo[] => {
491 const operationLevel = extractServerList(operation.servers);
492 if (operationLevel.length > 0) return operationLevel;
493 const pathLevel = extractServerList(pathItem.servers);
494 if (pathLevel.length > 0) return pathLevel;
495 return docServers;
496};
497
498/** OAuth scope requirements an operation declares via `security`, with the
499 * spec's semantics preserved (OpenAPI 3.x Security Requirement Objects):

Callers 3

extract.tsFile · 0.85
streamOperationBindingsFunction · 0.85

Calls 1

extractServerListFunction · 0.85

Tested by

no test coverage detected