-
-
Notifications
You must be signed in to change notification settings - Fork 263
Open
Labels
bug 🔥Something isn't workingSomething isn't working
Description
Description
Description
Date transformers are not generated for collection endpoints, when:
- Collection items use
$refto reference component schemas (not inline schemas) - The same schema component IS transformed correctly when used directly
Expected Behavior
The same schema component (UserMatch.jsonld-match.collection.read) IS transformed correctly when used directly:
- Single-item endpoint (
/api/admin/{company}/matches/{id}/{kind}) → transformer generated - Collection endpoint (
/api/admin/{company}/matches) → transformer NOT generated
Generated code:
export function getAdminCompanyMatchesIdKind(...) {
return client.get({
responseTransformer: apiAdminCompanymatchesIdKindGetResponseTransformer,
url: '/api/admin/{company}/matches/{id}/{kind}',
})
}
export function listAdminCompanyMatches(...) {
return client.get({
// responseTransformer: MISSING
url: '/api/admin/{company}/matches',
})
}Actual Behavior
- TypeScript types claim dates are
Date:lastMessageSentAt?: Date | null - Runtime data has dates as strings (JSON doesn't have Date types)
- Code expecting
Dateobjects fails at runtime (e.g., calling.getTime()on a string)
Reproducible example or configuration
https://stackblitz.com/edit/hey-api-client-fetch-example-a95akxjr?file=repro-client%2Fsdk.gen.ts
OpenAPI specification (optional)
No response
System information (optional)
No response
Copilot
Metadata
Metadata
Assignees
Labels
bug 🔥Something isn't workingSomething isn't working