Skip to content

Clarifying OAS List #325

@thegagne

Description

@thegagne

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions