From e87e10a7eb82f9daf9580c5b0ea21877b8a53acc Mon Sep 17 00:00:00 2001 From: davidvader Date: Fri, 27 Oct 2023 14:59:48 -0500 Subject: [PATCH] fix: add Graph to api spec --- api/build/graph.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/build/graph.go b/api/build/graph.go index 075fd8d99..1a94b7648 100644 --- a/api/build/graph.go +++ b/api/build/graph.go @@ -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"` @@ -509,7 +511,7 @@ func GetBuildGraph(c *gin.Context) { } // construct the response - graph := graph{ + graph := Graph{ BuildID: b.GetID(), Nodes: nodes, Edges: edges,