Skip to content

Commit

Permalink
Add status reason in response.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed Jun 15, 2024
1 parent 20d6796 commit 0a0f583
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 76 deletions.
155 changes: 79 additions & 76 deletions drip/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions mapper/node_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func DbNodeVersionToApiNodeVersion(dbNodeVersion *ent.NodeVersion) *drip.NodeVer
Dependencies: &dbNodeVersion.PipDependencies,
CreatedAt: &dbNodeVersion.CreateTime,
Status: DbNodeVersionStatusToApiNodeVersionStatus(dbNodeVersion.Status),
StatusReason: &dbNodeVersion.StatusReason,
}
}

Expand All @@ -80,6 +81,7 @@ func DbNodeVersionToApiNodeVersion(dbNodeVersion *ent.NodeVersion) *drip.NodeVer
Dependencies: &dbNodeVersion.PipDependencies,
CreatedAt: &dbNodeVersion.CreateTime,
Status: status,
StatusReason: &dbNodeVersion.StatusReason,
}
}

Expand Down
3 changes: 3 additions & 0 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1751,6 +1751,9 @@ components:
status:
$ref: "#/components/schemas/NodeVersionStatus"
description: The status of the node version.
status_reason:
type: string
description: The reason for the status change.
Error:
type: object
properties:
Expand Down

0 comments on commit 0a0f583

Please sign in to comment.