Skip to content

Small inconsistency between creation and retrieval #1501

@LM-SR

Description

@LM-SR

During creation, the example provided reads
https://google.aip.dev/133#request-message

message CreateBookRequest {
 (...)
  // The ID to use for the book, which will become the final component of
  // the book's resource name.
  //
  // This value should be 4-63 characters, and valid characters
  // are /[a-z][0-9]-/.
  string book_id = 2 [(google.api.field_behavior) = REQUIRED];

  // The book to create.
  Book book = 3 [(google.api.field_behavior) = REQUIRED];
}

During retrieval, the example provided reads
https://google.aip.dev/131#request-message

message GetBookRequest {
  // The name of the book to retrieve.
  // Format: publishers/{publisher}/books/{book}
  (...)
}

The information that is requested in the path during retrieval is book_id (and made clear during creation), but the "format" comment states that this should be "book".

A potential simple solution would be to have a note that whenever specifying {book}, this is a reference to {book}_id and not to {book.name}. This would be nicer than replacing the "format" comment from {book} to {book_id}.

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