[PP-1] Remove schema references from contrib in SDC tests in core

Created on 26 April 2023, about 1 year ago
Updated 18 June 2024, 8 days ago

Problem/Motivation

Our test components are likely to be used as examples or starting point for components in user land. These component reference a schema URL that lives in the SDC contrib β†’ module.

See the following example:

$schema: https://git.drupalcode.org/project/sdc/-/raw/1.x/src/metadata.schema.json
name: Card
status: experimental
props:
  type: object
  required:
    - header
  properties:
    header:
      type: string
      title: Header
      description: The card header
      examples:
        - I am a header!
slots:
  card_body:
    title: Body
    description: The contents of the card.
    examples:
      - <p>Foo is <strong>NOT</strong> bar.</p>

Proposed resolution

Let's replace https://git.drupalcode.org/project/sdc/-/raw/1.x/src/metadata.schema.json with an appropriate URL.

One option is to use GitLab's URL for the new core module: https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/modules/sdc/src/metadata.schema.json. This has the problem that it contains 10.1.x and it will eventually change to something else, when we stabilize the module. It has the benefit that it's a reference to the schema that is actually used to validate our components.

Is there another option? Perhaps a documentation page that serves a JSON file, instead of HTML, or something similar?

Remaining tasks

  • Decide on the best URL to use.
  • Remove documentation references from the User Guide.
  • Update the URL to the schemas with the new schema URL.
πŸ“Œ Task
Status

Postponed

Version

11.0 πŸ”₯

Component
single-directory componentsΒ  β†’

Last updated about 21 hours ago

Created by

e0ipso Can Picafort

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.69.0 2024