File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -342,6 +342,12 @@ describe('CLI options testing', () => {
342
342
343
343
expect ( fs . readFileSync ( fileName , { encoding : 'utf-8' } ) ) . toMatchSnapshot ( ) ;
344
344
} ) ;
345
+
346
+ it ( 'should use brackets in a querystring urls arg, when the arg contains full stops' , async ( ) => {
347
+ const fileName = getTmpFileName ( ) ;
348
+ const result = await cli ( [ '-h' , `./test/fixtures/params.json` ] , '.' ) ;
349
+ expect ( result . stdout ) . toContain ( '`/api/v1/list/${queryArg["item.id"]}`' ) ;
350
+ } ) ;
345
351
} ) ;
346
352
347
353
describe ( 'yaml parsing' , ( ) => {
Original file line number Diff line number Diff line change
1
+ {
2
+ "swagger" : " 2.0" ,
3
+ "info" : {
4
+ "title" : " Params test" ,
5
+ "version" : " 0.1"
6
+ },
7
+ "schemes" : [" https" ],
8
+ "consumes" : [" application/json" ],
9
+ "produces" : [" application/json" ],
10
+ "paths" : {
11
+ "/api/v1/list/{item.id}" : {
12
+ "patch" : {
13
+ "responses" : {
14
+ "200" : {
15
+ "description" : " A successful response." ,
16
+ "schema" : {
17
+ "type" : " string"
18
+ }
19
+ }
20
+ },
21
+ "parameters" : [
22
+ {
23
+ "name" : " item.id" ,
24
+ "in" : " path" ,
25
+ "required" : true ,
26
+ "type" : " string"
27
+ }
28
+ ]
29
+ }
30
+ }
31
+ }
32
+ }
You can’t perform that action at this time.
0 commit comments