Enhanced Schema.org Markup for Shopify Products with Additional Review Properties, Product-Specific

How can I improve the Schema.org markup for my Shopify products to include additional review properties, product-specific variables, and aggregate review data?

{% if product.reviews.size > 0 %}
  {% assign ratingCount = product.reviews.size %}
  {% assign ratingValue = 0 %}
  {% for review in product.reviews %}
    {% assign ratingValue = ratingValue | plus: review.rating %}
  {% endfor %}
  {% assign averageRating = ratingValue | divided_by: ratingCount %}
  {% assign bestRating = 5 %}
  {% assign worstRating = 1 %}
  
  
{% endif %}