Skip to content

chore: add linter for OpenAPI#13

Closed
thomaspoignant wants to merge 4 commits intomainfrom
lint-openapi
Closed

chore: add linter for OpenAPI#13
thomaspoignant wants to merge 4 commits intomainfrom
lint-openapi

Conversation

@thomaspoignant
Copy link
Member

Add linter for OpenAPI validation.

Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
@thomaspoignant thomaspoignant requested a review from a team as a code owner April 30, 2024 20:27
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
- name: Checkout repository
uses: actions/checkout@v4
- name: OpenAPI Lint Checks
uses: nwestfall/openapi-action@v1.0.2
Copy link
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
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
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

@thomaspoignant
Copy link
Member Author

@Kavindu-Dodan Maybe we should take your branch instead of this one.
When it comes to the validation I am not sure why it fails, but this is worth checking.

@Kavindu-Dodan
Copy link
Contributor

@Kavindu-Dodan Maybe we should take your branch instead of this one. When it comes to the validation I am not sure why it fails, but this is worth checking.

I will take a shot on this then :)

@Kavindu-Dodan
Copy link
Contributor

@thomaspoignant here is a PR with redocly - #15

@thomaspoignant
Copy link
Member Author

Close this PR in favor of #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants