<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged }</title>
<link>https://coderlegion.com/tag/%7D</link>
<description>Powered by Question2Answer</description>
<item>
<title>Schema Markup: The Hidden SEO Weapon</title>
<link>https://coderlegion.com/21113/schema-markup-the-hidden-seo-weapon</link>
<description>
&lt;p&gt;&amp;lt;!-- ========== SCHEMAS ========== --&amp;gt;

&amp;lt;!-- FAQPage schema (generated from translation data) --&amp;gt;


&amp;lt;!-- WebSite schema --&amp;gt;


&amp;lt;!-- LocalBusiness schema --&amp;gt;



?&amp;gt;


&amp;lt;!-- Organization schema --&amp;gt;


&amp;lt;!-- BreadcrumbList schema (headline from translation) --&amp;gt;


&amp;lt;!-- CommunicateAction schema --&amp;gt;


&amp;lt;!-- ========== ARTICLE CONTENT ========== --&amp;gt;
&lt;/p&gt;&lt;h1&gt;Schema Markup: The Hidden SEO Weapon Most Sites Ignore&lt;/h1&gt;
&lt;div class=&quot;post-meta&quot;&gt;
    &lt;span class=&quot;post-date&quot;&gt;March 2026&lt;/span&gt;
    &lt;span class=&quot;post-read&quot;&gt;14 min read&lt;/span&gt;
&lt;/div&gt;

&lt;p class=&quot;intro&quot;&gt;&lt;/p&gt;&lt;p&gt;I&amp;rsquo;m Jacob Campbell, and if I had to name the most underused SEO tactic, it&amp;rsquo;s schema markup. Most sites never add it, which is exactly why it&amp;rsquo;s a quiet competitive edge: the same ranking, but a richer, more clickable listing. Structured data tells Google what your content &lt;em&gt;is&lt;/em&gt; so it can show stars, FAQs and prices right in the results. Here&amp;rsquo;s why it works and how to start &amp;mdash; with Google&amp;rsquo;s own numbers.&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;application/ld+json&quot;&amp;gt;
{
  &quot;@context&quot;: &quot;&lt;a href=&quot;https://schema.org&quot; rel=&quot;nofollow&quot;&gt;https://schema.org&lt;/a&gt;&quot;,
  &quot;@type&quot;: &quot;LocalBusiness&quot;,
  &quot;name&quot;: &quot;BuiltToWinWeb&quot;,
  &quot;image&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/logo.webp&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/logo.webp&lt;/a&gt;&quot;,
  &quot;address&quot;: {
    &quot;@type&quot;: &quot;PostalAddress&quot;,
    &quot;streetAddress&quot;: &quot;7322 Ashley Shores Circle&quot;,
    &quot;addressLocality&quot;: &quot;Lake Worth&quot;,
    &quot;addressRegion&quot;: &quot;FL&quot;,
    &quot;postalCode&quot;: &quot;33467&quot;,
    &quot;addressCountry&quot;: &quot;US&quot;
  },
  &quot;telephone&quot;: &quot;+15613017130&quot;,
  &quot;openingHours&quot;: &quot;Mo-Fr 09:00-17:00&quot;,
  &quot;aggregateRating&quot;: {
    &quot;@type&quot;: &quot;AggregateRating&quot;,
    &quot;ratingValue&quot;: &quot;4.9&quot;,
    &quot;reviewCount&quot;: &quot;7&quot;
  },
  &quot;priceRange&quot;: &quot;$$&quot;
}
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;application/ld+json&quot;&amp;gt;
{
  &quot;@context&quot;: &quot;&lt;a href=&quot;https://schema.org&quot; rel=&quot;nofollow&quot;&gt;https://schema.org&lt;/a&gt;&quot;,
  &quot;@type&quot;: &quot;FAQPage&quot;,
  &quot;mainEntity&quot;: [
    {
      &quot;@type&quot;: &quot;Question&quot;,
      &quot;name&quot;: &quot;How much does a custom PHP website cost?&quot;,
      &quot;acceptedAnswer&quot;: {
        &quot;@type&quot;: &quot;Answer&quot;,
        &quot;text&quot;: &quot;BuiltToWinWeb offers three flat&amp;#8209;fee packages: Business Pro Website at $1,750, Ecommerce Website at $5,600, and SaaS/Web Application at $10,000.&quot;
      }
    },
    {
      &quot;@type&quot;: &quot;Question&quot;,
      &quot;name&quot;: &quot;Why does custom PHP outrank WordPress?&quot;,
      &quot;acceptedAnswer&quot;: {
        &quot;@type&quot;: &quot;Answer&quot;,
        &quot;text&quot;: &quot;WordPress loads 847KB of JavaScript on average; custom PHP serves only what's needed. That means LCP scores under 1s vs WordPress&amp;rsquo;s 3.8s, which directly improves rankings.&quot;
      }
    }
  ]
}
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;@type&quot;: &quot;Product&quot;,
  &quot;name&quot;: &quot;Custom Ecommerce Website Development&quot;,
  &quot;image&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/ecommerce.webp&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/ecommerce.webp&lt;/a&gt;&quot;,
  &quot;description&quot;: &quot;Full custom PHP ecommerce store with Stripe checkout. One flat fee, no monthly fees.&quot;,
  &quot;offers&quot;: {
    &quot;@type&quot;: &quot;Offer&quot;,
    &quot;price&quot;: &quot;5600&quot;,
    &quot;priceCurrency&quot;: &quot;USD&quot;,
    &quot;availability&quot;: &quot;&lt;a href=&quot;https://schema.org/InStock&quot; rel=&quot;nofollow&quot;&gt;https://schema.org/InStock&lt;/a&gt;&quot;
  },
  &quot;aggregateRating&quot;: {
    &quot;@type&quot;: &quot;AggregateRating&quot;,
    &quot;ratingValue&quot;: &quot;5.0&quot;,
    &quot;reviewCount&quot;: &quot;7&quot;
  }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;@context&quot;: &quot;&lt;a href=&quot;https://schema.org&quot; rel=&quot;nofollow&quot;&gt;https://schema.org&lt;/a&gt;&quot;,
  &quot;@type&quot;: &quot;BreadcrumbList&quot;,
  &quot;itemListElement&quot;: [
    { &quot;@type&quot;: &quot;ListItem&quot;, &quot;position&quot;: 1, &quot;name&quot;: &quot;Home&quot;, &quot;item&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/&lt;/a&gt;&quot; },
    { &quot;@type&quot;: &quot;ListItem&quot;, &quot;position&quot;: 2, &quot;name&quot;: &quot;Services&quot;, &quot;item&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/services/&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/services/&lt;/a&gt;&quot; },
    { &quot;@type&quot;: &quot;ListItem&quot;, &quot;position&quot;: 3, &quot;name&quot;: &quot;Custom PHP Website&quot;, &quot;item&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/services/custom-php-website/&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/services/custom-php-website/&lt;/a&gt;&quot; }
  ]
}&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;@type&quot;: &quot;Article&quot;,
  &quot;headline&quot;: &quot;Schema Markup: The Hidden SEO Weapon&quot;,
  &quot;datePublished&quot;: &quot;2026-03-15&quot;,
  &quot;author&quot;: {
    &quot;@type&quot;: &quot;Person&quot;,
    &quot;name&quot;: &quot;Jacob Campbell&quot;
  },
  &quot;publisher&quot;: {
    &quot;@type&quot;: &quot;Organization&quot;,
    &quot;name&quot;: &quot;BuiltToWinWeb&quot;,
    &quot;logo&quot;: { &quot;@type&quot;: &quot;ImageObject&quot;, &quot;url&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/logo.webp&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/logo.webp&lt;/a&gt;&quot; }
  },
  &quot;mainEntityOfPage&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/blog/schema-markup&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/blog/schema-markup&lt;/a&gt;&quot;
}&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;ul&gt;
    &lt;/ul&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ol&gt;
    &lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;ul&gt;
    &lt;/ul&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function getProductSchema($product) {
    return [
        &quot;@context&quot; =&amp;gt; &quot;&lt;a href=&quot;https://schema.org&quot; rel=&quot;nofollow&quot;&gt;https://schema.org&lt;/a&gt;&quot;,
        &quot;@type&quot; =&amp;gt; &quot;Product&quot;,
        &quot;name&quot; =&amp;gt; $product['name'],
        &quot;description&quot; =&amp;gt; $product['description'],
        &quot;offers&quot; =&amp;gt; [
            &quot;@type&quot; =&amp;gt; &quot;Offer&quot;,
            &quot;price&quot; =&amp;gt; $product['price'],
            &quot;priceCurrency&quot; =&amp;gt; &quot;USD&quot;,
            &quot;availability&quot; =&amp;gt; $product['in_stock'] ? &quot;&lt;a href=&quot;https://schema.org/InStock&quot; rel=&quot;nofollow&quot;&gt;https://schema.org/InStock&lt;/a&gt;&quot; : &quot;&lt;a href=&quot;https://schema.org/OutOfStock&quot; rel=&quot;nofollow&quot;&gt;https://schema.org/OutOfStock&lt;/a&gt;&quot;
        ]
    ];
}

