Browse Source

fix numeric types

pull/2676/head
Jason Dove 8 months ago
parent
commit
e119eeafbb
No known key found for this signature in database
  1. 3
      ErsatzTV/Startup.cs
  2. 66
      ErsatzTV/wwwroot/openapi/scripted-schedule-tagged.json
  3. 66
      ErsatzTV/wwwroot/openapi/scripted-schedule.json
  4. 208
      ErsatzTV/wwwroot/openapi/v1.json

3
ErsatzTV/Startup.cs

@ -4,6 +4,7 @@ using System.IO.Abstractions;
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Channels; using System.Threading.Channels;
using BlazorSortable; using BlazorSortable;
using Bugsnag.AspNet.Core; using Bugsnag.AspNet.Core;
@ -177,6 +178,8 @@ public class Startup
}); });
}); });
services.ConfigureHttpJsonOptions(o => o.SerializerOptions.NumberHandling = JsonNumberHandling.Strict);
OidcHelper.Init(Configuration); OidcHelper.Init(Configuration);
JwtHelper.Init(Configuration); JwtHelper.Init(Configuration);
SearchHelper.Init(Configuration); SearchHelper.Init(Configuration);

66
ErsatzTV/wwwroot/openapi/scripted-schedule-tagged.json

@ -1768,11 +1768,7 @@
"description": "The 'key' for the content" "description": "The 'key' for the content"
}, },
"count": { "count": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "The number of items to skip", "description": "The number of items to skip",
"format": "int32" "format": "int32"
} }
@ -1791,20 +1787,12 @@
"description": "The 'key' for the content" "description": "The 'key' for the content"
}, },
"season": { "season": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "The season number", "description": "The season number",
"format": "int32" "format": "int32"
}, },
"episode": { "episode": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "The episode number", "description": "The episode number",
"format": "int32" "format": "int32"
} }
@ -1901,11 +1889,7 @@
"type": "string" "type": "string"
}, },
"milliseconds": { "milliseconds": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "Duration in milliseconds", "description": "Duration in milliseconds",
"format": "int64" "format": "int64"
} }
@ -1923,11 +1907,7 @@
"description": "The 'key' for the content" "description": "The 'key' for the content"
}, },
"count": { "count": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
} }
} }
@ -1974,11 +1954,7 @@
"description": "The 'key' for the content that should be added" "description": "The 'key' for the content that should be added"
}, },
"count": { "count": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"fillerKind": { "fillerKind": {
@ -2027,11 +2003,7 @@
"description": "Controls whether content will be trimmed to exactly fit the specified duration" "description": "Controls whether content will be trimmed to exactly fit the specified duration"
}, },
"discardAttempts": { "discardAttempts": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "When trim is false, this is the number of times to discard items from the collection to find something that fits in the remaining duration", "description": "When trim is false, this is the number of times to discard items from the collection to find something that fits in the remaining duration",
"format": "int32" "format": "int32"
}, },
@ -2074,11 +2046,7 @@
"description": "The 'key' for the content that should be added" "description": "The 'key' for the content that should be added"
}, },
"minutes": { "minutes": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "The minutes interval", "description": "The minutes interval",
"format": "int32" "format": "int32"
}, },
@ -2094,11 +2062,7 @@
"description": "Controls whether content will be trimmed to exactly fit the specified interval" "description": "Controls whether content will be trimmed to exactly fit the specified interval"
}, },
"discardAttempts": { "discardAttempts": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "When trim is false, this is the number of times to discard items from the collection to find something that fits in the remaining interval", "description": "When trim is false, this is the number of times to discard items from the collection to find something that fits in the remaining interval",
"format": "int32" "format": "int32"
}, },
@ -2160,11 +2124,7 @@
"description": "Controls whether content will be trimmed to exactly fit until the specified time" "description": "Controls whether content will be trimmed to exactly fit until the specified time"
}, },
"discardAttempts": { "discardAttempts": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "When trim is false, this is the number of times to discard items from the collection to find something that fits until the specified time", "description": "When trim is false, this is the number of times to discard items from the collection to find something that fits until the specified time",
"format": "int32" "format": "int32"
}, },
@ -2223,11 +2183,7 @@
"description": "Controls whether content will be trimmed to exactly fit until the specified time" "description": "Controls whether content will be trimmed to exactly fit until the specified time"
}, },
"discardAttempts": { "discardAttempts": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "When trim is false, this is the number of times to discard items from the collection to find something that fits until the specified time", "description": "When trim is false, this is the number of times to discard items from the collection to find something that fits until the specified time",
"format": "int32" "format": "int32"
}, },

66
ErsatzTV/wwwroot/openapi/scripted-schedule.json

