Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,118 changes: 1,835 additions & 283 deletions api/serverless/openapi.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions internal/api/serverless/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ func (c *Client) ListVersions(ctx context.Context, appID string, params *ListVer
if resp.JSON200 == nil {
return pageOf[Version](nil, nil), nil
}
return pageOf(resp.JSON200.Data, resp.JSON200.NextCursor), nil
return pageOf(&resp.JSON200.Data, resp.JSON200.NextCursor), nil
case http.StatusUnauthorized:
return Page[Version]{}, problemToError(resp.ApplicationproblemJSON401, http.StatusUnauthorized)
case http.StatusForbidden:
Expand Down Expand Up @@ -559,7 +559,7 @@ func (c *Client) ListBuilds(ctx context.Context, appID string, params *ListBuild
if resp.JSON200 == nil {
return pageOf[Build](nil, nil), nil
}
return pageOf(resp.JSON200.Data, resp.JSON200.NextCursor), nil
return pageOf(&resp.JSON200.Data, resp.JSON200.NextCursor), nil
case http.StatusUnauthorized:
return Page[Build]{}, problemToError(resp.ApplicationproblemJSON401, http.StatusUnauthorized)
case http.StatusForbidden:
Expand Down
5 changes: 2 additions & 3 deletions internal/api/serverless/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,7 @@ func TestCreateApp(t *testing.T) {
source, err := NewCodeAppSource(CodeSourceUpsert{
BaseImage: "python:3.11-slim",
Codebase: CodebaseSource{
ModelFile: "app.py",
ZipBase64: "Zm9v",
UploadId: uuid.MustParse("019c7654-8b21-7abc-9123-abcdef123456"),
},
})
if err != nil {
Expand Down Expand Up @@ -452,7 +451,7 @@ func TestUpdateApp(t *testing.T) {
if body.Configuration == nil || body.Configuration.MaxWorkers == nil || *body.Configuration.MaxWorkers != maxWorkers {
t.Errorf("unexpected body: %s", raw)
}
if body.AppName != nil || body.AppSource != nil || body.Secrets != nil || body.EnvironmentVariables != nil || body.Endpoints != nil {
if body.AppName != nil || body.AppSource != nil || body.Secrets != nil || body.EnvironmentVariables != nil {
t.Errorf("patch included out-of-scope fields: %s", raw)
}
var rawMap map[string]json.RawMessage
Expand Down
Loading