<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ schema - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ schema - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sat, 30 May 2026 19:50:17 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/schema/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Handle Breaking Changes for API and Event Schemas ]]>
                </title>
                <description>
                    <![CDATA[ Several years ago while designing APIs for an ecommerce company, I discovered the importance of API versioning. So I wrote about it in a freeCodeCamp article entitled How to Version a REST API.  Now I find myself designing event schemas for sending m... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-handle-breaking-changes/</link>
                <guid isPermaLink="false">66bccb69ec0f48126680c59a</guid>
                
                    <category>
                        <![CDATA[ api ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Microservices ]]>
                    </category>
                
                    <category>
                        <![CDATA[ schema ]]>
                    </category>
                
                    <category>
                        <![CDATA[ versioning ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Tim Kleier ]]>
                </dc:creator>
                <pubDate>Thu, 19 Oct 2023 14:18:25 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/10/7115374283_30d07f11c3_c-2.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Several years ago while designing APIs for an ecommerce company, I discovered the importance of API versioning. So I wrote about it in a <a target="_blank" href="https://www.freecodecamp.org/news">freeCodeCamp</a> article entitled <a target="_blank" href="https://www.freecodecamp.org/news/how-to-version-a-rest-api/">How to Version a REST API</a>. </p>
<p>Now I find myself designing event schemas for sending messages across a distributed system. It's a very similar problem with similar pain points and solutions. Adhering to data contracts is critical to ensure we don't frustrate event subscribers or bring down systems.</p>
<p>Versioning APIs is translatable to versioning event schemas, but if you can effectively evolve schemas, you don't actually need versioning. Effective evolution of schemas comes down to avoiding breaking changes. </p>
<p>Though I covered that briefly in the article above, here I want to thoroughly address breaking changes and propose more solutions to avoiding them.</p>
<h2 id="heading-what-are-breaking-changes">What are Breaking Changes?</h2>
<p>Essentially, a breaking change to a schema (in an API or event context) is anything that requires a consumer to make an update on their end. It's a change that forces change. Schemas will evolve, but once a schema is in use in production, you have to be very careful not to break the data contract. </p>
<p>Removing an event format or changing an event's basic structure constitutes a breaking change. But the nuts and bolts are at the attribute (the field or property) level. </p>
<h3 id="heading-structural-breaking-changes">Structural breaking changes</h3>
<p>Here's a list of structural breaking changes for schema attributes:</p>
<ul>
<li><strong>Renaming Attributes</strong> – Changes to an attribute's name, even if it's just changing the case (for example, from camelCase to TitleCase), is a breaking change.</li>
<li><strong>Removing Attributes</strong> – Taking an attribute out of a schema.</li>
<li><strong>Data Types Changes</strong> – Changing data types, even if the change seems compatible.</li>
<li><strong>Making Attributes Required</strong> – Anytime you mark an attribute (even a new one) as required when it wasn't before, it's a breaking change.</li>
</ul>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Type</td><td>Example</td></tr>
</thead>
<tbody>
<tr>
<td>Renaming Attributes</td><td><code>name</code> to <code>firstName</code></td></tr>
<tr>
<td>Removing Attributes</td><td>Introducing <code>firstName</code> but removing <code>name</code></td></tr>
<tr>
<td>Data Type Changes</td><td>Changing <code>productSKU</code> from <code>integer</code> to <code>string</code></td></tr>
<tr>
<td>Making Attributes Required</td><td>Now requiring a <code>customerID</code></td></tr>
</tbody>
</table>
</div><h3 id="heading-semantic-breaking-changes">Semantic breaking changes</h3>
<p>The other primary category of attribute-level breaking changes has to do with changes in what the data means, or semantic changes. They force consumers to re-interpret the data they're getting. </p>
<p>They are as follows:</p>
<ul>
<li><strong>Format Changes</strong> – Any change to the format of an attribute. </li>
<li><strong>Meaning Changes</strong> – When the declared or implied meaning of data changes.</li>
<li><strong>Stricter Constraints</strong> – When attribute requirements are added or made more restrictive.</li>
</ul>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Type</td><td>Example</td></tr>
</thead>
<tbody>
<tr>
<td>Format Changes</td><td>Date from <code>mm/dd/yyyy</code> to <code>yyyy-mm-dd</code></td></tr>
<tr>
<td>Meaning Changes</td><td>Changing an enum, changing <code>providerCost</code> from dollars to cents</td></tr>
<tr>
<td>Stricter Constraints</td><td>Adding <code>percentage</code> maximum of 100 </td></tr>
</tbody>
</table>
</div><p>It's important to note that what counts as a "breaking change" might be more nuanced. Changing an <code>amount</code> from dollars to cents still forces a change by event subscribers, in interpreting the <em>meaning</em> of the data being sent. Be careful of those, as they are not always obvious.</p>
<h2 id="heading-what-are-non-breaking-changes">What are Non-Breaking Changes?</h2>
<p>We can generally describe non-breaking changes as additive or permissive ones. These are changes that don't require change for consumers. </p>
<p>Here is a list of non-breaking attribute changes: </p>
<ul>
<li><strong>Adding New Attribute</strong> – In all schema contexts, the addition of a new attribute is a non-breaking change, so long as it's not required (for example, for a POST request). </li>
<li><strong>Making Attribute Not Required</strong> – When an attribute was required but newer schema versions do not require it.</li>
<li><strong>Looser Constraints</strong> – Things like more permissive integer ranges (min and max) or allowing for greater decimal precision. Be cautious and communicate with consumers, though, as they may rely on stricter constraints.</li>
</ul>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Type</td><td>Example</td></tr>
</thead>
<tbody>
<tr>
<td>Adding New Attribute</td><td>Adding <code>firstName</code> alongside <code>name</code></td></tr>
<tr>
<td>Making Attribute Not Required</td><td><code>customerID</code> is no longer required</td></tr>
<tr>
<td>Looser Constraints</td><td>Percentage max increased from 100 to 200</td></tr>
</tbody>
</table>
</div><p>Non-breaking changes can often be avoided. But evolving schemas effectively can be challenging and require a lot of thought so as not to break schemas and consumers' trust.</p>
<h2 id="heading-how-to-evolve-schemas">How to Evolve Schemas</h2>
<p>Sadly, the list of breaking changes is longer than the non-breaking ones. But there are some strategies for evolving schemas in a non-breaking way.</p>
<ol>
<li><strong>Domain Knowledge</strong> – Understanding the domain will help ensure you don't end up with poorly named attributes, attributes on the wrong object, or incorrect data types.</li>
<li><strong>Specific Attribute Names</strong> – Rather than changing an attribute's name, data type, or format, introduce a new attribute with a more specific name and correct the data type or format.</li>
<li><strong>Attribute Names With Intent</strong> – Leverage attribute names that reflect their format or intent. For example, consumers might not know whether <code>providerCost</code> would be in dollars or cents, so specify with <code>providerCostInDollars</code> or <code>providerCostInCents</code>. This will also prevent a breaking change if you're having calculation precision issues with dollars and decide to deliver the cost in cents. </li>
<li><strong>Drafted Schemas &amp; Attributes</strong> – Utilize "draft mode" extensively at the schema level, getting feedback on attributes in simulated environments before they are live in production. For schemas that are in use in production, you could introduce a <code>draftedAttributes</code> object and dump experimental (non-production ready) attributes into it. Communicate with consumers that they attributes are being refined – so they should expect breaking changes – and will be moved to the main schema when ready.</li>
<li><strong>Support Existing Attributes</strong> – Leave old attributes in the schema. Don't remove old attributes unless you've been able to coordinate a deprecation/sunsetting strategy with consumers.</li>
<li><strong>Versioning</strong> – If necessary, version your schemas. Although it can become quite difficult to maintain, versioning your schemas is a way to allow for backwards compatibility but move forward with a new schema. You can do high-level versioning (for example, v1 and v2) or more granular semantic versioning (for example, v1.0.1). It's best to version each schema independently, so you don't have to, for example, copy all API v1 endpoints to v2. </li>
</ol>
<h2 id="heading-conclusion">Conclusion</h2>
<p>Breaking changes are a quick way to break trust for any API consumers or event subscribers. I hope that the guidelines above will provide more insight what constitutes a breaking versus non-breaking change, and how to evolve schemas effectively.</p>
<p>If you can't avoid breaking changes, <strong>make sure to coordinate with any and all consumers.</strong> You can actually earn more trust with your consumers if you effectively evolve schemas and communicate breaking changes when they are necessary. </p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Why Using Structured Data Helps Your Website’s SEO ]]>
                </title>
                <description>
                    <![CDATA[ Few things are as exciting for a new developer as getting their first customers. The idea of putting one’s new coding knowledge to work can be exhilarating. There’s an important thing to remember though, especially if your customer is some type of sm... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/using-structured-data-helps-your-websites-seo/</link>
                <guid isPermaLink="false">66d4601dffe6b1f641b5fa28</guid>
                
                    <category>
                        <![CDATA[ schema ]]>
                    </category>
                
                    <category>
                        <![CDATA[ SEO ]]>
                    </category>
                
                    <category>
                        <![CDATA[ structured data ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Luke Ciciliano ]]>
                </dc:creator>
                <pubDate>Wed, 28 Aug 2019 18:21:57 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/08/seo-and-ipad-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Few things are as exciting for a new developer as getting their first customers. The idea of putting one’s new coding knowledge to work can be exhilarating.</p>
<p>There’s an important thing to remember though, especially if your customer is some type of small business which deals with the public (such as a restaurant, a bakery, and so on). That thing to remember is that the customer probably doesn’t care about HTML, CSS, or JavaScript. They care about whether the website performs well in search and whether customers come into their business as a result.</p>
<p>This means that you need to build the website with search engine optimization (SEO) in mind. One of the bigger developments recently in the area of SEO is Google’s increasing use of “structured data” in its analysis of websites. This trend made me decide to write this article on the use of structured data in your various web projects.</p>
<p>I’m going to divide this discussion up into four sections. The areas I’m going to delve into include:</p>
<ol>
<li><p>What is structured data and why does Google care about it?</p>
</li>
<li><p>How to use structured data in a website.</p>
</li>
<li><p>How to test your structured data and monitor for errors after the site launches.</p>
</li>
<li><p>The need to keep your structured data up to date after the website launches.</p>
</li>
</ol>
<p>This is an important discussion to have. I find that many, many, many, many……(many) people who hold themselves out as web developers don’t actually know much (if anything) about SEO.</p>
<p>I also find that many people who hold themselves out as assisting with SEO don’t actually know anything about web development (and often can barely code at all).</p>
<p>Someone who can actually code, and who understands what the search engines are looking for, can provide a great deal of value to their customers. This value, in turn, helps you to make more money as a developer. In other words, pairing an understanding of SEO with your newly learned web development skills can help you go from looking like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/08/Computer-with-help-sign.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>To looking like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/08/computer-and-money.jpg" alt="Image" width="600" height="400" loading="lazy"></p>
<p>So let’s get to it and discuss why structured data is important to a website’s SEO.</p>
<h3 id="heading-what-is-structured-data-and-why-does-google-care-about-it">What is structured data and why does Google care about it?</h3>
<p>Structured data is form of markup you can apply to your website’s content. This markup allows you to provide information to search engines about your web pages and the information they contain.</p>
<p>This markup is important because search engines, while getting better at understanding natural language, can struggle with understanding the wording or other content contained within a web page.</p>
<p>For example, if someone is searching for “professional to help with investing,” search engines may struggle to distinguish between sites which belong to investment managers and sites which discuss how to pick an investment manager in general (this is a very generalized example).</p>
<p>By using structured data, you can help Google know that your website actually belongs to an investment manager.</p>
<p>Another purpose of structured data is that it helps search engines identify who is who on the web. Suppose, for example, you're doing a website for a political candidate. The candidate, in addition to an official campaign website, has an official Facebook page for the campaign.</p>
<p>For obvious reasons, there may be people who start false Facebook pages about the candidate. By including certain structured data in the website, you can create a relational link between the official Facebook page and the campaign’s website. This helps the search engines to know which Facebook page is legit and which one is bogus.</p>
<p>Google has been working to identify who is who on the web for roughly a decade. This started with their now defunct social network, Google+ (you know…..that social network that you may have tried but none of your friends were on).</p>
<p>Back in the early part of this decade, if a website included a link to a Google+ profile, and the link included the “rel=author” attribute, the link informed Google that the website belonged to the holder of the Google+ profile. This was something Google intended to ratchet up in search, as one of their executives explained in this 2013 video:</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/3QlY8ba0jYI" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<p> </p>
<p>Google abandoned this approach, mainly due to the struggles of Google+, in August of 2014. Since that time, Google has been increasing its emphasis on structured data as a way of annotating information in search results and identifying who is who on the web.</p>
<p>So, in short, structured data is something you should be including to add value to any website you build for your clients.</p>
<h3 id="heading-how-to-use-structured-data-in-a-website">How to use structured data in a website</h3>
<p>Structured data can be used in a number of ways. In addition to using it to help identify the individual or entity operating the site, you can use it to help Google better understand a page’s content.</p>
<p>If, for example, you’ve built a website for a bakery, then there are types of markup you can use to highlight the business’ good reviews, to highlight upcoming events, and so on. This markup can lead to highlights in search results which, in turn, will make your customer (the bakery owner) happy.</p>
<p>Let’s look at a few examples of what this looks like in real life, using a <a target="_blank" href="https://www.dayton-real-estate-agent.com/">real estate agent website</a> which I recently built (I'm including the link in case you want to take a look at the code).</p>
<p>The realtor I built the website for focuses her business on dealing with investors. The website includes structured data which informs Google that the site belongs to an actual real estate agent. When I perform a Google search for “Dayton realtor for investors,” the top three organic results I receive are as shown in this photo:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/08/Investor-search.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>The first result is the website I built. The latter two are websites which do not belong to actual real estate agents, even though that is what I was clearly looking for with my search term. In fact, only one other realtor website even appears on the first page of the search results. Now, I’m not saying that this is entirely due to the structured data, but it certainly helps.</p>
<p>The markup used for structured data is generated/governed by <a target="_blank" href="https://schema.org/">Schema.org</a>. When you’re marking up a site, an individual page, an event, or a product, it’s important to use as much markup as is <em>reasonably</em> possible in order to provide the search engines with relevant information.</p>
<p>Schema.org's website often provides examples of what your markup should look like. The start of the markup that I used for the realtor site involved informing Google that the site belonged to a real estate agent by placing the following inside of a</p>
<p>:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">itemscope</span> <span class="hljs-attr">itemtype</span>=<span class="hljs-string">http://schema.org/RealEstateAgent</span>&gt;</span>
</code></pre>
<p>This tells the search engines that I am relying on schema’s markup to identify and describe the site and that the site belongs to a real estate agent, as defined by schema <a target="_blank" href="https://schema.org/RealEstateAgent">here</a>.</p>
<p>I was also able to use structured data to tell Google that this realtor has good online reviews and that they work on commission. This, in turn, is now showing up in search results.</p>
<p>For example, the page at the following link is on the first page of search when I look for <a target="_blank" href="https://www.dayton-real-estate-agent.com/apartments-multi-family-homes-for-sale/">Dayton apartments for sale</a>. (Again, I'm including this link in case you want to look at the site's source code).</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/08/multifamily-1.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Notice that the search results include the fact that this is a five-star rated realtor and that the professional works on commission? In other words, the use of structured data helps the site to stand out more in the search results. This information was added to the site with the following markup:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">itemprop</span>=<span class="hljs-string">"aggregateRating"</span> <span class="hljs-attr">itemscope</span> <span class="hljs-attr">itemtype</span>=<span class="hljs-string">"http://schema.org/AggregateRating"</span>&gt;</span>
Rated <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">itemprop</span>=<span class="hljs-string">"ratingValue"</span>&gt;</span>Actual Rating of Realtor<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span> out of <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">itemprop</span>=<span class="hljs-string">"bestRating"</span>&gt;</span>Highest Possible Rating of Realtor<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span> by <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">itemprop</span>=<span class="hljs-string">"ratingCount"</span>&gt;</span>Number of Total Reviews<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span> clients at <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"URL of Website Where Reviews Are Located"</span> <span class="hljs-attr">target</span>=<span class="hljs-string">"_blank"</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"noopener"</span>&gt;</span>Name of Website Where Reviews Are Located<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>
Fee Structure: <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">itemprop</span>=<span class="hljs-string">"priceRange"</span>&gt;</span>Commission<span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<p>Figuring out what structured data to use in a site, or on a particular page, can be difficult. Fortunately, Google gives a few tools that help with this. Let’s look at those tools in the following section of this article.</p>
<h3 id="heading-testing-your-structured-data-and-monitoring-it-after-your-site-launches">Testing your structured data and monitoring it after your site launches</h3>
<p>The first step in adding structured data to your content is to figure out the category it falls into. You can do this by researching the Schema.org website, looking at the data from other websites, or a combination of both. Once you find the category you fall into, the rest is pretty easy. Let’s stick with the real estate agent example from above.</p>
<p>The first step is to add the realtor markup, from Schema, the site. Then enter your url into <a target="_blank" href="https://search.google.com/structured-data/testing-tool">Google’s structured data testing tool</a>. The tool will tell you what structured data has been found on your site, what errors you may have, and what structured data is “suggested” for the category you’ve selected. Once you start using this tool, you’ll find that making sure you have the right information in the website becomes fairly simple and straightforward.</p>
<p>Also, I heavily rely on the examples which Schema provides for various categories and data types. Using Google’s testing tool can help you to make sure that you have the correct data in your site from the get go.</p>
<p>Another important tool, in monitoring for errors, is <a target="_blank" href="https://search.google.com/search-console/about">Google Search Console</a>. This is another developer tool, from Google, that will let you know when structured data errors appear on your website after launch. This is an incredibly useful tool and if you’re supporting your client’s website on an ongoing basis, after launch, then you need to be using it to monitor things.</p>
<h3 id="heading-the-need-to-keep-your-structured-data-up-to-date-after-a-website-launches">The need to keep your structured data up to date after a website launches</h3>
<p>It is important to understand that you may need to go back and edit a site’s older structured data after a site launches. This is because, like many other things, the standards for structured data change over time. As an example, I build and maintain websites for law firms as part of my primary business. Under the prior structured data standards, these websites were marked up with the following:</p>
<p>In later revisions to the structured data standards, however, the “Attorney” classification was deprecated and changed to “LegalService” – as such, I had to change the markup on each website I manage. I tell you this because it’s important to realize that these standards change somewhat often. It’s important that you keep up with the changes.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>Web results are becoming increasingly rich in that they provide more information than just a link to a website. It’s important for your clients that you markup your pages accordingly. Doing so is important to your SEO efforts and to providing value to your customers. This is why it’s important to include structured data in your projects.</p>
<h3 id="heading-about-me">About Me</h3>
<p>I am a web developer who primarily provides various types of services to law firms. I am also a co-founder of <a target="_blank" href="https://www.modern-website.design/">Modern Website Design</a>. I enjoy writing on issues which help freelance developers and small businesses to grow their revenue.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
