(servers: OpenAPIV3.ServerObject[])
| 4 | * Get the default URL for the server. |
| 5 | */ |
| 6 | export function getDefaultServerURL(servers: OpenAPIV3.ServerObject[]): string { |
| 7 | const server = servers[0]; |
| 8 | if (!server) { |
| 9 | // Return empty string if no server is found to display nothing |
| 10 | return ''; |
| 11 | } |
| 12 | |
| 13 | return interpolateServerURL(server); |
| 14 | } |
| 15 | |
| 16 | /** |
| 17 | * Interpolate the server URL with the default values of the variables. |
no test coverage detected