osrd
osrd copied to clipboard
Remove unused fields in the rolling stock schema
Description and goal
Over the time, a couple of irrelevant fields creeped into the rolling stock RailJSON schema:
versionwas added in this change. It's meant to be incremented every time the rolling stock is edited. It has no business there, it's supposed to be internal to editoast, and its addition is not sound: if the version counter is supposed to be incremented when a rolling stock with a given ID changes, this field cannot meaningfully be read from disk. Clients also have no business knowing the current version.energy_sourceswas added in this change. This field is not read anywhere, and we don't know when it's going to be used. Sure, the design of this API is pretty good, and we're probably going to use it at some point, but we should have added the field as we needed it:- even if this API seems appropriate now, it may have to change when it is finally used
- anyone actually using this field may be lead to believe that is actually makes a difference
- anyone using this field, through hyrum's law, constrain what we can do later on with this API
Both of these changes introduced practical issues.
Acceptance criteria
- [ ] Remove the
versionfield from the RailJSON schema - [ ] Create an issue or documentation page with the Qualesi design work and proposed schema
- [ ] Remove the
energy_sourcesfield from the RailJSON schema
The energy_source field was supposed to be used soon. I would like to discuss it before finding out that there's an issue asking to remove it...
@flomonster is this fixed by the changes on the schemas ?
@flomonster is this fixed by the changes on the schemas ?
I'm not sure which changes you're talking about. But no.
We need to discuss the roadmap for rolling stock modelization.
Is this still relevant? Was a decision reached about the status of these fields?
Not relevent anymore. Thanks @Synar