petterreinholdtsen / noark5-tester

Test Noark 5 Core REST API
3 stars 3 forks source link

Missing _links in response payloads of ny-* endpoints #29

Open ivaylomitrev opened 1 year ago

ivaylomitrev commented 1 year ago

We do get several

missing _links in GET {entity}/{systemId}/ny-{entity}

endpoints. The specification, however, only specifies that implementations must return "common data" as suggestions, but some entities may not contain code lists to be included in _links rendering it empty (and, thus, redundant).

Should the tester requirements then be made more lenient or is it expected that _links must be returned even if empty?

petterreinholdtsen commented 1 year ago

[ivaylomitrev]

Should the tester requirements then be made more lenient or is it expected that _links must be returned even if empty?

_links should be returned even if empty. I am aware that "JSON Hypertext Application Language" state that it is optional. It is not intended to be optional in N5TG.

For ny-* is implied by this part of chapter 6:

Strukturen (uten "_links" og felt med verdi «null») kan brukes som utgangspunkt for en POST når et nytt objekt skal opprettes.

-- Happy hacking Petter Reinholdtsen

ivaylomitrev commented 1 year ago

We will address this in our code, thank you!