Skip to content

Commit

Permalink
fix: add Graph to api spec
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Oct 27, 2023
1 parent 9b97030 commit e87e10a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions api/build/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ import (
"github.com/sirupsen/logrus"
)

// graph contains nodes, and relationships between nodes, or edges.
// Graph contains nodes, and relationships between nodes, or edges.
//
// a node is a pipeline stage and its relevant steps.
// an edge is a relationship between nodes, defined by the 'needs' tag.
type graph struct {
//
// swagger:model Graph
type Graph struct {
BuildID int64 `json:"build_id"`
Nodes map[int]*node `json:"nodes"`
Edges []*edge `json:"edges"`
Expand Down Expand Up @@ -509,7 +511,7 @@ func GetBuildGraph(c *gin.Context) {
}

// construct the response
graph := graph{
graph := Graph{
BuildID: b.GetID(),
Nodes: nodes,
Edges: edges,
Expand Down

0 comments on commit e87e10a

Please sign in to comment.