diff --git a/arrays/index.html b/arrays/index.html index f2f23b3..d0d67c1 100644 --- a/arrays/index.html +++ b/arrays/index.html @@ -122,7 +122,7 @@

Update strategies

(meaning that order does not matter, duplicate values are not meaningful, and non-comparable values such as null or NaN are not used), the API should define custom methods using the verbs Add and Remove:

-
rpc AddAuthor(AddAuthorRequest) returns (Book) {
option (google.api.http) = {
post: "/v1/{book=publishers/*/books/*}:addAuthor"
body: "*"
};
}
+
rpc AddAuthor(AddAuthorRequest) returns (Book) {
option (google.api.http) = {
post: "/v1/{book=publishers/*/books/*}:addAuthor"
body: "*"
};
}
rpc RemoveAuthor(RemoveAuthorRequest) returns (Book) {
option (google.api.http) = {
post: "/v1/{book=publishers/*/books/*}:removeAuthor"
body: "*"
};
}
  • The data being added or removed should be a primitive (usually a @@ -207,7 +207,7 @@

    Update strategies

    Request Structure

    -
    message AddAuthorRequest {
    // The name of the book to add an author to.
    string book = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference).type = "library.googleapis.com/Book"
    ];
    +
    message AddAuthorRequest {
    // The name of the book to add an author to.
    string book = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference).type = "library.googleapis.com/Book"
    ];
    // The author to be added.
    string author = 2 [(google.api.field_behavior) = REQUIRED];
    }
    message RemoveAuthorRequest {
    // The name of the book to remove an author from.
    string book = 1 [
    (google.api.field_behavior) = REQUIRED,
    (google.api.resource_reference).type = "library.googleapis.com/Book"
    ];
    // The author to be removed.
    string author = 2 [(google.api.field_behavior) = REQUIRED];
    }
      diff --git a/get/index.html b/get/index.html index dca0613..308d2e4 100644 --- a/get/index.html +++ b/get/index.html @@ -112,7 +112,7 @@

      Errors

      If the user does have proper permission, but the requested resource does not exist, the service must reply with an HTTP 404 error.

      Interface Definitions

      -

      Get operations are specified using the following pattern:

      rpc GetBook(GetBookRequest) returns (Book) {
      option (google.api.http) = {
      get: "/v1/{path=publishers/*/books/*}"
      };
      option (google.api.method_signature) = "path";
      }
        +

        Get operations are specified using the following pattern:

        rpc GetBook(GetBookRequest) returns (Book) {
        option (google.api.http) = {
        get: "/v1/{path=publishers/*/books/*}"
        };
        option (google.api.method_signature) = "path";
        }
        • The RPC’s name must begin with the word Get. The remainder of the RPC name should be the singular form of the resource’s message name.
        • The request message must match the RPC name, with a Request suffix.
        • @@ -131,7 +131,7 @@

          Interface Definitions

        • There must not be a body key in the google.api.http annotation.
        • There should be exactly one google.api.method_signature annotation, with a value of "path".
        • -

        Get operations also implement a common request message pattern:

        message GetBookRequest {
        // The path of the book to retrieve.
        string path = 1 [
        (google.api.field_behavior) = REQUIRED,
        (google.api.resource_reference) = {
        type: "library.googleapis.com/Book"
        }];
        }
          +

        Get operations also implement a common request message pattern:

        message GetBookRequest {
        // The path of the book to retrieve.
        string path = 1 [
        (google.api.field_behavior) = REQUIRED,
        (google.api.resource_reference) = {
        type: "library.googleapis.com/Book"
        }];
        }
        • A resource path field must be included. It should be called path.
          • The field should be annotated as REQUIRED.