File tree Expand file tree Collapse file tree 2 files changed +36
-7
lines changed Expand file tree Collapse file tree 2 files changed +36
-7
lines changed Original file line number Diff line number Diff line change 9
9
get :
10
10
parameters :
11
11
- name : spacecraftId
12
- description : PATH_PARAM_DESCRIPTION
12
+ description : " Required spacecraftId path param "
13
13
in : path
14
14
required : true
15
15
schema :
16
16
type : string
17
+ - name : pathParamOptional
18
+ description : " Path param optional description"
19
+ in : path
20
+ required : false
21
+ schema :
22
+ type : string
17
23
- name : limit
18
24
in : query
19
- description : QUERY_PARAM_DESCRIPTION
25
+ description : " QUERY PARAM DESCRIPTION"
26
+ required : true
27
+ schema :
28
+ type : integer
29
+ format : int32
30
+ - name : optionalQueryParam
31
+ in : query
32
+ description : " QUERY PARAM Optional"
20
33
required : false
21
34
schema :
22
35
type : integer
23
36
format : int32
24
37
- name : page
25
38
in : header
26
- description : " HEADER_DESCRIPTION_NOT_PRESENT"
39
+ description : " HEADER PARAM DESCRIPTION"
40
+ required : true
41
+ schema :
42
+ type : string
43
+ - name : offset
44
+ in : header
45
+ description : " HEADER PARAM Optional"
27
46
required : false
28
47
schema :
29
48
type : string
49
+
30
50
summary : Read a spacecraft
31
51
responses :
32
52
" 201 " :
Original file line number Diff line number Diff line change @@ -1177,13 +1177,22 @@ describe('The convert v2 Function', function() {
1177
1177
Converter . convertV2 ( { type : 'string' , data : openapi } ,
1178
1178
{ } , ( err , conversionResult ) => {
1179
1179
expect ( conversionResult . output [ 0 ] . data . item [ 0 ] . item [ 0 ] . item [ 0 ] . request . url . query [ 0 ] . description . content ) . to . equal (
1180
- 'QUERY PARAM DESCRIPTION'
1180
+ '(Required) QUERY PARAM DESCRIPTION'
1181
+ ) ;
1182
+ expect ( conversionResult . output [ 0 ] . data . item [ 0 ] . item [ 0 ] . item [ 0 ] . request . url . query [ 1 ] . description . content ) . to . equal (
1183
+ 'QUERY PARAM Optional'
1181
1184
) ;
1182
1185
expect ( conversionResult . output [ 0 ] . data . item [ 0 ] . item [ 0 ] . item [ 0 ] . request . url . variable [ 0 ] . description ) . to . equal (
1183
- 'PATH PARAM DESCRIPTION'
1186
+ '(Required) Required spacecraftId path param'
1187
+ ) ;
1188
+ expect ( conversionResult . output [ 0 ] . data . item [ 0 ] . item [ 0 ] . item [ 0 ] . request . url . variable [ 1 ] . description ) . to . equal (
1189
+ 'Path param optional description'
1190
+ ) ;
1191
+ expect ( conversionResult . output [ 0 ] . data . item [ 0 ] . item [ 0 ] . item [ 0 ] . request . header [ 0 ] . description . content ) . to . equal (
1192
+ '(Required) HEADER PARAM DESCRIPTION'
1184
1193
) ;
1185
- expect ( conversionResult . output [ 0 ] . data . item [ 0 ] . item [ 0 ] . item [ 0 ] . request . url . header [ 0 ] . description ) . to . equal (
1186
- 'HEADER PARAM DESCRIPTION '
1194
+ expect ( conversionResult . output [ 0 ] . data . item [ 0 ] . item [ 0 ] . item [ 0 ] . request . header [ 1 ] . description . content ) . to . equal (
1195
+ 'HEADER PARAM Optional '
1187
1196
) ;
1188
1197
done ( ) ;
1189
1198
} ) ;
You can’t perform that action at this time.
0 commit comments