Fix integration API site resource lookup - #3510
Open
shubhamsinnh wants to merge 1 commit into
Open
Conversation
shubhamsinnh
marked this pull request as ready for review
July 30, 2026 10:05
shubhamsinnh
requested review from
miloschwartz and
oschwartz10612
as code owners
July 30, 2026 10:05
Contributor
Author
|
Hi @oschwartz10612, @miloschwartz, and @AstralDestiny I'd appreciate your review when you get a chance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.
Description
Fixes #2743.
The integration API route
GET /site-resource/{siteResourceId}only provides a resource ID, but the shared request schema required anorgId. As a result, valid requests failed validation before the resource lookup ran.This makes
orgIdoptional for ID-based lookups while keeping it as an additional constraint for org-scoped routes. It also updates the OpenAPI definitions so they only advertise parameters that are actually present in the route.A regression test covers the ID-only route, the existing org-scoped form, and invalid resource IDs.
For API-key and user routes, the existing access middleware still authorizes the requested resource before this handler runs. Root API keys continue through the existing root-key check and receive the normal not-found response when the resource does not exist.
How to test?
All four checks pass locally.