Skip to content

Commit 1f65e57

Browse files
committed
Update mustache templates
1 parent 57fb959 commit 1f65e57

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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}}

src/main/resources/mustache/typescript-fetch/licenseInfo.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
66
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
77
*
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.
99
* https://github.com/swagger-api/swagger-codegen.git
10-
* Do not edit the class manually.
10+
* Do not edit the file manually.
1111
*/

src/main/resources/mustache/typescript-fetch/package.mustache

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
"portable-fetch": "^3.0.0"
2121
},
2222
"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"
2527
}{{#npmRepository}},{{/npmRepository}}
2628
{{#npmRepository}}
2729
"publishConfig":{

0 commit comments

Comments
 (0)