Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292900

Allow marking a config schema types to be marked as "internal" (to avoid exposing them via HTTP APIs)

$
0
0

Problem/Motivation

As of #3028301: Do not expose to Layout Builder's sections either in defaults or overrides to REST and other external APIs, Layout Builder is not yet ready to expose its "layout description data structure" as an API — that's what #2942975: Expose Layout Builder data to REST and JSON:API aims to fix. As a work-around, we created \Drupal\layout_builder\Normalizer\LayoutEntityDisplayNormalizer to ensure this is not exposed via rest.module.

However, this then had to be repeated for jsonapi.module in #3042198: Add JSON:API integration test for LayoutBuilderEntityViewDisplay. But JSON:API module doesn't allow for such arbitrary
alterations, because it makes schema support impossible (see https://www.drupal.org/project/openapi) and endangers JSON:API spec compliance.

Proposed resolution

Bring the internal flag from Typed Data definitions over to config schema as well, then we could just mark third_party_settings.layout_builder.sections as internal and the JSON:API module would respect that. We can make the RESTful Web Services module respect it too, and remove \Drupal\layout_builder\Normalizer\LayoutEntityDisplayNormalizer.

Remaining tasks

TBD

User interface changes

None.

API changes

Ability to mark

Data model changes

No changes, only an addition: a internal flag (name TBD) on config schemas would allow a certain subtree from the config schema to be marked as an internal implementation detail, that should not be exposed via HTTP APIs.

Release notes snippet

TBD


Viewing all articles
Browse latest Browse all 292900

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>