// Then output as JSON
$schema = getProductSchema($product);
echo '&amp;lt;script type=&quot;application/ld+json&quot;&amp;gt;' . json_encode($schema, JSON_UNESCAPED_SLASHES) . '&amp;lt;/script&amp;gt;';&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;

&lt;div class=&quot;article-cta&quot;&gt;
    &lt;a href=&quot;/contact&quot;&gt;&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;small&gt;&lt;em&gt;&lt;/em&gt;&lt;/small&gt;&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/21113/schema-markup-the-hidden-seo-weapon</guid>
<pubDate>Sun, 12 Jul 2026 07:45:45 +0000</pubDate>
</item>
<item>
<title>Schema Markup Guide: JSON-LD for Rich Results</title>
<link>https://coderlegion.com/21107/schema-markup-guide-json-ld-for-rich-results</link>
<description>
&lt;p&gt;&amp;lt;!-- ========== SCHEMAS ========== --&amp;gt;

&amp;lt;!-- FAQPage schema (generated from translation data) --&amp;gt;


&amp;lt;!-- WebSite schema --&amp;gt;


&amp;lt;!-- LocalBusiness schema --&amp;gt;



?&amp;gt;

&amp;lt;!-- Organization schema --&amp;gt;


&amp;lt;!-- BreadcrumbList schema (headline from translation) --&amp;gt;


&amp;lt;!-- CommunicateAction schema --&amp;gt;


&amp;lt;!-- ========== ARTICLE CONTENT ========== --&amp;gt;
&lt;/p&gt;&lt;h1&gt;Schema Markup Guide: Using JSON-LD to Win Rich Results&lt;/h1&gt;
&lt;div class=&quot;post-meta&quot;&gt;
    &lt;span class=&quot;post-date&quot;&gt;February 2026&lt;/span&gt;
    &lt;span class=&quot;post-read&quot;&gt;16 min read&lt;/span&gt;
&lt;/div&gt;

