You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
openapi should process an api with more than one server #1154
Connecting to the Stellar Horizon api server, via openapi example 2:
Import-PipeScript {
function Get-HorizonApi
{
[OpenAPI(SchemaURI='https://raw.githubusercontent.com/stellar/stellar-docs/refs/heads/main/openapi/horizon/bundled.yml')]
param()
}
}
Get-HorizonApi '/accounts'
Invoke-RestMethod:
Line |
235 | $restfulOutput = Invoke-RestMethod @invokeSplat
| ~~~~~~~~~~~~
| Cannot bind parameter 'Uri'. Cannot convert value "https://horizon-testnet.stellar.org https://horizon-futurenet.stellar.org/accounts" to type "System.Uri". Error: "Invalid URI: The hostname could not be parsed."
bundle.yml references two servers.
servers:
- url: https://horizon-testnet.stellar.org
description: The Testnet Network
- url: https://horizon-futurenet.stellar.org
description: The Futurenet network
...which both end up in the url (line 43) of the script block
I looked at -QueryParameter, and -PathParameter, but didn't succeed at setting the url.
If it's possible, then a note how to direct requests to the desired server would be nice. And the issue title is incorrect.
Cheers.
Activity