You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: FETCH_MIGRATION.md
+30-22Lines changed: 30 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -40,34 +40,42 @@ Code will be on the `master` branch.
40
40
### Other repositories
41
41
42
42
-[x] Update [kubernetes-client/gen](https://github.com/kubernetes-client/gen)'s typescript-fetch files to let us pass in the `typescriptThreePlus` config option <sup>[1](https://github.com/OpenAPITools/openapi-generator/issues/9973)[2](https://github.com/OpenAPITools/openapi-generator/issues/3869#issuecomment-584152932)</sub>
43
-
-[] Update [openapi-generator](https://github.com/OpenAPITools/openapi-generator)'s typescript-fetch flavor to mark parameters as optional if all parameters are optional <sup>[3](https://github.com/OpenAPITools/openapi-generator/issues/6440)</sup>
43
+
-[x] Update [openapi-generator](https://github.com/OpenAPITools/openapi-generator)'s typescript-fetch flavor to mark parameters as optional if all parameters are optional <sup>[3](https://github.com/OpenAPITools/openapi-generator/issues/6440)</sup>
44
44
45
45
### Kubernetes-client repository
46
46
47
-
-[ ] Increment `OPENAPI_GENERATOR_COMMIT` to be [version 5.3.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.3.0) (with the optional parameters addition)
48
-
-[ ]`npm install node-fetch` to install node-fetch
49
-
-[ ] Switch generate-client script to use typescript-fetch
50
-
-[ ] Import and inject node-fetch in `src/api.ts` with the following
51
-
52
-
```typescript
53
-
importfetchfrom'node-fetch';
54
-
55
-
// inject node-fetch
56
-
if (!globalThis.fetch) {
57
-
// @ts-ignore
58
-
globalThis.fetch=fetch;
59
-
globalThis.Headers=Headers;
60
-
globalThis.Request=Request;
61
-
globalThis.Response=Response;
62
-
}
63
-
```
64
-
65
-
-[ ] Generate api with `npm run generate`
66
-
-[ ] Match src/gen/api.ts to new generated layout (it changes slightly)
47
+
-[x] Increment `OPENAPI_GENERATOR_COMMIT` to be [version 5.3.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.3.0) (with the optional parameters addition)
48
+
-[x]`npm install node-fetch` to install node-fetch
49
+
-[x] Switch generate-client script to use typescript-fetch
50
+
-[x] Generate api with `npm run generate`
51
+
-[x] Match src/gen/api.ts to new generated layout (it changes slightly)
67
52
-[ ] Fix errors in /src folder (due to new api)
53
+
-[ ] migrate src/auth.ts, the dependent implementations (ex: azure_auth, gcp_auth etc) and tests to fetch api from request
54
+
-[ ] migrate src/log.ts and its tests to fetch api from request
55
+
- major remaining work is fixing up async signatures and return piping
56
+
-[ ] migrate src/watch.ts and its tests to fetch api from request
57
+
- remove decprecated requestImpl and RequestInterface
58
+
- implement queryParams parameter in watch method by injecting them into the fetch call
59
+
- update tests in src/watch_test.ts
68
60
-[ ] Fix errors in test (due to new api)
69
61
-[ ] Test all features
70
-
-[ ] Fix examples (due to new api)
62
+
-[ ] Fix examples and validate their param signatures (due to new api)
63
+
64
+
-[ ] cache-example
65
+
-[ ] example
66
+
-[ ] follow-logs
67
+
-[ ] in-cluster-create-job-from-cronjob
68
+
-[ ] in-cluster
69
+
-[ ] ingress
70
+
-[ ] namespace
71
+
-[ ] patch-example
72
+
-[ ] raw-example (note: uses request lib directly, will require full fetch migration not just client param swap)
0 commit comments