File tree Expand file tree Collapse file tree 2 files changed +37
-6
lines changed Expand file tree Collapse file tree 2 files changed +37
-6
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,18 @@ class FeedbackController < Api::V8::BaseController
19
19
schema do
20
20
key :title , :status
21
21
key :required , [ :status ]
22
- property :status , type : :string , example : 'ok'
23
- key :answers , :array
24
- items do
25
- key :answer , :string
26
- key :answer , :integer
27
- end
22
+ property :status do
23
+ key :type , :array
24
+ items do
25
+ key :type , :object
26
+ property :answer do
27
+ key :type , :string
28
+ end
29
+ property :question_id do
30
+ key :type , :integer
31
+ end
32
+ end
33
+ end
28
34
end
29
35
end
30
36
response 403 , '$ref' : '#/responses/error'
Original file line number Diff line number Diff line change @@ -10,6 +10,15 @@ class BasicInfoByUsernamesController < Api::V8::BaseController
10
10
operation :post do
11
11
key :description , 'Find all users\' basic infos with the posted json array of usernames'
12
12
key :operationId , 'findUsersBasicInfoByUsernames'
13
+ parameter do
14
+ key :name , :usernames
15
+ key :in , :body
16
+ key :description , 'usernames for which to find basic infos'
17
+ key :required , true
18
+ schema do
19
+ key :'$ref' , :UsernamesInput
20
+ end
21
+ end
13
22
key :produces , [
14
23
'application/json'
15
24
]
@@ -31,6 +40,22 @@ class BasicInfoByUsernamesController < Api::V8::BaseController
31
40
end
32
41
end
33
42
43
+ swagger_schema :UsernamesInput do
44
+ allOf do
45
+ schema do
46
+ property :usernames do
47
+ key :type , :array
48
+ items do
49
+ key :type , :string
50
+ property :username do
51
+ key :type , :string
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+
34
59
35
60
skip_authorization_check
36
61
You can’t perform that action at this time.
0 commit comments