Refactor some readOnly attributes to have no type. Stop nesting plugin type fields. Refactor serializer/normalizer tests
This commit is contained in:
1 parent
75f75878a1
commit
46246441aa
2 files changed
+19
-56
No files matched your search
@@ -1,34 +1,33 @@
|
||||
import GeneratedHostModel from '../generated/models/host';
|
||||
import { attr } from '@ember-data/model';
|
||||
import { fragmentArray } from 'ember-data-model-fragments/attributes';
|
||||
|
||||
export default class HostModel extends GeneratedHostModel {
|
||||
// =attributes (nested under attributes)
|
||||
@fragmentArray('fragment-string', {
|
||||
readOnly: true,
|
||||
emptyArrayIfMissing: true,
|
||||
isNestedAttribute: true,
|
||||
})
|
||||
ip_addresses;
|
||||
// =attributes
|
||||
|
||||
// Static specific fields
|
||||
@attr('string', {
|
||||
description: 'The address (DNS or IP name) used to reach the host',
|
||||
isNestedAttribute: true,
|
||||
})
|
||||
address;
|
||||
|
||||
// Plugin specific fields
|
||||
@attr({
|
||||
readOnly: true,
|
||||
emptyArrayIfMissing: true,
|
||||
})
|
||||
ip_addresses;
|
||||
|
||||
@attr('string', {
|
||||
description: '',
|
||||
readOnly: true,
|
||||
isNestedAttribute: true,
|
||||
})
|
||||
external_id;
|
||||
|
||||
// Aws specific
|
||||
@fragmentArray('fragment-string', {
|
||||
@attr({
|
||||
readOnly: true,
|
||||
emptyArrayIfMissing: true,
|
||||
isNestedAttribute: true,
|
||||
})
|
||||
dns_names;
|
||||
|
||||
|
||||
Reference in new issue
Block a user