@ -1768,11 +1768,7 @@
"description": "The 'key' for the content" "description": "The 'key' for the content"
}, },
"count": { "count": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "The number of items to skip", "description": "The number of items to skip",
"format": "int32" "format": "int32"
} }
@ -1791,20 +1787,12 @@
"description": "The 'key' for the content" "description": "The 'key' for the content"
}, },
"season": { "season": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "The season number", "description": "The season number",
"format": "int32" "format": "int32"
}, },
"episode": { "episode": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "The episode number", "description": "The episode number",
"format": "int32" "format": "int32"
} }
@ -1901,11 +1889,7 @@
"type": "string" "type": "string"
}, },
"milliseconds": { "milliseconds": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "Duration in milliseconds", "description": "Duration in milliseconds",
"format": "int64" "format": "int64"
} }
@ -1923,11 +1907,7 @@
"description": "The 'key' for the content" "description": "The 'key' for the content"
}, },
"count": { "count": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
} }
} }
@ -1974,11 +1954,7 @@
"description": "The 'key' for the content that should be added" "description": "The 'key' for the content that should be added"
}, },
"count": { "count": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"fillerKind": { "fillerKind": {
@ -2027,11 +2003,7 @@
"description": "Controls whether content will be trimmed to exactly fit the specified duration" "description": "Controls whether content will be trimmed to exactly fit the specified duration"
}, },
"discardAttempts": { "discardAttempts": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "When trim is false, this is the number of times to discard items from the collection to find something that fits in the remaining duration", "description": "When trim is false, this is the number of times to discard items from the collection to find something that fits in the remaining duration",
"format": "int32" "format": "int32"
}, },
@ -2074,11 +2046,7 @@
"description": "The 'key' for the content that should be added" "description": "The 'key' for the content that should be added"
}, },
"minutes": { "minutes": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "The minutes interval", "description": "The minutes interval",
"format": "int32" "format": "int32"
}, },
@ -2094,11 +2062,7 @@
"description": "Controls whether content will be trimmed to exactly fit the specified interval" "description": "Controls whether content will be trimmed to exactly fit the specified interval"
}, },
"discardAttempts": { "discardAttempts": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "When trim is false, this is the number of times to discard items from the collection to find something that fits in the remaining interval", "description": "When trim is false, this is the number of times to discard items from the collection to find something that fits in the remaining interval",
"format": "int32" "format": "int32"
}, },
@ -2160,11 +2124,7 @@
"description": "Controls whether content will be trimmed to exactly fit until the specified time" "description": "Controls whether content will be trimmed to exactly fit until the specified time"
}, },
"discardAttempts": { "discardAttempts": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "When trim is false, this is the number of times to discard items from the collection to find something that fits until the specified time", "description": "When trim is false, this is the number of times to discard items from the collection to find something that fits until the specified time",
"format": "int32" "format": "int32"
}, },
@ -2223,11 +2183,7 @@
"description": "Controls whether content will be trimmed to exactly fit until the specified time" "description": "Controls whether content will be trimmed to exactly fit until the specified time"
}, },
"discardAttempts": { "discardAttempts": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"description": "When trim is false, this is the number of times to discard items from the collection to find something that fits until the specified time", "description": "When trim is false, this is the number of times to discard items from the collection to find something that fits until the specified time",
"format": "int32" "format": "int32"
}, },

208
ErsatzTV/wwwroot/openapi/v1.json

