Skip to content

Commit 0d6ef64

Browse files
bring data models more in line with SWECommon 3.0, add more validation tests to check validation survives transformation of data to wire format and back
1 parent 97cd5e2 commit 0d6ef64

3 files changed

Lines changed: 767 additions & 1 deletion

File tree

src/oshconnect/swe_components.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ class AnyComponentSchema(BaseModel):
6767

6868
class DataRecordSchema(AnyComponentSchema):
6969
type: Literal["DataRecord"] = "DataRecord"
70-
fields: list["AnyComponent"] = Field(...)
70+
# DataRecord.json: fields.minItems = 1
71+
fields: list["AnyComponent"] = Field(..., min_length=1)
7172

7273
@model_validator(mode="after")
7374
def _fields_require_name(self):

0 commit comments

Comments
 (0)