diff --git a/openapi/api-docs.yaml b/openapi/api-docs.yaml index 08958a0346dd..48f62e479514 100644 --- a/openapi/api-docs.yaml +++ b/openapi/api-docs.yaml @@ -1583,7 +1583,70 @@ paths: - $ref: '#/components/parameters/index' - - $ref: '#/components/parameters/client_filters' + name: name + in: query + description: Filter by client name + required: false + schema: + type: string + example: bob + - + name: balance + in: query + description: Filter by client balance, format uses an operator and value separated by a colon. lt,lte, gt, gte, eq + required: false + schema: + type: string + example: lt:10 + - + name: between_balance + in: query + description: Filter between client balances, format uses two values separated by a colon + required: false + schema: + type: string + example: 10:100 + - + name: email + in: query + description: Filter by client email + required: false + schema: + type: string + example: bob@gmail.com + - + name: id_number + in: query + description: Filter by client id_number + required: false + schema: + type: string + example: a1039883 + - + name: number + in: query + description: Filter by client number + required: false + schema: + type: string + example: a1039883 + - + name: filter + in: query + description: Filters clients on columns - name, id_number, contact.first_name contact.last_name, contact.email, custom_value1-4 + required: false + schema: + type: string + example: a1039883 + - + name: sort + in: query + description: Returns the list sorted by column in ascending or descending order. + required: false + schema: + type: string + example: id|desc name|desc balance|asc + responses: 200: description: 'A list of clients' @@ -18973,38 +19036,6 @@ components: bank_transactions: value: bank_transactions summary: The associated Bank Transactions - client_filters: - name: filters - in: query - description: Search in list by name. - required: false - schema: - type: string - examples: - name: - value: name - summary: ?name=bob - returns all clients with name bob - balance: - value: balance - summary: ?balance=lt:10 - returns all clients with balance less than 10 - between_balance: - value: between_balance - summary: ?between_balance=10:100 - returns all clients with balance between 10 and 100 - email: - value: email - summary: ?email=bob@gmail.com - returns all clients with an email of bob@gmail.com - id_number: - value: id_number - summary: ?id_number=abcd - returns all clients with a id_number of abcd - number: - value: number - summary: ?number=abcd - returns all clients with a number of abcd - filter: - value: filter - summary: Filters clients on columns - name, id_number, contact.first_name contact.last_name, contact.email, custom_value1-4 - sort: - value: sort - summary: ?sort=id|desc sorts the clients by id client_include: name: include in: query diff --git a/openapi/components/components.yaml b/openapi/components/components.yaml index 1622e45ebbdf..2ad24c10978b 100644 --- a/openapi/components/components.yaml +++ b/openapi/components/components.yaml @@ -4101,38 +4101,6 @@ components: bank_transactions: value: bank_transactions summary: The associated Bank Transactions - client_filters: - name: filters - in: query - description: Search in list by name. - required: false - schema: - type: string - examples: - name: - value: name - summary: ?name=bob - returns all clients with name bob - balance: - value: balance - summary: ?balance=lt:10 - returns all clients with balance less than 10 - between_balance: - value: between_balance - summary: ?between_balance=10:100 - returns all clients with balance between 10 and 100 - email: - value: email - summary: ?email=bob@gmail.com - returns all clients with an email of bob@gmail.com - id_number: - value: id_number - summary: ?id_number=abcd - returns all clients with a id_number of abcd - number: - value: number - summary: ?number=abcd - returns all clients with a number of abcd - filter: - value: filter - summary: Filters clients on columns - name, id_number, contact.first_name contact.last_name, contact.email, custom_value1-4 - sort: - value: sort - summary: ?sort=id|desc sorts the clients by id client_include: name: include in: query diff --git a/openapi/paths/paths.yaml b/openapi/paths/paths.yaml index 8f70fa1f425e..fdf136252021 100644 --- a/openapi/paths/paths.yaml +++ b/openapi/paths/paths.yaml @@ -1559,7 +1559,70 @@ paths: - $ref: '#/components/parameters/index' - - $ref: '#/components/parameters/client_filters' + name: name + in: query + description: Filter by client name + required: false + schema: + type: string + example: bob + - + name: balance + in: query + description: Filter by client balance, format uses an operator and value separated by a colon. lt,lte, gt, gte, eq + required: false + schema: + type: string + example: lt:10 + - + name: between_balance + in: query + description: Filter between client balances, format uses two values separated by a colon + required: false + schema: + type: string + example: 10:100 + - + name: email + in: query + description: Filter by client email + required: false + schema: + type: string + example: bob@gmail.com + - + name: id_number + in: query + description: Filter by client id_number + required: false + schema: + type: string + example: a1039883 + - + name: number + in: query + description: Filter by client number + required: false + schema: + type: string + example: a1039883 + - + name: filter + in: query + description: Filters clients on columns - name, id_number, contact.first_name contact.last_name, contact.email, custom_value1-4 + required: false + schema: + type: string + example: a1039883 + - + name: sort + in: query + description: Returns the list sorted by column in ascending or descending order. + required: false + schema: + type: string + example: id|desc name|desc balance|asc + responses: 200: description: 'A list of clients'