(This is a self-answered question. It wasn't posted in this post since the user asked for microdata, not JSON-LD)
How do you use the schema.org property "Warranty", listed in https://schema.org/warranty?.
There're no examples provided, not even for JSON-LD format. For instance, the article on offers provides examples like this:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",
"aggregateRating": {
"@type": "AggregateRating",
"bestRating": "100",
"ratingCount": "24",
"ratingValue": "87"
},
"image": "dell-30in-lcd.jpg",
"name": "Dell UltraSharp 30\" LCD Monitor",
"offers": {
"@type": "AggregateOffer",
"highPrice": "$1495",
"lowPrice": "$1250",
"offerCount": "8",
"offers": [
{
"@type": "Offer",
"url": "save-a-lot-monitors.com/dell-30.html"
},
{
"@type": "Offer",
"url": "jondoe-gadgets.com/dell-30.html"
}
]
}
}
</script>
The correct usage is as follows (somewhere inside your HTML code):
Tested on Google's Structured Data Testing Tool. You can check it too.
The organization says the
warrantyproperty must be insideOfferorDemand, and that it should have WarrantyPromise inside.They also say WarrantyPromise can have the properties
durationOfWarrantyandwarrantyScope.For
durationOfWarrantyyou must useQuantitativeValue, which allowsvalueto be used.For
warrantyScopeyou must useWarrantyScope, which allowsdescriptionto be used.Finally, they talk something about
warrantyPromise(notWarrantyPromise) stating thatWarrantyPromiseproperty must be insidewarrantyPromise.