Pitfalls & testing
- Failing a whole batch on one bad record. Reject the single record with
problems; apply the rest. - Treating
recordRefas your own id. It is the Consumer’s stable id — store it for upserts; return your id asexternalId. - Embedding/expecting file bytes in the payload. Documents transfer by reference; you fetch them.
- Skipping
sha256verification after downloading a document. - Omitting
audon the document-resolution JWT, or signing with a key not in your publishedjwks_uri— the Consumer will (correctly) reject the call. - Open dynamic registration. Always require a software statement or initial access token.
- Long-lived access tokens. Keep them short; rely on refresh.
- Non-idempotent ingest. Re-delivered batches must not create duplicate students.
- Translating the wrong things. Localize
title/description/detailonly — never property names, enumconstvalues, or errorcodes. Translating those breaks mapping and validation on the Consumer.
11. Testing tips
Section titled “11. Testing tips”- Start with discovery: a Consumer (or
curl) should parse your.well-knowndocument and find every endpoint it needs. - Exercise both the happy path and partial failure: a batch with one valid and one invalid record should
return
createdfor one andrejected(withproblems) for the other. - Replay the same batch with the same
Idempotency-Keyand confirm identical results and no duplicates. - If you localize, fetch the schema with
Accept-Language: sw-KEand an unsupported tag: confirm titles change,Content-Languagereflects what you returned (including thedefault_languagefallback), and property names + enum values are byte-for-byte identical across languages. - For documents, stand up a stub Consumer resolve endpoint that verifies your JWT (issuer +
aud+ yourjwks_uri) and returns a signed URL to a known file; confirm yoursha256check passes and fails correctly on a tampered file. - Run the steward’s published conformance suite for each level you claim before requesting certification.