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
Found out that the filter types weren't being enforced unless inlined. Essentially rendering the feature useless.
This is because object literals undergo a special treatement called "excess property checks", if a property that doesn't exist is added it throws an error. This is what we want, but only happens if you inline your object.
Copy file name to clipboardExpand all lines: codegen/templates/api/_RESOURCE_.ts.hbs
+2-5Lines changed: 2 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,6 @@ import { {{this}} } from '../models/{{this}}';
3
3
{{/resource.fileImports}}
4
4
import { PartialDeep } from '../models/PartialDeep';
5
5
import { RequiredDeep } from '../models/RequiredDeep';
6
-
import { Filters } from '../models/Filters';
7
6
import { RequestOptions } from '../models/RequestOptions';
8
7
import http from '../utils/HttpClient';
9
8
import OrderCloudError from '../utils/OrderCloudError';
@@ -31,12 +30,10 @@ class {{resource.id}} {
31
30
* @param requestOptions.cancelToken Provide an [axios cancelToken](https://github.com/axios/axios#cancellation) that can be used to cancel the request.
32
31
* @param requestOptions.requestType Provide a value that can be used to identify the type of request. Useful for error logs.
0 commit comments