Result of `hdf/attrs` endpoint is not consistent with the API doc
loichuder opened this issue ยท 3 comments
According to the API doc, the endpoint should directly return the attributes as a dictionary
Currently, it returns:
{
name,
type,
attrs
}
with attrs
the actual attribute dict.
I can fix it but I was not sure what was your intention ๐
When I rewrote the API, at some point I decided that all of the endpoints should return at least name
and type
, for consistency. But then I guess I forgot about that when writing the API doc :)
@loichuder So the question is, do I change the behavior to match the docs, or the docs to match the behavior? I'll think about it for a bit, but which makes more sense to you?
If I had to choose, I would leave name
and type
to the dedicated endpoints (contents
and meta
) and remove it from attrs
.
Moreover, as we are discussing on the first point of #53, the attrs
endpoint might need to return the type of attributes so it would be clearer to remove the type
of the original entity.
I'm convinced. I'll change the backend to match the docs