<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>fallpoke</author_name>
  <author_url>https://blog.hatena.ne.jp/fallpoke/</author_url>
  <blog_title>誰かの技術置き場</blog_title>
  <blog_url>https://fallpoke-tech.hatenadiary.jp/</blog_url>
  <categories>
    <anon>Python</anon>
    <anon>FastAPI</anon>
    <anon>備忘録</anon>
  </categories>
  <description>お疲れ様です。 PydanticのBaseModelには要素のキー名の命名規則を変換する機能があります。 AliasGeneratorという機能で、BaseModelを定義する際に設定をすることができます。 pydantic.dev 例えば、frontendでTypeScript、backendでPythonを使用して開発しているときなどプログラム言語による変数の命名規則が異なるときに、API通信のタイミングで自動で言語ごとの命名規則の形式に変換することができます。 命名規則については以下参考。 一般的にPythonではsnake_case、TypeScriptではcamelCaseが変数の命…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffallpoke-tech.hatenadiary.jp%2Fentry%2F2026%2F04%2F20%2F211113&quot; title=&quot;BaseModelのkeyの命名規則を変換するAliasGeneratorについてメモ【備忘録】 - 誰かの技術置き場&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/f/fallpoke/20260420/20260420210410.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2026-04-20 21:11:13</published>
  <title>BaseModelのkeyの命名規則を変換するAliasGeneratorについてメモ【備忘録】</title>
  <type>rich</type>
  <url>https://fallpoke-tech.hatenadiary.jp/entry/2026/04/20/211113</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
