Problem/Motivation

The https://schema.org/identifier property supports key/value pairs for identifiers. In Drupal, identifiers should be dedicated string field with size and pattern limitations.

Proposed resolution

Provide a Schema.org Blueprint Identifier module (schemadotorg_identifier.module) that manages the creation of identifiers as Schema.org types are created.

Notes

  • Identifier must be a simple field that allows for queries, apis, views, and tokens
  • Identifiers should be grouped together.
  • Identifier label via Schema.org need to support any format.
  • Identifier still must have a machine/api name.
  • Identifier sub-properties (flightNumber, globalLocationNumber, gtin, etc…) should be grouped.
  • Identifier field names should be prefixed with 'schema_identifier_*'
  • JSON:API should just use the machine name.
  • Default identifier should be npi and employee_id
field_prefix: schema_identifier_
field_definitions:
 employee_id:
   name: Employee ID
   label: Employee ID
   description: The organization's employee ID.
   required: true
   max_length: 10
 npi:
   name: NPI
   label: National Provider Identifier (NPI)
   description: A unique identification number for covered health care providers.
   required: true
   max_length: 10
  
schema_types:
 MedicalBusiness:
   - npi
 MedicalOrganization:
   - npi
 Person:
   - npi
   - employee_id

Remaining tasks

  • Create module
  • Create settings
  • Create field
  • Create field group
  • Create schemadotorg_identifier/README.md
  • Update doc/MODULES.md
  • Update JSON-LD
  • Update JSON:API
  • Write tests

User interface changes

Identifier support.

API changes

Identifier is no longer automatically added JSON-LD without the schemadotorg_identifier.module.

Data model changes

N/A

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jrockowitz created an issue. See original summary.

jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Issue summary: View changes
jrockowitz’s picture

Issue summary: View changes

jrockowitz’s picture

Status: Active » Needs review

  • jrockowitz committed e0e05a97 on 1.0.x
    Issue #3356895 by jrockowitz: Improve https://schema.org/identifier...
jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.