Skip to content

Commit

Permalink
Revert Embedded_data_specification Optional
Browse files Browse the repository at this point in the history
In #328, we made the attribute `data_specification` in class
`Embedded_data_specification` optional, since that is what we thought
the specification said (See also the discussion in #326)

However, this was a bug in the specification, which is fixed in v3.0.1
of the specification.
We therefore revert these changes.

Fixes #326
  • Loading branch information
s-heppner committed May 6, 2024
1 parent 6d5411b commit aa21468
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions aas_core_meta/v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -5109,13 +5109,13 @@ class Embedded_data_specification:
data_specification_content: Data_specification_content
"""Actual content of the data specification"""

data_specification: Optional[Reference]
data_specification: Reference
"""Reference to the data specification"""

def __init__(
self,
data_specification_content: Data_specification_content,
data_specification: Optional[Reference] = None,
data_specification: Reference,
) -> None:
self.data_specification_content = data_specification_content
self.data_specification = data_specification
Expand Down
4 changes: 2 additions & 2 deletions aas_core_meta/v3_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -5110,13 +5110,13 @@ class Embedded_data_specification:
data_specification_content: Data_specification_content
"""Actual content of the data specification"""

data_specification: Optional[Reference]
data_specification: Reference
"""Reference to the data specification"""

def __init__(
self,
data_specification_content: Data_specification_content,
data_specification: Optional[Reference] = None,
data_specification: Reference,
) -> None:
self.data_specification_content = data_specification_content
self.data_specification = data_specification
Expand Down

0 comments on commit aa21468

Please sign in to comment.