<?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: Hanné</title>
    <description>The latest articles on DEV Community by Hanné (@hannedev).</description>
    <link>https://dev.to/hannedev</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%2Fuser%2Fprofile_image%2F4205592%2F3618108b-5a77-45df-b71a-2f12dd09bca9.jpg</url>
      <title>DEV Community: Hanné</title>
      <link>https://dev.to/hannedev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hannedev"/>
    <language>en</language>
    <item>
      <title>Why F# Breaks OpenAPI rendering: Note Names, URL Encoding, and the Clash Between Music Notation and pre-existing Web Standards</title>
      <dc:creator>Hanné</dc:creator>
      <pubDate>Sat, 24 Oct 2026 23:52:29 +0000</pubDate>
      <link>https://dev.to/hannedev/why-f-breaks-openapi-rendering-note-names-url-encoding-and-the-clash-between-music-notation-and-3573</link>
      <guid>https://dev.to/hannedev/why-f-breaks-openapi-rendering-note-names-url-encoding-and-the-clash-between-music-notation-and-3573</guid>
      <description>&lt;p&gt;I'm building a music theory API. I typed F# as root note into the "tonic" interface, which OpenAPI translated into a URL and I got a subsequent 404. Everything broke. Here's what happened and how I created a work-around.&lt;/p&gt;

&lt;h2&gt;
  
  
  What # means to a URL
&lt;/h2&gt;

&lt;p&gt;The # character is reserved in URLs to signal a fragment identifier. Everything after the # character is interpreted by the browser as an anchor on the page, not part of the path. So something like &lt;code&gt;/scales/F#/major&lt;/code&gt; is parsed as &lt;code&gt;/scales/F with fragment major&lt;/code&gt;. The server never even sees the # and we get a 404 error response right away when trying to render in OpenAPI.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the # symbol means to a musician
&lt;/h2&gt;

&lt;p&gt;The sharp symbol in music applies to a note name to raise it by a semitone. In the context of naming scales, as for the API, the root note is the name given to the scale and so F# must be the root note for a scale beginning on the note F-sharp. This becomes a matching issue in pre-programmed interfaces like OpenAPI interfaces, which weren't designed for music first formats initially but the two now have to "talk to" each other.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solutions People have Reached for
&lt;/h2&gt;

&lt;p&gt;URL encoding (F%23), query parameters, string substitution (Fs) are all potential solutions to the issue. Each one works technically, but breaks something musically or semantically, because it's clumsy to annotate to non-technical users, and string substitution like Fs doesn't make sense musically.&lt;/p&gt;

&lt;h2&gt;
  
  
  The German Naming Solution
&lt;/h2&gt;

&lt;p&gt;German music notation uses the suffix "is" for sharps and "es" for flats i.e. Fis, Cis, Es, but notably B for Bb. Despite the workaround, no special characters are needed. Clean URLs. (Also, it's not a hack; it's a centuries-old naming convention used in some of the greatest musical traditions.) &lt;/p&gt;

</description>
      <category>opensource</category>
      <category>musictheory</category>
      <category>openapi</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
