fix(api): add nullable context to #96/#98 DTOs; regen OpenAPI + SPA types
ChannelResponseModel and BulkChannelRequests DTOs lacked file-scoped #nullable enable, so the OpenAPI generator emitted every string property as a ["null","string"] union (project Nullable default is disable), polluting SPA typegen with needless `| null` unions. ChannelStateResponseModel already complied with this convention (precedent: PlayoutResponseModel). All properties in both files are always populated (never null in practice), so no property needed to become explicitly optional/nullable - just adding #nullable enable was sufficient to clean up the generated schema. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using Newtonsoft.Json;
|
#nullable enable
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace ErsatzTV.Core.Api.Channels;
|
namespace ErsatzTV.Core.Api.Channels;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#nullable enable
|
||||||
using ErsatzTV.Application.Channels;
|
using ErsatzTV.Application.Channels;
|
||||||
|
|
||||||
namespace ErsatzTV.Controllers.Api.Requests;
|
namespace ErsatzTV.Controllers.Api.Requests;
|
||||||
|
|||||||
@@ -3916,10 +3916,7 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"channelIds": {
|
"channelIds": {
|
||||||
"type": [
|
"type": "array",
|
||||||
"null",
|
|
||||||
"array"
|
|
||||||
],
|
|
||||||
"items": {
|
"items": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int32"
|
"format": "int32"
|
||||||
@@ -3935,20 +3932,14 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"channelIds": {
|
"channelIds": {
|
||||||
"type": [
|
"type": "array",
|
||||||
"null",
|
|
||||||
"array"
|
|
||||||
],
|
|
||||||
"items": {
|
"items": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int32"
|
"format": "int32"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"group": {
|
"group": {
|
||||||
"type": [
|
"type": "string"
|
||||||
"null",
|
|
||||||
"string"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3964,10 +3955,7 @@
|
|||||||
"format": "int32"
|
"format": "int32"
|
||||||
},
|
},
|
||||||
"number": {
|
"number": {
|
||||||
"type": [
|
"type": "string"
|
||||||
"null",
|
|
||||||
"string"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3978,10 +3966,7 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"channels": {
|
"channels": {
|
||||||
"type": [
|
"type": "array",
|
||||||
"null",
|
|
||||||
"array"
|
|
||||||
],
|
|
||||||
"items": {
|
"items": {
|
||||||
"$ref": "#/components/schemas/BulkRenumberChannelRequest"
|
"$ref": "#/components/schemas/BulkRenumberChannelRequest"
|
||||||
}
|
}
|
||||||
@@ -4143,50 +4128,29 @@
|
|||||||
"format": "int32"
|
"format": "int32"
|
||||||
},
|
},
|
||||||
"number": {
|
"number": {
|
||||||
"type": [
|
"type": "string"
|
||||||
"null",
|
|
||||||
"string"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"sortNumber": {
|
"sortNumber": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"format": "double"
|
"format": "double"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": [
|
"type": "string"
|
||||||
"null",
|
|
||||||
"string"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"group": {
|
"group": {
|
||||||
"type": [
|
"type": "string"
|
||||||
"null",
|
|
||||||
"string"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"categories": {
|
"categories": {
|
||||||
"type": [
|
"type": "string"
|
||||||
"null",
|
|
||||||
"string"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"fFmpegProfile": {
|
"fFmpegProfile": {
|
||||||
"type": [
|
"type": "string"
|
||||||
"null",
|
|
||||||
"string"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"language": {
|
"language": {
|
||||||
"type": [
|
"type": "string"
|
||||||
"null",
|
|
||||||
"string"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"streamingMode": {
|
"streamingMode": {
|
||||||
"type": [
|
"type": "string"
|
||||||
"null",
|
|
||||||
"string"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"isEnabled": {
|
"isEnabled": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
|
|||||||
Vendored
+12
-12
@@ -27,18 +27,18 @@ export interface components {
|
|||||||
"contentType": string;
|
"contentType": string;
|
||||||
};
|
};
|
||||||
"BulkDeleteChannelsRequest": {
|
"BulkDeleteChannelsRequest": {
|
||||||
"channelIds": null | Array<number>;
|
"channelIds": Array<number>;
|
||||||
};
|
};
|
||||||
"BulkMoveChannelsToGroupRequest": {
|
"BulkMoveChannelsToGroupRequest": {
|
||||||
"channelIds": null | Array<number>;
|
"channelIds": Array<number>;
|
||||||
"group": null | string;
|
"group": string;
|
||||||
};
|
};
|
||||||
"BulkRenumberChannelRequest": {
|
"BulkRenumberChannelRequest": {
|
||||||
"id": number;
|
"id": number;
|
||||||
"number": null | string;
|
"number": string;
|
||||||
};
|
};
|
||||||
"BulkRenumberChannelsRequest": {
|
"BulkRenumberChannelsRequest": {
|
||||||
"channels": null | Array<components["schemas"]["BulkRenumberChannelRequest"]>;
|
"channels": Array<components["schemas"]["BulkRenumberChannelRequest"]>;
|
||||||
};
|
};
|
||||||
"ChannelGuideChannelResponseModel": {
|
"ChannelGuideChannelResponseModel": {
|
||||||
"number": string;
|
"number": string;
|
||||||
@@ -69,14 +69,14 @@ export interface components {
|
|||||||
"ChannelPlayoutSource": "Generated" | "Mirror";
|
"ChannelPlayoutSource": "Generated" | "Mirror";
|
||||||
"ChannelResponseModel": {
|
"ChannelResponseModel": {
|
||||||
"id": number;
|
"id": number;
|
||||||
"number": null | string;
|
"number": string;
|
||||||
"sortNumber": number;
|
"sortNumber": number;
|
||||||
"name": null | string;
|
"name": string;
|
||||||
"group": null | string;
|
"group": string;
|
||||||
"categories": null | string;
|
"categories": string;
|
||||||
"fFmpegProfile": null | string;
|
"fFmpegProfile": string;
|
||||||
"language": null | string;
|
"language": string;
|
||||||
"streamingMode": null | string;
|
"streamingMode": string;
|
||||||
"isEnabled": boolean;
|
"isEnabled": boolean;
|
||||||
"showInEpg": boolean;
|
"showInEpg": boolean;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user