Skip to content

Commit

Permalink
changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed Dec 3, 2024
1 parent d10b7dc commit 5a05981
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- `c-select-many-to-many` is now based on `c-select` rather than `v-autocomplete`. As a result, it has gained support for all of the props and slots of `c-select`.
- Added strong types for pass-through Vuetify slots and props to `c-input`, `c-select`, `c-select-many-to-many`, and `c-datetime-picker`.
- Added a `color` prop to `c-datetime-picker`.
- Added experimental client-side support for System.Text.Json's PreserveReferences reference handling option in server responses. This does not require changes to your JSON settings in Program.cs - instead, it is activated by setting `refResponse` on the `DataSourceParameters` for a request (i.e. the `$params` object on a ViewModel or ListViewModel). This option can significantly reduce response sizes in cases where the same object occurs many times in a response.

# 5.2.1

Expand Down
10 changes: 5 additions & 5 deletions src/coalesce-vue/src/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ export interface DataSourceParameters {
* which can significantly reduce the size of the response payload. This will also cause the resulting
* `Model` and `ViewModel` instances on the client to be deduplicated.
*/
useRef?: boolean;
refResponse?: boolean;
}
export class DataSourceParameters {
constructor() {
this.includes = null;
this.dataSource = null;
this.useRef = false;
this.refResponse = false;
}
}

Expand Down Expand Up @@ -761,10 +761,10 @@ export class ApiClient<T extends ApiRoutedType> {
}

let headers = config?.headers;
if (standardParameters?.useRef) {
if (standardParameters?.refResponse) {
headers = {
...config?.headers,
Accept: standardParameters?.useRef
Accept: standardParameters?.refResponse
? ["application/json+ref", "application/json"]
: ["application/json"],
};
Expand All @@ -775,8 +775,8 @@ export class ApiClient<T extends ApiRoutedType> {
data: body,
responseType: method.return.type == "file" ? "blob" : "json",
cancelToken: this._cancelToken,
headers,
...config,
headers,
params: {
...query,
...(config && config.params ? config.params : null),
Expand Down

0 comments on commit 5a05981

Please sign in to comment.