Skip to content

feat: docs updated with the games catalogue for team managers#301

Open
juliannoronha wants to merge 1 commit into
mainfrom
feat/catalogue
Open

feat: docs updated with the games catalogue for team managers#301
juliannoronha wants to merge 1 commit into
mainfrom
feat/catalogue

Conversation

@juliannoronha

@juliannoronha juliannoronha commented Jul 18, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • Documentation
    • Added coverage details for the games catalog and administrative game-selection routes.
    • Documented how to retrieve a team’s enabled mini-games, including supported parameters, response structure, caching behavior, and error responses.
    • Clarified that clients should display only games returned by the catalog service.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Documents the GET /api/games/catalog contract, including parameters, response grouping, client rendering, caching, and errors. Updates the route coverage matrix for public and admin game routes.

Changes

Games catalog documentation

Layer / File(s) Summary
Catalog contract and route coverage
repositories/d-sports-engage-native/integration-contracts.mdx, api-reference/domains/route-coverage-matrix.mdx
Defines the games catalog request and response contract, client expectations, caching, and error codes; classifies public and admin game routes in the coverage matrix.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: jondmarien

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: documentation updates for the games catalog/team-manager flow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/catalogue

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
repositories/d-sports-engage-native/integration-contracts.mdx (1)

27-28: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use active voice in the catalog description.

Rewrite the passive constructions so the documentation states who performs each action.

Proposed wording
- The catalog is admin-managed and team-selected server-side; the client must render only the games returned and must not assume a fixed set.
- Responses are cacheable (`Cache-Control: public, max-age=60, stale-while-revalidate=300`); short-lived staleness after a team changes its selection is expected.
+ Admins manage the catalog, and the server selects each team's games; the client must render only the games returned and must not assume a fixed set.
+ The server returns cacheable responses (`Cache-Control: public, max-age=60, stale-while-revalidate=300`); clients should expect short-lived staleness after a team changes its selection.

As per coding guidelines, documentation must use active voice and concise sentences.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@repositories/d-sports-engage-native/integration-contracts.mdx` around lines
27 - 28, Rewrite the catalog bullets in the integration-contract documentation
using active voice: explicitly identify the administrator and server as the
actors managing the catalog and selecting teams’ games, and state that clients
render only the returned games without assuming a fixed set. Keep the
cacheability statement concise and active while preserving its existing cache
directives and staleness behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@repositories/d-sports-engage-native/integration-contracts.mdx`:
- Line 29: Expand the `/api/games/catalog` documentation in
integration-contracts.mdx to specify machine-readable error codes, the complete
error response shape, and validation precedence when both teamId and teamSlug
are provided. Replace the current status-only statement while preserving the
documented 404 behavior for unknown teams and 400 behavior for missing
identifiers.

---

Nitpick comments:
In `@repositories/d-sports-engage-native/integration-contracts.mdx`:
- Around line 27-28: Rewrite the catalog bullets in the integration-contract
documentation using active voice: explicitly identify the administrator and
server as the actors managing the catalog and selecting teams’ games, and state
that clients render only the returned games without assuming a fixed set. Keep
the cacheability statement concise and active while preserving its existing
cache directives and staleness behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 297579c9-48ea-467f-a48d-4722e444df5d

📥 Commits

Reviewing files that changed from the base of the PR and between 7b4d0f3 and 3f5f90e.

📒 Files selected for processing (2)
  • api-reference/domains/route-coverage-matrix.mdx
  • repositories/d-sports-engage-native/integration-contracts.mdx

- Each game entry carries `id`, `key`, `title`, `description`, `icon`, and `badge`; `key` is the stable slug the client maps to a playable game route (for example `daily-spin`).
- The catalog is admin-managed and team-selected server-side; the client must render only the games returned and must not assume a fixed set.
- Responses are cacheable (`Cache-Control: public, max-age=60, stale-while-revalidate=300`); short-lived staleness after a team changes its selection is expected.
- Unknown teams return `404`; a missing `teamId`/`teamSlug` returns `400`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

file='repositories/d-sports-engage-native/integration-contracts.mdx'
wc -l "$file"
nl -ba "$file" | sed -n '1,160p'

printf '\n--- nearby references ---\n'
rg -n "teamId|teamSlug|404|400|error code|error shape|error contract" repositories/d-sports-engage-native -g '*.mdx' -g '*.md' -g '*.ts' -g '*.js'

Repository: D-Sports-Ecosystem/docs

Length of output: 266


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file='repositories/d-sports-engage-native/integration-contracts.mdx'
printf '--- file contents ---\n'
cat -n "$file"

printf '\n--- related references ---\n'
rg -n "teamId|teamSlug|404|400|error code|error shape|error contract|status code|error response" repositories/d-sports-engage-native -g '*.mdx' -g '*.md' -g '*.ts' -g '*.js'

Repository: D-Sports-Ecosystem/docs

Length of output: 252


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file='repositories/d-sports-engage-native/integration-contracts.mdx'
echo '--- file contents ---'
cat -n "$file"

echo
echo '--- related references ---'
rg -n "teamId|teamSlug|404|400|error code|error shape|error contract|status code|error response" repositories/d-sports-engage-native -g '*.mdx' -g '*.md' -g '*.ts' -g '*.js'

Repository: D-Sports-Ecosystem/docs

Length of output: 3678


Document the full /api/games/catalog error contract.
Add the machine-readable error codes, response shape, and precedence when both teamId and teamSlug are supplied so clients don’t have to infer behavior from status codes alone.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@repositories/d-sports-engage-native/integration-contracts.mdx` at line 29,
Expand the `/api/games/catalog` documentation in integration-contracts.mdx to
specify machine-readable error codes, the complete error response shape, and
validation precedence when both teamId and teamSlug are provided. Replace the
current status-only statement while preserving the documented 404 behavior for
unknown teams and 400 behavior for missing identifiers.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@juliannoronha please implement this suggestion from coderabbit :) thank you

@jondmarien
jondmarien requested a review from aidan729 July 19, 2026 05:53
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