-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
32 lines (32 loc) · 1.01 KB
/
action.yml
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
name: 'openapi spec to json schema'
description: 'Retrieve openapi specification file and return json schema file'
branding:
icon: 'box'
color: 'purple'
inputs:
specification-url:
description: 'Specification URL'
required: true
# default: ''
outputs:
json-schema-file:
description: 'The generated json schema file'
value: ${{ steps.schema-id.outputs.json-schema-file }}
runs:
using: composite
steps:
- id: specification-id
run: |
echo "Generating json schema from openapi specification file ${{ inputs.specification-url }}"
shell: bash
- shell: bash
run: |
docker run -u 1001 --rm --workdir ${{ github.workspace }} -v "${{ github.workspace }}":"${{ github.workspace }}" \
openapitools/openapi-generator-cli generate \
-i ${{ inputs.specification-url }} \
-g openapi \
-o ${{ github.workspace }}/openapi
- id: schema-id
run: |
echo "::set-output name=json-schema-file::openapi.json"
shell: bash