Skip to content

Commit

Permalink
FIX: Make volumes product name required
Browse files Browse the repository at this point in the history
  • Loading branch information
mferrera committed Dec 19, 2024
1 parent b3b4121 commit 4a409fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion schema/definitions/0.8.0/schema/fmu_results.json
Original file line number Diff line number Diff line change
Expand Up @@ -3451,14 +3451,16 @@
},
"name": {
"const": "inplace_volumes",
"default": "inplace_volumes",
"enum": [
"inplace_volumes"
],
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "InplaceVolumesProduct",
"type": "object"
},
Expand Down
4 changes: 2 additions & 2 deletions src/fmu/dataio/_model/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Product(BaseModel):
name: enums.ProductName
"""The identifying product name for this data object."""

file_schema: Optional[FileSchema] = None
file_schema: Optional[FileSchema] = Field(default=None)
"""The schema identifying the format of the product."""


Expand All @@ -45,7 +45,7 @@ class InplaceVolumesProduct(Product):
This class contains metadata for the 'inplace_volumes' product.
"""

name: Literal[enums.ProductName.inplace_volumes] = enums.ProductName.inplace_volumes
name: Literal[enums.ProductName.inplace_volumes]
"""The identifying product name for the 'inplace_volumes' product."""

file_schema: FileSchema = FileSchema(
Expand Down

0 comments on commit 4a409fc

Please sign in to comment.