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

Function operationServers

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

Source from the content-addressed store, hash-verified

560const extractServers = (doc: ParsedDocument): ServerInfo[] => extractServerList(doc.servers);
561
562const operationServers = (
563 pathItem: PathItemObject,
564 operation: OperationObject,
565 docServers: readonly ServerInfo[],
566): readonly ServerInfo[] => {
567 const operationLevel = extractServerList(operation.servers);
568 if (operationLevel.length > 0) return operationLevel;
569 const pathLevel = extractServerList(pathItem.servers);
570 if (pathLevel.length > 0) return pathLevel;
571 return docServers;
572};
573
574/** OAuth scope requirements an operation declares via `security`, with the
575 * 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