(self, lang: str)
| 52 | ) |
| 53 | |
| 54 | def to_dict(self, lang: str): |
| 55 | input_schema_dict = { |
| 56 | k: { |
| 57 | "type": v.type, |
| 58 | "name": i18n_text(self.bundle_id, v.name, lang), |
| 59 | "description": i18n_text(self.bundle_id, v.description, lang), |
| 60 | "required": v.required, |
| 61 | } |
| 62 | for k, v in self.input_schema.items() |
| 63 | } |
| 64 | |
| 65 | output_schema_dict = { |
| 66 | k: { |
| 67 | "type": v.type, |
| 68 | "name": i18n_text(self.bundle_id, v.name, lang), |
| 69 | "description": i18n_text(self.bundle_id, v.description, lang), |
| 70 | "required": v.required, |
| 71 | } |
| 72 | for k, v in self.output_schema.items() |
| 73 | } |
| 74 | |
| 75 | return { |
| 76 | "object": self.object_name(), |
| 77 | "bundle_id": self.bundle_id, |
| 78 | "plugin_id": self.plugin_id, |
| 79 | "name": i18n_text(self.bundle_id, self.name, lang), |
| 80 | "description": i18n_text(self.bundle_id, self.description, lang), |
| 81 | "input_schema": input_schema_dict, |
| 82 | "output_schema": output_schema_dict, |
| 83 | } |
| 84 | |
| 85 | def validate_input(self, input_params: Dict[str, Any]): |
| 86 | # Iterate over the input_schema to validate each parameter |
nothing calls this directly
no test coverage detected