Skip to content

Commit

Permalink
fixup editoast
Browse files Browse the repository at this point in the history
Signed-off-by: Youness CHRIFI ALAOUI <[email protected]>
  • Loading branch information
younesschrifi committed Nov 20, 2024
1 parent 37fa1e7 commit a0c4f3e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion editoast/editoast_schemas/src/infra/operational_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub struct OperationalPoint {
#[schema(inline)]
pub extensions: OperationalPointExtensions,
#[serde(default)]
pub weight: Option<u64>,
pub weight: Option<u8>,
}

#[derive(Debug, Derivative, Clone, Deserialize, Serialize, ToSchema)]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
UPDATE infra_object_operational_point
SET data = data - 'weight';

UPDATE infra
SET railjson_version = '3.4.12';

ALTER TABLE infra
ALTER COLUMN railjson_version
SET DEFAULT '3.4.12';
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
UPDATE infra_object_operational_point
SET data = jsonb_set(
data,
'{weight}',
'null'::jsonb,
true
);

UPDATE infra
SET railjson_version = '3.4.13';

ALTER TABLE infra
ALTER COLUMN railjson_version
SET DEFAULT '3.4.13';
5 changes: 5 additions & 0 deletions editoast/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7008,6 +7008,11 @@ components:
type: array
items:
$ref: '#/components/schemas/OperationalPointPart'
weight:
type: integer
format: int32
nullable: true
minimum: 0
additionalProperties: false
OperationalPointExtensions:
type: object
Expand Down
1 change: 1 addition & 0 deletions front/src/common/api/generatedEditoastApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1887,6 +1887,7 @@ export type OperationalPoint = {
};
id: string;
parts: OperationalPointPart[];
weight?: number | null;
};
export type Waypoint =
| {
Expand Down

0 comments on commit a0c4f3e

Please sign in to comment.