fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #863 from hey-api/fix/fetch-query-date

fix: cast query params dates into ISO strings

authored by

Lubos and committed by
GitHub
650a406b 70a375e6

+20 -3
+5
.changeset/twelve-chicken-heal.md
··· 1 + --- 2 + '@hey-api/client-fetch': patch 3 + --- 4 + 5 + fix: cast query params dates into ISO strings
+5 -1
packages/client-fetch/src/utils.ts
··· 150 150 style, 151 151 value, 152 152 }: SerializeOptions<ObjectSeparatorStyle> & { 153 - value: Record<string, unknown>; 153 + value: Record<string, unknown> | Date; 154 154 }) => { 155 + if (value instanceof Date) { 156 + return value.toISOString(); 157 + } 158 + 155 159 if (style !== 'deepObject' && !explode) { 156 160 let values: string[] = []; 157 161 Object.entries(value).forEach(([key, v]) => {
+5 -1
packages/openapi-ts/test/__snapshots__/test/generated/v3_hey-api_client-fetch_bundle/core/utils.ts.snap
··· 150 150 style, 151 151 value, 152 152 }: SerializeOptions<ObjectSeparatorStyle> & { 153 - value: Record<string, unknown>; 153 + value: Record<string, unknown> | Date; 154 154 }) => { 155 + if (value instanceof Date) { 156 + return value.toISOString(); 157 + } 158 + 155 159 if (style !== 'deepObject' && !explode) { 156 160 let values: string[] = []; 157 161 Object.entries(value).forEach(([key, v]) => {
+5 -1
packages/openapi-ts/test/__snapshots__/test/generated/v3_hey-api_client-fetch_bundle_transform/core/utils.ts.snap
··· 150 150 style, 151 151 value, 152 152 }: SerializeOptions<ObjectSeparatorStyle> & { 153 - value: Record<string, unknown>; 153 + value: Record<string, unknown> | Date; 154 154 }) => { 155 + if (value instanceof Date) { 156 + return value.toISOString(); 157 + } 158 + 155 159 if (style !== 'deepObject' && !explode) { 156 160 let values: string[] = []; 157 161 Object.entries(value).forEach(([key, v]) => {