Greenfield: Currency rate should be strings (#4607)

This commit is contained in:
Nicolas Dorier 2023-02-08 19:18:37 +09:00 committed by GitHub
parent 85513aa5c3
commit 7bbfc8e6d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -1,10 +1,13 @@
using System.Collections.Generic;
using BTCPayServer.JsonConverters;
using Newtonsoft.Json;
namespace BTCPayServer.Client.Models;
public class StoreRateResult
{
public string CurrencyPair { get; set; }
[JsonConverter(typeof(NumericStringJsonConverter))]
public decimal? Rate { get; set; }
public List<string> Errors { get; set; }
}

View file

@ -1260,6 +1260,7 @@
"rate": {
"type": "string",
"format": "decimal",
"example": "64392.23",
"description": "The rate between this payment method's currency and the invoice currency"
},
"paymentMethodPaid": {

View file

@ -238,8 +238,9 @@
"description": "Errors relating to this currency pair fetching based on your config"
},
"rate": {
"type": "number",
"example": 24520.23,
"type": "string",
"format": "decimal",
"example": "64392.23",
"description": "the rate fetched based on the currency pair"
}
}