Upgrade api to ember 4.12 (#1833) (#1839)

* chore: 🤖 Upgrade API layer to ember 4.12

* chore: 🤖 Upgrade ember-data to 4.12

* fix: 🐛 Fix breaking change from usage of internal method

* chore: 🤖 Remove stylelint in API addon

* test: 💍 Fix broken API tests

* chore: 🤖 get rid of toArray

* test: 💍 Fix tests broken by ember data changes

---------

Co-authored-by: dharini <dharini@hashicorp.com>
This commit is contained in:
Zhihe Lianddharini authored and GitHub committed 2023-08-14 17:03:59 -04:00
1 parent 77b47e2cb3
commit 0e9042f588
21 files changed
+1338 -284

No files matched your search

+3 -3
View File
@@ -209,9 +209,9 @@ export default class ApplicationSerializer extends RESTSerializer {
* @return {object}
*/
normalizeMissingArrays(store, primaryModelClass, payload) {
const attrDefs = store._attributesDefinitionFor(
primaryModelClass.modelName
);
const attrDefs = store
.getSchemaDefinitionService()
.attributesDefinitionFor({ type: primaryModelClass.modelName });
if (attrDefs) {
Object.keys(attrDefs).forEach((key) => {
if (!payload[key] && attrDefs[key]?.options?.emptyArrayIfMissing) {