Skip to content

Commit

Permalink
add fastapi method tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustem Galiullin committed May 22, 2024
1 parent af2ffbd commit 480507e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/hayhooks/server/handlers/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
from hayhooks.server.utils.deploy_utils import deploy_pipeline_def, PipelineDefinition


@app.post("/deploy")
@app.post("/deploy", tags=["config"])
async def deploy(pipeline_def: PipelineDefinition):
return deploy_pipeline_def(app, pipeline_def)
2 changes: 1 addition & 1 deletion src/hayhooks/server/handlers/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from hayhooks.server.pipelines import registry


@app.get("/draw/{pipeline_name}")
@app.get("/draw/{pipeline_name}", tags=["config"])
async def status(pipeline_name):
pipeline = registry.get(pipeline_name)
if not pipeline:
Expand Down
2 changes: 1 addition & 1 deletion src/hayhooks/server/handlers/undeploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from hayhooks.server.pipelines import registry


@app.post("/undeploy/{pipeline_name}")
@app.post("/undeploy/{pipeline_name}", tags=["config"])
async def deploy(pipeline_name: str):
if pipeline_name not in registry.get_names():
raise HTTPException(status_code=404)
Expand Down
1 change: 1 addition & 0 deletions src/hayhooks/server/utils/deploy_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ async def pipeline_run(pipeline_run_req: PipelineRunRequest) -> JSONResponse: #
methods=["POST"],
name=pipeline_def.name,
response_model=PipelineRunResponse,
tags=["pipelines"],
)
app.openapi_schema = None
app.setup()
Expand Down

0 comments on commit 480507e

Please sign in to comment.