Static APIRoutes can't receive props
from getStaticPaths
#4920
Labels
- P2: nice to have
Not breaking anything but nice to have (priority)
props
from getStaticPaths
#4920
What version of
astro
are you using?1.3.0
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
Mac
Describe the Bug
Custom endpoints/API Routes support
getStaticPaths
for dynamic routing in static mode. Theparams
in each route can be accessed using theparams
property ofAPIContext
, but there is no way to access theprops
returned fromgetStaticPaths
.The fix would expose
props
onAPIContext
.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-e6xf7j?file=src%2Fpages%2F[id].json.ts%3AL8&on=stackblitz
Participation
The text was updated successfully, but these errors were encountered: