From 01b4f14f20cb6de98524f3dd2a7648afa360eb0c Mon Sep 17 00:00:00 2001 From: tomcdonnell Date: Tue, 18 Apr 2023 17:46:21 +1000 Subject: [PATCH 1/3] Set schema to array of items instead of single item [SA-15481] --- .../components/responses/userGroupMembership-list.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openapi/components/responses/userGroupMembership-list.yaml b/openapi/components/responses/userGroupMembership-list.yaml index bed05f75..630bbb23 100644 --- a/openapi/components/responses/userGroupMembership-list.yaml +++ b/openapi/components/responses/userGroupMembership-list.yaml @@ -7,6 +7,8 @@ content: A group within Schoolbox. This contains some of the folder's fields in this context. - type: object - properties: - $ref: ../schemas/userGroupMembership-readableFields.yaml + type: array + items: + type: object + properties: + $ref: ../schemas/userGroupMembership-readableFields.yaml From 071a712c6c0a087bbc328712beb0af52dc1c15e0 Mon Sep 17 00:00:00 2001 From: tomcdonnell Date: Tue, 18 Apr 2023 17:58:01 +1000 Subject: [PATCH 2/3] Set groups schema to array of objects instead of single object [SA-15481] --- .../schemas/user-readableFields.yaml | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/openapi/components/schemas/user-readableFields.yaml b/openapi/components/schemas/user-readableFields.yaml index 2495b746..509b23a4 100644 --- a/openapi/components/schemas/user-readableFields.yaml +++ b/openapi/components/schemas/user-readableFields.yaml @@ -17,16 +17,18 @@ properties: groups: description: | This user's group memberships indexed by folder ID of the groups. - type: object - additionalProperties: - title: Group Membership - description: | - A group within Schoolbox. - - This contains some of the folder's fields in this context. + type: array + items: type: object - properties: - $ref: ../schemas/userGroupMembership-readableFields.yaml + additionalProperties: + title: Group Membership + description: | + A group within Schoolbox. + + This contains some of the folder's fields in this context. + type: object + properties: + $ref: ../schemas/userGroupMembership-readableFields.yaml schoolHouse: $ref: ./schoolHouse.yaml From 1038bfd4218f3178280becb3bca5c831b523117e Mon Sep 17 00:00:00 2001 From: tomcdonnell Date: Wed, 19 Apr 2023 16:03:52 +1000 Subject: [PATCH 3/3] Fix documentation for user -> groups [SA-15481] --- .../schemas/user-readableFields.yaml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/openapi/components/schemas/user-readableFields.yaml b/openapi/components/schemas/user-readableFields.yaml index 509b23a4..472ae35e 100644 --- a/openapi/components/schemas/user-readableFields.yaml +++ b/openapi/components/schemas/user-readableFields.yaml @@ -16,19 +16,17 @@ properties: groups: description: | - This user's group memberships indexed by folder ID of the groups. + This user's group memberships type: array items: type: object - additionalProperties: - title: Group Membership - description: | - A group within Schoolbox. - - This contains some of the folder's fields in this context. - type: object - properties: - $ref: ../schemas/userGroupMembership-readableFields.yaml + title: Group Membership + description: | + A group within Schoolbox. + + This contains some of the folder's fields in this context. + properties: + $ref: ../schemas/userGroupMembership-readableFields.yaml schoolHouse: $ref: ./schoolHouse.yaml