🆒 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
🆒 Your use case
Currently, dynamic params seem not named with
[DynamicParam]in tree. For tools likeh3, it would be helpful to typegetRouteParams(event)object for exampele.🆕 The solution you'd like
Method 1:
Method 2:
🔍 Alternatives you've considered
No response
ℹ️ Additional info
No response