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

Support typing.Annotated to add information to an http verb method's return type #155

Open
Jaymon opened this issue Dec 5, 2024 · 0 comments

Comments

@Jaymon
Copy link
Owner

Jaymon commented Dec 5, 2024

I think it would be cool to do something like this:

from endpoints import Controller
from typing import Annotated

class Foo(Controller):
    def GET(self) -> Annotated[str, "text/yaml"]:
        return "<SOME YAML>"

Links and searches

@Jaymon Jaymon changed the title Support typing.Annotated to add information to a http verb method's return type Support typing.Annotated to add information to an http verb method's return type Dec 5, 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

1 participant