Pular para o conteúdo
#0765
Exec

The API class grades against the spec

Backend course, week eight: ship an endpoint. Each student writes an exec script in their container; saving it makes it a URL.

Grading doesn't read the code first. It reads the contract: POST /api/v1/exec/user-openapi/generate builds an OpenAPI document from the student's scripts, and GET /user-openapi/spec serves it. The rubric is mechanical: your endpoint appears in the spec, your schema validates, your routes answer what they declare. The instructor's checker walks forty specs before breakfast.

Students learn the part tutorials skip: an API isn't the code, it's the contract. And this contract isn't a document someone forgot to update: it's generated from what's actually deployed.

The assignment ships when the spec says so.