Problem/Motivation
Right now we are treating the configuration entities as string properties outputting only their ID. We want to have full GET support for configuration entities.
Proposed resolution
Modify the normalizers to give support for the configuration entities so we can:
- GET individual configuration entities.
- GET collections of configuration entities.
- Include config entities in the returned payload.
- Set sparse fieldsets to select the output.
Remaining tasks
Identify the bigger tasks and put them in their own follow up issue so they can be tackled separately.
Identified tasks so far:
- Filter collections of configuration entities.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2733097--interdiff--5-3.txt | 1.97 KB | e0ipso |
| #5 | 2733097--config-entities--5.patch | 17.21 KB | e0ipso |
Comments
Comment #2
e0ipsoStarting to work on this.
Comment #3
e0ipsoSparse fieldsets and filters will be added separately in follow ups.
Comment #4
gabesulliceThis is super exciting! Great work!
Is this correct?
Usually I see this as ::CLASS
Is there a reason we're not hinting this in the main docblock?
Nit: field_names
Same as above.
ditto. I'm not saying it's wrong, I'm really just curious what the reason is ;)
Comment #5
e0ipso2. Doing a quick grep on core's code I found hundreds of examples of
::classbut only 2 of::CLASS.3., 5. and 6. Yes there is a reason. It is because of polymorphism. We are inheriting from a common class with
ContentEntityNormalizerand the method gets different objects there.The feedback is implemented now.
Comment #6
e0ipsoComment #7
e0ipsoMerging, as this is a blocker for #2734755: [FEATURE] Include support for sparse fieldsets in configuration entities. As usual if you have any other concern, let's create a follow up.
Comment #9
e0ipsoComment #11
wim leersFYI: #2724823: EntityResource: read-only (GET) support for configuration entities just landed. e0ipso wrote in there that he would follow up on this issue once that landed. So, reopening this issue to create the appropriate follow-up.
Comment #12
wim leersComment #13
e0ipsoMany thanks @Wim Leers! I'll make sure to add a follow up to have a spike to see what can be leveraged from REST core.
Comment #14
e0ipsocleanup