add dtos for the open api spec
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace SafelyYou.Api;
|
||||||
|
|
||||||
|
public record ErrorResponse(
|
||||||
|
[property: JsonPropertyName("msg")] string Msg
|
||||||
|
);
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace SafelyYou.Api;
|
||||||
|
|
||||||
|
public record GetDeviceStatsResponse(
|
||||||
|
[property: JsonPropertyName("avg_upload_time")] string AvgUploadTime,
|
||||||
|
[property: JsonPropertyName("uptime")] double Uptime
|
||||||
|
);
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace SafelyYou.Api;
|
||||||
|
|
||||||
|
public record HeartbeatRequest(
|
||||||
|
[property: JsonPropertyName("sent_at")] DateTimeOffset SentAt
|
||||||
|
);
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace SafelyYou.Api;
|
||||||
|
|
||||||
|
public record NotFoundResponse(
|
||||||
|
[property: JsonPropertyName("msg")] string Msg
|
||||||
|
);
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace SafelyYou.Api;
|
||||||
|
|
||||||
|
public record UploadStatsRequest(
|
||||||
|
[property: JsonPropertyName("sent_at")] DateTimeOffset SentAt,
|
||||||
|
[property: JsonPropertyName("upload_time")] long UploadTime
|
||||||
|
);
|
||||||
Reference in New Issue
Block a user