From 54e9d2ec255ddbcfdb6aeb5c540d925d7ab537e8 Mon Sep 17 00:00:00 2001 From: Sajed Date: Thu, 17 Jun 2021 10:20:23 +0200 Subject: [PATCH 1/7] Add read only for the symmetrical property. --- swagger.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swagger.yaml b/swagger.yaml index 53c845d..89bc3b4 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -8728,7 +8728,8 @@ components: example: 5aaa9b059007ba08c9ebaf58 symmetrical: type: boolean - description: Is the relationship symmetrical? + description: Is the relationship symmetrical? (read only). + readOnly: true example: true relationship_variants: type: array From eff311904d06414ae473ffcdb5ca0ed3d6f76151 Mon Sep 17 00:00:00 2001 From: Sajed Date: Fri, 18 Jun 2021 20:37:23 +0200 Subject: [PATCH 2/7] Fix typos | CR API-641 --- swagger.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/swagger.yaml b/swagger.yaml index 89bc3b4..e0ca45e 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -3336,13 +3336,13 @@ paths: properties: variants: type: array - description: The relationship varients. + description: The relationship variants. items: type: object properties: name: type: string - description: The relationship varient name. + description: The relationship variant name. example: Partner responses: 201: @@ -3429,18 +3429,18 @@ paths: properties: variants: type: array - description: The relationship varients. + description: The relationship variants. items: type: object properties: id: type: string format: bson-id - description: ID of the relationship varient + description: ID of the relationship variant example: 5aaa9b059007ba08c9ebaf59 name: type: string - description: The relationship varient name. + description: The relationship variant name. example: Partner responses: 200: @@ -8744,7 +8744,7 @@ components: example: 5aaa9b059007ba08c9ebaf59 name: type: string - description: The relationship varient name + description: The relationship variant name example: Partner created_at: type: string From 67e8a680a0e7cf73250991e93fa5c081788ea986 Mon Sep 17 00:00:00 2001 From: Sajed Date: Fri, 18 Jun 2021 20:35:38 +0200 Subject: [PATCH 3/7] Rename relationship types query parameter | CR API-641 --- swagger.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/swagger.yaml b/swagger.yaml index e0ca45e..d1d7b27 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -3270,7 +3270,7 @@ paths: tags: - Relationship Types parameters: - - $ref: '#/components/parameters/query_relationship_variants' + - $ref: '#/components/parameters/query_relationship_types_search' - $ref: '#/components/parameters/query_relationship_symmetrical' - $ref: '#/components/parameters/query_date_filter' - $ref: '#/components/parameters/query_since' @@ -10421,6 +10421,14 @@ components: schema: type: string example: Solar panels + query_relationship_types_search: + name: search + in: query + required: false + description: Search relationship types by relationship variants + schema: + type: string + example: Partner query_contacts_owner_id: name: owner_id in: query @@ -10934,14 +10942,6 @@ components: schema: type: string example: 5cfa87a4849d7873db082f98 - query_relationship_variants: - name: variant - in: query - required: false - description: Search relationship types by relationship variants - schema: - type: string - example: Partner query_relationship_symmetrical: name: symmetrical in: query From 1bbcd2a8481caa41d5d81021df1e01379c942bcf Mon Sep 17 00:00:00 2001 From: Sajed Date: Tue, 22 Jun 2021 15:30:14 +0200 Subject: [PATCH 4/7] Address review comments | CR API-641 --- swagger.yaml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/swagger.yaml b/swagger.yaml index d1d7b27..9b466c7 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -3336,13 +3336,16 @@ paths: properties: variants: type: array - description: The relationship variants. + minItems: 1 + maxItems: 2 + description: The relationship variants items: type: object properties: name: type: string - description: The relationship variant name. + maxLength: 35 chars + description: The relationship variant name example: Partner responses: 201: @@ -3379,7 +3382,7 @@ paths: $ref: '#/components/responses/500' /relationship_types/{relationship_type_id}: get: - summary: Get a specific relationship type. + summary: Get a specific relationship type description: tags: - Relationship Types @@ -3429,7 +3432,9 @@ paths: properties: variants: type: array - description: The relationship variants. + minItems: 1 + maxItems: 2 + description: The relationship variants items: type: object properties: @@ -3440,7 +3445,8 @@ paths: example: 5aaa9b059007ba08c9ebaf59 name: type: string - description: The relationship variant name. + maxLength: 35 chars + description: The relationship variant name example: Partner responses: 200: @@ -8728,11 +8734,13 @@ components: example: 5aaa9b059007ba08c9ebaf58 symmetrical: type: boolean - description: Is the relationship symmetrical? (read only). + description: Is the relationship symmetrical? (read only) readOnly: true example: true relationship_variants: type: array + minItems: 1 + maxItems: 2 items: type: object properties: @@ -8744,6 +8752,7 @@ components: example: 5aaa9b059007ba08c9ebaf59 name: type: string + maxLength: 35 chars description: The relationship variant name example: Partner created_at: @@ -10425,7 +10434,7 @@ components: name: search in: query required: false - description: Search relationship types by relationship variants + description: Search relationship types by relationship variant name schema: type: string example: Partner From 3991e44b4762cf74272728f6d4ec3935c60a707a Mon Sep 17 00:00:00 2001 From: Sajed Date: Thu, 24 Jun 2021 03:09:00 +0200 Subject: [PATCH 5/7] Fix typos in relationship types responses | CR API-641 --- swagger.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/swagger.yaml b/swagger.yaml index ba26fd3..4145bc2 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -3362,12 +3362,8 @@ paths: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: - relationship_types: - type: array - items: - properties: - relationship_type: - $ref: '#/components/schemas/Relationship_Type' + relationship_type: + $ref: '#/components/schemas/Relationship_Type' 400: $ref: '#/components/responses/400' 401: @@ -3403,7 +3399,7 @@ paths: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: - deal: + relationship_type: $ref: '#/components/schemas/Relationship_Type' 400: $ref: '#/components/responses/400' @@ -3463,7 +3459,7 @@ paths: $ref: '#/components/schemas/Success/properties/timestamp' data: properties: - deal: + relationship_type: $ref: '#/components/schemas/Relationship_Type' 400: $ref: '#/components/responses/400' From 7098436dfd9481137842c88c2e6934101390dc40 Mon Sep 17 00:00:00 2001 From: Sajed Date: Fri, 25 Jun 2021 04:45:38 +0200 Subject: [PATCH 6/7] Rename relationship type writable json attribute | CR API-641 --- swagger.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swagger.yaml b/swagger.yaml index 4145bc2..6a9bcc5 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -3334,7 +3334,7 @@ paths: application/json: schema: properties: - variants: + relationship_variants: type: array minItems: 1 maxItems: 2 @@ -3426,7 +3426,7 @@ paths: application/json: schema: properties: - variants: + relationship_variants: type: array minItems: 1 maxItems: 2 From 4796db4e862718d092c84ed31e7130672e28c730 Mon Sep 17 00:00:00 2001 From: Sajed Date: Fri, 25 Jun 2021 05:15:39 +0200 Subject: [PATCH 7/7] Rename relationship type writable json attribute | CR API-641 --- swagger.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/swagger.yaml b/swagger.yaml index 6a9bcc5..bd0e7e9 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -3334,7 +3334,7 @@ paths: application/json: schema: properties: - relationship_variants: + variants: type: array minItems: 1 maxItems: 2 @@ -3426,7 +3426,7 @@ paths: application/json: schema: properties: - relationship_variants: + variants: type: array minItems: 1 maxItems: 2 @@ -8992,7 +8992,7 @@ components: description: >- The relationship types that identifies the relationships between the contacts. required: - - relationship_variants + - variants properties: id: type: string @@ -9005,7 +9005,7 @@ components: description: Is the relationship symmetrical? (read only) readOnly: true example: true - relationship_variants: + variants: type: array minItems: 1 maxItems: 2