<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: dust</title>
    <description>The latest articles on DEV Community by dust (dust-codegen).</description>
    <link>https://dev.to/dust-codegen</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F14386%2F87e2a6b5-85f8-4c3d-a83c-7fa57873e2b8.png</url>
      <title>DEV Community: dust</title>
      <link>https://dev.to/dust-codegen</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dust-codegen"/>
    <language>en</language>
    <item>
      <title>Keep Form Validation Rules Close to the Model</title>
      <dc:creator>YeLinAung</dc:creator>
      <pubDate>Fri, 21 Aug 2026 03:12:24 +0000</pubDate>
      <link>https://dev.to/dust-codegen/keep-form-validation-rules-close-to-the-model-307h</link>
      <guid>https://dev.to/dust-codegen/keep-form-validation-rules-close-to-the-model-307h</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbaxhwx6z6di6u77x1hsy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbaxhwx6z6di6u77x1hsy.png" alt="Flutter TextFormField validator beside a Dust validation model" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Flutter forms usually start with &lt;code&gt;TextFormField.validator&lt;/code&gt;. That works well for one field on one screen.&lt;/p&gt;

&lt;p&gt;The problem starts when the same rule appears in more than one place. Signup. Profile edit. Checkout. Tests.&lt;/p&gt;

&lt;p&gt;Dust lets the model own the rule. Add &lt;code&gt;Validate()&lt;/code&gt; to the model, put the field rule beside the field, and run &lt;code&gt;dust build&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Then the form can call the generated validator helper. The model can still validate itself before submit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/y3l1n4ung/dust/blob/main/docs/usage/validation.md" rel="noopener noreferrer"&gt;Read the Dust validation guide&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Dust #Validation #Flutter #Dart
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Decode Tagged JSON into a Sealed Model</title>
      <dc:creator>YeLinAung</dc:creator>
      <pubDate>Sun, 16 Aug 2026 13:15:38 +0000</pubDate>
      <link>https://dev.to/dust-codegen/decode-tagged-json-into-a-sealed-model-5fk6</link>
      <guid>https://dev.to/dust-codegen/decode-tagged-json-into-a-sealed-model-5fk6</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsnbs4sulydjkcbtq3vy0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsnbs4sulydjkcbtq3vy0.png" alt="A manual tagged JSON switch beside a Dust Serde sealed model" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How do you decode tagged JSON into a sealed model?&lt;/p&gt;

