From a95929a9789773e23743458bbb405ec8f170314f Mon Sep 17 00:00:00 2001 From: theocrsb Date: Mon, 13 Jan 2025 15:37:27 +0100 Subject: [PATCH] editoast: add weight documentation Signed-off-by: theocrsb Signed-off-by: Youness CHRIFI ALAOUI --- editoast/openapi.yaml | 1 + editoast/src/core/path_properties.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/editoast/openapi.yaml b/editoast/openapi.yaml index 8b1d0df6109..0ebb0c358e7 100644 --- a/editoast/openapi.yaml +++ b/editoast/openapi.yaml @@ -8107,6 +8107,7 @@ components: format: int32 description: Importance of the operational point nullable: true + maximum: 100 minimum: 0 description: Operational points along the path nullable: true diff --git a/editoast/src/core/path_properties.rs b/editoast/src/core/path_properties.rs index 4581e1c7548..dc0216ba883 100644 --- a/editoast/src/core/path_properties.rs +++ b/editoast/src/core/path_properties.rs @@ -79,7 +79,7 @@ pub struct OperationalPointOnPath { /// Distance from the beginning of the path in mm position: u64, /// Importance of the operational point - #[schema(required)] + #[schema(required, minimum = 0, maximum = 100)] weight: Option, }