Week 4 Part II · API and Persistence
Instructor lesson plan: lecture (2 h) and practice (2 h).
ASP.NET CoreSwagger / OpenAPIFluentValidationProblemDetails
| 0:00-0:15 | 15 min | HTTP and API design recapResources, verbs, status codes, idempotency, and JSON contracts. |
| 0:15-0:40 | 25 min | ASP.NET Core request pipeline
|
| 0:40-1:05 | 25 min | Controllers and Minimal APIsWhen each style is appropriate and how to keep the API layer thin. |
| 1:05-1:15 | 10 min | Swagger and OpenAPIAPI documentation as a contract with clients. |
| 1:15-1:25 | 10 min | Break |
| 1:25-1:50 | 25 min | DTOs and validation
|
| 1:50-2:00 | 10 min | Project previewFirst project endpoints needed for the proposal presentation. |
Students often think: the controller is where the business logic goes.
Set it straight: controllers translate HTTP into application calls. Business behavior belongs behind the API layer.
| 0:00-0:20 | 20 min | Create API projectAdd ASP.NET Core API project to the solution and run Swagger locally. |
| 0:20-0:55 | 35 min | First endpoints
|
| 0:55-1:10 | 15 min | ValidationAdd request validation and inspect failure responses. |
| 1:10-1:20 | 10 min | Break |
| 1:20-1:50 | 30 min | OpenAPI reviewTeams review each other's API contract and name one ambiguity. |
| 1:50-2:00 | 10 min | Project-integration briefPrepare API screenshots and endpoint list for Proposal Presentation. |