diff --git a/shared/requirements.txt b/shared/requirements.txt index 215ce3f08..df72fdd51 100644 --- a/shared/requirements.txt +++ b/shared/requirements.txt @@ -2,5 +2,5 @@ # This file is auto-generated by tools/extract_requirements.py. backports.zoneinfo>=0.2.1,<0.3;python_version<'3.9' click>=8.0.4,<8.2 -pydantic>=2.5.0,<2.7 +pydantic>=2.5.0,<2.8 pyyaml>=5.3.1,<6.1 diff --git a/shared/setup.py b/shared/setup.py index 2b1409af6..dbb54c288 100644 --- a/shared/setup.py +++ b/shared/setup.py @@ -14,7 +14,7 @@ setup( install_requires=[ "backports.zoneinfo>=0.2.1,<0.3;python_version<'3.9'", "click>=8.0.4,<8.2", - "pydantic>=2.5.0,<2.7", + "pydantic>=2.5.0,<2.8", "pyyaml>=5.3.1,<6.1", ], extras_require={ diff --git a/shared/tests/config/base_test.py b/shared/tests/config/base_test.py index 93e9b900f..f9a4c0ef0 100644 --- a/shared/tests/config/base_test.py +++ b/shared/tests/config/base_test.py @@ -41,7 +41,13 @@ FIXTURE_CONFIG_JSON_SCHEMA = { "default": "stereo", }, "bitrate": {"title": "Bitrate", "type": "integer"}, - "format": {"const": "aac", "default": "aac", "title": "Format"}, + "format": { + "const": "aac", + "default": "aac", + "enum": ["aac"], + "title": "Format", + "type": "string", + }, }, "required": ["bitrate"], "title": "AudioAAC", @@ -59,7 +65,13 @@ FIXTURE_CONFIG_JSON_SCHEMA = { "default": "stereo", }, "bitrate": {"title": "Bitrate", "type": "integer"}, - "format": {"const": "mp3", "default": "mp3", "title": "Format"}, + "format": { + "const": "mp3", + "default": "mp3", + "enum": ["mp3"], + "title": "Format", + "type": "string", + }, }, "required": ["bitrate"], "title": "AudioMP3", @@ -72,7 +84,13 @@ FIXTURE_CONFIG_JSON_SCHEMA = { "default": "stereo", }, "bitrate": {"title": "Bitrate", "type": "integer"}, - "format": {"const": "ogg", "default": "ogg", "title": "Format"}, + "format": { + "const": "ogg", + "default": "ogg", + "enum": ["ogg"], + "title": "Format", + "type": "string", + }, "enable_metadata": { "anyOf": [{"type": "boolean"}, {"type": "null"}], "default": False, @@ -93,7 +111,9 @@ FIXTURE_CONFIG_JSON_SCHEMA = { "format": { "const": "opus", "default": "opus", + "enum": ["opus"], "title": "Format", + "type": "string", }, }, "required": ["bitrate"], @@ -132,7 +152,9 @@ FIXTURE_CONFIG_JSON_SCHEMA = { "kind": { "const": "icecast", "default": "icecast", + "enum": ["icecast"], "title": "Kind", + "type": "string", }, "enabled": { "default": False, @@ -141,7 +163,7 @@ FIXTURE_CONFIG_JSON_SCHEMA = { }, "public_url": { "anyOf": [ - {"type": "string", "format": "uri"}, + {"format": "uri", "type": "string"}, {"type": "null"}, ], "default": None, @@ -253,7 +275,9 @@ FIXTURE_CONFIG_JSON_SCHEMA = { "kind": { "const": "shoutcast", "default": "shoutcast", + "enum": ["shoutcast"], "title": "Kind", + "type": "string", }, "enabled": { "default": False, @@ -262,7 +286,7 @@ FIXTURE_CONFIG_JSON_SCHEMA = { }, "public_url": { "anyOf": [ - {"type": "string", "format": "uri"}, + {"format": "uri", "type": "string"}, {"type": "null"}, ], "default": None, @@ -334,7 +358,7 @@ FIXTURE_CONFIG_JSON_SCHEMA = { }, }, "properties": { - "public_url": {"title": "Public Url", "type": "string", "format": "uri"}, + "public_url": {"format": "uri", "title": "Public Url", "type": "string"}, "api_key": {"title": "Api Key", "type": "string"}, "allowed_hosts": { "default": [],