generated from Himenon/template-js
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathtestCodeGenWithFunctional.ts
78 lines (69 loc) · 3.13 KB
/
testCodeGenWithFunctional.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import * as Writer from "./writer/Functional.js";
const main = () => {
Writer.generateTypedefCodeOnly("test/api.test.domain/index.yml", "test/code/functional/typedef-only/api.test.domain.ts", true);
Writer.generateTypedefCodeOnly("test/infer.domain/index.yml", "test/code/functional/typedef-only/infer.domain.ts", false);
Writer.generateTypedefCodeOnly("test/json.properties/index.yml", "test/code/functional/typedef-only/json.properties.ts", false);
Writer.generateTemplateCodeOnly("test/api.test.domain/index.yml", "test/code/functional/template-only/api.test.domain.ts", true, {
sync: false,
});
Writer.generateTemplateCodeOnly("test/api.test.domain/index.yml", "test/code/functional/template-only/sync-api.test.domain.ts", true, {
sync: true,
});
Writer.generateTemplateCodeOnly("test/infer.domain/index.yml", "test/code/functional/template-only/infer.domain.ts", false, {
sync: true,
});
Writer.generateTypedefWithTemplateCode("test/api.v2.domain/index.yml", "test/code/functional/typedef-with-template/api.v2.domain.ts", false, {
sync: false,
});
Writer.generateTypedefWithTemplateCode(
"test/api.test.domain/index.yml",
"test/code/functional/typedef-with-template/api.test.domain.ts",
true,
{
sync: false,
},
);
Writer.generateTypedefWithTemplateCode(
"test/api.test.domain/index.yml",
"test/code/functional/typedef-with-template/sync-api.test.domain.ts",
true,
{
sync: true,
},
);
Writer.generateTypedefWithTemplateCode("test/infer.domain/index.yml", "test/code/functional/typedef-with-template/infer.domain.ts", false, {
sync: false,
});
Writer.generateTypedefWithTemplateCode("test/ref.access/index.yml", "test/code/functional/typedef-with-template/ref-access.ts", false, {
sync: false,
});
Writer.generateTypedefWithTemplateCode(
"test/remote.ref.access/v1.yml",
"test/code/functional/typedef-with-template/remote-ref-access.ts",
false,
{
sync: false,
},
);
Writer.generateTypedefWithTemplateCode("test/kubernetes/openapi-v1.18.5.json", "test/code/functional/kubernetes/client-v1.18.5.ts", false, {
sync: false,
});
Writer.generateTypedefWithTemplateCode("test/argo-rollout/index.json", "test/code/functional/argo-rollout/client.ts", false, {
sync: false,
});
Writer.generateTypedefWithTemplateCode(
"test/unknown.schema.domain/index.yml",
"test/code/functional/unknown.schema.domain/client.ts",
false,
{
sync: false,
},
);
Writer.generateSplitCode("test/api.test.domain/index.yml", "test/code/functional/split");
Writer.generateSplitCode("test/multi-type.test.domain/index.yml", "test/code/functional/mulit-type-test.domain");
Writer.generateParameter("test/api.test.domain/index.yml", "test/code/functional/parameter/api.test.domain.json");
Writer.generateParameter("test/infer.domain/index.yml", "test/code/functional/parameter/infer.domain.json");
Writer.generateFormatTypeCode("test/format.domain/index.yml", "test/code/functional/format.domain/code.ts");
Writer.generateFormatTypeCode("test/cloudflare/openapi.yaml", "test/code/functional/cloudflare/client.ts");
};
main();