Skip to content

Commit

Permalink
Make fields optional
Browse files Browse the repository at this point in the history
  • Loading branch information
mferrera committed Sep 23, 2024
1 parent 4be386e commit b0b8540
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
22 changes: 18 additions & 4 deletions schema/definitions/0.8.0/schema/fmu_results.json
Original file line number Diff line number Diff line change
Expand Up @@ -7594,20 +7594,34 @@
"type": "array"
},
"num_columns": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"examples": [
1,
9999
],
"title": "Num Columns",
"type": "integer"
"title": "Num Columns"
},
"num_rows": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"examples": [
1,
9999
],
"title": "Num Rows",
"type": "integer"
"title": "Num Rows"
},
"size": {
"examples": [
Expand Down
4 changes: 2 additions & 2 deletions src/fmu/dataio/_model/specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ class TableSpecification(BaseModel):
columns: List[str]
"""List of columns present in a table."""

num_columns: int = Field(examples=[1, 9999])
num_columns: Optional[int] = Field(examples=[1, 9999])
"""The number of columns in a table."""

num_rows: int = Field(examples=[1, 9999])
num_rows: Optional[int] = Field(examples=[1, 9999])
"""The number of rows in a table.."""

size: int = Field(examples=[1, 9999])
Expand Down

0 comments on commit b0b8540

Please sign in to comment.