Skip to content

Commit adae103

Browse files
committed
Fix response-validation 500s on sensor encoding types
1 parent 2cd6c40 commit adae103

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

interfaces/sensorthings/schemas/sensor.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,19 @@ class SensorModel(Schema):
2020
)
2121

2222

23-
sensorEncodingTypes = Literal[
23+
KnownSensorEncodingTypes = Literal[
2424
"application/pdf",
2525
"http://www.opengis.net/doc/IS/SensorML/2.0",
2626
"text/html",
2727
"application/json",
28+
"text/plain",
2829
]
2930

31+
# Legacy deployments may contain other valid MIME strings in this field.
32+
# Keep known values documented while accepting arbitrary encodings to avoid
33+
# response-validation 500s when reading existing records.
34+
sensorEncodingTypes = KnownSensorEncodingTypes | str
35+
3036

3137
class SensorMetadata(Schema):
3238
method_code: Optional[str] = None

0 commit comments

Comments
 (0)