&lt;p class=&quot;intro&quot;&gt;&lt;/p&gt;&lt;p&gt;I&amp;rsquo;m Jacob Campbell, and schema markup is one of the most underused SEO wins out there &amp;mdash; it&amp;rsquo;s how you turn a plain blue link into a rich result with stars, FAQs and prices. Structured data is just a small block of code that tells Google exactly what your page &lt;em&gt;is&lt;/em&gt;: a product, a local business, a recipe, an FAQ. Get it right and Google can show your page in a richer, more clickable format. This guide explains how it works, which types matter, and how to add them properly &amp;mdash; straight from Google&amp;rsquo;s documentation.&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;application/ld+json&quot;&amp;gt;
{
  &quot;@context&quot;: &quot;&lt;a href=&quot;https://schema.org&quot; rel=&quot;nofollow&quot;&gt;https://schema.org&lt;/a&gt;&quot;,
  &quot;@type&quot;: &quot;Organization&quot;,
  &quot;name&quot;: &quot;BuiltToWinWeb&quot;,
  &quot;url&quot;: &quot;&lt;a href=&quot;https://built2winweb.com&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com&lt;/a&gt;&quot;,
  &quot;logo&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/logo.webp&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/logo.webp&lt;/a&gt;&quot;,
  &quot;sameAs&quot;: [
    &quot;&lt;a href=&quot;https://www.linkedin.com/in/jacob-campbell-32a60a1a7/&quot; rel=&quot;nofollow&quot;&gt;https://www.linkedin.com/in/jacob-campbell-32a60a1a7/&lt;/a&gt;&quot;,
    &quot;&lt;a href=&quot;https://www.upwork.com/freelancers/~016276996a9883140f&quot; rel=&quot;nofollow&quot;&gt;https://www.upwork.com/freelancers/~016276996a9883140f&lt;/a&gt;&quot;
  ],
  &quot;contactPoint&quot;: {
    &quot;@type&quot;: &quot;ContactPoint&quot;,
    &quot;telephone&quot;: &quot;+15613017130&quot;,
    &quot;contactType&quot;: &quot;customer service&quot;,
    &quot;availableLanguage&quot;: &quot;English&quot;
  }
}
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;@type&quot;: &quot;LocalBusiness&quot;,
  &quot;name&quot;: &quot;BuiltToWinWeb&quot;,
  &quot;address&quot;: {
    &quot;@type&quot;: &quot;PostalAddress&quot;,
    &quot;streetAddress&quot;: &quot;7322 Ashley Shores Circle&quot;,
    &quot;addressLocality&quot;: &quot;Lake Worth&quot;,
    &quot;addressRegion&quot;: &quot;FL&quot;,
    &quot;postalCode&quot;: &quot;33467&quot;,
    &quot;addressCountry&quot;: &quot;US&quot;
  },
  &quot;geo&quot;: {
    &quot;@type&quot;: &quot;GeoCoordinates&quot;,
    &quot;latitude&quot;: &quot;26.5986&quot;,
    &quot;longitude&quot;: &quot;-80.1784&quot;
  },
  &quot;telephone&quot;: &quot;+15613017130&quot;,
  &quot;openingHours&quot;: &quot;Mo-Fr 09:00-17:00&quot;,
  &quot;priceRange&quot;: &quot;$$&quot;,
  &quot;aggregateRating&quot;: {
    &quot;@type&quot;: &quot;AggregateRating&quot;,
    &quot;ratingValue&quot;: &quot;5.0&quot;,
    &quot;reviewCount&quot;: &quot;7&quot;
  }
}&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;@type&quot;: &quot;FAQPage&quot;,
  &quot;mainEntity&quot;: [
    {
      &quot;@type&quot;: &quot;Question&quot;,
      &quot;name&quot;: &quot;How much does a custom PHP website cost?&quot;,
      &quot;acceptedAnswer&quot;: {
        &quot;@type&quot;: &quot;Answer&quot;,
        &quot;text&quot;: &quot;Flat&amp;#8209;fee packages: Business $1,750, Ecommerce $5,600, SaaS $10,000. One payment, no monthly fees.&quot;
      }
    },
    {
      &quot;@type&quot;: &quot;Question&quot;,
      &quot;name&quot;: &quot;Do you build ecommerce stores without Shopify?&quot;,
      &quot;acceptedAnswer&quot;: {
        &quot;@type&quot;: &quot;Answer&quot;,
        &quot;text&quot;: &quot;Yes &amp;ndash; custom PHP with Stripe checkout. No subscription fees, you own the code.&quot;
      }
    }
  ]
}&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;@type&quot;: &quot;Product&quot;,
  &quot;name&quot;: &quot;Custom PHP Ecommerce Store&quot;,
  &quot;image&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/ecommerce.jpg&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/ecommerce.jpg&lt;/a&gt;&quot;,
  &quot;description&quot;: &quot;Full&amp;#8209;featured custom online store with Stripe checkout. One flat fee, no monthly costs.&quot;,
  &quot;sku&quot;: &quot;BTW-ECOMM&quot;,
  &quot;offers&quot;: {
    &quot;@type&quot;: &quot;Offer&quot;,
    &quot;price&quot;: &quot;5600&quot;,
    &quot;priceCurrency&quot;: &quot;USD&quot;,
    &quot;availability&quot;: &quot;&lt;a href=&quot;https://schema.org/InStock&quot; rel=&quot;nofollow&quot;&gt;https://schema.org/InStock&lt;/a&gt;&quot;,
    &quot;url&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/services/ecommerce&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/services/ecommerce&lt;/a&gt;&quot;
  },
  &quot;aggregateRating&quot;: {
    &quot;@type&quot;: &quot;AggregateRating&quot;,
    &quot;ratingValue&quot;: &quot;5.0&quot;,
    &quot;reviewCount&quot;: &quot;7&quot;
  }
}&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;@type&quot;: &quot;BreadcrumbList&quot;,
  &quot;itemListElement&quot;: [
    { &quot;@type&quot;: &quot;ListItem&quot;, &quot;position&quot;: 1, &quot;name&quot;: &quot;Home&quot;, &quot;item&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/&lt;/a&gt;&quot; },
    { &quot;@type&quot;: &quot;ListItem&quot;, &quot;position&quot;: 2, &quot;name&quot;: &quot;Services&quot;, &quot;item&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/services/&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/services/&lt;/a&gt;&quot; },
    { &quot;@type&quot;: &quot;ListItem&quot;, &quot;position&quot;: 3, &quot;name&quot;: &quot;Custom PHP Website&quot;, &quot;item&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/services/custom-php-website/&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/services/custom-php-website/&lt;/a&gt;&quot; }
  ]
}&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;@type&quot;: &quot;Article&quot;,
  &quot;headline&quot;: &quot;Schema Markup Mastery: JSON&amp;#8209;LD for Rich Results&quot;,
  &quot;description&quot;: &quot;Complete guide to implementing schema markup with copy&amp;#8209;paste JSON&amp;#8209;LD examples.&quot;,
  &quot;datePublished&quot;: &quot;2026-02-15&quot;,
  &quot;dateModified&quot;: &quot;2026-05-24&quot;,
  &quot;author&quot;: {
    &quot;@type&quot;: &quot;Person&quot;,
    &quot;name&quot;: &quot;Jacob Campbell&quot;
  },
  &quot;publisher&quot;: {
    &quot;@type&quot;: &quot;Organization&quot;,
    &quot;name&quot;: &quot;BuiltToWinWeb&quot;,
    &quot;logo&quot;: { &quot;@type&quot;: &quot;ImageObject&quot;, &quot;url&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/logo.webp&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/logo.webp&lt;/a&gt;&quot; }
  },
  &quot;image&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/schema-guide.jpg&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/schema-guide.jpg&lt;/a&gt;&quot;,
  &quot;mainEntityOfPage&quot;: &quot;&lt;a href=&quot;https://built2winweb.com/blog/schema-markup-guide&quot; rel=&quot;nofollow&quot;&gt;https://built2winweb.com/blog/schema-markup-guide&lt;/a&gt;&quot;
}&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;@type&quot;: &quot;HowTo&quot;,
  &quot;name&quot;: &quot;How to Add Schema Markup to Your Website&quot;,
  &quot;step&quot;: [
    { &quot;@type&quot;: &quot;HowToStep&quot;, &quot;name&quot;: &quot;Choose your schema type&quot;, &quot;text&quot;: &quot;Select from LocalBusiness, FAQPage, Product, etc.&quot; },
    { &quot;@type&quot;: &quot;HowToStep&quot;, &quot;name&quot;: &quot;Generate JSON&amp;#8209;LD&quot;, &quot;text&quot;: &quot;Use a generator or write manually.&quot; },
    { &quot;@type&quot;: &quot;HowToStep&quot;, &quot;name&quot;: &quot;Add to your HTML head&quot;, &quot;text&quot;: &quot;Place the script tag in &amp;lt;head&amp;gt; or before &amp;lt;/body&amp;gt;.&quot; },
    { &quot;@type&quot;: &quot;HowToStep&quot;, &quot;name&quot;: &quot;Test with Rich Results Tool&quot;, &quot;text&quot;: &quot;Validate at search.google.com/test/rich-results.&quot; }
  ]
}&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;ol&gt;
    &lt;/ol&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;?php
