diff --git a/API_CHANGELOG.md b/API_CHANGELOG.md index 754d24dae..77ab8610c 100644 --- a/API_CHANGELOG.md +++ b/API_CHANGELOG.md @@ -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) | @@ -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 @@ -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: diff --git a/app/Http/Resources/OperatorResource.php b/app/Http/Resources/OperatorResource.php index 5bcaa3671..ff677be6c 100644 --- a/app/Http/Resources/OperatorResource.php +++ b/app/Http/Resources/OperatorResource.php @@ -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( @@ -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', @@ -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)), ]; diff --git a/resources/types/Api.gen.ts b/resources/types/Api.gen.ts index 403764811..1df57addd 100644 --- a/resources/types/Api.gen.ts +++ b/resources/types/Api.gen.ts @@ -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[]; diff --git a/storage/api-docs/api-docs.json b/storage/api-docs/api-docs.json index 482c5f52a..bab41a411 100644 --- a/storage/api-docs/api-docs.json +++ b/storage/api-docs/api-docs.json @@ -14473,7 +14473,6 @@ "type", "id", "uuid", - "identifier", "name", "identifiers" ], @@ -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"