diff --git a/packages/overture-schema-system/src/overture/schema/system/optionality.py b/packages/overture-schema-system/src/overture/schema/system/optionality.py index f4d50ff3d..326607a6a 100644 --- a/packages/overture-schema-system/src/overture/schema/system/optionality.py +++ b/packages/overture-schema-system/src/overture/schema/system/optionality.py @@ -1,4 +1,7 @@ -from enum import Enum +""" +Optional types. +""" + from types import NoneType, UnionType from typing import Annotated, Any, Generic, TypeVar, Union, get_args, get_origin @@ -71,18 +74,6 @@ def __class_getitem__(cls, item: Any) -> Any: return Annotated[item | MISSING, Field(default=MISSING)] -# todo - Vic - finish this -class Optionality(str, Enum): - # This is for implementing the model constraints more cleverly. - # Noneable -> It is allowed to be `null` in JSON Schema. - # To make it @required, need to take away the right to set `null`. - # - # - OMITABLE = ("omitable",) - NONEABLE = ("noneable",) - NOT_OPTIONAL = ("not_optional",) - - def _has_none(value: Any) -> bool: if value is None or value is NoneType: return True diff --git a/packages/overture-schema-system/src/overture/schema/system/ref/ref.py b/packages/overture-schema-system/src/overture/schema/system/ref/ref.py index a5e74cd94..7c37cc054 100644 --- a/packages/overture-schema-system/src/overture/schema/system/ref/ref.py +++ b/packages/overture-schema-system/src/overture/schema/system/ref/ref.py @@ -13,7 +13,7 @@ class Relationship(str, DocumentedEnum): - """ + r""" The kind of relationship that exists between two entities. Relationships represent connections between different features or models. Think of them as links @@ -33,9 +33,9 @@ class Relationship(str, DocumentedEnum): relationship, is at the bottom. COMPOSITION - / \\ + / \ AGGREGATION HIERARCHY - \\ / + \ / ASSOCIATION Note that the *kind* of a relationship does not say anything about the *directionality* of the