55 version : 1.0.0
66paths :
77 /publishers/{publisherId}/books/{bookId} :
8+ parameters :
9+ - $ref : " #/components/parameters/PublisherId"
10+ - $ref : " #/components/parameters/BookId"
811 get :
912 operationId : getBook
1013 description : Retrieve a single book.
1114 responses :
12- 200 :
15+ ' 200 ' :
1316 description : OK
1417 content :
1518 application/json :
1619 schema :
1720 $ref : ' #/components/schemas/Book'
21+
1822 /publishers/{publisherId}/books/{bookId}:listRevisions :
23+ parameters :
24+ - $ref : " #/components/parameters/PublisherId"
25+ - $ref : " #/components/parameters/BookId"
1926 get :
2027 operationId : listBookRevisions
2128 description : List all revisions of a single book.
2229 parameters :
2330 - name : maxPageSize
2431 in : query
2532 schema :
26- type : int32
33+ type : integer
34+ format : int32
2735 description : The maximum number of revisions to return per page.
2836 - name : pageToken
2937 in : query
@@ -33,25 +41,32 @@ paths:
3341 The page token, received from a previous ListBookRevisions call.
3442 Provide this to retrieve the subsequent page.
3543 responses :
36- 200 :
44+ ' 200 ' :
3745 description : OK
3846 content :
3947 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.
48+ schema :
49+ description : Response structure for listing book revisions.
50+ type : object
51+ properties :
52+ books :
53+ type : array
54+ items :
55+ $ref : ' #/components/schemas/Book'
56+ description : The revisions of the book.
57+ nextPageToken :
58+ type : string
59+ description : |
60+ A token that can be sent as `pageToken` to retrieve the
61+ next page.
62+
63+ If this field is omitted, there are no subsequent pages.
5264
53- If this field is omitted, there are no subsequent pages.
5465 /publishers/{publisherId}/books/{bookId}@{revisionId}:tagRevision :
66+ parameters :
67+ - $ref : " #/components/parameters/PublisherId"
68+ - $ref : " #/components/parameters/BookId"
69+ - $ref : " #/components/parameters/RevisionId"
5570 post :
5671 operationId : tagBookRevision
5772 description : |
@@ -63,40 +78,56 @@ paths:
6378 requestBody :
6479 content :
6580 application/json :
66- description : Request structure for tagging a book revision.
67- properties :
68- tag :
69- type : string
70- description : |
71- The tag to apply. The tag should be at most 40 characters,
72- and match `[a-z][a-z0-9-]{3,38}[a-z0-9]`.
73- required : true
81+ schema :
82+ description : Request structure for tagging a book revision.
83+ type : object
84+ properties :
85+ tag :
86+ type : string
87+ description : |
88+ The tag to apply.
89+ maxLength : 40
90+ pattern : " ^[a-z][a-z0-9-]*[a-z0-9]$"
91+ required : ["tag"]
7492 responses :
75- 200 :
93+ ' 200 ' :
7694 description : OK
7795 content :
7896 application/json :
7997 schema :
8098 $ref : ' #/components/schemas/Book'
99+
81100 /publishers/{publisherId}/books/{bookId}@{revisionId}:deleteRevision :
101+ parameters :
102+ - $ref : " #/components/parameters/PublisherId"
103+ - $ref : " #/components/parameters/BookId"
104+ - $ref : " #/components/parameters/RevisionId"
82105 delete :
83106 operationId : deleteBookRevision
84107 description : Delete a single revision of this book.
85108 responses :
86- 200 :
87- description : OK
109+ ' 204 ' :
110+ description : Revision deleted
111+
88112 /publishers/{publisherId}/books/{bookId}:commit :
113+ parameters :
114+ - $ref : " #/components/parameters/PublisherId"
115+ - $ref : " #/components/parameters/BookId"
89116 post :
90117 operationId : commitBook
91118 description : Save a new, discrete revision snapshot of the given book.
92119 responses :
93- 200 :
120+ ' 200 ' :
94121 description : OK
95122 content :
96123 application/json :
97124 schema :
98125 $ref : ' #/components/schemas/Book'
126+
99127 /publishers/{publisherId}/books/{bookId}:rollback :
128+ parameters :
129+ - $ref : " #/components/parameters/PublisherId"
130+ - $ref : " #/components/parameters/BookId"
100131 post :
101132 operationId : rollbackBook
102133 description : |
@@ -105,28 +136,54 @@ paths:
105136 This creates a new revision, with a new revision ID, with the contents
106137 of the provided revision, as the most recent revision in the sequence.
107138 requestBody :
139+ required : true
108140 content :
109141 application/json :
110- description : |
111- Request structure for rolling back a book to a previous revision.
112- properties :
113- revisionId :
114- type : string
115- description : |
116- The revision ID to roll back to.
117- It must be a revision of the same book.
142+ schema :
143+ description : |
144+ Request structure for rolling back a book to a previous revision.
145+ type : object
146+ properties :
147+ revisionId :
148+ type : string
149+ description : |
150+ The revision ID to roll back to.
151+ It must be a revision of the same book.
152+ example : c7cfa2a8
153+ required : ["revisionId"]
118154
119- Example: c7cfa2a8
120- required : true
121155 responses :
122- 200 :
156+ ' 200 ' :
123157 description : OK
124158 content :
125159 application/json :
126160 schema :
127161 $ref : ' #/components/schemas/Book'
162+
128163components :
129- schema :
164+ parameters :
165+ PublisherId :
166+ name : publisherId
167+ in : path
168+ description : The id of the book publisher.
169+ required : true
170+ schema :
171+ type : string
172+ BookId :
173+ name : bookId
174+ in : path
175+ description : The id of the book.
176+ required : true
177+ schema :
178+ type : string
179+ RevisionId :
180+ name : revisionId
181+ in : path
182+ description : The id of a revision of the book.
183+ required : true
184+ schema :
185+ type : string
186+ schemas :
130187 Book :
131188 description : A representation of a single book.
132189 properties :
@@ -144,5 +201,5 @@ components:
144201 The format is an 8-character hexadecimal string.
145202 revisionCreateTime :
146203 type : string
147- format : datetime
204+ format : date-time
148205 description : The timestamp when the revision was created.
0 commit comments