File tree Expand file tree Collapse file tree 3 files changed +32
-4
lines changed
src/main/resources/mustache/typescript-fetch Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change
1
+ { {> licenseInfo} }
2
+
3
+ import * as api from "./api"
4
+
5
+ { {#apiInfo} }
6
+ { {#apis} }
7
+ { {#operations} }
8
+ describe("{ {classname} }", () => {
9
+ let instance: api.{{classname} }
10
+ beforeEach(function() {
11
+ instance = new api.{{classname} }()
12
+ });
13
+
14
+ { {#operation} }
15
+ test("{ {operationId} }", () => {
16
+ {{#allParams} }
17
+ const { {{paramName} }}: { {^isPrimitiveType} }api.{ {/isPrimitiveType} }{ {{dataType} }} = { {#example} }{ {#isString} }"{ {{example} }}"{ {/isString} }{ {^isString} }{ {{example} }}{ {/isString} }{ {/example} }{ {^example} }undefined{ {/example} }
18
+ { {/allParams} }
19
+ expect(instance.{ {operationId} }({ {#allParams} }{ {{paramName} }}, { {/allParams} }{ } )).toBe(null)
20
+ })
21
+ { {/operation} }
22
+ })
23
+
24
+ { {/operations} }
25
+ { {/apis} }
26
+ { {/apiInfo} }
Original file line number Diff line number Diff line change 5
5
* { {#version} }OpenAPI spec version: { {{version} }}{ {/version} }
6
6
* { {#infoEmail} }Contact: { {{infoEmail} }}{ {/infoEmail} }
7
7
*
8
- * NOTE: This class is auto generated by the swagger code generator program.
8
+ * NOTE: This file is auto generated by the swagger code generator program.
9
9
* https://github.com/swagger-api/swagger-codegen.git
10
- * Do not edit the class manually.
10
+ * Do not edit the file manually.
11
11
*/
Original file line number Diff line number Diff line change 20
20
" portable-fetch" : " ^3.0.0"
21
21
} ,
22
22
"devDependencies": {
23
- " @types/node" : " ^8.0.9" ,
24
- " typescript" : " ^2.0"
23
+ " @types/jest" : " ^25.2.1" ,
24
+ " @types/node" : " ^13.13.0" ,
25
+ " jest" : " ^25.4.0" ,
26
+ " typescript" : " ^3.8.3"
25
27
} { {#npmRepository} },{ {/npmRepository} }
26
28
{ {#npmRepository} }
27
29
"publishConfig":{
You can’t perform that action at this time.
0 commit comments