diff options
author | crupest <crupest@outlook.com> | 2020-08-21 23:47:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-21 23:47:10 +0800 |
commit | c28848a35b0f31a59f9d02641571495822ad0db8 (patch) | |
tree | 520b56d834185ba5f9f556558a181bb9f4059b29 /Timeline/Models/Http/TimelineController.cs | |
parent | 30e96fc5a59a8324ed861e7f7e856c44b4d329ff (diff) | |
parent | 3aa8e1cda4222fc3a9828888ba8fb51d2ba1d6c8 (diff) | |
download | timeline-c28848a35b0f31a59f9d02641571495822ad0db8.tar.gz timeline-c28848a35b0f31a59f9d02641571495822ad0db8.tar.bz2 timeline-c28848a35b0f31a59f9d02641571495822ad0db8.zip |
Merge pull request #149 from crupest/swagger
Swagger/OpenAPI
Diffstat (limited to 'Timeline/Models/Http/TimelineController.cs')
-rw-r--r-- | Timeline/Models/Http/TimelineController.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Timeline/Models/Http/TimelineController.cs b/Timeline/Models/Http/TimelineController.cs index 3e2e6b58..aad361ee 100644 --- a/Timeline/Models/Http/TimelineController.cs +++ b/Timeline/Models/Http/TimelineController.cs @@ -4,33 +4,66 @@ using Timeline.Models.Validation; namespace Timeline.Models.Http
{
+ /// <summary>
+ /// Content of post create request.
+ /// </summary>
public class TimelinePostCreateRequestContent
{
+ /// <summary>
+ /// Type of post content.
+ /// </summary>
[Required]
public string Type { get; set; } = default!;
+ /// <summary>
+ /// If post is of text type, this is the text.
+ /// </summary>
public string? Text { get; set; }
+ /// <summary>
+ /// If post is of image type, this is base64 of image data.
+ /// </summary>
public string? Data { get; set; }
}
public class TimelinePostCreateRequest
{
+ /// <summary>
+ /// Content of the new post.
+ /// </summary>
[Required]
public TimelinePostCreateRequestContent Content { get; set; } = default!;
+ /// <summary>
+ /// Time of the post. If not set, current time will be used.
+ /// </summary>
public DateTime? Time { get; set; }
}
+ /// <summary>
+ /// Create timeline request model.
+ /// </summary>
public class TimelineCreateRequest
{
+ /// <summary>
+ /// Name of the new timeline. Must be a valid name.
+ /// </summary>
[Required]
[TimelineName]
public string Name { get; set; } = default!;
}
+ /// <summary>
+ /// Patch timeline request model.
+ /// </summary>
public class TimelinePatchRequest
{
+ /// <summary>
+ /// New description. Null for not change.
+ /// </summary>
public string? Description { get; set; }
+ /// <summary>
+ /// New visibility. Null for not change.
+ /// </summary>
public TimelineVisibility? Visibility { get; set; }
}
}
|