Skip to content

Commit f490995

Browse files
authored
Merge pull request #31 from linuxfoundation/andrest50/is-foundation-flag
[LFXV2-728] Add is_foundation flag and change meeting_coordinators to UserInfo
2 parents 62259aa + 6d57f18 commit f490995

File tree

20 files changed

+750
-282
lines changed

20 files changed

+750
-282
lines changed

api/project/v1/design/project.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ var _ = Service("project-service", func() {
7070
ProjectDescriptionAttribute()
7171
ProjectNameAttribute()
7272
ProjectPublicAttribute()
73+
ProjectIsFoundationAttribute()
7374
ProjectParentUIDAttribute()
7475
ProjectStageAttribute()
7576
ProjectCategoryAttribute()
@@ -201,6 +202,7 @@ var _ = Service("project-service", func() {
201202
ProjectDescriptionAttribute()
202203
ProjectNameAttribute()
203204
ProjectPublicAttribute()
205+
ProjectIsFoundationAttribute()
204206
ProjectParentUIDAttribute()
205207
ProjectStageAttribute()
206208
ProjectCategoryAttribute()

api/project/v1/design/types.go

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func ProjectBaseAttributes() {
6060
ProjectDescriptionAttribute()
6161
ProjectNameAttribute()
6262
ProjectPublicAttribute()
63+
ProjectIsFoundationAttribute()
6364
ProjectParentUIDAttribute()
6465
ProjectStageAttribute()
6566
ProjectCategoryAttribute()
@@ -189,6 +190,13 @@ func ProjectPublicAttribute() {
189190
})
190191
}
191192

193+
// ProjectIsFoundationAttribute is the DSL attribute for a project is_foundation flag.
194+
func ProjectIsFoundationAttribute() {
195+
Attribute("is_foundation", Boolean, "Whether the project is a foundation", func() {
196+
Example(false)
197+
})
198+
}
199+
192200
// ProjectParentUIDAttribute is the DSL attribute for a project parent UID.
193201
func ProjectParentUIDAttribute() {
194202
Attribute("parent_uid", String, "The UID of the parent project, required and must be a valid UUID", func() {
@@ -284,12 +292,21 @@ func ProjectWritersAttribute() {
284292

285293
// ProjectMeetingCoordinatorsAttribute is the DSL attribute for a project meeting coordinators.
286294
func ProjectMeetingCoordinatorsAttribute() {
287-
Attribute("meeting_coordinators", ArrayOf(String), func() {
288-
Description(
289-
"A list of project meeting coordinators by their LFIDs (usernames). " +
290-
"These users are responsible for managing meetings for the project.",
291-
)
292-
Example([]string{"user123", "user456"})
295+
Attribute("meeting_coordinators", ArrayOf(UserInfo), "A list of project meeting coordinators with their profile information", func() {
296+
Example([]map[string]interface{}{
297+
{
298+
"name": "John Doe",
299+
"email": "[email protected]",
300+
"username": "johndoe123",
301+
"avatar": "https://example.com/avatar1.jpg",
302+
},
303+
{
304+
"name": "Jane Smith",
305+
"email": "[email protected]",
306+
"username": "janesmith456",
307+
"avatar": "https://example.com/avatar2.jpg",
308+
},
309+
})
293310
})
294311
}
295312

api/project/v1/gen/http/cli/lfx_v2_project_service/cli.go

Lines changed: 26 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/project/v1/gen/http/openapi.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)