in rostran/core/parameters.py [0:0]
def validate(self):
if not isinstance(self.name, str):
raise InvalidTemplateParameter(
name=self.name,
reason=f"The type should be str",
)
if self.type not in self.TYPES:
raise InvalidTemplateParameter(
name=self.name,
reason=f"Parameter type {self.type} is not supported. Allowed types: {self.TYPES}",
)
if self.association_property is not None and not isinstance(
self.association_property, str
):
raise InvalidTemplateParameter(
name=self.name,
reason=f"The type of {self.ASSOCIATION_PROPERTY} should be str",
)
if self.association_property_metadata is not None and not isinstance(
self.association_property_metadata, dict
):
raise InvalidTemplateParameter(
name=self.name,
reason=f"The type of {self.ASSOCIATION_PROPERTY_METADATA} should be dict",
)