fix(003_06, 003_08): a batch whose @context and Content-Type do not match is a 400 for the whole request

TS 104-176 clause 6.2.4: with Content-Type: application/json, an @context in the payload body raises BadRequestData; with application/ld+json, a body without @context does.

The mismatch is a property of the request - its header and its body - not of one entity in the batch. So the answer is a 400 with a ProblemDetails body, not a 207 with a per-entity error.

  • 003_06_01: JSON Content-Type, entities carrying @context -> 400 BadRequestData
  • 003_08_01: JSON-LD Content-Type, entities without @context -> 400 BadRequestData

2 Test Cases, expectations only (status code and where the ProblemDetails is read). Both fail on develop and pass with this MR against a broker that follows clause 6.2.4.

Merge request reports

Loading
Loading