Explicit declaration of Schema Types

Created on 9 October 2017, about 7 years ago
Updated 23 July 2024, 4 months ago

Problem/Motivation

In order to provide contextual error messages, and otherwise plan ahead to facilitate UI building, request validation, and so on, we need a more explicit mechanism to allow schema types to declare themselves, other than the existence of a collection of normalizer services.

Proposed resolution

In #2868562: Better error messages β†’ I explored this via a plugin mechanism, though in practice it could be that a service collector is just as effective. Either way, the primary need right now is in metadata entries rather than per schema type logic.

As a nice-to-have, it would be possible for a schema type to declare an associated MIME-Type, and have SchemataServiceProvider register that content type header for the serialization format. Doing this is a future scope thing, but will have to be researched a bit to identify if it's possible and how to see how that influences the implementation here.

Remaining tasks

  • Research central management of MIME types via SchemataServiceProvider
  • Confirm a direction between a service collector and a plugin architecture
  • Port code out of the current patch to #2868562: Better error messages β†’ as makes sense (and is not directly related to the error handling).

User interface changes

None.

API changes

Additions.

Data model changes

None.

πŸ“Œ Task
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Grayside

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024