feat: month, year, and discovery endpoints #134
No reviewers
Labels
No labels
area: api
area: auth
area: build
area: cache
area: ci
area: compare
area: model
area: provenance
area: rite
backport
blocked
breaking
confirmed
dependencies
duplicate
epic
invalid
needs-info
needs-triage
php
priority: high
priority: low
priority: medium
regression
type: chore
type: correction
type: docs
type: enhancement
type: feature
type: fix
type: perf
type: refactor
type: security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Directorium/Api!134
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/8-calendar-endpoints"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Completes the calendar endpoints (epic #8) on top of the #133 skeleton — the read surface the Ordo plugin and Site consume for the R2 / 3mi.org release.
What's here
GET /v1/month/{year-month}(#10) andGET /v1/year/{year}(#11) — an ordered list of day contracts (each self-describing via its owndate) withmeta.count. The gateway resolves the civil year once (memoised per year+calendar) and reads every day off that index, so a whole year is a single Core resolution.GET /v1/meta(#12) — discovery: supported systems (1962→roman:rubricae-1960), calendars (universal+ thesspxparticular with its overlay descriptor), languages (la), and the resolved date range (1583–2200). Every value is derived from Core, not hardcoded, so it stays correct as 1954/1955 and FSSP/ICKSP land.GET /v1/day/{date}(#9) shipped in #133 as the skeleton's anchor; this PR rounds out its siblings.CoreGatewaynow resolves throughCalendarCatalog+DayContractdirectly — one resolution path for single day and ranges — and gainssystemsDetail()/calendarsDetail().QueryParsergainsparseMonth/parseYear(shared year-range check);RangeQuerycarries the validated span + its echo.Verification
composer checkgreen: phpcs 27/27, PHPStan[OK], PHPUnit 48 tests / 176 assertions./v1/metalistsuniversal,sspx;/v1/month/2026-09= 30 days (Sep 3 first-class under?calendar=sspx);/v1/year/2024= 366 (leap).Refs #8 #9 #10 #11 #12