-
-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the feature
Current limitations for generating specs and accessing dynamic parameters:
-
For generating specs: Instead of requiring dynamic parameters to exist in the
.input
schema, we can assume they expect astring
type when we cannot infer it from the.input
schema. -
For accessing parameters: We can inject them into the context and access them through a unique symbol:
const router = os.prefix('/{organizationId}').use(({ next, context }) => {
const organizationId: string | undefined = getDynamicParams(context).organizationId
return next()
}).router({
// ...
})
Note:
.prefix
only affects procedures with defined paths inside.router
Additional information
- Would you be willing to help implement this feature?
unnoq and thereis
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request