<p></p>
<blockquote>
<p dir="auto">Also what is the point of the first commit if the second one reverts it? If you want to offer two alternatives then open two PRs don't lump them together in one PR because then if we merge it we'll add loads of useless noise to the history.</p>
</blockquote>
<p dir="auto">I was planning on squashing it before it got merged. I'll go ahead and do that now.</p>
<blockquote>
<p dir="auto">I wasn't actually expecting us to change the behaviour! I thought you meant you were going to fix the client to not use such silly names...<br>
The whole point was to make it easier to map an API to the appropriate API key.</p>
</blockquote>
<p dir="auto">While MapRoulette has a primary instance (<code class="notranslate">https://maproulette.org/api/v2</code>), it is possible to have other instances (for example, Company Foo could have a private instance).</p>
<p dir="auto">While it is possible to have each service have a static api key (for example, the main MR server could use <code class="notranslate">maproulette_apikey_v2</code>), it isn't very scalable. Hence why I was looking at <code class="notranslate">apikey:<API URL></code>. Having the API URL as part of the key makes it trivial to map API keys to their respective services, minimizing special cases (<code class="notranslate">if (api == "https://maproulette.org/api/v2"); then key = "maproulette_apikey_v2"; else if (api == "https://random.foo"); then key = "foo_random_key"; else if (...)</code>).</p>
<p dir="auto">With all that said, if you are against having arbitrary keys in user preferences, would you accept a PR that validated the PUT /user/preferences endpoint to <em>not</em> have keys that would be invalid for the /user/preferences/[KEY] endpoints?</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-1306067003">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJ6VSQZMCVBBZYLV23WHFH6DANCNFSM6AAAAAARZPOMC4">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLFK7HUTVHGA6TGCSTWHFH6DA5CNFSM6AAAAAARZPOMC6WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSN3EADW.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/c1306067003</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-1306067003",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3787#issuecomment-1306067003",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>