Skip to content

fix(apps): reject unsupported native API route parameters - #713

Merged
KAJdev merged 5 commits into
mainfrom
zeke/con-2064-validate-native-api-route-signatures-and
Nov 11, 2026
Merged

KAJdev merged 5 commits into
mainfrom
zeke/con-2064-validate-native-api-route-signatures-and

Conversation

@KAJdev

@KAJdev KAJdev commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Native API routes accepted parameters that requests could not populate.

@app.api()
class Search:
    @get("/search")
    def search(self, q="hello"):
        return {"q": q}

GET /search?q=world returned {"q": "hello"} because native handlers did not bind query parameters. Required parameters could fail with HTTP 500, and body annotations did not validate fields.

Now native declarations require literal paths and instance methods with no input, or one required positional JSON-object argument for POST, PUT, PATCH, and DELETE. Unsupported signatures and schema annotations fail during application import with guidance to use a FastAPI factory.

Request-body handling is covered by the companion runtime PR #13. Both releases are needed for the complete contract.

Refs CON-2064.

@justinwlin justinwlin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The check matches what the runtime can call, and the tests fail without the change. Two notes inline, not blocking.

Comment thread runpod/apps/handles.py Resolved
Comment thread runpod/apps/handles.py Resolved
Comment thread runpod/apps/handles.py Fixed
Comment thread runpod/apps/handles.py Fixed
@KAJdev
KAJdev merged commit 2d9471b into main Nov 11, 2026
9 checks passed
@KAJdev
KAJdev deleted the zeke/con-2064-validate-native-api-route-signatures-and branch November 11, 2026 21:39
@promptless

promptless Bot commented Nov 11, 2026

Copy link
Copy Markdown

Promptless documentation updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants