Commit bd252bc2 authored by kzangeli's avatar kzangeli
Browse files

fix(local): 001_02_02 EmptyJson expects BadRequestData, not InvalidRequest

The empty.jsonld fixture is `[]` — a syntactically VALID JSON document whose
content is not a valid Entity. Per TS 104-175 §8.2.3 (General NGSI-LD
validation), the error type depends on JSON validity:
  - body is not a valid JSON document        -> InvalidRequest
  - valid JSON, content not per the data type -> BadRequestData
`[]` parses as JSON, so the second rule applies: BadRequestData. (001_02_01
InvalidJson, whose fixture is genuinely malformed JSON, correctly keeps
InvalidRequest.)

This aligns the assertion with §8.2.3; an ETSI issue is filed upstream.
parent 789dc7ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ Test Template Create Entity With Invalid Request Scenarios
    invalid-json.jsonld    ${ERROR_TYPE_INVALID_REQUEST}
001_02_02 EmptyJson
    [Tags]    e-create    5_6_1
    empty.jsonld    ${ERROR_TYPE_INVALID_REQUEST}
    empty.jsonld    ${ERROR_TYPE_BAD_REQUEST_DATA}
001_02_03 EntityWithNoContext
    [Tags]    e-create    5_6_1
    building-minimal.json    ${ERROR_TYPE_BAD_REQUEST_DATA}