Skip to content

Conversation

@flovntp
Copy link
Collaborator

@flovntp flovntp commented Dec 18, 2025

No description provided.

@flovntp flovntp marked this pull request as draft December 18, 2025 14:03
@flovntp flovntp marked this pull request as ready for review December 19, 2025 11:59
@Theosakamg Theosakamg requested a review from Copilot January 7, 2026 16:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces automated validation for the image registry structure by adding a JSON schema, a TypeScript validation script, and a GitHub Actions workflow that runs on pull requests and pushes.

Key Changes

  • Added JSON schema and Zod-based validation script to enforce registry.json structure
  • Integrated schema validation into the API via a new endpoint
  • Created GitHub Actions workflow to automatically validate registry changes

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
resources/image/registry.schema.json Defines JSON Schema for validating registry.json structure with comprehensive type definitions
backend/src/scripts/validate-registry.ts Implements Zod-based validation script that parses and validates registry.json against defined schemas
backend/src/routes/validation.routes.ts Adds new API endpoint to expose the registry validation schema
backend/package.json Adds npm script for running registry validation
.vscode/settings.json Configures VS Code to use the JSON schema for registry.json files
.github/workflows/validate-registry.yml Creates CI workflow to validate registry on relevant file changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

console.error(`Failed to read registry file at ${registryPath}`);
console.error(error);
process.exit(1);
return;
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return statement after process.exit(1) is unreachable and serves no purpose. Remove this line to improve code clarity.

Copilot uses AI. Check for mistakes.
console.error('registry.json is not valid JSON');
console.error(error);
process.exit(1);
return;
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return statement after process.exit(1) is unreachable and serves no purpose. Remove this line to improve code clarity.

Copilot uses AI. Check for mistakes.
console.error('registry.json does not match the expected schema');
console.error(JSON.stringify(result.error.format(), null, 2));
process.exit(1);
return;
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return statement after process.exit(1) is unreachable and serves no purpose. Remove this line to improve code clarity.

Copilot uses AI. Check for mistakes.
@flovntp
Copy link
Collaborator Author

flovntp commented Jan 9, 2026

merged into #58

@flovntp flovntp closed this Jan 9, 2026
@flovntp flovntp deleted the validate-registry-action branch January 9, 2026 12:06
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.

2 participants