function outputProductSchema($product) {
    $schema = [
        &quot;@context&quot; =&amp;gt; &quot;&lt;a href=&quot;https://schema.org&quot; rel=&quot;nofollow&quot;&gt;https://schema.org&lt;/a&gt;&quot;,
        &quot;@type&quot; =&amp;gt; &quot;Product&quot;,
        &quot;name&quot; =&amp;gt; $product['name'],
        &quot;description&quot; =&amp;gt; $product['description'],
        &quot;sku&quot; =&amp;gt; $product['sku'],
        &quot;offers&quot; =&amp;gt; [
            &quot;@type&quot; =&amp;gt; &quot;Offer&quot;,
            &quot;price&quot; =&amp;gt; number_format($product['price'], 2),
            &quot;priceCurrency&quot; =&amp;gt; &quot;USD&quot;,
            &quot;availability&quot; =&amp;gt; $product['in_stock'] ? &quot;&lt;a href=&quot;https://schema.org/InStock&quot; rel=&quot;nofollow&quot;&gt;https://schema.org/InStock&lt;/a&gt;&quot; : &quot;&lt;a href=&quot;https://schema.org/OutOfStock&quot; rel=&quot;nofollow&quot;&gt;https://schema.org/OutOfStock&lt;/a&gt;&quot;
        ]
    ];
    if (!empty($product['image_url'])) {
        $schema['image'] = $product['image_url'];
    }
    echo '&amp;lt;script type=&quot;application/ld+json&quot;&amp;gt;' . json_encode($schema, JSON_UNESCAPED_SLASHES) . '&amp;lt;/script&amp;gt;';
}
?&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;ul&gt;
    &lt;/ul&gt;

&lt;h3&gt;&lt;/h3&gt;
&lt;ul&gt;
    &lt;/ul&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &quot;@context&quot;: &quot;&lt;a href=&quot;https://schema.org&quot; rel=&quot;nofollow&quot;&gt;https://schema.org&lt;/a&gt;&quot;,
  &quot;@graph&quot;: [
    { &quot;@type&quot;: &quot;Organization&quot;, &quot;name&quot;: &quot;...&quot; },
    { &quot;@type&quot;: &quot;LocalBusiness&quot;, ... },
    { &quot;@type&quot;: &quot;FAQPage&quot;, ... }
  ]
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;

&lt;div class=&quot;article-cta&quot;&gt;
    &lt;a href=&quot;/contact&quot;&gt;&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;small&gt;&lt;em&gt;&lt;/em&gt;&lt;/small&gt;&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/21107/schema-markup-guide-json-ld-for-rich-results</guid>
<pubDate>Mon, 06 Jul 2026 07:45:45 +0000</pubDate>
</item>
<item>
<title>Local SEO Tips: Rank for Near Me Searches in 2026</title>
<link>https://coderlegion.com/21105/local-seo-tips-rank-for-near-me-searches-in-2026</link>
<description>
&lt;p&gt;&amp;lt;!-- ========== SCHEMAS ========== --&amp;gt;

&amp;lt;!-- FAQPage schema (generated from translation data) --&amp;gt;


&amp;lt;!-- WebSite schema --&amp;gt;


&amp;lt;!-- LocalBusiness schema --&amp;gt;



?&amp;gt;

&amp;lt;!-- Organization schema --&amp;gt;


&amp;lt;!-- BreadcrumbList schema (headline from translation) --&amp;gt;


&amp;lt;!-- CommunicateAction schema --&amp;gt;


&amp;lt;!-- ========== ARTICLE CONTENT ========== --&amp;gt;
&lt;/p&gt;&lt;h1&gt;Local SEO Tips: How to Rank for &amp;ldquo;Near Me&amp;rdquo; Searches in 2026&lt;/h1&gt;
&lt;div class=&quot;post-meta&quot;&gt;
    &lt;span class=&quot;post-date&quot;&gt;September 2025&lt;/span&gt;
    &lt;span class=&quot;post-read&quot;&gt;15 min read&lt;/span&gt;
&lt;/div&gt;

&lt;p class=&quot;intro&quot;&gt;&lt;/p&gt;&lt;p&gt;I&amp;rsquo;m Jacob Campbell, and local SEO is one of the highest-return things a small business can do &amp;mdash; yet most get it wrong because they don&amp;rsquo;t know what Google actually weighs. Google is refreshingly open here: local rankings come down to three things &amp;mdash; relevance, distance, and prominence. Once you know that, the &amp;ldquo;tips&amp;rdquo; stop being random and start being a checklist. This guide explains how the map pack really works and the concrete steps to climb it, with Google&amp;rsquo;s own documentation backing each point.&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;/ul&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;application/ld+json&quot;&amp;gt;
{
  &quot;@context&quot;: &quot;&lt;a href=&quot;https://schema.org&quot; rel=&quot;nofollow&quot;&gt;https://schema.org&lt;/a&gt;&quot;,
  &quot;@type&quot;: &quot;LocalBusiness&quot;,
  &quot;name&quot;: &quot;BuiltToWinWeb&quot;,
  &quot;address&quot;: {
    &quot;@type&quot;: &quot;PostalAddress&quot;,
    &quot;streetAddress&quot;: &quot;7322 Ashley Shores Circle&quot;,
    &quot;addressLocality&quot;: &quot;Lake Worth&quot;,
    &quot;addressRegion&quot;: &quot;FL&quot;,
    &quot;postalCode&quot;: &quot;33467&quot;,
    &quot;addressCountry&quot;: &quot;US&quot;
  },
  &quot;geo&quot;: {
    &quot;@type&quot;: &quot;GeoCoordinates&quot;,
    &quot;latitude&quot;: &quot;26.5986&quot;,
    &quot;longitude&quot;: &quot;-80.1784&quot;
  },
  &quot;telephone&quot;: &quot;+15613017130&quot;,
  &quot;openingHours&quot;: &quot;Mo-Fr 09:00-17:00&quot;,
  &quot;priceRange&quot;: &quot;$$&quot;,
  &quot;aggregateRating&quot;: {
    &quot;@type&quot;: &quot;AggregateRating&quot;,
    &quot;ratingValue&quot;: &quot;5.0&quot;,
    &quot;reviewCount&quot;: &quot;7&quot;
  },
  &quot;areaServed&quot;: [
    { &quot;@type&quot;: &quot;City&quot;, &quot;name&quot;: &quot;Boca Raton&quot; },
    { &quot;@type&quot;: &quot;City&quot;, &quot;name&quot;: &quot;Delray Beach&quot; },
    { &quot;@type&quot;: &quot;City&quot;, &quot;name&quot;: &quot;West Palm Beach&quot; }
  ]
}
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;ul&gt;
    &lt;/ul&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;ul&gt;
    &lt;/ul&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;ul&gt;
    &lt;/ul&gt;

