-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathaction.yml
More file actions
64 lines (62 loc) · 1.92 KB
/
action.yml
File metadata and controls
64 lines (62 loc) · 1.92 KB
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
name: Prepare OpenAPI Spec — Convert Swagger 2.0
description: Convert Swagger 2.0 spec to OpenAPI 3.x using swagger2openapi
branding:
icon: refresh-cw
color: blue
runs:
using: node20
main: ../../dist/prepareSwagger.js
inputs:
input_path:
description: >-
Path to the input Swagger 2.0 spec file (JSON or YAML).
required: true
output_path:
description: >-
Path where the converted OpenAPI 3.x spec will be written.
If not specified, will default to 'openapi.json' in the same directory as the input file.
required: false
patch:
description: >-
Fix up small errors in the source definition (default: false).
Equivalent to swagger2openapi --patch flag.
required: false
default: "false"
output_format:
description: >-
Output format: 'json' or 'yaml' (default: 'json').
If not specified, will be inferred from output_path extension.
required: false
resolve:
description: >-
Resolve external references (default: true).
Equivalent to swagger2openapi --resolve flag.
required: false
default: "true"
target_version:
description: >-
Target OpenAPI version: '3.0' or '3.1' (default: '3.0').
required: false
default: "3.0"
commit:
description: >-
Whether to commit the converted file to the repository (default: false).
Requires 'contents: write' permission.
required: false
default: "false"
commit_message:
description: >-
Commit message to use when committing the converted file.
Only used if commit is true.
required: false
default: "chore: convert Swagger 2.0 to OpenAPI 3.x"
github_token:
description: >-
GitHub token for committing changes.
Only required if commit is true. Defaults to the GITHUB_TOKEN secret.
required: false
default: ${{ github.token }}
outputs:
output_path:
description: >-
Path to the converted OpenAPI spec file.