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
By default, `openapi-ts` exports schemas from your OpenAPI specification as plain JavaScript objects. A great use case for schemas is client-side form input validation.
@@ -194,9 +194,9 @@ Schemas are now exported from a single file. If you used imports from individual
194
194
By default, generated clients will use a single object argument to pass values to API calls. This is a significant change from the previous default of unspecified array of arguments. If migrating your application in one go isn't feasible, we recommend deprecating your old client and generating a new client.
195
195
196
196
```ts
197
-
import { DefaultService } from'client/services'// <-- old client with array arguments
197
+
import { DefaultService } from'client/services';// <-- old client with array arguments
198
198
199
-
import { DefaultService } from'client_v2/services'// <-- new client with options argument
199
+
import { DefaultService } from'client_v2/services';// <-- new client with options argument
200
200
```
201
201
202
202
This way, you can gradually switch over to the new syntax as you update parts of your code. Once you've removed all instances of `client` imports, you can safely delete the old `client` folder and find and replace all `client_v2` calls to `client`.
0 commit comments