Skip to content

Conversation

@hoegertn
Copy link
Member

@hoegertn hoegertn commented Oct 3, 2025

  • Introduced a new JSON schema for league group exports, defining the structure for groups, teams, clubs, gyms, and statistics.
  • Added a sample JSON file demonstrating the expected data format for league group exports, including detailed entries for teams, players, clubs, and gyms.
  • Enhanced TypeScript definitions to align with the new schema, ensuring type safety and clarity in data handling.

This update improves the API's capability to manage and export league group data effectively.

Summary by CodeRabbit

  • New Features

    • Added a structured league group export format covering group details, teams, clubs, gyms, and summary statistics.
    • Enforced data validation (UUIDs, dates, enums, required fields) for reliable exports and consistent imports.
    • Supports nested entities and collections (players, preferred matchday dates, venues) for comprehensive data exchange.
  • Documentation

    • Included a full sample export demonstrating the format, field expectations, and typical data relationships.

- Introduced a new JSON schema for league group exports, defining the structure for groups, teams, clubs, gyms, and statistics.
- Added a sample JSON file demonstrating the expected data format for league group exports, including detailed entries for teams, players, clubs, and gyms.
- Enhanced TypeScript definitions to align with the new schema, ensuring type safety and clarity in data handling.

This update improves the API's capability to manage and export league group data effectively.
@amazon-inspector-frankfurt
Copy link

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@github-actions github-actions bot requested a review from hoegerma October 3, 2025 21:35
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 3, 2025

Walkthrough

Adds a new league-group export data model: a JSON Schema, a TypeScript export contract, and a sample JSON payload describing group, teams, clubs, gyms, and aggregated statistics.

Changes

Cohort / File(s) Summary
Schema: League group export
league-group.schema.json
New JSON Schema for league group exports: top-level object with required group, teams, clubs, gyms, statistics; includes definitions for Address, Season, League, Leader, Group, Person, PreferredMatchdayDate, TeamDetail, Gym, LeagueGroupStatistics and formats/enums.
TypeScript: Data contracts
src/export/league-group.ts
New exported TypeScript interfaces/types mirroring the schema: Address, Club, Season, League, Leader, Group, Person, PreferredDateStatus, PreferredMatchdayDate, TeamDetail, Gym, LeagueGroupStatistics, LeagueGroupExport. No runtime logic.
Sample payload
samples/league-group-sample.json
New sample JSON illustrating a full league group export: group metadata, teams with players, clubs with preferred dates, gyms with addresses, and statistics totals.

Sequence Diagram(s)

No sequence diagrams provided — changes are purely declarative data/schema additions with no control flow to visualize.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • hoegerma

Poem

A rabbit taps its paws in glee,
New schemas map our league’s esprit.
Types aligned in tidy rows,
Clubs and gyms where data grows.
Hop — export bright, and let it be!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description does not follow the repository’s required template because it omits the checklist of requirements, the “What kind of change” section, the current behavior description, the breaking change indication, and other specified headings. Please update the description to include the template checklist items (commit message, tests, docs), specify the change type, outline the current and new behavior, indicate any breaking changes, and add the “Other information” section as shown in the repository’s description template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly summarizes the primary change by indicating the addition of both the league group export schema and sample data, follows conventional commit style, and is clear and specific to the changes included in this PR.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch export-formats

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b28819a and f58293f.

📒 Files selected for processing (1)
  • league-group.schema.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • league-group.schema.json

Comment @coderabbitai help to get the list of available commands and usage tips.

@taimos-projen taimos-projen bot enabled auto-merge October 3, 2025 21:36
@amazon-inspector-frankfurt
Copy link

✅ I finished the code review, and didn't find any security or code quality issues.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 12a3e21 and b28819a.

📒 Files selected for processing (3)
  • league-group.schema.json (1 hunks)
  • samples/league-group-sample.json (1 hunks)
  • src/export/league-group.ts (1 hunks)
🔇 Additional comments (3)
src/export/league-group.ts (1)

1-104: LGTM! TypeScript interfaces are well-structured.

The interface definitions are clean, properly typed, and align with the JSON Schema. The use of string types for dates (instead of Date objects) is appropriate for JSON serialization, and nullable fields are correctly annotated with | null.

samples/league-group-sample.json (2)

716-721: Statistics totals verified: All values in the statistics block match actual counts.


38-459: Manual referential integrity check required
Ensure every team.clubId, player.clubId, gym.clubId, and non-null team.sgClubId exists in the clubs array and that each club id is referenced by at least one entity.

@taimos-projen taimos-projen bot added this pull request to the merge queue Oct 21, 2025
Merged via the queue into main with commit 913b0cc Oct 21, 2025
6 checks passed
@taimos-projen taimos-projen bot deleted the export-formats branch October 21, 2025 08:01
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.

3 participants