|
| 1 | +--- |
| 2 | +openapi: 3.0.3 |
| 3 | +info: |
| 4 | + title: Library |
| 5 | + version: 1.0.0 |
| 6 | +paths: |
| 7 | + /publishers/{publisherId}/books/{bookId}: |
| 8 | + get: |
| 9 | + operationId: getBook |
| 10 | + description: Retrieve a single book. |
| 11 | + responses: |
| 12 | + 200: |
| 13 | + description: OK |
| 14 | + content: |
| 15 | + application/json: |
| 16 | + schema: |
| 17 | + $ref: '#/components/schemas/Book' |
| 18 | + /publishers/{publisherId}/books/{bookId}:listRevisions: |
| 19 | + get: |
| 20 | + operationId: listBookRevisions |
| 21 | + description: List all revisions of a single book. |
| 22 | + parameters: |
| 23 | + - name: maxPageSize |
| 24 | + in: query |
| 25 | + schema: |
| 26 | + type: int32 |
| 27 | + description: The maximum number of revisions to return per page. |
| 28 | + - name: pageToken |
| 29 | + in: query |
| 30 | + schema: |
| 31 | + type: string |
| 32 | + description: | |
| 33 | + The page token, received from a previous ListBookRevisions call. |
| 34 | + Provide this to retrieve the subsequent page. |
| 35 | + responses: |
| 36 | + 200: |
| 37 | + description: OK |
| 38 | + content: |
| 39 | + application/json: |
| 40 | + description: Response structure for listing book revisions. |
| 41 | + properties: |
| 42 | + books: |
| 43 | + type: array |
| 44 | + items: |
| 45 | + $ref: '#/components/schemas/Book' |
| 46 | + description: The revisions of the book. |
| 47 | + nextPageToken: |
| 48 | + type: string |
| 49 | + description: | |
| 50 | + A token that can be sent as `pageToken` to retrieve the |
| 51 | + next page. |
| 52 | +
|
| 53 | + If this field is omitted, there are no subsequent pages. |
| 54 | + /publishers/{publisherId}/books/{bookId}:tagRevision: |
| 55 | + post: |
| 56 | + operationId: tagBookRevision |
| 57 | + description: | |
| 58 | + Tag a single book revision with a user-specified tag. |
| 59 | + The tag may then be used in place of the canonical revision ID. |
| 60 | +
|
| 61 | + If a tag is sent that already exists, the tag will be removed from its |
| 62 | + original revision and assigned to the provided revision. |
| 63 | + requestBody: |
| 64 | + content: |
| 65 | + application/json: |
| 66 | + description: Request structure for tagging a book revision. |
| 67 | + properties: |
| 68 | + id: |
| 69 | + type: string |
| 70 | + description: | |
| 71 | + The ID of the book to be tagged, including the revision ID. |
| 72 | + required: true |
| 73 | + tag: |
| 74 | + type: string |
| 75 | + description: | |
| 76 | + The tag to apply. The tag should be at most 40 characters, |
| 77 | + and match `[a-z][a-z0-9-]{3,38}[a-z0-9]`. |
| 78 | + required: true |
| 79 | + responses: |
| 80 | + 200: |
| 81 | + description: OK |
| 82 | + content: |
| 83 | + application/json: |
| 84 | + schema: |
| 85 | + $ref: '#/components/schemas/Book' |
| 86 | +components: |
| 87 | + schema: |
| 88 | + Book: |
| 89 | + description: A representation of a single book. |
| 90 | + properties: |
| 91 | + id: |
| 92 | + type: string |
| 93 | + description: | |
| 94 | + The resource ID of the book. |
| 95 | + Format: publishers/{publisher}/books/{book} |
| 96 | + # Other fields... |
| 97 | + revisionId: |
| 98 | + type: string |
| 99 | + description: | |
| 100 | + The revision ID of the book. |
| 101 | + A new revision is committed whenever the book is changed in any way. |
| 102 | + The format is an 8-character hexadecimal string. |
| 103 | + revisionCreateTime: |
| 104 | + type: string |
| 105 | + format: datetime |
| 106 | + description: The timestamp when the revision was created. |
0 commit comments