From eb6ab580a17642af653354893a5401ecb6b372a8 Mon Sep 17 00:00:00 2001 From: Corey Collins Date: Thu, 14 Apr 2022 11:05:02 -0500 Subject: [PATCH 1/3] Added query parameters to filter projects by name, city, labels, etc --- openapi.yaml | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index fdad41b..b8b6c9b 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -320,8 +320,7 @@ paths: format: int32 - name: query in: query - required: false - description: "An optional value to filter the projects by name and address line 1" + description: "An optional value to do a full text search for projects" schema: type: string - name: modified_since @@ -329,6 +328,49 @@ paths: description: "An ISO8601 formatted date and time to return projects modified on or after the provided value" schema: type: string + - name: name + in: query + description: "An optional value to filter projects by name" + schema: + type: string + - name: street_address_1 + in: query + description: "An optional value to filter projects by street address 1" + schema: + type: string + - name: city + in: query + description: "An optional value to filter projects by city" + schema: + type: string + - name: postal_code + in: query + description: "An optional value to filter projects by postal code" + schema: + type: string + - name: labels + in: query + description: "A comma delimited list of labels to filter projects by" + example: "active,todo" + schema: + type: string + - name: creator_id + in: query + description: "An optional value to filter projects by the user id who created the project" + schema: + type: string + - name: integration_type + in: query + description: "An optional value to filter projects by the integration type it was created from" + example: "Jobber" + schema: + type: string + - name: integration_relation_id + in: query + description: "An optional value to filter projects by the integration id associated with the project" + example: job-1234 + schema: + type: string responses: '200': description: 'List of projects sorted by most recent activity first' From 82791c3c4e7df3535755c33aeec4d6888fa0e1ca Mon Sep 17 00:00:00 2001 From: Corey Collins Date: Mon, 25 Apr 2022 11:17:34 -0500 Subject: [PATCH 2/3] Removed address searching from spec --- openapi.yaml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index b8b6c9b..8b4a4ba 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -328,26 +328,6 @@ paths: description: "An ISO8601 formatted date and time to return projects modified on or after the provided value" schema: type: string - - name: name - in: query - description: "An optional value to filter projects by name" - schema: - type: string - - name: street_address_1 - in: query - description: "An optional value to filter projects by street address 1" - schema: - type: string - - name: city - in: query - description: "An optional value to filter projects by city" - schema: - type: string - - name: postal_code - in: query - description: "An optional value to filter projects by postal code" - schema: - type: string - name: labels in: query description: "A comma delimited list of labels to filter projects by" From 6f884ea3ffd5f69562eb259548c46b82c90cb3c3 Mon Sep 17 00:00:00 2001 From: Corey Collins Date: Wed, 25 May 2022 10:56:45 -0500 Subject: [PATCH 3/3] Add primary contact query fields --- openapi.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 8b4a4ba..85c3f9f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -351,6 +351,18 @@ paths: example: job-1234 schema: type: string + - name: primary_contact_email + in: query + description: "An optional value to filter projects by the primary contact email associated with the project" + example: joe@email.com + schema: + type: string + - name: primary_contact_phone_number + in: query + description: "An optional value to filter projects by the primary contact phone number associated with the project. Only numbers allowed" + example: "5551234444" + schema: + type: string responses: '200': description: 'List of projects sorted by most recent activity first' @@ -2241,6 +2253,11 @@ components: $ref: '#/components/schemas/Coordinate' primary_contact: $ref: '#/components/schemas/ProjectContactResponse' + labels: + type: array + description: "A list of labels associated with the project" + items: + $ref: '#/components/schemas/ProjectIntegration' created_at: type: integer format: int32