diff --git a/backend/ebios_rm/views.py b/backend/ebios_rm/views.py index fbf0136f6..1ca61f709 100644 --- a/backend/ebios_rm/views.py +++ b/backend/ebios_rm/views.py @@ -39,6 +39,7 @@ class FearedEventViewSet(BaseModelViewSet): "ebios_rm_study", ] + class RoToViewSet(BaseModelViewSet): model = RoTo diff --git a/frontend/src/lib/utils/schemas.ts b/frontend/src/lib/utils/schemas.ts index 60e09fd74..f862915fd 100644 --- a/frontend/src/lib/utils/schemas.ts +++ b/frontend/src/lib/utils/schemas.ts @@ -390,7 +390,8 @@ export const vulnerabilitySchema = z.object({ filtering_labels: z.string().optional().array().optional() }); -export const ebiosRMSchema = baseNamedObject({ +export const ebiosRMSchema = z.object({ + ...NameDescriptionMixin, version: z.string().optional().default('0.1'), ref_id: z.string().default(''), risk_matrix: z.string().optional(), @@ -401,7 +402,8 @@ export const ebiosRMSchema = baseNamedObject({ folder: z.string() }); -export const fearedEventsSchema = baseNamedObject({ +export const fearedEventsSchema = z.object({ + ...NameDescriptionMixin, ref_id: z.string().optional(), gravity: z.number().optional(), is_selected: z.boolean().optional(),