Skip to content

Commit

Permalink
pkg: api: rest: Add operation IDs to new APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
ish-hcc committed Oct 7, 2024
1 parent efe6da6 commit 393a91f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
9 changes: 7 additions & 2 deletions pkg/api/rest/controller/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,7 @@ func GetTaskDirectly(c echo.Context) error {

// GetTaskLogs godoc
//
// @ID get-task-logs
// @Summary Get Task Logs
// @Description Get the task Logs.
// @Tags [Workflow]
Expand Down Expand Up @@ -937,6 +938,7 @@ func GetTaskLogs(c echo.Context) error {

// GetWorkflowRuns godoc
//
// @ID get-workflow
// @Summary Get workflowRuns
// @Description Get the task Logs.
// @Tags [Workflow]
Expand Down Expand Up @@ -982,6 +984,7 @@ func GetWorkflowRuns(c echo.Context) error {

// GetTaskInstances godoc
//
// @ID get-task-instances
// @Summary Get taskInstances
// @Description Get the task Logs.
// @Tags [Workflow]
Expand Down Expand Up @@ -1047,8 +1050,9 @@ func GetTaskInstances(c echo.Context) error {
return c.JSONPretty(http.StatusOK, taskInstances, " ")
}

// taskInstances godoc
// ClearTaskInstances godoc
//
// @ID clear-task-instances
// @Summary Clear taskInstances
// @Description Clear the task Instance.
// @Tags [Workflow]
Expand Down Expand Up @@ -1107,7 +1111,7 @@ func ClearTaskInstances(c echo.Context) error {

// GetEventLogs godoc
//
// @ID get-Eventlog
// @ID get-event-logs
// @Summary Get Eventlog
// @Description Get Eventlog.
// @Tags [Workflow]
Expand Down Expand Up @@ -1172,6 +1176,7 @@ func GetEventLogs(c echo.Context) error {

// GetImportErrors godoc
//
// @ID get-import-errors
// @Summary Get importErrors
// @Description Get the importErrors.
// @Tags [Workflow]
Expand Down
7 changes: 6 additions & 1 deletion pkg/api/rest/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const docTemplate = `{
"[Workflow]"
],
"summary": "Get Eventlog",
"operationId": "get-Eventlog",
"operationId": "get-event-logs",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -92,6 +92,7 @@ const docTemplate = `{
"[Workflow]"
],
"summary": "Get importErrors",
"operationId": "get-import-errors",
"responses": {
"200": {
"description": "Successfully get the importErrors.",
Expand Down Expand Up @@ -864,6 +865,7 @@ const docTemplate = `{
"[Workflow]"
],
"summary": "Get workflowRuns",
"operationId": "get-workflow",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1225,6 +1227,7 @@ const docTemplate = `{
"[Workflow]"
],
"summary": "Clear taskInstances",
"operationId": "clear-task-instances",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1283,6 +1286,7 @@ const docTemplate = `{
"[Workflow]"
],
"summary": "Get Task Logs",
"operationId": "get-task-logs",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1348,6 +1352,7 @@ const docTemplate = `{
"[Workflow]"
],
"summary": "Get taskInstances",
"operationId": "get-task-instances",
"parameters": [
{
"type": "string",
Expand Down
7 changes: 6 additions & 1 deletion pkg/api/rest/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"[Workflow]"
],
"summary": "Get Eventlog",
"operationId": "get-Eventlog",
"operationId": "get-event-logs",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -85,6 +85,7 @@
"[Workflow]"
],
"summary": "Get importErrors",
"operationId": "get-import-errors",
"responses": {
"200": {
"description": "Successfully get the importErrors.",
Expand Down Expand Up @@ -857,6 +858,7 @@
"[Workflow]"
],
"summary": "Get workflowRuns",
"operationId": "get-workflow",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1218,6 +1220,7 @@
"[Workflow]"
],
"summary": "Clear taskInstances",
"operationId": "clear-task-instances",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1276,6 +1279,7 @@
"[Workflow]"
],
"summary": "Get Task Logs",
"operationId": "get-task-logs",
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -1341,6 +1345,7 @@
"[Workflow]"
],
"summary": "Get taskInstances",
"operationId": "get-task-instances",
"parameters": [
{
"type": "string",
Expand Down
7 changes: 6 additions & 1 deletion pkg/api/rest/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ paths:
consumes:
- application/json
description: Get Eventlog.
operationId: get-Eventlog
operationId: get-event-logs
parameters:
- description: ID of the workflow.
in: query
Expand Down Expand Up @@ -437,6 +437,7 @@ paths:
consumes:
- application/json
description: Get the importErrors.
operationId: get-import-errors
produces:
- application/json
responses:
Expand Down Expand Up @@ -922,6 +923,7 @@ paths:
consumes:
- application/json
description: Get the task Logs.
operationId: get-workflow
parameters:
- description: ID of the workflow.
in: path
Expand Down Expand Up @@ -1164,6 +1166,7 @@ paths:
consumes:
- application/json
description: Clear the task Instance.
operationId: clear-task-instances
parameters:
- description: ID of the workflow.
in: path
Expand Down Expand Up @@ -1203,6 +1206,7 @@ paths:
consumes:
- application/json
description: Get the task Logs.
operationId: get-task-logs
parameters:
- description: ID of the workflow.
in: path
Expand Down Expand Up @@ -1247,6 +1251,7 @@ paths:
consumes:
- application/json
description: Get the task Logs.
operationId: get-task-instances
parameters:
- description: ID of the workflow.
in: path
Expand Down

0 comments on commit 393a91f

Please sign in to comment.