&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;

&lt;div class=&quot;article-cta&quot;&gt;
    &lt;a href=&quot;/contact&quot;&gt;&lt;/a&gt;
&lt;/div&gt;

&lt;p&gt;&lt;small&gt;&lt;em&gt;&lt;/em&gt;&lt;/small&gt;&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/21105/local-seo-tips-rank-for-near-me-searches-in-2026</guid>
<pubDate>Sat, 04 Jul 2026 07:45:45 +0000</pubDate>
</item>
<item>
<title>Helm Values JSON Schema: Validate Your values.yaml Before It Breaks Production</title>
<link>https://coderlegion.com/15637/helm-values-json-schema-validate-your-values-yaml-before-it-breaks-production</link>
<description>
&lt;p&gt;Helm is the de facto package manager for Kubernetes, and &lt;code&gt;values.yaml&lt;/code&gt; is its primary interface for configuration. Yet for years, that interface has been completely unvalidated by default &amp;mdash; a free-form YAML file where any key can be anything, where typos silently pass through, and where misconfigured deployments only reveal themselves when pods fail to start in production. The &lt;code&gt;values.schema.json&lt;/code&gt; file changes that equation entirely. This article explains why schema validation matters, how to implement it properly, and how to integrate it into a modern CI/CD pipeline.&lt;/p&gt;



&lt;h2 class=&quot;wp-block-heading&quot;&gt;The Problem: Silent Failures in Production&lt;/h2&gt;



&lt;p&gt;Consider a platform team managing dozens of Helm releases across multiple clusters. A developer submits a values override file with &lt;code&gt;replicaCount: &quot;3&quot;&lt;/code&gt; instead of &lt;code&gt;replicaCount: 3&lt;/code&gt; &amp;mdash; a string where an integer is expected. Or they set &lt;code&gt;image.pullPolicy: Allways&lt;/code&gt; with a typo. Or they omit a required secret reference that the application needs to boot. In all three cases, Helm without schema validation will happily render the templates, produce Kubernetes manifests, and apply them to the cluster. The failure surfaces later &amp;mdash; sometimes much later &amp;mdash; as a CrashLoopBackOff, an ImagePullBackOff, or a subtle runtime error that takes hours to debug.&lt;/p&gt;



&lt;p&gt;This is not a hypothetical scenario. It is the daily reality for teams operating at scale without values validation. The root cause is architectural: Helm templates use Go&amp;rsquo;s &lt;code&gt;text/template&lt;/code&gt; engine, which is weakly typed and permissive by design. A template that does &lt;code&gt;{{ .Values.replicaCount }}&lt;/code&gt; will render whether the value is an integer, a string, or even a boolean. The resulting Kubernetes manifest may be invalid, but that error only surfaces when the Kubernetes API server rejects it &amp;mdash; or worse, accepts it but interprets it differently than intended.&lt;/p&gt;



&lt;p&gt;The consequences compound at scale. When a chart is used by multiple teams, the lack of a formal contract for acceptable values means every consumer has to read through template files and comments to understand what inputs are valid. There is no machine-readable specification. There is no IDE support. There is no guardrail. The only documentation is whatever the chart author happened to write in comments inside &lt;code&gt;values.yaml&lt;/code&gt; &amp;mdash; and comments do not stop a CI pipeline from shipping a broken deployment.&lt;/p&gt;



&lt;h2 class=&quot;wp-block-heading&quot;&gt;What Is values.schema.json&lt;/h2&gt;



&lt;p&gt;Since Helm 3.0.0, released in November 2019, Helm supports an optional &lt;code&gt;values.schema.json&lt;/code&gt; file at the root of a chart directory &amp;mdash; the same level as &lt;code&gt;Chart.yaml&lt;/code&gt; and &lt;code&gt;values.yaml&lt;/code&gt;. This file is a &lt;a href=&quot;https://json-schema.org/specification-links.html#draft-7&quot; target=&quot;_blank&quot; rel=&quot;noopener nofollow&quot;&gt;JSON Schema draft-07&lt;/a&gt; document that formally describes the structure, types, constraints, and required fields for the chart&amp;rsquo;s values.&lt;/p&gt;



&lt;p&gt;When this file is present, Helm automatically validates the merged values (defaults from &lt;code&gt;values.yaml&lt;/code&gt; merged with any user-supplied overrides) against the schema at multiple points: during &lt;code&gt;helm install&lt;/code&gt;, &lt;code&gt;helm upgrade&lt;/code&gt;, &lt;code&gt;helm template&lt;/code&gt;, and &lt;code&gt;helm lint&lt;/code&gt;. If validation fails, Helm refuses to proceed and prints a human-readable error message identifying exactly which value failed and why. This transforms a class of runtime failures into build-time failures &amp;mdash; the correct direction for any production system.&lt;/p&gt;



&lt;p&gt;The choice of JSON Schema draft-07 specifically is worth noting. Draft-07 is widely supported by tooling, including the &lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml&quot; target=&quot;_blank&quot; rel=&quot;noopener nofollow&quot;&gt;Red Hat YAML extension for VS Code&lt;/a&gt;, JetBrains IDEs, and most JSON Schema validators. It introduced the &lt;code&gt;if/then/else&lt;/code&gt; conditional keywords that are particularly useful for Helm charts. More recent drafts (2019-09, 2020-12) offer additional features but have less universal tooling support, making draft-07 the pragmatic choice for chart authors today.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;Chart Directory Structure&lt;/h3&gt;



&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;my-app/
&amp;#9500;&amp;#9472;&amp;#9472; Chart.yaml
&amp;#9500;&amp;#9472;&amp;#9472; values.yaml
&amp;#9500;&amp;#9472;&amp;#9472; values.schema.json      &amp;larr; lives here
&amp;#9500;&amp;#9472;&amp;#9472; charts/
&amp;#9492;&amp;#9472;&amp;#9472; templates/
    &amp;#9500;&amp;#9472;&amp;#9472; deployment.yaml
    &amp;#9500;&amp;#9472;&amp;#9472; service.yaml
    &amp;#9500;&amp;#9472;&amp;#9472; ingress.yaml
    &amp;#9492;&amp;#9472;&amp;#9472; _helpers.tpl&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;The schema file is included when a chart is packaged with &lt;code&gt;helm package&lt;/code&gt; and distributed through chart repositories. Consumers of the chart get schema validation automatically without any additional configuration &amp;mdash; the guardrails ship with the chart itself.&lt;/p&gt;



