Skip to content

Commit

Permalink
Merge pull request #21 from Rusteam/fastapi-tags
Browse files Browse the repository at this point in the history
add fastapi method tags
  • Loading branch information
masci authored May 22, 2024
2 parents af2ffbd + 480507e commit 72e3441
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 72e3441

Please sign in to comment.