Skip to content

Commit f298316

Browse files
authored
chore: fix some small groups and acl typos (#18732)
- Add `format:"uri"` to `Group.AvatarURL` (matches `User.AvatarURL` field) - `<user_id>` and `<group_id>` were backwards in the `example:` tags - The `@Success` annotation for `/acl [get]` had an incorrect type
1 parent 935bd34 commit f298316

File tree

7 files changed

+362
-104
lines changed

7 files changed

+362
-104
lines changed

coderd/apidoc/docs.go

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

coderd/apidoc/swagger.json

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

codersdk/groups.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type Group struct {
3636
// even if the user is not authorized to read group member details.
3737
// May be greater than `len(Group.Members)`.
3838
TotalMemberCount int `json:"total_member_count"`
39-
AvatarURL string `json:"avatar_url"`
39+
AvatarURL string `json:"avatar_url" format:"uri"`
4040
QuotaAllowance int `json:"quota_allowance"`
4141
Source GroupSource `json:"source"`
4242
OrganizationName string `json:"organization_name"`

codersdk/templates.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ type TemplateUser struct {
194194
type UpdateTemplateACL struct {
195195
// UserPerms should be a mapping of user id to role. The user id must be the
196196
// uuid of the user, not a username or email address.
197-
UserPerms map[string]TemplateRole `json:"user_perms,omitempty" example:"<group_id>:admin,4df59e74-c027-470b-ab4d-cbba8963a5e9:use"`
197+
UserPerms map[string]TemplateRole `json:"user_perms,omitempty" example:"<user_id>:admin,4df59e74-c027-470b-ab4d-cbba8963a5e9:use"`
198198
// GroupPerms should be a mapping of group id to role.
199-
GroupPerms map[string]TemplateRole `json:"group_perms,omitempty" example:"<user_id>>:admin,8bd26b20-f3e8-48be-a903-46bb920cf671:use"`
199+
GroupPerms map[string]TemplateRole `json:"group_perms,omitempty" example:"<group_id>:admin,8bd26b20-f3e8-48be-a903-46bb920cf671:use"`
200200
}
201201

202202
// ACLAvailable is a list of users and groups that can be added to a template

0 commit comments

Comments
 (0)