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

Group Endpoints #6

Open
nolan1999 opened this issue Oct 25, 2023 · 0 comments
Open

Group Endpoints #6

nolan1999 opened this issue Oct 25, 2023 · 0 comments
Assignees

Comments

@nolan1999
Copy link
Member

Applies to both user and worker facing.
Note please do not group by HTTP Method but by meaningful semantics.

from fastapi import FastAPI

tags_metadata = [
    {"name": "Get Methods", "description": "One other way around"},
    {"name": "Post Methods", "description": "Keep doing this"},
    {"name": "Delete Methods", "description": "KILL 'EM ALL"},
    {"name": "Put Methods", "description": "Boring"},
]

app = FastAPI(openapi_tags=tags_metadata)


@app.delete("/items", tags=["Delete Methods"])
@app.put("/items", tags=["Put Methods"])
@app.post("/items", tags=["Post Methods"])
@app.get("/items", tags=["Get Methods"])
async def handle_items():
    return
@nolan1999 nolan1999 self-assigned this Oct 25, 2023
@nolan1999 nolan1999 mentioned this issue Oct 25, 2023
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