Skip to content

Commit

Permalink
feat(helpdesk-ecommerce): PPABV-76 update openapi with range search f…
Browse files Browse the repository at this point in the history
…or helpdesk ecommerce (#2615)

* feat: update openapi with range search

* chore(openapi): refactoring for time range
  • Loading branch information
infantesimone authored Dec 4, 2024
1 parent 099b4b8 commit 698eea0
Showing 1 changed file with 53 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,40 @@
],
"description": "Product from which transaction belongs"
},
"SearchTransactionRequestDateTimeRange": {
"type": "object",
"description": "Search transaction by date and time range",
"properties": {
"type": {
"type": "string",
"default": "DATE_TIME_RANGE",
"example": "DATE_TIME_RANGE"
},
"timeRange": {
"type": "object",
"properties": {
"startDate": {
"type": "string",
"format": "date-time",
"description": "Search start date"
},
"endDate": {
"type": "string",
"format": "date-time",
"description": "Search end date"
}
},
"required": [
"startDate",
"endDate"
]
}
},
"required": [
"type",
"timeRange"
]
},
"PmSearchTransactionRequest": {
"type": "object",
"oneOf": [
Expand All @@ -1068,13 +1102,17 @@
},
{
"$ref": "#/components/schemas/SearchTransactionRequestEmail"
},
{
"$ref": "#/components/schemas/SearchTransactionRequestDateTimeRange"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"USER_FISCAL_CODE": "#/components/schemas/SearchTransactionRequestFiscalCode",
"USER_EMAIL": "#/components/schemas/SearchTransactionRequestEmail"
"USER_EMAIL": "#/components/schemas/SearchTransactionRequestEmail",
"DATE_TIME_RANGE": "#/components/schemas/SearchTransactionRequestDateTimeRange"
}
}
},
Expand Down Expand Up @@ -1770,13 +1808,17 @@
},
{
"$ref": "#/components/schemas/SearchTransactionRequestEmail"
},
{
"$ref": "#/components/schemas/SearchTransactionRequestDateTimeRange"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"USER_FISCAL_CODE": "#/components/schemas/SearchTransactionRequestFiscalCode",
"USER_EMAIL": "#/components/schemas/SearchTransactionRequestEmail"
"USER_EMAIL": "#/components/schemas/SearchTransactionRequestEmail",
"DATE_TIME_RANGE": "#/components/schemas/SearchTransactionRequestDateTimeRange"
}
}
},
Expand All @@ -1792,6 +1834,15 @@
"type": "USER_EMAIL",
"userEmail": "[email protected]"
}
},
"search by date and time range": {
"value": {
"type": "DATE_TIME_RANGE",
"timeRange": {
"startDate": "2023-01-01T00:00:00.000",
"endDate": "2023-01-01T02:00:00.000"
}
}
}
}
}
Expand Down

0 comments on commit 698eea0

Please sign in to comment.