Skip to content

Conversation

@Hafsa-Ahmadi
Copy link


Fixes #366

OpenAPI Validation for Protocol Specifications

This PR adds automated OpenAPI syntax validation for transactions.yaml, meta.yaml, and registry.YAML files to prevent syntactical errors from being committed to the master branch.

Implementation Details

  • Added GitHub Actions workflow that runs on PRs to the master branch
  • Created a Node.js validation script that checks all OpenAPI specification files against OpenAPI 3.0 standards
  • Updated documentation to inform contributors about the validation process
  • Added test files to verify that the validation works as expected

How It Works

  • When a PR is submitted that modifies any OpenAPI spec files, the validation automatically runs
  • The script finds all instances of transactions.yaml, meta.yaml, and registry.yaml in the repository
  • Each file is validated against the OpenAPI 3.0 specification
  • Detailed error messages are provided for any issues found
  • PR checks will fail if any file contains syntax errors

Acceptance Criteria Met

  • ✅ Checks run on a PR with syntax errors in the OpenAPI spec will fail
  • ✅ Checks run on a PR with no syntax errors in the OpenAPI spec will pass

Testing

The validation has been tested locally against the current repository structure to ensure it correctly identifies and validates all target files.

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.

Need automated Open API syntax validation on submitting PR to master

1 participant