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, }