&lt;h2 class=&quot;wp-block-heading&quot;&gt;How Helm Uses the Schema&lt;/h2&gt;



&lt;p&gt;Helm&amp;rsquo;s validation behavior is straightforward but has some nuances worth understanding. When Helm processes a release, it first merges all value sources in order of increasing precedence: chart defaults (&lt;code&gt;values.yaml&lt;/code&gt;), parent chart values, &lt;code&gt;-f&lt;/code&gt; value files, and finally &lt;code&gt;--set&lt;/code&gt; flags. The merged result is then validated against the schema as a single operation.&lt;/p&gt;



&lt;p&gt;This means the schema validates the &lt;em&gt;effective&lt;/em&gt; values, not each source in isolation. A required field that has a default in &lt;code&gt;values.yaml&lt;/code&gt; will pass validation even when not specified by the user, because the merged result includes the default. This is the correct behavior &amp;mdash; it validates what will actually be used during rendering.&lt;/p&gt;



&lt;p&gt;The validation happens before template rendering. If schema validation fails, Helm exits with a non-zero status code and prints all validation errors. The error output is structured and actionable:&lt;/p&gt;



&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;$ helm install my-release ./my-app --set replicaCount=abc

Error: values don't meet the specifications of the schema(s) in the following chart(s):
my-app:
- replicaCount: Invalid type. Expected: integer, given: string&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;For &lt;code&gt;helm lint&lt;/code&gt;, which is typically used in CI pipelines without installing to a cluster, schema validation also runs. This makes &lt;code&gt;helm lint&lt;/code&gt; a powerful pre-deployment gate when schema files are present.&lt;/p&gt;



&lt;h2 class=&quot;wp-block-heading&quot;&gt;IDE Benefits: Autocompletion and Inline Validation&lt;/h2&gt;



&lt;p&gt;Beyond Helm&amp;rsquo;s own validation, &lt;code&gt;values.schema.json&lt;/code&gt; unlocks IDE support that significantly improves the developer experience when working with values files. The Red Hat YAML extension for VS Code can reference a JSON Schema file to provide autocompletion, type checking, and inline error highlighting for YAML files.&lt;/p&gt;



&lt;p&gt;To enable this, add a &lt;code&gt;yaml.schemas&lt;/code&gt; configuration to your VS Code workspace settings or the user settings file:&lt;/p&gt;



&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;// .vscode/settings.json
{
  &quot;yaml.schemas&quot;: {
    &quot;./my-app/values.schema.json&quot;: &quot;./my-app/values.yaml&quot;
  }
}&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;With this configuration, editing &lt;code&gt;values.yaml&lt;/code&gt; in VS Code will show autocompletion for defined keys, inline errors for type mismatches, and hover documentation pulled from the &lt;code&gt;description&lt;/code&gt; fields in your schema. For platform teams maintaining internal Helm charts, this transforms the chart into a self-documenting, IDE-aware configuration interface &amp;mdash; without any additional tooling investment.&lt;/p&gt;



&lt;p&gt;JetBrains IDEs (IntelliJ IDEA, GoLand, etc.) support JSON Schema associations through the &lt;strong&gt;Languages &amp;amp; Frameworks &amp;gt; Schemas and DTDs &amp;gt; JSON Schema Mappings&lt;/strong&gt; settings panel, providing equivalent functionality for teams using those tools.&lt;/p&gt;



&lt;h2 class=&quot;wp-block-heading&quot;&gt;Building the Schema: A Practical Guide&lt;/h2&gt;



&lt;p&gt;Let&amp;rsquo;s build a complete, realistic example. Start with a typical &lt;code&gt;values.yaml&lt;/code&gt; for a web application chart:&lt;/p&gt;



&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;# values.yaml
replicaCount: 2

image:
  repository: myorg/my-app
  tag: &quot;1.0.0&quot;
  pullPolicy: IfNotPresent

service:
  type: ClusterIP
  port: 80

ingress:
  enabled: false
  hostname: &quot;&quot;
  tls: false

resources:
  requests:
    cpu: &quot;100m&quot;
    memory: &quot;128Mi&quot;
  limits:
    cpu: &quot;500m&quot;
    memory: &quot;512Mi&quot;

autoscaling:
  enabled: false
  minReplicas: 1
  maxReplicas: 10
  targetCPUUtilizationPercentage: 80

config:
  logLevel: info
  databaseUrl: &quot;&quot;

nodeSelector: {}
tolerations: []
affinity: {}&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Now the full &lt;code&gt;values.schema.json&lt;/code&gt; that validates this structure:&lt;/p&gt;



