diff --git a/internal/api/client.go b/internal/api/client.go index 65e23c3..9139317 100644 --- a/internal/api/client.go +++ b/internal/api/client.go @@ -54,7 +54,7 @@ func (c *Client) Analyze(ctx context.Context, zipPath, idempotencyKey string) (* mw.Close() var g Graph - if err := c.request(ctx, http.MethodPost, "/v1/supermodel", mw.FormDataContentType(), &buf, idempotencyKey, &g); err != nil { + if err := c.request(ctx, http.MethodPost, "/v1/graphs/supermodel", mw.FormDataContentType(), &buf, idempotencyKey, &g); err != nil { return nil, err } return &g, nil diff --git a/internal/api/types.go b/internal/api/types.go index ebae0f8..31fdeee 100644 --- a/internal/api/types.go +++ b/internal/api/types.go @@ -40,7 +40,7 @@ type Relationship struct { Properties map[string]any `json:"properties,omitempty"` } -// Graph is the unified response type for /v1/supermodel and +// Graph is the unified response type for /v1/graphs/supermodel and // /v1/repos/{id}/graph/display. The API serialises relationships as either // "edges" or "relationships" depending on the endpoint; Rels() unifies both. type Graph struct { diff --git a/scripts/check-architecture/main.go b/scripts/check-architecture/main.go index 0665bf6..e055a83 100644 --- a/scripts/check-architecture/main.go +++ b/scripts/check-architecture/main.go @@ -46,7 +46,7 @@ var sharedKernel = map[string]bool{ } // --- Supermodel API response types ------------------------------------------- -// Schema: DisplayGraphResponse from api.supermodeltools.com/v1/supermodel +// Schema: DisplayGraphResponse from api.supermodeltools.com/v1/graphs/supermodel type graphResponse struct { Nodes []graphNode `json:"nodes"` @@ -235,7 +235,7 @@ func callAPI(apiBase, apiKey, zipPath string) (*graphResponse, error) { } mw.Close() - req, err := http.NewRequest(http.MethodPost, apiBase+"/v1/supermodel", &buf) + req, err := http.NewRequest(http.MethodPost, apiBase+"/v1/graphs/supermodel", &buf) if err != nil { return nil, err }