@ -193,7 +193,6 @@
"in": "path", "in": "path",
"required": true, "required": true,
"schema": { "schema": {
"pattern": "^-?(?:0|[1-9]\\d*)$",
"type": "integer", "type": "integer",
"format": "int32" "format": "int32"
} }
@ -218,7 +217,6 @@
"in": "path", "in": "path",
"required": true, "required": true,
"schema": { "schema": {
"pattern": "^-?(?:0|[1-9]\\d*)$",
"type": "integer", "type": "integer",
"format": "int32" "format": "int32"
} }
@ -243,7 +241,6 @@
"in": "path", "in": "path",
"required": true, "required": true,
"schema": { "schema": {
"pattern": "^-?(?:0|[1-9]\\d*)$",
"type": "integer", "type": "integer",
"format": "int32" "format": "int32"
} }
@ -546,7 +543,6 @@
"in": "path", "in": "path",
"required": true, "required": true,
"schema": { "schema": {
"pattern": "^-?(?:0|[1-9]\\d*)$",
"type": "integer", "type": "integer",
"format": "int32" "format": "int32"
} }
@ -605,11 +601,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"id": { "id": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"number": { "number": {
@ -652,11 +644,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"apiVersion": { "apiVersion": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"appVersion": { "appVersion": {
@ -704,11 +692,7 @@
] ]
}, },
"threadCount": { "threadCount": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"hardwareAcceleration": { "hardwareAcceleration": {
@ -730,20 +714,14 @@
] ]
}, },
"qsvExtraHardwareFrames": { "qsvExtraHardwareFrames": {
"pattern": "^-?(?:0|[1-9]\\d*)$",
"type": [ "type": [
"null", "null",
"integer", "integer"
"string"
], ],
"format": "int32" "format": "int32"
}, },
"resolutionId": { "resolutionId": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"scalingBehavior": { "scalingBehavior": {
@ -771,19 +749,11 @@
"$ref": "#/components/schemas/FFmpegProfileBitDepth" "$ref": "#/components/schemas/FFmpegProfileBitDepth"
}, },
"videoBitrate": { "videoBitrate": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"videoBufferSize": { "videoBufferSize": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"tonemapAlgorithm": { "tonemapAlgorithm": {
@ -793,38 +763,22 @@
"$ref": "#/components/schemas/FFmpegProfileAudioFormat" "$ref": "#/components/schemas/FFmpegProfileAudioFormat"
}, },
"audioBitrate": { "audioBitrate": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"audioBufferSize": { "audioBufferSize": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"normalizeLoudnessMode": { "normalizeLoudnessMode": {
"$ref": "#/components/schemas/NormalizeLoudnessMode" "$ref": "#/components/schemas/NormalizeLoudnessMode"
}, },
"audioChannels": { "audioChannels": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"audioSampleRate": { "audioSampleRate": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"normalizeFramerate": { "normalizeFramerate": {
@ -888,11 +842,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"id": { "id": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"name": { "name": {
@ -902,11 +852,7 @@
] ]
}, },
"threadCount": { "threadCount": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"hardwareAcceleration": { "hardwareAcceleration": {
@ -928,11 +874,9 @@
] ]
}, },
"qsvExtraHardwareFrames": { "qsvExtraHardwareFrames": {
"pattern": "^-?(?:0|[1-9]\\d*)$",
"type": [ "type": [
"null", "null",
"integer", "integer"
"string"
], ],
"format": "int32" "format": "int32"
}, },
@ -967,19 +911,11 @@
"$ref": "#/components/schemas/FFmpegProfileBitDepth" "$ref": "#/components/schemas/FFmpegProfileBitDepth"
}, },
"videoBitrate": { "videoBitrate": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"videoBufferSize": { "videoBufferSize": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"tonemapAlgorithm": { "tonemapAlgorithm": {
@ -989,38 +925,22 @@
"$ref": "#/components/schemas/FFmpegProfileAudioFormat" "$ref": "#/components/schemas/FFmpegProfileAudioFormat"
}, },
"audioBitrate": { "audioBitrate": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"audioBufferSize": { "audioBufferSize": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"normalizeLoudnessMode": { "normalizeLoudnessMode": {
"$ref": "#/components/schemas/NormalizeLoudnessMode" "$ref": "#/components/schemas/NormalizeLoudnessMode"
}, },
"audioChannels": { "audioChannels": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"audioSampleRate": { "audioSampleRate": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"normalizeFramerate": { "normalizeFramerate": {
@ -1129,11 +1049,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"id": { "id": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"name": { "name": {
@ -1143,19 +1059,11 @@
] ]
}, },
"width": { "width": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"height": { "height": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"isCustom": { "isCustom": {
@ -1197,11 +1105,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"id": { "id": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"name": { "name": {
@ -1250,11 +1154,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"fFmpegProfileId": { "fFmpegProfileId": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"name": { "name": {
@ -1264,11 +1164,7 @@
] ]
}, },
"threadCount": { "threadCount": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"hardwareAcceleration": { "hardwareAcceleration": {
@ -1290,20 +1186,14 @@
] ]
}, },
"qsvExtraHardwareFrames": { "qsvExtraHardwareFrames": {
"pattern": "^-?(?:0|[1-9]\\d*)$",
"type": [ "type": [
"null", "null",
"integer", "integer"
"string"
], ],
"format": "int32" "format": "int32"
}, },
"resolutionId": { "resolutionId": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"scalingBehavior": { "scalingBehavior": {
@ -1331,19 +1221,11 @@
"$ref": "#/components/schemas/FFmpegProfileBitDepth" "$ref": "#/components/schemas/FFmpegProfileBitDepth"
}, },
"videoBitrate": { "videoBitrate": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"videoBufferSize": { "videoBufferSize": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"tonemapAlgorithm": { "tonemapAlgorithm": {
@ -1353,38 +1235,22 @@
"$ref": "#/components/schemas/FFmpegProfileAudioFormat" "$ref": "#/components/schemas/FFmpegProfileAudioFormat"
}, },
"audioBitrate": { "audioBitrate": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"audioBufferSize": { "audioBufferSize": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"normalizeLoudnessMode": { "normalizeLoudnessMode": {
"$ref": "#/components/schemas/NormalizeLoudnessMode" "$ref": "#/components/schemas/NormalizeLoudnessMode"
}, },
"audioChannels": { "audioChannels": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"audioSampleRate": { "audioSampleRate": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"normalizeFramerate": { "normalizeFramerate": {
@ -1404,11 +1270,7 @@
"type": "object", "type": "object",
"properties": { "properties": {
"id": { "id": {
"pattern": "^-?(?:0|[1-9]\\d*)$", "type": "integer",
"type": [
"integer",
"string"
],
"format": "int32" "format": "int32"
}, },
"name": { "name": {

Loading…
Cancel
Save