This repository has been archived by the owner on Oct 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathopenapi-client-generator.php
95 lines (80 loc) · 2.47 KB
/
openapi-client-generator.php
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
return [
/**
* Path to the directory where index.yaml openapi file located
*/
'apidoc_dir' => public_path('api-docs'),
/**
* Dir template where client package will be generated
*/
'output_dir_template' => base_path('..' . DIRECTORY_SEPARATOR . '<paste_your_client_package_name>'),
/**
* Git user
*/
'git_user' => '<paste_your_git_user>',
/**
* Git repository name template
*/
'git_repo_template' => '<paste_your_git_repo_template>',
/**
* Git host
*/
'git_host' => 'gitlab.com',
/**
* Args for generate nodejs client
*/
'js_args' => [
/**
* Specific generator params from https://openapi-generator.tech/docs/generators/typescript-fetch/
*/
'params' => [
'npmName' => '<paste_your_npm_package_name>',
'useES6' => true,
'useSingleRequestParameter' => true,
'withInterfaces' => true,
'typescriptThreePlus' => true,
],
/**
* Need generate nest js module, only for backend services
*/
'generate_nestjs_module' => false,
/**
* Directory where you can place templates to override default ones. . Used in -t
*/
'template_dir' => '',
/**
* Files that will be ignored during repository cleanup
*/
'files_to_ignore_during_cleanup' => ['.git', '.gitignore'],
],
/**
* Args for generate php client
*/
'php_args' => [
/**
* Package name for composer, use standard pattern namespace/package
*/
'composer_name' => 'paste_your_composer_package_name',
/**
* Specific generator params from https://openapi-generator.tech/docs/generators/php/
*/
'params' => [
'apiPackage' => 'Api',
'invokerPackage' => '<paste_your_php_package_namespace>',
'modelPackage' => 'Dto',
'packageName' => '<paste_your_php_package_name>'
],
/**
* Directory where you can place templates to override default ones. . Used in -t
*/
'template_dir' => '',
/**
* Files that will be ignored during repository cleanup
*/
'files_to_ignore_during_cleanup' => ['.git', '.gitignore'],
/**
* Options for disable patch section "require" composer.json
*/
'composer_disable_patch_require' => false,
]
];