<p></p>
<blockquote>
<p dir="auto">The problem is that <code class="notranslate">user/preferences/gps.trace.visibility</code> will lead to a routing error (it cannot find the route) if <code class="notranslate">resources</code> is used.</p>
</blockquote>
<p dir="auto">But I still don't understand what you are trying to achieve! I thought we'd clarified that we can't use any unescaped <code class="notranslate">.</code> characters from the keys in the urls, since we need <code class="notranslate">.</code> for the format separator. So whether rails resource matching can parse multiple <code class="notranslate">.</code> in the url isn't going to affect us - the only <code class="notranslate">.</code> we will see in the url will be the format separator. Not any <code class="notranslate">.</code> from a key.</p>
<p dir="auto">If you are trying to support both (optional) format extensions and also dotted-keys in the url, then I believe that's a dead-end. You can't distinguish these two different situations:</p>
<ul dir="auto">
<li><code class="notranslate">/user/preferences/foo.json</code> - a request for the <code class="notranslate">foo</code> key, response should be json format</li>
<li><code class="notranslate">/user/preferences/foo.json</code> - a request for the <code class="notranslate">foo.json</code> key</li>
</ul>
<p dir="auto">Similarly if you consider keys with multiple <code class="notranslate">.</code> characters</p>
<ul dir="auto">
<li><code class="notranslate">/user/preferences/foo.bar.xml</code> - a request for the <code class="notranslate">gps.visibility.xml</code> key</li>
<li><code class="notranslate">/user/preferences/foo.bar.xml</code> - a request for the <code class="notranslate">gps.visibility</code> key in XML format</li>
</ul>
<p dir="auto">I don't want to see a special-case for the User Preferences API along the lines of "please note that if you have a <code class="notranslate">.</code> in your key and also the characters after the final dot happen to match one of the formats that we support (currently <code class="notranslate">xml</code> and <code class="notranslate">json</code>) then your key cannot be accessed through the direct users preferences API" or something like this. Reading between the lines, I think that's what you might be trying to achieve, but it's not clear to me.</p>
<p dir="auto">I don't want you to spend more of your time and effort working on debugging something that turns out to be a dead end or not useful, so I recommend that we clarify what you are trying to do before you jump in with more coding.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3787#issuecomment-1320078854">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLIFHAGTSUYXW2K5DXLWI6IADANCNFSM6AAAAAARZPOMC4">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPNWYIJAWO6B4JLYUTWI6IADA5CNFSM6AAAAAARZPOMC6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSOV3HAM.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/3787/c1320078854</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3787#issuecomment-1320078854",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3787#issuecomment-1320078854",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>