Generate Fireblocks API Client flow
-
Update api-spec-2.yaml
-
Genereate ApiClients.cs from console:
dotnet new tool-manifest --force
dotnet tool install NSwag.ConsoleCore
dotnet nswag version
dotnet nswag run nswag.json
-
In ApiClients.cs replace:
-
status_ == 5XX -> status_ >= 500 && status_ < 600
-
public ExternalCorrelationData ExternalCorrelationData -> public CorrelationData ExternalCorrelationData
-
System.Threading.Tasks.Task<Response> ExecutePostAsync -> System.Threading.Tasks.Task<Response> WorkflowExecutePostAsync
-
System.Threading.Tasks.Task<Response> PositionsGetAsync(string id -> System.Threading.Tasks.Task<Response> PositionsGetByIdAsync(string id
-
System.Collections.Generic.List -> System.Collections.Generic.List
In class CreateWorkflowConfigurationRequest:
- public System.Collections.Generic.List ConfigOperations { get; set; } = new System.Collections.Generic.List(); -> public System.Collections.Generic.List ConfigOperations { get; set; } = new System.Collections.Generic.List();
In class WorkflowConfiguration:
- public System.Collections.Generic.List ConfigOperations { get; set; } = new System.Collections.Generic.List(); -> public System.Collections.Generic.List ConfigOperations { get; set; } = new System.Collections.Generic.List();
In class WorkflowConfigurationSnapshot:
- public System.Collections.Generic.List ConfigOperations { get; set; } = new System.Collections.Generic.List(); -> public System.Collections.Generic.List ConfigOperations { get; set; } = new System.Collections.Generic.List();
In class WorkflowExecution:
- public System.Collections.Generic.List ExecutionOperations { get; set; } = new System.Collections.Generic.List(); -> public System.Collections.Generic.List ExecutionOperations { get; set; } = new System.Collections.Generic.List();
In class class TransactionResponse:
-
[Newtonsoft.Json.JsonProperty("externalTxId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] -> [Newtonsoft.Json.JsonProperty("externalTxId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
-
[Newtonsoft.Json.JsonProperty("customerRefId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] -> [Newtonsoft.Json.JsonProperty("customerRefId", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
In class class TransactionsClient:
- public partial class TransactionsClient : BaseClient, ITransactionsClient -> public partial class TransactionsClient : BaseClient, ITransactionsClient, ITransactionsAdminClient, ITransactionsSignerClient
-
-
Add to enum AssetTypeResponseType:
[System.Runtime.Serialization.EnumMember(Value = @"TON_ASSET")] TON_ASSET = 11, [System.Runtime.Serialization.EnumMember(Value = @"ETH_CONTRACT")] ETH_CONTRACT = 12, [System.Runtime.Serialization.EnumMember(Value = @"XRP_ASSET")] XRP_ASSET = 13
-
Add to enum ExchangeType:
[System.Runtime.Serialization.EnumMember(Value = @"BYBIT_V2")] BYBIT_V2 = 26,