&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;{
  &quot;$schema&quot;: &quot;&lt;a href=&quot;http://json-schema.org/draft-07/schema#&quot; rel=&quot;nofollow&quot;&gt;http://json-schema.org/draft-07/schema#&lt;/a&gt;&quot;,
  &quot;title&quot;: &quot;my-app Helm Chart Values&quot;,
  &quot;description&quot;: &quot;Configuration values for the my-app Helm chart&quot;,
  &quot;type&quot;: &quot;object&quot;,
  &quot;additionalProperties&quot;: false,
  &quot;required&quot;: [&quot;image&quot;, &quot;service&quot;],
  &quot;$defs&quot;: {
    &quot;resourceQuantity&quot;: {
      &quot;type&quot;: &quot;string&quot;,
      &quot;pattern&quot;: &quot;^[0-9]+(\\.[0-9]+)?(m|Ki|Mi|Gi|Ti|Pi|Ei|k|M|G|T|P|E)?$&quot;,
      &quot;description&quot;: &quot;A Kubernetes resource quantity (e.g. 100m, 128Mi, 1Gi)&quot;
    }
  },
  &quot;properties&quot;: {
    &quot;replicaCount&quot;: {
      &quot;type&quot;: &quot;integer&quot;,
      &quot;minimum&quot;: 0,
      &quot;maximum&quot;: 50,
      &quot;default&quot;: 2,
      &quot;description&quot;: &quot;Number of pod replicas. Set to 0 to scale down.&quot;
    },
    &quot;image&quot;: {
      &quot;type&quot;: &quot;object&quot;,
      &quot;additionalProperties&quot;: false,
      &quot;required&quot;: [&quot;repository&quot;, &quot;tag&quot;],
      &quot;description&quot;: &quot;Container image configuration&quot;,
      &quot;properties&quot;: {
        &quot;repository&quot;: {
          &quot;type&quot;: &quot;string&quot;,
          &quot;minLength&quot;: 1,
          &quot;description&quot;: &quot;Container image repository&quot;
        },
        &quot;tag&quot;: {
          &quot;type&quot;: &quot;string&quot;,
          &quot;pattern&quot;: &quot;^[a-zA-Z0-9._-]+$&quot;,
          &quot;minLength&quot;: 1,
          &quot;description&quot;: &quot;Image tag. Avoid using 'latest' in production.&quot;
        },
        &quot;pullPolicy&quot;: {
          &quot;type&quot;: &quot;string&quot;,
          &quot;enum&quot;: [&quot;Always&quot;, &quot;IfNotPresent&quot;, &quot;Never&quot;],
          &quot;default&quot;: &quot;IfNotPresent&quot;,
          &quot;description&quot;: &quot;Kubernetes imagePullPolicy&quot;
        }
      }
    },
    &quot;service&quot;: {
      &quot;type&quot;: &quot;object&quot;,
      &quot;additionalProperties&quot;: false,
      &quot;required&quot;: [&quot;type&quot;, &quot;port&quot;],
      &quot;properties&quot;: {
        &quot;type&quot;: {
          &quot;type&quot;: &quot;string&quot;,
          &quot;enum&quot;: [&quot;ClusterIP&quot;, &quot;NodePort&quot;, &quot;LoadBalancer&quot;, &quot;ExternalName&quot;],
          &quot;description&quot;: &quot;Kubernetes Service type&quot;
        },
        &quot;port&quot;: {
          &quot;type&quot;: &quot;integer&quot;,
          &quot;minimum&quot;: 1,
          &quot;maximum&quot;: 65535,
          &quot;description&quot;: &quot;Service port&quot;
        }
      }
    },
    &quot;ingress&quot;: {
      &quot;type&quot;: &quot;object&quot;,
      &quot;additionalProperties&quot;: false,
      &quot;properties&quot;: {
        &quot;enabled&quot;: {
          &quot;type&quot;: &quot;boolean&quot;,
          &quot;default&quot;: false
        },
        &quot;hostname&quot;: {
          &quot;type&quot;: &quot;string&quot;,
          &quot;description&quot;: &quot;Ingress hostname. Required when ingress.enabled is true.&quot;
        },
        &quot;tls&quot;: {
          &quot;type&quot;: &quot;boolean&quot;,
          &quot;default&quot;: false,
          &quot;description&quot;: &quot;Enable TLS for the ingress&quot;
        }
      },
      &quot;if&quot;: {
        &quot;properties&quot;: {
          &quot;enabled&quot;: { &quot;const&quot;: true }
        },
        &quot;required&quot;: [&quot;enabled&quot;]
      },
      &quot;then&quot;: {
        &quot;required&quot;: [&quot;hostname&quot;],
        &quot;properties&quot;: {
          &quot;hostname&quot;: {
            &quot;minLength&quot;: 1,
            &quot;pattern&quot;: &quot;^[a-zA-Z0-9]([a-zA-Z0-9\\-\\.]+)?[a-zA-Z0-9]$&quot;
          }
        }
      }
    },
    &quot;resources&quot;: {
      &quot;type&quot;: &quot;object&quot;,
      &quot;additionalProperties&quot;: false,
      &quot;properties&quot;: {
        &quot;requests&quot;: {
          &quot;type&quot;: &quot;object&quot;,
          &quot;additionalProperties&quot;: false,
          &quot;properties&quot;: {
            &quot;cpu&quot;: { &quot;$ref&quot;: &quot;#/$defs/resourceQuantity&quot; },
            &quot;memory&quot;: { &quot;$ref&quot;: &quot;#/$defs/resourceQuantity&quot; }
          }
        },
        &quot;limits&quot;: {
          &quot;type&quot;: &quot;object&quot;,
          &quot;additionalProperties&quot;: false,
          &quot;properties&quot;: {
            &quot;cpu&quot;: { &quot;$ref&quot;: &quot;#/$defs/resourceQuantity&quot; },
            &quot;memory&quot;: { &quot;$ref&quot;: &quot;#/$defs/resourceQuantity&quot; }
          }
        }
      }
    },
    &quot;autoscaling&quot;: {
      &quot;type&quot;: &quot;object&quot;,
      &quot;additionalProperties&quot;: false,
      &quot;properties&quot;: {
        &quot;enabled&quot;: {
          &quot;type&quot;: &quot;boolean&quot;,
          &quot;default&quot;: false
        },
        &quot;minReplicas&quot;: {
          &quot;type&quot;: &quot;integer&quot;,
          &quot;minimum&quot;: 1
        },
        &quot;maxReplicas&quot;: {
          &quot;type&quot;: &quot;integer&quot;,
          &quot;minimum&quot;: 1,
          &quot;maximum&quot;: 100
        },
        &quot;targetCPUUtilizationPercentage&quot;: {
          &quot;type&quot;: &quot;integer&quot;,
          &quot;minimum&quot;: 1,
          &quot;maximum&quot;: 100
        }
      },
      &quot;if&quot;: {
        &quot;properties&quot;: {
          &quot;enabled&quot;: { &quot;const&quot;: true }
        },
        &quot;required&quot;: [&quot;enabled&quot;]
      },
      &quot;then&quot;: {
        &quot;required&quot;: [&quot;minReplicas&quot;, &quot;maxReplicas&quot;]
      }
    },
    &quot;config&quot;: {
      &quot;type&quot;: &quot;object&quot;,
      &quot;additionalProperties&quot;: false,
      &quot;properties&quot;: {
        &quot;logLevel&quot;: {
          &quot;type&quot;: &quot;string&quot;,
          &quot;enum&quot;: [&quot;debug&quot;, &quot;info&quot;, &quot;warn&quot;, &quot;error&quot;],
          &quot;default&quot;: &quot;info&quot;,
          &quot;description&quot;: &quot;Application log level&quot;
        },
        &quot;databaseUrl&quot;: {
          &quot;type&quot;: &quot;string&quot;,
          &quot;description&quot;: &quot;Database connection URL&quot;
        }
      }
    },
    &quot;nodeSelector&quot;: {
      &quot;type&quot;: &quot;object&quot;,
      &quot;description&quot;: &quot;Node selector labels for pod scheduling&quot;
    },
    &quot;tolerations&quot;: {
      &quot;type&quot;: &quot;array&quot;,
      &quot;description&quot;: &quot;Pod tolerations&quot;
    },
    &quot;affinity&quot;: {
      &quot;type&quot;: &quot;object&quot;,
      &quot;description&quot;: &quot;Pod affinity rules&quot;
    }
  }
}&lt;/code&gt;&lt;/pre&gt;



&lt;h2 class=&quot;wp-block-heading&quot;&gt;Key Schema Patterns Explained&lt;/h2&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;additionalProperties: false&lt;/h3&gt;



&lt;p&gt;This is arguably the most important pattern in a Helm schema. Without it, unknown keys pass validation silently &amp;mdash; which defeats much of the purpose. With &lt;code&gt;&quot;additionalProperties&quot;: false&lt;/code&gt;, any key not listed in &lt;code&gt;properties&lt;/code&gt; causes a validation error. This catches typos like &lt;code&gt;repicaCount&lt;/code&gt; instead of &lt;code&gt;replicaCount&lt;/code&gt;, which would otherwise silently use the default value and leave the developer wondering why their override had no effect.&lt;/p&gt;



&lt;p&gt;Apply it at every nested object level, not just the root. A typo inside &lt;code&gt;image:&lt;/code&gt; or &lt;code&gt;resources:&lt;/code&gt; is just as dangerous as one at the top level.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;$defs for Reusable Definitions&lt;/h3&gt;



&lt;p&gt;The &lt;code&gt;$defs&lt;/code&gt; keyword (called &lt;code&gt;definitions&lt;/code&gt; in earlier draft versions, though draft-07 supports both) provides a namespace for reusable schema fragments. In the example above, &lt;code&gt;resourceQuantity&lt;/code&gt; is defined once and referenced via &lt;code&gt;$ref&lt;/code&gt; in both &lt;code&gt;requests&lt;/code&gt; and &lt;code&gt;limits&lt;/code&gt;. This avoids duplication and ensures consistent validation logic across related fields.&lt;/p&gt;



&lt;p&gt;For larger charts, &lt;code&gt;$defs&lt;/code&gt; becomes essential. Common patterns include reusable schemas for image configurations, resource requirements, probe configurations, and environment variable maps.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;Conditional Validation with if/then/else&lt;/h3&gt;



&lt;p&gt;The &lt;code&gt;if/then/else&lt;/code&gt; construct in JSON Schema draft-07 is particularly powerful for Helm charts, where many values are conditional on a feature toggle. The ingress example above demonstrates this: when &lt;code&gt;ingress.enabled&lt;/code&gt; is &lt;code&gt;true&lt;/code&gt;, the &lt;code&gt;hostname&lt;/code&gt; field becomes required and must match a valid hostname pattern. When ingress is disabled, the hostname can be empty or omitted entirely.&lt;/p&gt;



&lt;p&gt;This pattern can be extended for more complex scenarios. For example, enforcing that when &lt;code&gt;autoscaling.enabled&lt;/code&gt; is true, the standalone &lt;code&gt;replicaCount&lt;/code&gt; should not be set (since the HPA controls replica count):&lt;/p&gt;



&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;{
  &quot;if&quot;: {
    &quot;properties&quot;: {
      &quot;autoscaling&quot;: {
        &quot;properties&quot;: {
          &quot;enabled&quot;: { &quot;const&quot;: true }
        },
        &quot;required&quot;: [&quot;enabled&quot;]
      }
    }
  },
  &quot;then&quot;: {
    &quot;properties&quot;: {
      &quot;replicaCount&quot;: {
        &quot;description&quot;: &quot;replicaCount is ignored when autoscaling is enabled&quot;
      }
    }
  }
}&lt;/code&gt;&lt;/pre&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;Pattern Validation for Image Tags&lt;/h3&gt;



&lt;p&gt;The image tag field is a common source of production issues. Teams accidentally deploy with &lt;code&gt;latest&lt;/code&gt;, which is non-deterministic and makes rollbacks unreliable. A pattern constraint can enforce semantic versioning or at least ban the &lt;code&gt;latest&lt;/code&gt; tag in production charts:&lt;/p&gt;



&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;&quot;tag&quot;: {
  &quot;type&quot;: &quot;string&quot;,
  &quot;not&quot;: {
    &quot;enum&quot;: [&quot;latest&quot;, &quot;&quot;]
  },
  &quot;pattern&quot;: &quot;^[0-9]+\\.[0-9]+\\.[0-9]+&quot;,
  &quot;description&quot;: &quot;Semantic version tag required. 'latest' is not permitted.&quot;
}&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;This enforces that image tags start with a semantic version number, immediately rejecting &lt;code&gt;latest&lt;/code&gt;, empty strings, or arbitrary branch names that would produce non-reproducible deployments.&lt;/p&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;Enum for Controlled Vocabularies&lt;/h3&gt;



&lt;p&gt;Fields with a fixed set of valid values &amp;mdash; Kubernetes service types, image pull policies, log levels &amp;mdash; should use &lt;code&gt;enum&lt;/code&gt;. This is more precise than a pattern and produces clearer error messages. It also enables IDE autocompletion to show exactly the valid options as a pick-list, rather than requiring the developer to remember or look up acceptable values.&lt;/p&gt;



&lt;h2 class=&quot;wp-block-heading&quot;&gt;CI/CD Integration&lt;/h2&gt;



&lt;h3 class=&quot;wp-block-heading&quot;&gt;GitHub Actions&lt;/h3&gt;



&lt;p&gt;The most direct integration point is &lt;code&gt;helm lint&lt;/code&gt;, which runs schema validation as part of its checks. A minimal GitHub Actions workflow that validates a chart on every pull request looks like this:&lt;/p&gt;



&lt;pre class=&quot;wp-block-code&quot;&gt;&lt;code&gt;# .github/workflows/helm-lint.yaml
name: Helm Lint

on:
  pull_request:
    paths:
      - 'charts/**'

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Set up Helm
        uses: azure/setup-helm@v4
        with:
          version: '3.14.0'

      - name: Lint chart with default values
        run: helm lint charts/my-app

      - name: Lint chart with staging values
        run: helm lint charts/my-app -f charts/my-app/ci/staging-values.yaml

      - name: Lint chart with production values
        run: helm lint charts/my-app -f charts/my-app/ci/production-values.yaml

      - name: Validate template rendering
        run: |
          helm template my-app charts/my-app \
            -f charts/my-app/ci/production-values.yaml \
            --debug &amp;gt; /dev/null&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;The &lt;code&gt;ci/&lt;/code&gt; directory convention (values files specifically for CI testing) is a pattern from the &lt;a href=&quot;https://github.com/helm/chart-testing&quot; target=&quot;_blank&quot; rel=&quot;noopener nofollow&quot;&gt;chart-testing&lt;/a&gt; tool and works well for validating multiple realistic value combinations, not just the defaults.&lt;/p&gt;



&lt;p&gt;For teams using th&lt;/p&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/15637/helm-values-json-schema-validate-your-values-yaml-before-it-breaks-production</guid>
<pubDate>Mon, 27 Apr 2026 09:13:42 +0000</pubDate>
</item>
</channel>
</rss>