Skip to content

Commit 98975cf

Browse files
committed
docs(ZMS): require routing.php for new zmsbackend API controllers
Call out that new controllers must be registered in zmsbackend/routing.php as part of the API-layer checklist.
1 parent 204beb1 commit 98975cf

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

docs/de/setup-and-development/getting-started/implement-a-user-story.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ flowchart TD
4545
schemaModel --> apiController[In API-Controller propagieren<br/><code>Api</code>-Ordner in <code>zmsbackend</code>]
4646
maybeController --> apiController
4747
apiController --> apiElse{"Muss ich sonst noch etwas<br/>in der <code>zmsbackend</code>-<br/>API-Schicht ändern?"}
48-
apiElse -->|Ja| apiMore[Routen, neue Endpunkte,<br/>Request-Handling, Statuscodes, …]
48+
apiElse -->|Ja| apiMore[Neuer Controller → in<br/><code>zmsbackend/routing.php</code> eintragen<br/>plus Request-Handling, Statuscodes, …]
4949
apiElse -->|Nein| apiDone[API-Schicht für diese Story fertig]
5050
apiMore --> apiDone
5151
end
@@ -136,6 +136,7 @@ Typisches Layout:
136136
- `zmsentities/schema/` — JSON Schema für Entities (und zugehörige Citizen-API-Schemas)
137137
- `zmsentities` PHP-Entity-Klassen — die Modelle zu diesen Schemas
138138
- `zmsbackend/src/Zmsbackend/.../Api/` — API-Controller, die diese Entities in Responses zurückgeben
139+
- `zmsbackend/routing.php` — Slim-Routen, die URL-Pfade an diese Controller binden
139140

140141
**Frage 4: Muss ich das JSON-Schema / Modell in `zmsentities` ändern oder ergänzen, damit ich die Änderung in der API-Controller-Response propagieren kann?**
141142

@@ -146,13 +147,14 @@ Typisches Layout:
146147

147148
Wenn die Response-Form stimmt, mache einen letzten Check der API-Oberfläche in `zmsbackend` (typisch unter `.../Api/`):
148149

149-
- neue oder geänderte Routen / Endpunkte
150+
- **neuer Controller** → du **musst** ihn in [`zmsbackend/routing.php`](https://github.com/it-at-m/eappointment/blob/main/zmsbackend/routing.php) registrieren (Slim-Route → Controller-Klasse); die Controller-Datei allein reicht nicht
151+
- neue oder geänderte Routen / Endpunkte für bestehende Controller (ebenfalls in `routing.php`)
150152
- Request-Parsing oder Validierung
151153
- welcher Service-Aufruf im Controller
152154
- HTTP-Statuscodes, Fehler oder Auth-/Rechteprüfungen
153155
- verwandte Controller, die denselben Contract einhalten müssen
154156

155-
- **Ja** — schließe diese API-Schicht-Änderungen ab, bevor du `zmsbackend` verlässt.
157+
- **Ja** — schließe diese API-Schicht-Änderungen ab (inkl. `routing.php`, wenn du einen Controller hinzugefügt hast), bevor du `zmsbackend` verlässt.
156158
- **Nein** — die API-Schicht ist für diese Story fertig.
157159

158160
Beide Antworten **schließen** den Backend-Pfad für diese Story. Weiter unter [Oberhalb der API](#oberhalb-der-api).

docs/en/setup-and-development/getting-started/implement-a-user-story.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ flowchart TD
4545
schemaModel --> apiController[Propagate in API controller<br/><code>Api</code> folders in <code>zmsbackend</code>]
4646
maybeController --> apiController
4747
apiController --> apiElse{"Do I need to change anything<br/>else in the <code>zmsbackend</code><br/>API layer?"}
48-
apiElse -->|Yes| apiMore[Routes, new endpoints,<br/>request handling, status codes, …]
48+
apiElse -->|Yes| apiMore[New controller → register in<br/><code>zmsbackend/routing.php</code><br/>plus request handling, status codes, …]
4949
apiElse -->|No| apiDone[API layer done for this story]
5050
apiMore --> apiDone
5151
end
@@ -136,6 +136,7 @@ Typical layout:
136136
- `zmsentities/schema/` — JSON Schema for entities (and related citizen API schemas)
137137
- `zmsentities` PHP entity classes — the models that follow those schemas
138138
- `zmsbackend/src/Zmsbackend/.../Api/` — API controllers that return those entities in responses
139+
- `zmsbackend/routing.php` — Slim routes that wire URL paths to those controllers
139140

140141
**Question 4: Do I need to change or add the JSON schema / model in `zmsentities` so I can propagate the changes in my API controller response?**
141142

@@ -146,13 +147,14 @@ Typical layout:
146147

147148
After the response shape is right, do a final pass on the API surface in `zmsbackend` (typically under `.../Api/`):
148149

149-
- new or changed routes / endpoints
150+
- **new controller** → you **must** register it in [`zmsbackend/routing.php`](https://github.com/it-at-m/eappointment/blob/main/zmsbackend/routing.php) (Slim route → controller class); a controller file alone is not enough
151+
- new or changed routes / endpoints for existing controllers (also in `routing.php`)
150152
- request parsing or validation
151153
- which service method the controller calls
152154
- HTTP status codes, errors, or auth/permission checks
153155
- related controllers that must stay consistent with the same contract
154156

155-
- **Yes** — finish those API-layer changes before leaving `zmsbackend`.
157+
- **Yes** — finish those API-layer changes (including `routing.php` when you added a controller) before leaving `zmsbackend`.
156158
- **No** — the API layer is done for this story.
157159

158160
Either answer **closes** the backend path for this story. Continue at [Above the API](#above-the-api).

0 commit comments

Comments
 (0)