mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 09:34:44 +01:00
Add all websocket messages to generated openapi spec (#9682)
* Add all websocket messages to generated openapi spec * Use oneOf * JsonIgnore ServerId * Oops * Add discriminators * Add WebSocketMessage container for Inbound and Outbound messages
This commit is contained in:
28
MediaBrowser.Controller/Net/WebSocketMessage.cs
Normal file
28
MediaBrowser.Controller/Net/WebSocketMessage.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
using MediaBrowser.Model.Session;
|
||||
|
||||
namespace MediaBrowser.Controller.Net;
|
||||
|
||||
/// <summary>
|
||||
/// Websocket message without data.
|
||||
/// </summary>
|
||||
public abstract class WebSocketMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the message.
|
||||
/// TODO make this abstract and get only.
|
||||
/// </summary>
|
||||
public virtual SessionMessageType MessageType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the message id.
|
||||
/// </summary>
|
||||
public Guid MessageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the server id.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public string? ServerId { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user