Icu 6657 auth method model fragments refactor (#1507)

* refactor: 💡 Remove fragment usage for arrays in auth method
* chore: 🤖 Remove ember-data-model-fragments

✅ Closes: ICU-6657
This commit is contained in:
Zhihe Li authored and GitHub committed 2022-12-02 14:29:53 -05:00
1 parent f8429b15e9
commit c3d9fd8fc5
32 files changed
+161 -341

No files matched your search

-31
View File
@@ -1,5 +1,4 @@
import GeneratedAuthMethodModel from '../generated/models/auth-method';
import { fragmentArray } from 'ember-data-model-fragments/attributes';
import { equal } from '@ember/object/computed';
/**
@@ -29,36 +28,6 @@ export const options = {
export default class AuthMethodModel extends GeneratedAuthMethodModel {
// =attributes
@fragmentArray('fragment-auth-method-attributes-account-claim-map', {
emptyArrayIfMissing: true,
isNestedAttribute: true,
})
account_claim_maps;
@fragmentArray('fragment-string', {
emptyArrayIfMissing: true,
isNestedAttribute: true,
})
claims_scopes;
@fragmentArray('fragment-string', {
emptyArrayIfMissing: true,
isNestedAttribute: true,
})
signing_algorithms;
@fragmentArray('fragment-string', {
emptyArrayIfMissing: true,
isNestedAttribute: true,
})
allowed_audiences;
@fragmentArray('fragment-string', {
emptyArrayIfMissing: true,
isNestedAttribute: true,
})
idp_ca_certs;
/**
* @type {boolean}
*/
@@ -1,9 +0,0 @@
import Fragment from 'ember-data-model-fragments/fragment';
import { attr } from '@ember-data/model';
export default class FragmentAuthMethodAttributesAccountClaimMapModel extends Fragment {
// =attributes (OIDC)
@attr('string') from;
@attr('string') to;
}
@@ -1,14 +0,0 @@
import Fragment from 'ember-data-model-fragments/fragment';
import { attr } from '@ember-data/model';
/**
* Represents an item in an array of strings.
*/
export default class FragmentStringModel extends Fragment {
// =attributes
@attr('string', {
description: 'The value of the string.',
})
value;
}