Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions aip/general/0122.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ the leading slash:
[`OUTPUT_ONLY`](./0203.md#output-only) field behavior classification.
- Resources **must not** expose tuples, self-links, or other forms of
resource identification.
- Resources **must** include their parent's resource name in their resource
names.
- All ID fields **should** be strings.

**Note:** Resource names as described here are used within the scope of a
Expand Down Expand Up @@ -322,6 +324,20 @@ message Book {
}
```

## Rationale

### Including the parent resource name in the resource name

It is a common use case to first look up the parent resource, then perform an
operation on a child. If the child does not incude the resource name of the
parent, the consumer of the resource must choose from a set of non-optimal
approaches to find the parent:

1. Perform a read of the child resource, then look up a custom field on the
child to find the parent (assuming such a field exists).
1. Require another field for their operation that specifies the parent of a
resource in addition to the child resource.

## Further reading

- For evolving resource names over time, see
Expand Down