Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions aep/general/0004/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ APIs **must** annotate the resource types for each resource in the API

{% tab proto %}

For protobuf, use the [`google.api.resource`][resource] annotation:
For protobuf, use the [`aep.api.resource`][resource] annotation:

```proto
// A representation of a user event.
message UserEvent {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "user.example.com/user-event"
singular: "user-event"
plural: "user-events"
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0008/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ clients or their authors, including but not limited to:
Examples of enhancements include:

- Requiring new proto annotations that enable more descriptive interfaces on
clients (e.g. requiring `singular` and `plural` on a `google.api.resource`
clients (e.g. requiring `singular` and `plural` on a `aep.api.resource`
annotation).

AEP guidance **must not** be a significant detriment to a client's usability or
Expand Down
8 changes: 4 additions & 4 deletions aep/general/0122/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -191,13 +191,13 @@ and the full resource path does not change between these.

When defining a resource, the first field **should** be the resource path,
which **must** be of type `string` and **must** be called `path` for the
resource path. The message **should** include a `google.api.resource`
annotation declaring the type (see AEP-4 for more on this).
resource path. The message **should** include a `aep.api.resource` annotation
declaring the type (see AEP-4 for more on this).

```proto
// A representation of a book in the library.
message Book {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "apis.example.com/library/Book"
pattern: "publishers/{publisher_id}/books/{book_id}"
};
Expand Down Expand Up @@ -296,7 +296,7 @@ When referencing a resource path for a different resource:
```proto
// A representation of a book in a library.
message Book {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "apis.example.com/library/Book"
pattern: "publishers/{publisher_id}/books/{book_id}"
};
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0124/embedded_resource.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "google/api/resource.proto";
message Book {
// The resource path pattern for Book indicates that Publisher is the
// canonical parent.
option (google.api.resource) = {
option (aep.api.resource) = {
type: "library.googleapis.com/Book"
pattern: "publishers/{publisher_id}/books/{book_id}"
};
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0124/many_to_many_repeated.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "google/api/field_behavior.proto";
import "google/api/resource.proto";

message Book {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "library.googleapis.com/Book"
pattern: "publishers/{publisher_id}/books/{book_id}"
};
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0124/many_to_many_subresource.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "google/api/resource.proto";
message BookAuthor {
// The resource pattern for BookAuthor indicates that Book is the
// canonical parent.
option (google.api.resource) = {
option (aep.api.resource) = {
type: "library.googleapis.com/BookAuthor"
pattern: "publishers/{publisher_id}/books/{book_id}/authors/{book_author}"
};
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0124/multiple_many_to_one.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "google/api/resource.proto";
message Book {
// The resource path pattern for Book indicates that Publisher is the
// canonical parent.
option (google.api.resource) = {
option (aep.api.resource) = {
type: "library.googleapis.com/Book"
pattern: "publishers/{publisher_id}/books/{book_id}"
};
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0126/enum.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import "google/api/resource.proto";

// A representation of a book.
message Book {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "library.googleapis.com/Book"
pattern: "publishers/{publisher_id}/books/{book_id}"
};
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0136/library.proto
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ message SortBooksResponse {}

// A representation of a single book.
message Book {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "library.googleapis.com/Book"
pattern: "publishers/{publisher_id}/books/{book_id}"
};
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0144/add_remove.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ message RemoveAuthorRequest {

// A representation of a single book.
message Book {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "library.googleapis.com/Book"
pattern: "publishers/{publisher_id}/books/{book_id}"
};
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0144/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Resources **may** use array fields where appropriate.

```proto
message Book {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "library.googleapis.com/Book"
pattern: "publishers/{publisher_id}/books/{book_id}"
};
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0156/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For example:

