fix: Update documentation of filter APIs (#7245)

This commit is contained in:
Pranav Raj S
2023-06-02 15:36:41 -07:00
committed by GitHub
parent f28533bc47
commit ca9d108741
3 changed files with 178 additions and 162 deletions

View File

@@ -10,39 +10,42 @@ parameters:
- name: page
in: query
type: integer
- name: payload
- name: body
in: body
required: true
schema:
type: array
items:
type: object
properties:
attribute_key:
type: string
description: filter attribute name
filter_operator:
type: string
description: filter operator name
enum: [ equal_to, not_equal_to, contains, does_not_contain ]
values:
type: array
items:
type: string
description: array of the attribute values to filter
query_operator:
type: string
description: query operator name
enum: [ AND, OR ]
example:
- attribute_key: 'name'
filter_operator: 'equal_to'
values: ['en']
query_operator: 'AND'
- attribute_key: 'country_code'
filter_operator: 'equal_to'
values: ['us']
query_operator: nil
type: object
properties:
payload:
type: array
items:
type: object
properties:
attribute_key:
type: string
description: filter attribute name
filter_operator:
type: string
description: filter operator name
enum: [ equal_to, not_equal_to, contains, does_not_contain ]
values:
type: array
items:
type: string
description: array of the attribute values to filter
query_operator:
type: string
description: query operator name
enum: [ AND, OR ]
example:
- attribute_key: 'name'
filter_operator: 'equal_to'
values: ['en']
query_operator: 'AND'
- attribute_key: 'country_code'
filter_operator: 'equal_to'
values: ['us']
query_operator: null
responses:
200:

View File

@@ -10,39 +10,42 @@ parameters:
- name: page
in: query
type: integer
- name: payload
- name: body
in: body
required: true
schema:
type: array
items:
type: object
properties:
attribute_key:
type: string
description: filter attribute name
filter_operator:
type: string
description: filter operator name
enum: [ equal_to, not_equal_to, contains, does_not_contain ]
values:
type: array
items:
type: string
description: array of the attribute values to filter
query_operator:
type: string
description: query operator name
enum: [ AND, OR ]
example:
- attribute_key: 'browser_language'
filter_operator: 'not_eq'
values: ['en']
query_operator: 'AND'
- attribute_key: 'status'
filter_operator: 'eq'
values: ['pending']
query_operator: nil
type: object
properties:
payload:
type: array
items:
type: object
properties:
attribute_key:
type: string
description: filter attribute name
filter_operator:
type: string
description: filter operator name
enum: [ equal_to, not_equal_to, contains, does_not_contain ]
values:
type: array
items:
type: string
description: array of the attribute values to filter
query_operator:
type: string
description: query operator name
enum: [ AND, OR ]
example:
- attribute_key: 'browser_language'
filter_operator: 'not_eq'
values: ['en']
query_operator: 'AND'
- attribute_key: 'status'
filter_operator: 'eq'
values: ['pending']
query_operator: null
responses:
200:

View File

@@ -2014,63 +2014,68 @@
"type": "integer"
},
{
"name": "payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attribute_key": {
"type": "string",
"description": "filter attribute name"
"type": "object",
"properties": {
"payload": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attribute_key": {
"type": "string",
"description": "filter attribute name"
},
"filter_operator": {
"type": "string",
"description": "filter operator name",
"enum": [
"equal_to",
"not_equal_to",
"contains",
"does_not_contain"
]
},
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "array of the attribute values to filter"
},
"query_operator": {
"type": "string",
"description": "query operator name"
},
"enum": [
"AND",
"OR"
]
}
},
"filter_operator": {
"type": "string",
"description": "filter operator name",
"enum": [
"equal_to",
"not_equal_to",
"contains",
"does_not_contain"
]
},
"values": {
"type": "array",
"items": {
"type": "string"
"example": [
{
"attribute_key": "name",
"filter_operator": "equal_to",
"values": [
"en"
],
"query_operator": "AND"
},
"description": "array of the attribute values to filter"
},
"query_operator": {
"type": "string",
"description": "query operator name",
"enum": [
"AND",
"OR"
]
}
{
"attribute_key": "country_code",
"filter_operator": "equal_to",
"values": [
"us"
],
"query_operator": null
}
]
}
},
"example": [
{
"attribute_key": "name",
"filter_operator": "equal_to",
"values": [
"en"
],
"query_operator": "AND"
},
{
"attribute_key": "country_code",
"filter_operator": "equal_to",
"values": [
"us"
],
"query_operator": "nil"
}
]
}
}
}
],
@@ -2907,63 +2912,68 @@
"type": "integer"
},
{
"name": "payload",
"name": "body",
"in": "body",
"required": true,
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attribute_key": {
"type": "string",
"description": "filter attribute name"
"type": "object",
"properties": {
"payload": {
"type": "array",
"items": {
"type": "object",
"properties": {
"attribute_key": {
"type": "string",
"description": "filter attribute name"
},
"filter_operator": {
"type": "string",
"description": "filter operator name",
"enum": [
"equal_to",
"not_equal_to",
"contains",
"does_not_contain"
]
},
"values": {
"type": "array",
"items": {
"type": "string"
},
"description": "array of the attribute values to filter"
},
"query_operator": {
"type": "string",
"description": "query operator name",
"enum": [
"AND",
"OR"
]
}
}
},
"filter_operator": {
"type": "string",
"description": "filter operator name",
"enum": [
"equal_to",
"not_equal_to",
"contains",
"does_not_contain"
]
},
"values": {
"type": "array",
"items": {
"type": "string"
"example": [
{
"attribute_key": "browser_language",
"filter_operator": "not_eq",
"values": [
"en"
],
"query_operator": "AND"
},
"description": "array of the attribute values to filter"
},
"query_operator": {
"type": "string",
"description": "query operator name",
"enum": [
"AND",
"OR"
]
}
{
"attribute_key": "status",
"filter_operator": "eq",
"values": [
"pending"
],
"query_operator": null
}
]
}
},
"example": [
{
"attribute_key": "browser_language",
"filter_operator": "not_eq",
"values": [
"en"
],
"query_operator": "AND"
},
{
"attribute_key": "status",
"filter_operator": "eq",
"values": [
"pending"
],
"query_operator": "nil"
}
]
}
}
}
],