Open homosapien14 opened 2 months ago
@ravi-prakash-v Hii , could you please review it once.
@rajaneeshk90 can you please look at this?
Hello @harshcrop Will you pls review the contribution? Thanks.
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, Rajaneesh
Hello @homosapien14 Any update on this? Also, Augtoberfest ends on 15th Sept, so it would be great if we finish this before that. Thanks.
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.
Create a New Branch:
swapnil/openapispecs
.push
branches in the validate-openapi.yml
file to your new branch name (xyz
).Test the Workflow:
master
and make invalid changes (e.g., introduce syntax errors or remove required lines) in the meta.yaml
, registry.yaml
, or transaction.yaml
files.Push and Create a Draft PR:
xyz
.Check the CI Workflow:
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: