Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route Confusion #164

Closed
apoliakov opened this issue Dec 6, 2024 · 1 comment
Closed

Route Confusion #164

apoliakov opened this issue Dec 6, 2024 · 1 comment

Comments

@apoliakov
Copy link
Member

Analogous to dbos-inc/dbos-transact-ts#666 but more consistent.

If we do something like this:

@app.get("/greeting/theotherone")
def greeting_one() -> str:
    greeting = f"Called the other greeting"
    DBOS.logger.info(greeting)
    return greeting

@app.get("/greeting/{name}")
def greeting_one(name: str) -> str:
    greeting = f"Called greeting with {name}"
    DBOS.logger.info(greeting)
    return greeting

The first method declared in the file will get precedence.

@kraftp
Copy link
Member

kraftp commented Dec 6, 2024

This has nothing to do with DBOS and is well-documented FastAPI behavior.

@kraftp kraftp closed this as completed Dec 6, 2024
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

No branches or pull requests

2 participants