-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: automated Open API syntax validation on submitting PR to master #443
base: master
Are you sure you want to change the base?
Conversation
@ravi-prakash-v Hii , could you please review it once. |
@rajaneeshk90 can you please look at this? |
Hello @harshcrop |
hey @harshcrop , can you even give me a feedback? |
Hi @homosapien14, Thank you for submitting the PR! I appreciate your effort. I have a few suggestions that could help improve the submission:
Thanks again for your contribution! Best regards, |
Hello @homosapien14 |
05cd64b
to
94cf4ee
Compare
Hi @rajaneeshk90, Thank you for your response. I am sorry for the delay (I was busy with the office project deadline). I have made the required changes as you suggested in this 82fa17b commit. How to Test the Changes
Here are the sample errors while I was testing the implementation: |
Hi @homosapien14, Thank you for the changes in the PR! Here are a few points that need attention:
Thanks again for your contribution! Best, |
Description (fixes #366 )
Problem:
Sometimes when pull requests are merged, syntactical errors in the OpenAPI document get committed to the
master
branch, which can lead to integration issues and broken functionality.Feature Request:
Implement an automated script that validates OpenAPI specifications when a pull request is created. The script should specifically validate
transaction.yaml
,meta.yaml
, andregistry.yaml
against the OpenAPI 3.0 specification.Goals:
master
branch.transaction.yaml
,meta.yaml
, andregistry.yaml
to ensure they conform to the OpenAPI 3.0 specification.Solution
How I Solved It:
Workflow Configuration:
master
branch and pull requests targeting themaster
branch.openapi-cli
tool globally.validate-openapi.sh
) is executable.Validation Script:
validate-openapi.sh
to iterate over the OpenAPI files (transaction.yaml
,meta.yaml
, andregistry.yaml
).openapi lint
to check for errors and warnings. If any issues are found, it reports them and exits with a non-zero status.Expected Outcome
master
branch should not have any syntax errors after a successful PR merge.Acceptance Criteria
How to Test
Create a Pull Request:
transaction.yaml
,meta.yaml
,registry.yaml
) in a new branch and open a pull request targeting themaster
branch.Check Workflow Execution:
Test with Errors:
Test without Errors: