Skip to content

chore(ci): add schema validation workflow#2

Open
sakinaroufid wants to merge 1 commit intomainfrom
pr-a-schema-validation
Open

chore(ci): add schema validation workflow#2
sakinaroufid wants to merge 1 commit intomainfrom
pr-a-schema-validation

Conversation

@sakinaroufid
Copy link
Owner

@sakinaroufid sakinaroufid commented Mar 1, 2026

Description

Adds a CI workflow (schema-validation.yml) that validates schemas and ensures generated/schema-types.ts stays in sync with the source schemas on every push and PR.

This also fixes a bug in generate_ts_schema_types.js where SOURCE_ROOT was set to 'spec' (a directory that doesn't exist), causing the generator to find 0 schemas and produce a stale output. The correct path is 'source'.

The new workflow:

  • Installs Node.js dependencies and ucp-schema
  • Runs ucp-schema lint source/ to validate schemas
  • Runs node generate_ts_schema_types.js and checks git diff --exit-code to catch desynchronized types

Note for reviewers: The large diff in generated/schema-types.ts is machine output from the generator path fix — no manual edits. Only schema-validation.yml (75 lines) and the one-line fix in generate_ts_schema_types.js need review.

This is part 1 of 3 from Universal-Commerce-Protocol#13, split per maintainer request.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@cursor
Copy link

cursor bot commented Mar 1, 2026

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on April 25.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Super-linter summary

Language Validation result
BIOME_LINT Pass ✅
GITHUB_ACTIONS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
JAVASCRIPT_ES Pass ✅
PRE_COMMIT Pass ✅
TRIVY Pass ✅
TYPESCRIPT_ES Pass ✅
TYPESCRIPT_PRETTIER Pass ✅
YAML Pass ✅

All files and directories linted successfully

For more information, see the
GitHub Actions workflow run

Powered by Super-linter

@sakinaroufid sakinaroufid reopened this Mar 1, 2026
@github-actions
Copy link

github-actions bot commented Mar 1, 2026

Super-linter summary

Language Validation result
BIOME_LINT Pass ✅
GITHUB_ACTIONS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
JAVASCRIPT_ES Pass ✅
PRE_COMMIT Pass ✅
TRIVY Pass ✅
TYPESCRIPT_ES Pass ✅
TYPESCRIPT_PRETTIER Pass ✅
YAML Pass ✅

All files and directories linted successfully

For more information, see the
GitHub Actions workflow run

Powered by Super-linter

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.

1 participant