Skip to content

Commit 51e2904

Browse files
author
Enda
authored
feat: add option to provide custom templates (#3)
1 parent c2dfefd commit 51e2904

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ inputs:
3232
additional-properties:
3333
description: 'Provide a config object of additional properties'
3434
required: false
35+
template:
36+
description: Directory of the templates used to generate code
37+
required: false
3538
ignore-file-override:
3639
description: 'Pass a custom OpenAPI Generator ignore file'
3740
required: false

src/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ async function run(): Promise<void> {
3434
if (ignoreFileOverride) {
3535
generateArgs.push('--ignore-file-override', ignoreFileOverride);
3636
}
37+
const templatesDir = core.getInput('template');
38+
if (templatesDir) {
39+
generateArgs.push('--template');
40+
}
3741
const config = core.getInput('config');
3842
if (config) {
3943
generateArgs.push('--config', config);

0 commit comments

Comments
 (0)