<p></p>
<p dir="auto">Thanks, looks good to me too. Merged.</p>
<p dir="auto">If you have a chance for a followup PR, there's some refactoring that could help here (and also for notes):</p>
<ul dir="auto">
<li>Move the magic numbers to settings.yml, so that they are in the same place as other api paging stuff like tracepoints_per_page</li>
<li>Expose them in the capabilities document, since that allows API consumers to avoid hard-coding matching magic numbers into their own code</li>
<li>Refactor the tests to use the values, e.g. instead of checking for <code class="notranslate">get changesets_path(:limit => "101")</code> check for <code class="notranslate">get changesets_path(:limit => Settings.foo + 1)</code></li>
<li>When testing limits, I like to make sure we have a pair of tests for highest-permitted and lowest-forbidden. This avoids off-by-one errors. So an additional test for <code class="notranslate">:limit => Settings.foo</code>. You can see that e.g. in the tests where we check "255" works and "256" fails.</li>
<li>Add similar tests for notes, I couldn't find any tests for these limits there.</li>
</ul>
<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/3933#issuecomment-1652088815">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJ4UDYQ7QKIBOH6ZU3XSE4HTANCNFSM6AAAAAAU34IYMA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLMOBFK726XLQBK6WUDXSE4HTA5CNFSM6AAAAAAU34IYMCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTCPDP66.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/3933/c1652088815</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/3933#issuecomment-1652088815",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3933#issuecomment-1652088815",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>