Closed (fixed)
Project:
JSON:API Extras
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Apr 2019 at 04:45 UTC
Updated:
29 Jan 2022 at 11:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
richgerdesThe attached patch removes the re implemented service to implement the
ResourceType::getPublicName()andResourceType::isFieldEnabled()functions for fields.Comment #3
richgerdesComment #4
e0ipsoI believe you will still need this to get the schema out of the potential Field Enhancer.
Comment #5
richgerdesThe logic in the patch from #2882269: Support for JSON API's ResourceType::getPublicName() and ResourceType::isFieldEnabled() was the same as that found here. Since you went the route in #3053272: Update JSON:API Schema generation this logic may not have been preserved. I think doing it the #2882269: Support for JSON API's ResourceType::getPublicName() and ResourceType::isFieldEnabled() method would have been cleaner since it let us take out this customization from jsonapi.
Anyways, since we've gone the route we have, I think it would make sense to verify if this customization is still required here, or if the logic could still be moved over to schemata in order to keep things organized and prevent the need for jsonapi_extras of needing to care about schema.
Comment #6
bbralaI see a lot of closed issues. @e0ipso since you know both modules, would you know if the status of this?
Comment #7
bradjones1Yes. I came here looking to find/file an issue relating to the fact enhancer-altered schemas are not being merged in, when generating OpenAPI schema.
So, the bulk of the existing logic in this normalizer can go, since it's accounted for in the first-class field name/disablement support. However, we need to consult the field enhancer to get the correct schema.
Relates to #3224754: Make schema normalizer overrides module-agnostic (support jsonapi_schema as well as Schemata/OpenAPI)
Comment #9
bradjones1Updated MR - the original included some code from #3229890: Better compatibility with other decorations of resource type repository - this is now clean. That other issue is NR, as well.
Comment #10
bradjones1Comment #11
bradjones1@bbrala I think this and #3229890: Better compatibility with other decorations of resource type repository would be great to get in together to tag 3.21?
Comment #12
bbralaYeah, just wanted to wait for tests and then got sucked into something else :) I won't wait long for a release.
Comment #14
bbralaLooking good, thanks!
Comment #15
bbrala