Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions API_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Check back here regularly to stay ahead of removals.
| Announced | What? | Safe until | PR |
|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|---------------------------------------------------------------|
| 2026-04-01 | `DepartureResource.stop.*` is deprecated → use `DepartureResource.station` instead | 2026-09-30 | [#4663](https://github.com/Traewelling/traewelling/pull/4663) |
| 2026-04-07 | `OperatorResource.identifier` is deprecated: legacy HAFAS operator ID, always `null` for new operators | 2026-09-30 | [#4675](https://github.com/Traewelling/traewelling/pull/4675) |
| 2026-04-07 | `OperatorResource.id` is deprecated as integer: will become a UUID after 2026-09-30. prefer `uuid` instead while migration-period | 2026-09-30 | [#4676](https://github.com/Traewelling/traewelling/pull/4676) |
| 2026-05-14 | `POST /api/v1/trains/checkin` 409 response: `message.status_id` and `message.lineName` are deprecated. Use `data.conflicts` (full `StatusResource` array) instead | 2026-10-31 | [#4677](https://github.com/Traewelling/traewelling/pull/4677) |
| 2026-07-19 | `StopoverResource.id` is deprecated as station ID: it currently holds the station ID (not unique within a trip). Use `station` for station details. After the safe-until date `id` is repurposed to the unique stopover ID | 2026-11-30 | [#4959](https://github.com/Traewelling/traewelling/pull/4959) |
Expand All @@ -27,7 +26,7 @@ Check back here regularly to stay ahead of removals.

# 2026-10-17

Removed the following deprecated fields, announced in 2026-03:
Removed the following deprecated fields, announced in 2026-03 and 2026-04:

- `EventDetailsResource.trainDistance`: use `totalDistance` instead
- `EventDetailsResource.trainDuration`: use `totalDuration` instead
Expand All @@ -44,6 +43,7 @@ Removed the following deprecated fields, announced in 2026-03:
- `StopoverResource.arrival`: use `arrivalReal` (if not null) or `arrivalPlanned` instead
- `StopoverResource.departure`: use `departureReal` (if not null) or `departurePlanned` instead
- `StopoverResource.rilIdentifier` and `evaIdentifier`: were always `null`, use `station.identifiers` instead
- `OperatorResource.identifier`: legacy HAFAS operator ID, use the `identifiers` array instead

Removed the following deprecated endpoints, announced in 2026-03:

Expand Down
14 changes: 1 addition & 13 deletions app/Http/Resources/OperatorResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#[OA\Schema(
schema: 'OperatorResource',
required: ['type', 'id', 'uuid', 'identifier', 'name', 'identifiers'],
required: ['type', 'id', 'uuid', 'name', 'identifiers'],
properties: [
new OA\Property(property: 'type', type: 'string', example: 'operator'),
new OA\Property(
Expand All @@ -21,14 +21,6 @@
deprecated: true
),
new OA\Property(property: 'uuid', description: 'Stable UUID identifier for this operator.', type: 'string', format: 'uuid', example: '00000000-0000-0000-0000-000000000000'),
new OA\Property(
property: 'identifier',
description: 'Legacy HAFAS operator ID. Always NULL for new operators. Will be removed soon.',
type: 'string',
example: 'db-regio-ag-nord',
nullable: true,
deprecated: true
),
new OA\Property(property: 'name', type: 'string', example: 'DB Regio AG Nord'),
new OA\Property(
property: 'identifiers',
Expand All @@ -46,10 +38,6 @@ public function toArray($request): array
'type' => 'operator', // @see https://github.com/public-transport/friendly-public-transport-format/tree/master/spec
'id' => $this->legacy_id, // @deprecated: will become uuid after 2026-09-30
'uuid' => $this->id, // currently NOT deprecated. But deprecate it, when ID is available -> migration uuid to id
'identifier' => $this->when( // @deprecated: remove after 2026-09
$this->relationLoaded('identifiers'),
fn () => $this->identifiers->firstWhere('type', 'hafas')?->identifier
),
'name' => $this->name,
'identifiers' => $this->whenLoaded('identifiers', fn () => OperatorIdentifierResource::collection($this->identifiers)),
];
Expand Down
6 changes: 0 additions & 6 deletions resources/types/Api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1723,12 +1723,6 @@ export interface OperatorResource {
* @example "00000000-0000-0000-0000-000000000000"
*/
uuid: string;
/**
* Legacy HAFAS operator ID. Always NULL for new operators. Will be removed soon.
* @deprecated
* @example "db-regio-ag-nord"
*/
identifier: string | null;
/** @example "DB Regio AG Nord" */
name: string;
identifiers: OperatorIdentifierResource[];
Expand Down
8 changes: 0 additions & 8 deletions storage/api-docs/api-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -14473,7 +14473,6 @@
"type",
"id",
"uuid",
"identifier",
"name",
"identifiers"
],
Expand All @@ -14494,13 +14493,6 @@
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
},
"identifier": {
"description": "Legacy HAFAS operator ID. Always NULL for new operators. Will be removed soon.",
"type": "string",
"example": "db-regio-ag-nord",
"nullable": true,
"deprecated": true
},
"name": {
"type": "string",
"example": "DB Regio AG Nord"
Expand Down
Loading