-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
🆒 Your use case
Currently, dynamic params seem not named with [DynamicParam]
in tree. For tools like h3
, it would be helpful to type getRouteParams(event)
object for exampele.
🆕 The solution you'd like
Method 1:
interface Schema {
[DynamicParam<"name">]: {
[Endpoint]: {
GET: { response: { type: 'dynamic', method: 'GET' } }
POST: {
body: { id: boolean }
response: { type: 'dynamic', method: 'POST' }
}
}
}
}
Method 2:
interface Schema {
[DynamicParam]: {
paramName: "name",
[Endpoint]: {
GET: { response: { type: 'dynamic', method: 'GET' } }
POST: {
body: { id: boolean }
response: { type: 'dynamic', method: 'POST' }
}
}
}
}
🔍 Alternatives you've considered
No response
ℹ️ Additional info
No response
danielroe and dargmuesli
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request