Skip to content

Commit 72e3441

Browse files
authored
Merge pull request #21 from Rusteam/fastapi-tags
add fastapi method tags
2 parents af2ffbd + 480507e commit 72e3441

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/hayhooks/server/handlers/deploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
from hayhooks.server.utils.deploy_utils import deploy_pipeline_def, PipelineDefinition
33

44

5-
@app.post("/deploy")
5+
@app.post("/deploy", tags=["config"])
66
async def deploy(pipeline_def: PipelineDefinition):
77
return deploy_pipeline_def(app, pipeline_def)

src/hayhooks/server/handlers/draw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from hayhooks.server.pipelines import registry
88

99

10-
@app.get("/draw/{pipeline_name}")
10+
@app.get("/draw/{pipeline_name}", tags=["config"])
1111
async def status(pipeline_name):
1212
pipeline = registry.get(pipeline_name)
1313
if not pipeline:

src/hayhooks/server/handlers/undeploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from hayhooks.server.pipelines import registry
77

88

9-
@app.post("/undeploy/{pipeline_name}")
9+
@app.post("/undeploy/{pipeline_name}", tags=["config"])
1010
async def deploy(pipeline_name: str):
1111
if pipeline_name not in registry.get_names():
1212
raise HTTPException(status_code=404)

src/hayhooks/server/utils/deploy_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ async def pipeline_run(pipeline_run_req: PipelineRunRequest) -> JSONResponse: #
3737
methods=["POST"],
3838
name=pipeline_def.name,
3939
response_model=PipelineRunResponse,
40+
tags=["pipelines"],
4041
)
4142
app.openapi_schema = None
4243
app.setup()

0 commit comments

Comments
 (0)