Description and goal
Right now it's a String. This is not type-safe: the generated OpenAPI (and TypeScript code) will not complain when passing an invalid object type. This is especially risky when handling cache tags here:
|
providesTags: (_result, _error, args) => |
Turn SearchPayload.object into an enum with one entry per object type.
Acceptance criteria
.
Description and goal
Right now it's a
String. This is not type-safe: the generated OpenAPI (and TypeScript code) will not complain when passing an invalid object type. This is especially risky when handling cache tags here:osrd/front/src/common/api/osrdEditoastApi.ts
Line 352 in fbada52
Turn
SearchPayload.objectinto an enum with one entry per object type.Acceptance criteria
.