Skip to content

Commit

Permalink
feat: add option to provide custom templates (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Enda committed Feb 8, 2022
1 parent c2dfefd commit 51e2904
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ inputs:
additional-properties:
description: 'Provide a config object of additional properties'
required: false
template:
description: Directory of the templates used to generate code
required: false
ignore-file-override:
description: 'Pass a custom OpenAPI Generator ignore file'
required: false
Expand Down
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ async function run(): Promise<void> {
if (ignoreFileOverride) {
generateArgs.push('--ignore-file-override', ignoreFileOverride);
}
const templatesDir = core.getInput('template');
if (templatesDir) {
generateArgs.push('--template');
}
const config = core.getInput('config');
if (config) {
generateArgs.push('--config', config);
Expand Down

0 comments on commit 51e2904

Please sign in to comment.