diff --git a/.github/workflows/lint-validate-openapi.yml b/.github/workflows/lint-validate-openapi.yml new file mode 100644 index 0000000..16a00a8 --- /dev/null +++ b/.github/workflows/lint-validate-openapi.yml @@ -0,0 +1,51 @@ +name: Lint and validate OpenAPI specs + +on: + - push + - pull_request + +jobs: + + lint: + name: Lint OpenAPI definition + runs-on: ubuntu-latest + steps: + - name: Check out head branch + uses: actions/checkout@v2 + - name: Run OpenAPI Lint Action + uses: nwestfall/openapi-action@v1.0.2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + file: openapi/task_execution_service.openapi.yaml + + diff: + name: Show OpenAPI differences relative to target branch + runs-on: ubuntu-latest + if: ${{ github.event_name == 'pull_request' }} + steps: + - name: Check out head branch + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} + path: head + - name: Check out base branch + uses: actions/checkout@v2 + with: + ref: ${{ github.base_ref }} + path: base + - name: Run OpenAPI Diff Action + uses: mvegter/openapi-diff-action@v0.23.5 + with: + head-spec: head/openapi/task_execution_service.openapi.yaml + base-spec: base/openapi/task_execution_service.openapi.yaml + + validate: + name: Validate OpenAPI definition + runs-on: ubuntu-latest + steps: + - name: Check out head branch + uses: actions/checkout@v2 + - name: Run OpenAPI Validate Action + uses: char0n/swagger-editor-validate@v1 + with: + definition-file: openapi/task_execution_service.openapi.yaml diff --git a/openapi/task_execution_service.openapi.yaml b/openapi/task_execution_service.openapi.yaml index 8d57d8f..f23c723 100644 --- a/openapi/task_execution_service.openapi.yaml +++ b/openapi/task_execution_service.openapi.yaml @@ -622,7 +622,9 @@ components: - `SYSTEM_ERROR`: The task was stopped due to a system error, but not from an Executor, for example an upload failed due to network issues, the worker's ran out of disk space, etc. - - `CANCELED`: The task was canceled by the user. + - `CANCELED`: The task was canceled by the user, and downstream resources have been deleted. + - `CANCELING`: The task was canceled by the user, + but the downstream resources are still awaiting deletion. default: UNKNOWN example: COMPLETE enum: @@ -635,6 +637,7 @@ components: - EXECUTOR_ERROR - SYSTEM_ERROR - CANCELED + - CANCELING tesTask: required: - executors