MCPcopy Create free account
hub / github.com/massCodeIO/massCode / getServers

Function getServers

src/main/http/import/openapi.ts:151–165  ·  view source on GitHub ↗
(
  raw: UnknownRecord,
  pathItem: UnknownRecord,
  operation: UnknownRecord,
)

Source from the content-addressed store, hash-verified

149}
150
151function getServers(
152 raw: UnknownRecord,
153 pathItem: UnknownRecord,
154 operation: UnknownRecord,
155): UnknownRecord[] {
156 const operationServers = asArray(operation.servers).filter(isRecord)
157 if (operationServers.length > 0)
158 return operationServers
159
160 const pathServers = asArray(pathItem.servers).filter(isRecord)
161 if (pathServers.length > 0)
162 return pathServers
163
164 return asArray(raw.servers).filter(isRecord)
165}
166
167function getServerUrl(
168 raw: UnknownRecord,

Callers 1

getServerUrlFunction · 0.85

Calls 1

asArrayFunction · 0.70

Tested by

no test coverage detected