@@ -112,52 +112,55 @@ module Envelopes # rubocop:todo Metrics/ModuleLength, Style/Documentation
112
112
end
113
113
end
114
114
115
- swagger_path '/{community_name}/envelopes/info ' do
116
- operation :get do
117
- key :operationId , 'getApiEnvelopesInfo '
118
- key :description , 'Gives general info about this community envelopes '
115
+ swagger_path '/{community_name}/envelopes/downloads ' do
116
+ operation :post do
117
+ key :operationId , 'postApiEnvelopesDownloads '
118
+ key :description , 'Starts new download '
119
119
key :produces , [ 'application/json' ]
120
120
key :tags , [ 'Envelopes' ]
121
121
122
122
parameter community_name
123
123
124
- response 200 do
125
- key :description , 'Gives general info about this community envelopes '
126
- schema { key :$ref , :EnvelopesInfo }
124
+ response 201 do
125
+ key :description , 'Download object '
126
+ schema { key :$ref , :EnvelopeDownload }
127
127
end
128
128
end
129
129
end
130
130
131
- swagger_path '/{community_name}/envelopes/{envelope_id}/verify ' do
132
- operation :patch do
133
- key :operationId , 'patchApiVerifyEnvelope '
134
- key :description , 'Updates verification date'
131
+ swagger_path '/{community_name}/envelopes/downloads/{id} ' do
132
+ operation :get do
133
+ key :operationId , 'getApiEnvelopesDownloads '
134
+ key :description , "Returns download's status and URL"
135
135
key :produces , [ 'application/json' ]
136
136
key :tags , [ 'Envelopes' ]
137
137
138
138
parameter community_name
139
- parameter envelope_id
140
-
141
- parameter do
142
- key :name , :body
143
- key :in , :body
144
- key :description , 'JSON object containing last_verified_on'
145
- key :required , true
139
+ parameter name : :id ,
140
+ in : :path ,
141
+ type : :string ,
142
+ required : true ,
143
+ description : 'Download ID'
146
144
147
- schema do
148
- key :type , :object
149
- property :last_verified_on do
150
- key :type , :string
151
- key :format , :date
152
- key :description , 'Last verification date'
153
- key :example , '2023-07-20'
154
- end
155
- end
145
+ response 200 do
146
+ key :description , 'Download object'
147
+ schema { key :$ref , :EnvelopeDownload }
156
148
end
149
+ end
150
+ end
151
+
152
+ swagger_path '/{community_name}/envelopes/info' do
153
+ operation :get do
154
+ key :operationId , 'getApiEnvelopesInfo'
155
+ key :description , 'Gives general info about this community envelopes'
156
+ key :produces , [ 'application/json' ]
157
+ key :tags , [ 'Envelopes' ]
158
+
159
+ parameter community_name
157
160
158
161
response 200 do
159
- key :description , 'Retrieves a specific envelope revision '
160
- schema { key :$ref , :Envelope }
162
+ key :description , 'Gives general info about this community envelopes '
163
+ schema { key :$ref , :EnvelopesInfo }
161
164
end
162
165
end
163
166
end
@@ -238,58 +241,55 @@ module Envelopes # rubocop:todo Metrics/ModuleLength, Style/Documentation
238
241
end
239
242
end
240
243
241
- swagger_path '/{community_name}/envelopes/downloads' do
242
- operation :post do
243
- key :operationId , 'postApiEnvelopesDownloads'
244
- key :description , 'Starts new download'
245
- key :produces , [ 'application/json' ]
246
- key :tags , [ 'Envelopes' ]
247
-
248
- parameter community_name
249
-
250
- response 201 do
251
- key :description , 'Download object'
252
- schema { key :$ref , :EnvelopeDownload }
253
- end
254
- end
255
- end
256
-
257
- swagger_path '/{community_name}/envelopes/downloads/{id}' do
244
+ swagger_path '/{community_name}/envelopes/{envelope_id}/revisions/{revision_id}' do
258
245
operation :get do
259
- key :operationId , 'getApiEnvelopesDownloads '
260
- key :description , "Returns download's status and URL"
246
+ key :operationId , 'getApiEnvelopeVersion '
247
+ key :description , 'Retrieves a specific envelope revision'
261
248
key :produces , [ 'application/json' ]
262
249
key :tags , [ 'Envelopes' ]
263
250
264
251
parameter community_name
265
- parameter name : :id ,
252
+ parameter envelope_id
253
+ parameter include_deleted
254
+ parameter name : :revision_id ,
266
255
in : :path ,
267
256
type : :string ,
268
257
required : true ,
269
- description : 'Download ID '
258
+ description : 'Unique revision identifier '
270
259
271
260
response 200 do
272
- key :description , 'Download object '
273
- schema { key :$ref , :EnvelopeDownload }
261
+ key :description , 'Retrieves a specific envelope revision '
262
+ schema { key :$ref , :Envelope }
274
263
end
275
264
end
276
265
end
277
266
278
- swagger_path '/{community_name}/envelopes/{envelope_id}/revisions/{revision_id} ' do
279
- operation :get do
280
- key :operationId , 'getApiEnvelopeVersion '
281
- key :description , 'Retrieves a specific envelope revision '
267
+ swagger_path '/{community_name}/envelopes/{envelope_id}/verify ' do
268
+ operation :patch do
269
+ key :operationId , 'patchApiVerifyEnvelope '
270
+ key :description , 'Updates verification date '
282
271
key :produces , [ 'application/json' ]
283
272
key :tags , [ 'Envelopes' ]
284
273
285
274
parameter community_name
286
275
parameter envelope_id
287
- parameter include_deleted
288
- parameter name : :revision_id ,
289
- in : :path ,
290
- type : :string ,
291
- required : true ,
292
- description : 'Unique revision identifier'
276
+
277
+ parameter do
278
+ key :name , :body
279
+ key :in , :body
280
+ key :description , 'JSON object containing last_verified_on'
281
+ key :required , true
282
+
283
+ schema do
284
+ key :type , :object
285
+ property :last_verified_on do
286
+ key :type , :string
287
+ key :format , :date
288
+ key :description , 'Last verification date'
289
+ key :example , '2023-07-20'
290
+ end
291
+ end
292
+ end
293
293
294
294
response 200 do
295
295
key :description , 'Retrieves a specific envelope revision'
0 commit comments