-
Notifications
You must be signed in to change notification settings - Fork 897
Add examples for issue 4658 in examples.txt #4663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add Product Role examples (UNCL codes & Digital Twin) for issue schemaorg#4658
|
Hi @MatthiasWiesmann, here is the example PR as requested. Ready for review! |
|
@kevinbouti I think this goes into order / cart and not into product. It's a document definition standard and not a product definition standard. |
Removed the 'TYPES' line and updated 'inDefinedTermSet' to include a structured object with name and URL.
|
@fthobe You are technically correct that UNCL 1001 is a document code standard. However, in the context of Digital Product Passports (DPP) and circular economy, we often need to define the intended role of a product (e.g., is this item a "Spare Part" or a "Consumable"?) at the product definition level, long before it enters a cart or order. To address your concern, I have updated the examples to: Use DefinedTerm with a generic name (e.g., "Consumable") as the primary value. Treat UNCL 1001 only as a reference mapping inside inDefinedTermSet, rather than implying the product is a document. Added non-EDI examples like "Digital Twin" and "Software Component" to show broader usage. This strikes a balance between semantic strictness and real-world B2B needs |
|
I left a longer comment on the issue, I do absolutely believe replicating standard processes in schema is great, but I also believe an additional planing effort should be made to avoid fragmenting document types in a way that does not adhere to the existing implementation of the same data elsewhere. |
|
Thanks @fthobe. I've read your detailed feedback on the Issue. I completely agree that we must avoid fragmenting document standards. I will reply to the architectural points on the Issue thread to keep this PR focused. However, just to clarify the immediate DPP (Digital Product Passport) necessity driving this example: in a Circular Economy context (like the EU Ecodesign for Sustainable Products Regulation), the "role" of an item (e.g., Spare Part, Raw Material, Recycled Component) is an intrinsic property of the physical object itself. A repairer or recycler scanning a QR code years after the initial sale needs to know this I'll jump over to the Issue now to continue the discussion on alignment. |
| "@type": "Product", | ||
| "name": "Laptop Battery Replacement", | ||
| "description": "A consumable battery for Model X", | ||
| "hasProductRole": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is property is not defined (yet) and this should cause the ruby tests to fail.
Make sure to build the site with
./software/util/buildsite.py -c -a -r --rubytests
MatthiasWiesmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot add examples before the schema changes.
|
hanks @MatthiasWiesmann for catching that! I need to first:
I'll hold this PR and start with the schema property definition first. |
Updated JSON-LD examples to include additional context and structured data for products.
kevinbouti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feat(#4658): Correct JSON-LD examples for DPP compliance
- Replace hasProductRole with schema.org-compliant category/additionalProperty
- Consolidate @context definition and remove duplicates
- Add unique @id identifiers for RDF compatibility
- Change CRM Module type to SoftwareApplication
- Preserve UN/CEFACT reference (code 711)
- Ensure multi-format serialization ready
Tests: JSON-LD valid, DPP compliant, RDF convertible
| "category": "Consumable", | ||
| "additionalProperty": [ | ||
| { | ||
| "@type": "PropertyValue", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what this should express.
UN/CEFACT Code is not a good name (key), that's a whole standard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the guidance. You are right, using "UN/CEFACT Code" as the name was semantically weak.
I have updated the example to use the standard PropertyValue pattern correctly:
Used propertyID to explicitly link to the UN/CEFACT standard URI (machine-readable).
Changed name to a generic "Product Type Code".
Kept the value "711" (Consumable).
kevinbouti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have updated the example to use the standard PropertyValue pattern correctly:
Renamed property: Changed name to a generic "Product Type Code" instead of the standard's name.
Added propertyID: Explicitly linked to the UN/CEFACT standard URI (https://service.unece.org/trade/untdid/d19b/tred/tred1001.htm) to make it machine-readable.
Added examples for issue 4658 including product and software application details in various formats.
kevinbouti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mise à jour
| "@type": "PropertyValue", | ||
| "propertyID": "GTIN", | ||
| "value": "5901234123457" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this into the gtin property.
Updated the schema markup for product details to use 'gtin' directly instead of an identifier div. Adjusted the structure for consistency across various product types.
kevinbouti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mise à jour
Removed redundant 'Software Component' category and additional property from examples.
kevinbouti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update
- Exemples pour Product et SoftwareApplication - Formats: PRE-MARKUP, MICRODATA, RDFA, JSON-LD - Contribution officielle à Schema.org Community Group - Référence: schemaorg/schemaorg#4663
Add Product Role examples (UNCL codes & Digital Twin) for issue #4658