Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/lint-openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "OpenAPI Lint"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
openAPILint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: OpenAPI Lint Checks
uses: nwestfall/openapi-action@v1.0.2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding this action, it seems this has been unmaintained for some time. And I checked alternatives and came across redocly-cli (MIT license) and used their docker image [1] to perform a similar validation

You can see my attempt in the fork [2] and the test GH action failure run in my fork [3]

Let me know your thoughts on this :)

[1] - https://github.com/Redocly/redocly-cli?tab=readme-ov-file#docker
[2] - https://github.com/open-feature/protocol/compare/test-validate
[3] - https://github.com/open-feature/protocol/actions/runs/8913421964/job/24478855581

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is another option that adds lint violations as annotations in the PR.

https://github.com/stoplightio/spectral-action

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beeme1mr checked but I am not super happy yet as there are open issues and PRs that were not addressed recently. We can switch back if we see issues with redocly

with:
github_token: ${{ secrets.GITHUB_TOKEN }}
file: services/openapi.yaml