Skip to content

feat(2024): add Classes collection#1059

Closed
t11z wants to merge 6 commits into5e-bits:mainfrom
t11z:main
Closed

feat(2024): add Classes collection#1059
t11z wants to merge 6 commits into5e-bits:mainfrom
t11z:main

Conversation

@t11z
Copy link
Copy Markdown

@t11z t11z commented Apr 5, 2026

What does this do?

Adds the Classes collection to the 2024 dataset — 12 SRD 5.2.1 class documents, a Zod schema, and tests.

Files:

  • src/2024/5e-SRD-Classes.json — all 12 SRD classes
  • src/2024/schemas/5e-SRD-Classes.ts — Zod schema based on the 2014 structure, adapted for 2024 URLs
  • Schema test added to src/2024/tests/schemas.test.ts
  • src/2024/5e-SRD-Subclasses.json — replaced nyi field with proper url in all 12 class references (the data they point to now exists)

2024-specific changes vs 2014:

  • Ranger spellcasting.level changed from 2 to 1 (SRD 5.2.1 p. 57)
  • All URLs use /api/2024/ prefix
  • Subclass references use indices from the existing 5e-SRD-Subclasses.json

Open question — Starting Equipment format:
The 2024 SRD presents starting equipment as a single A/B choice per class. The current JSON retains the 2014 granular structure. Happy to refactor to the 2024 A/B bundle format (as used in Backgrounds) if that's preferred — kept it conservative to avoid making a schema decision in isolation.

Relationship to #1056: This PR resolves the /api/2024/classes/{class}-nyi references in the Features PR by @G-Ambatte.

How was it tested?

npm test passes. Spot-checked 10 of 12 classes against the SRD 5.2.1 PDF (hit dice, saving throws, spellcasting, multiclassing prerequisites, skill choices, subclass references).

Is there a Github issue this is resolving?

No existing issue. This fills a gap in the 2024 dataset — Classes was one of the missing collections alongside Levels, Spells, and Monsters.

Did you update the docs in the API? Please link an associated PR if applicable.

No — the API doesn't serve /api/2024 yet. Once the API adds 2024 class endpoints, the data from this PR will be ready to serve.

Here's a fun image for your troubles

one does not simply

t11z and others added 6 commits April 5, 2026 01:07
Remove deploy (MongoDB update) and trigger-downstream jobs — the fork
has no hosted API. Consolidate into a single container-release job that
builds and pushes ghcr.io/t11z/5e-database:{tag} + :latest on release
publish or manual dispatch.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ci: adapt release workflow for t11z fork
Fork manages releases manually; the workflow requires GitHub App secrets
(DEPLOYMENT_APP_ID / DEPLOYMENT_APP_PRIVATE_KEY) that aren't available here.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ci: disable release-please workflow in fork
12 SRD 5.2.1 class documents with Zod schema and tests.
Schema follows the 2014 structure adapted for 2024 URL conventions.
Replaces nyi field in Subclasses with proper class URLs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(2024): add Classes collection
@t11z t11z requested a review from bagelbits as a code owner April 5, 2026 08:16
@t11z
Copy link
Copy Markdown
Author

t11z commented Apr 5, 2026

Reopening with a clean branch — this one included fork-specific CI commits. See replacement PR.

@t11z t11z closed this Apr 5, 2026
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