( pathItem: PathItemObject, operation: OperationObject, docServers: readonly ServerInfo[], )
| 484 | const extractServers = (doc: ParsedDocument): ServerInfo[] => extractServerList(doc.servers); |
| 485 | |
| 486 | const 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): |
no test coverage detected