Skip to content

Commit

Permalink
feat: add "relationships.current_droplet" to app resource
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhaochen47 committed Jan 14, 2025
1 parent 0c61a55 commit a86a3cc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
10 changes: 5 additions & 5 deletions resource/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
)

type App struct {
Name string `json:"name"`
State string `json:"state"`
Lifecycle Lifecycle `json:"lifecycle"`
Relationships SpaceRelationship `json:"relationships"`
Metadata *Metadata `json:"metadata"`
Name string `json:"name"`
State string `json:"state"`
Lifecycle Lifecycle `json:"lifecycle"`
Relationships AppRelationships `json:"relationships"`
Metadata *Metadata `json:"metadata"`
Resource `json:",inline"`
}

Expand Down
5 changes: 5 additions & 0 deletions resource/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ type SpaceRelationship struct {
Space ToOneRelationship `json:"space"`
}

type AppRelationships struct {
Space ToOneRelationship `json:"space"`
CurrentDroplet ToOneRelationship `json:"current_droplet"`
}

type AppRelationship struct {
App ToOneRelationship `json:"app"`
}
Expand Down
5 changes: 5 additions & 0 deletions testutil/template/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
"data": {
"guid": "5c1b65d8-abdc-471b-962d-b60a6d8646b0"
}
},
"current_droplet": {
"data": {
"guid": "e4398f42-5ac5-46fb-961e-ad419f14cf83"
}
}
},
"metadata": {
Expand Down

0 comments on commit a86a3cc

Please sign in to comment.