<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>JSON Schema on Yunier&#39;s Wiki</title>
    <link>http://localhost:1313/tags/json-schema/</link>
    <description>Recent content in JSON Schema on Yunier&#39;s Wiki</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sat, 09 Oct 2021 00:00:00 +0000</lastBuildDate>
    <atom:link href="http://localhost:1313/tags/json-schema/rss" rel="self" type="application/rss+xml" />
    <item>
      <title>A Better Web API Validation Strategy</title>
      <link>http://localhost:1313/post/2021/a-better-web-api-validation-strategy/</link>
      <pubDate>Sat, 09 Oct 2021 00:00:00 +0000</pubDate>
      <guid>http://localhost:1313/post/2021/a-better-web-api-validation-strategy/</guid>
      <description>&lt;p&gt;As an API developer, you will eventually need to determine how to handle data validation.&lt;/p&gt;&#xA;&lt;p&gt;The .NET ecosystem offers a few options, the first option, &lt;a href=&#34;https://docs.microsoft.com/en-us/aspnet/core/mvc/models/validation?view=aspnetcore-6.0#validation-attributes&#34;&gt;validation attributes&lt;/a&gt;, can be used to annotate how a model should be validated. Validation attributes are great, they don&amp;rsquo;t require any external dependencies, you can specify error messages, create your own &lt;a href=&#34;https://docs.microsoft.com/en-us/aspnet/core/mvc/models/validation?view=aspnetcore-6.0#validation-attributes&#34;&gt;custom validator&lt;/a&gt;, validate against many data types.&lt;/p&gt;&#xA;&lt;p&gt;For example, take the following Movie class, notice how the properties have been annotated with validation rules.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
