Skip to content

Commit

Permalink
Return node_id in node versions. (#115)
Browse files Browse the repository at this point in the history
* Return node_id in node versions.

* Update tests.
  • Loading branch information
robinjhuang authored Jan 4, 2025
1 parent c46dd20 commit 43947e4
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 78 deletions.
159 changes: 81 additions & 78 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 integration-tests/registry_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ func TestRegistryNodeVersion(t *testing.T) {
DownloadUrl: &downloadUrl,
Status: &nodeVersionStatus,
StatusReason: proto.String(""),
NodeId: node.Id,
}, resVersions200[0], "should be equal")

// retrieve node versions with the status reason
Expand Down Expand Up @@ -668,6 +669,7 @@ func TestRegistryNodeVersion(t *testing.T) {
DownloadUrl: &downloadUrl,
Status: &status,
StatusReason: proto.String(""),
NodeId: node.Id,
}
assert.Equal(t, updatedNodeVersion, res200[0], "should be equal")
createdNodeVersion = res200[0]
Expand Down
1 change: 1 addition & 0 deletions mapper/node_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func DbNodeVersionToApiNodeVersion(dbNodeVersion *ent.NodeVersion) *drip.NodeVer
StatusReason: &dbNodeVersion.StatusReason,
DownloadUrl: &downloadUrl,
ComfyNodes: comfyNodes,
NodeId: &dbNodeVersion.NodeID,
}
return apiVersion
}
Expand Down
3 changes: 3 additions & 0 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2227,6 +2227,9 @@ components:
type: object
additionalProperties:
$ref: "#/components/schemas/ComfyNode"
node_id:
type: string
description: The unique identifier of the node.
ComfyNode:
type: object
properties:
Expand Down

0 comments on commit 43947e4

Please sign in to comment.