Clarifying OAS List
Empty Fields
For fields that are empty, should they be omitted, empty stringed, or nulled?
GET /publishers/{publisher_id}/books?
{
"results": [{ ... }],
"next_page_token": "", -> empty string, null, or just omit the field?
"total_size": 1,
"unreachable": [], -> omit this?
}
Parents
For list endpoints in OAS, it appears that the parent field is not required in OAS, but it is in protobuf, at least according to AEP-132.
But AEP-122 says that it should have a field called parent. I believe that's protobuf specific again, but the page doesn't make that clear.
The question is, should there be some reference to the parent collection? Resources in the results all have path, so it's somewhat obvious looking at that where they come from in the heirarchy, so maybe not? If so, would this be parent or something else, like
{parent-resource-singular}: {path-to-parent-resource}
OR
collection: {path of request}
I would be ok with not having any parent listed, I just want to make certain that is the expectation. It could make sense to have it, so that every resource has path and every collection has parent.
Parents
For OAS, no, there shouldn't be a parent field in the response, nor the request.
I looked through 132 and I couldn't find, when you flip to the OAS tabs, any references that would imply that parent is required. So would the fix to this be adding an OAS tab to AEP-122?
Empty Fields
This question isn't exclusive to OAS list, is it?
The fields should be present with an empty value. I can't find a good place to put this, so perhaps it should be a new AEP (field existence?)
Sorry I think the confusion came from https://aep.dev/122/#fields-representing-a-resources-parent - this is proto specific but that page does not distinguish between OAS and proto.