```proto
message Config {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "api.example.com/Config"
pattern: "users/{user}/config"
};
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0164/undelete.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ message UndeleteBookRequest {

// A representation of a single book.
message Book {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "library.googleapis.com/Book"
pattern: "publishers/{publisher_id}/books/{book_id}"
};
Expand Down
6 changes: 3 additions & 3 deletions aep/general/0180/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ For example:

```proto
message Book {
// google.api.resource and other annotations and fields
// aep.api.resource and other annotations and fields

// The genre of the book
// If this is not set when the book is created, the field will be given a value of FICTION.
Expand All @@ -164,7 +164,7 @@ Changing to:

```proto
message Book {
// google.api.resource and other annotations and fields
// aep.api.resource and other annotations and fields

// The genre of the book
// If this is not set when the book is created, the field will be given a value of NONFICTION.
Expand Down Expand Up @@ -192,7 +192,7 @@ Consider the following proto, where the default value of `wheels` is `2`:
```proto
// A representation of an automobile
message Automobile {
// google.api.resource and other annotations and fields
// aep.api.resource and other annotations and fields

// The number of wheels on the automobile.
// The default value is 2, when no value is sent by the client.
Expand Down
2 changes: 1 addition & 1 deletion aep/general/0214/aep.md.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ library.

```proto
message ExpiringResource {
// google.api.resource and other annotations and fields
// aep.api.resource and other annotations and fields

oneof expiration {
// Timestamp in UTC of when this resource is considered expired.
Expand Down
8 changes: 6 additions & 2 deletions aep/general/example.oas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ components:
properties:
family_name:
type: string
x-aep-field-number: 2
given_name:
type: string
x-aep-field-number: 1
type: object
type: array
edition:
Expand Down Expand Up @@ -43,6 +41,7 @@ components:
- publishers/{publisher_id}/books/{book_id}
plural: books
singular: book
type: bookstore.example.com/book
book-edition:
properties:
display_name:
Expand All @@ -62,6 +61,7 @@ components:
- publishers/{publisher_id}/books/{book_id}/editions/{book_edition_id}
plural: book-editions
singular: book-edition
type: bookstore.example.com/book-edition
isbn:
properties:
path:
Expand All @@ -75,6 +75,7 @@ components:
- isbns/{isbn_id}
plural: isbns
singular: isbn
type: bookstore.example.com/isbn
item:
properties:
book:
Expand All @@ -101,6 +102,7 @@ components:
- stores/{store_id}/items/{item_id}
plural: items
singular: item
type: bookstore.example.com/item
publisher:
properties:
description:
Expand All @@ -116,6 +118,7 @@ components:
- publishers/{publisher_id}
plural: publishers
singular: publisher
type: bookstore.example.com/publisher
store:
properties:
description:
Expand All @@ -135,6 +138,7 @@ components:
- stores/{store_id}
plural: stores
singular: store
type: bookstore.example.com/store
info:
contact:
email: aepsupport@aep.dev
Expand Down
26 changes: 13 additions & 13 deletions aep/general/example.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ package example.bookstore.v1;

import "aep/api/field_info.proto";
import "aep/api/operation.proto";
import "aep/api/resource.proto";
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";

Expand Down Expand Up @@ -274,11 +274,11 @@ service Bookstore {

// A Book.
message Book {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "bookstore.example.com/book"
pattern: ["publishers/{publisher_id}/books/{book_id}"]
plural: "books"
singular: "book"
plural: "books"
};

// A Author.
Expand Down Expand Up @@ -331,11 +331,11 @@ message Book {

// A BookEdition.
message BookEdition {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "bookstore.example.com/book-edition"
pattern: ["publishers/{publisher_id}/books/{book_id}/editions/{book_edition_id}"]
plural: "book-editions"
singular: "book-edition"
plural: "book-editions"
};

// Field for display_name.
Expand All @@ -353,11 +353,11 @@ message BookEdition {

// A Isbn.
message Isbn {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "bookstore.example.com/isbn"
pattern: ["isbns/{isbn_id}"]
plural: "isbns"
singular: "isbn"
plural: "isbns"
};

// Field for path.
Expand All @@ -366,11 +366,11 @@ message Isbn {

// A Item.
message Item {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "bookstore.example.com/item"
pattern: ["stores/{store_id}/items/{item_id}"]
plural: "items"
singular: "item"
plural: "items"
};

// Field for book.
Expand Down Expand Up @@ -398,11 +398,11 @@ message Item {

// A Publisher.
message Publisher {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "bookstore.example.com/publisher"
pattern: ["publishers/{publisher_id}"]
plural: "publishers"
singular: "publisher"
plural: "publishers"
};

// Field for description.
Expand All @@ -414,11 +414,11 @@ message Publisher {

// A Store.
message Store {
option (google.api.resource) = {
option (aep.api.resource) = {
type: "bookstore.example.com/store"
pattern: ["stores/{store_id}"]
plural: "stores"
singular: "store"
plural: "stores"
};

// Field for name.
Expand Down