&lt;p&gt;Without code generation, you usually read the discriminator and map each value yourself. With Dust, define the tag and variants on the sealed class. Dust generates the JSON helpers, while your app can keep using a normal exhaustive switch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/y3l1n4ung/dust/blob/main/docs/usage/serde.md#sealed-classes" rel="noopener noreferrer"&gt;See the Dust sealed-class guide&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Dust #Serde #Dart #CodeGeneration
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Reject JSON Keys You Did Not Ask For</title>
      <dc:creator>YeLinAung</dc:creator>
      <pubDate>Sun, 16 Aug 2026 13:15:36 +0000</pubDate>
      <link>https://dev.to/dust-codegen/reject-json-keys-you-did-not-ask-for-i00</link>
      <guid>https://dev.to/dust-codegen/reject-json-keys-you-did-not-ask-for-i00</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkj0wnjdhab0kr1pvlp5p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkj0wnjdhab0kr1pvlp5p.png" alt="Dust Serde strict-key model rejecting an unexpected admin field" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Extra JSON keys can hide a server and client mismatch. Add &lt;code&gt;disallowUnrecognizedKeys: true&lt;/code&gt; to a Dust Serde model. Decoding then rejects any key that is not a field or alias instead of silently accepting it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/y3l1n4ung/dust/blob/main/docs/usage/serde.md#configuration" rel="noopener noreferrer"&gt;Read the Dust Serde configuration guide&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Dust #Serde #JSON #CodeGeneration
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Switch API Environments Without a Second Client</title>
      <dc:creator>YeLinAung</dc:creator>
      <pubDate>Sun, 16 Aug 2026 13:15:03 +0000</pubDate>
      <link>https://dev.to/dust-codegen/switch-api-environments-without-a-second-client-4ee2</link>
      <guid>https://dev.to/dust-codegen/switch-api-environments-without-a-second-client-4ee2</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fld8y8g9799s2u254gh7i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fld8y8g9799s2u254gh7i.png" alt="Dust HTTP client using one interface with production, staging, and local base URLs" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dust HTTP clients can keep one default API URL and accept a factory override for staging, tests, or local development. The endpoint declarations stay in one interface. Only the URL changes when the client is created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/y3l1n4ung/dust/blob/main/docs/usage/http.md#client-configuration" rel="noopener noreferrer"&gt;Read the Dust HTTP client configuration guide&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Dust #HTTPClient #CodeGeneration
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Keep Nested Validation on the Full Path</title>
      <dc:creator>YeLinAung</dc:creator>
      <pubDate>Sun, 16 Aug 2026 13:15:00 +0000</pubDate>
      <link>https://dev.to/dust-codegen/keep-nested-validation-on-the-full-path-31dd</link>
      <guid>https://dev.to/dust-codegen/keep-nested-validation-on-the-full-path-31dd</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzxzv5llglmabtwsotp89.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzxzv5llglmabtwsotp89.png" alt="Dust nested validation with an address.zipCode error path" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dust can validate one model inside another. Add &lt;code&gt;@Validate(nested: true)&lt;/code&gt; to the parent field. If &lt;code&gt;Address.zipCode&lt;/code&gt; fails, the parent returns &lt;code&gt;address.zipCode&lt;/code&gt;, so the error still points to the exact field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/y3l1n4ung/dust/blob/main/docs/usage/validation.md#nested-validation" rel="noopener noreferrer"&gt;Read the Dust nested validation guide&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Dust #Validation #CodeGeneration
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Keep Unix Timestamps at the API Boundary</title>
      <dc:creator>YeLinAung</dc:creator>
      <pubDate>Sun, 16 Aug 2026 13:14:26 +0000</pubDate>
      <link>https://dev.to/dust-codegen/keep-unix-timestamps-at-the-api-boundary-20gf</link>
      <guid>https://dev.to/dust-codegen/keep-unix-timestamps-at-the-api-boundary-20gf</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8xudc9xeslwuefsv1xxw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8xudc9xeslwuefsv1xxw.png" alt="Complete Dust custom codec model and JSON round-trip example" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When an API sends integer milliseconds, one &lt;code&gt;SerDeCodec&amp;lt;DateTime, int&amp;gt;&lt;/code&gt; keeps the JSON unchanged while the model works with &lt;code&gt;DateTime&lt;/code&gt;. Apply it to required or nullable fields; Dust handles &lt;code&gt;null&lt;/code&gt; outside the codec.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/y3l1n4ung/dust/blob/main/docs/usage/serde.md#custom-codecs" rel="noopener noreferrer"&gt;Read the Dust custom codec guide&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Dust #Serde #SerDeCodec #CodeGeneration
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Keep Code Generation Running While You Work</title>
      <dc:creator>YeLinAung</dc:creator>
      <pubDate>Sun, 16 Aug 2026 13:14:24 +0000</pubDate>
      <link>https://dev.to/dust-codegen/keep-code-generation-running-while-you-work-36g5</link>
      <guid>https://dev.to/dust-codegen/keep-code-generation-running-while-you-work-36g5</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbst2li91m72mk6h646hf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbst2li91m72mk6h646hf.png" alt="Dust one-shot build and watch workflow comparison" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Use Dust watch mode while editing models and APIs. It runs generation after source changes, so generated files stay current without another manual command after every save.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/y3l1n4ung/dust/blob/main/docs/usage/README.md" rel="noopener noreferrer"&gt;Read the Dust usage guide&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Dust #DustWatch #CodeGeneration
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Move One Data Model to Dust</title>
      <dc:creator>YeLinAung</dc:creator>
      <pubDate>Sun, 16 Aug 2026 13:13:51 +0000</pubDate>
      <link>https://dev.to/dust-codegen/move-one-data-model-to-dust-156d</link>
      <guid>https://dev.to/dust-codegen/move-one-data-model-to-dust-156d</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1ht9teiff22jx13ot2a8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1ht9teiff22jx13ot2a8.png" alt="Freezed and Equatable to Dust pubspec comparison" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Move one plain data model to Dust and generate only what it needs, such as equality, &lt;code&gt;copyWith&lt;/code&gt;, or &lt;code&gt;toString&lt;/code&gt;. Keep the model tests and remove old dependencies only after the migration is complete.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/y3l1n4ung/dust/blob/main/docs/usage/derive.md" rel="noopener noreferrer"&gt;Read the Dust data-class guide&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Dust #DataClass #CodeGeneration
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>JSON Field Aliases</title>
      <dc:creator>YeLinAung</dc:creator>
      <pubDate>Sun, 16 Aug 2026 13:13:47 +0000</pubDate>
      <link>https://dev.to/dust-codegen/json-field-aliases-3ii7</link>
      <guid>https://dev.to/dust-codegen/json-field-aliases-3ii7</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5kp5kj37nllf13ru33cy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5kp5kj37nllf13ru33cy.png" alt="Dust JSON field aliases" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dust can read an old JSON field name while writing the new one. Add an alias for the old key and keep one canonical key for new payloads.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/y3l1n4ung/dust/blob/main/docs/usage/serde.md" rel="noopener noreferrer"&gt;Read the Dust JSON guide&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Dust #Serde #JSON #CodeGeneration
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Cross-Field Model Validation</title>
      <dc:creator>YeLinAung</dc:creator>
      <pubDate>Sun, 16 Aug 2026 13:11:52 +0000</pubDate>
      <link>https://dev.to/dust-codegen/cross-field-model-validation-1dh6</link>
      <guid>https://dev.to/dust-codegen/cross-field-model-validation-1dh6</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsabn8d0wh3cju7y2wvc4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsabn8d0wh3cju7y2wvc4.png" alt="Dust cross-field validation" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dust can keep cross-field rules beside the model. A password confirmation field can point to the password field, so the relationship stays clear and generated validation reports the field error.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/y3l1n4ung/dust/blob/main/docs/usage/validation.md" rel="noopener noreferrer"&gt;Read the Dust validation guide&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Dust #Validation #CodeGeneration
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Generate HTTP Request Tests</title>
      <dc:creator>YeLinAung</dc:creator>
      <pubDate>Sun, 16 Aug 2026 13:11:49 +0000</pubDate>
      <link>https://dev.to/dust-codegen/generate-http-request-tests-4g83</link>
      <guid>https://dev.to/dust-codegen/generate-http-request-tests-4g83</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxrkh7ms4zihvp36ftfte.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxrkh7ms4zihvp36ftfte.png" alt="Dust generated HTTP request tests" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dust can generate request tests with an HTTP client. The tests check the method, path, headers, query values, and request body without calling a live server.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/y3l1n4ung/dust/blob/main/docs/usage/http.md" rel="noopener noreferrer"&gt;Read the Dust HTTP client guide&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Dust #HTTPClient #CodeGeneration
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>One Workflow for Dust Features</title>
      <dc:creator>YeLinAung</dc:creator>
      <pubDate>Sun, 16 Aug 2026 13:08:48 +0000</pubDate>
      <link>https://dev.to/dust-codegen/one-workflow-for-dust-features-2h60</link>
      <guid>https://dev.to/dust-codegen/one-workflow-for-dust-features-2h60</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftxekkq0pvnxwldwta2mb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftxekkq0pvnxwldwta2mb.png" alt="Eight feature areas, two dependency setups" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dust gives one generation workflow for data classes, JSON, validation, HTTP clients, routing, state, localization, and database work. The image shows a representative dependency comparison, not a feature-parity claim.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/y3l1n4ung/dust/blob/main/docs/usage/README.md" rel="noopener noreferrer"&gt;Explore the Dust feature guides&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Dust #CodeGeneration #DeveloperTools
&lt;/h1&gt;

</description>
    </item>
  </channel>
</rss>
