diff --git a/app/Services/Report/RefundReport.php b/app/Services/Report/RefundReport.php new file mode 100644 index 0000000000..afeb33306b --- /dev/null +++ b/app/Services/Report/RefundReport.php @@ -0,0 +1,156 @@ +company->db); + App::forgetInstance('translator'); + App::setLocale($this->company->locale()); + $t = app('translator'); + $t->replace(Ninja::transformTranslations($this->company->settings)); + + $this->csv = Writer::createFromString(); + \League\Csv\CharsetConverter::addTo($this->csv, 'UTF-8', 'UTF-8'); + + $this->csv->insertOne([]); + $this->csv->insertOne([]); + $this->csv->insertOne([]); + $this->csv->insertOne([]); + $this->csv->insertOne([ctrans('texts.refund_report')]); + $this->csv->insertOne([ctrans('texts.created_on'), ' ', $this->translateDate(now()->format('Y-m-d'), $this->company->date_format(), $this->company->locale())]); + + if (count($this->input['report_keys']) == 0) { + $this->input['report_keys'] = $this->report_keys; + } + + $this->csv->insertOne($this->buildHeader()); + + // Get all refund activities + $query = Activity::query() + ->where('company_id', $this->company->id) + ->where('activity_type_id', 40) // Refund activity type + ->with(['payment', 'payment.client']); + + $query = $this->addDateRange($query, 'activities'); + + $refundActivities = $query->cursor(); + + foreach ($refundActivities as $activity) { + /** @var Activity $activity */ + + // Extract refund amount from notes using regex + preg_match('/Refunded : (\d+) -/', $activity->notes, $matches); + $refundAmount = $matches[1] ?? 0; + + // Get payment details + $payment = $activity->payment; + + // Get gateway refund status from refund_meta + $gatewayRefund = false; + if ($payment && $payment->refund_meta) { + foreach ($payment->refund_meta as $refund) { + if (isset($refund['gateway_refund']) && $refund['gateway_refund']) { + $gatewayRefund = true; + break; + } + } + } + + // Get invoice details from refund_meta + $invoices = []; + if ($payment && $payment->refund_meta) { + foreach ($payment->refund_meta as $refund) { + if (isset($refund['invoices'])) { + foreach ($refund['invoices'] as $invoiceRefund) { + $invoice = Invoice::query() + ->where('company_id', $this->company->id) + ->where('id', $invoiceRefund['invoice_id']) + ->first(); + + if ($invoice) { + $invoices[] = [ + 'number' => $invoice->number, + 'amount' => $invoiceRefund['amount'] + ]; + } + } + } + } + } + + // Create a row for each refunded invoice + foreach ($invoices as $invoice) { + $this->csv->insertOne([ + $this->translateDate(\Carbon\Carbon::parse($activity->created_at)->format('Y-m-d'), $this->company->date_format(), $this->company->locale()), + Number::formatMoney($refundAmount, $this->company), + $payment ? $payment->number : '', + $invoice['number'], + Number::formatMoney($invoice['amount'], $this->company), + $gatewayRefund ? 'Yes' : 'No', + ]); + } + } + + return $this->csv->toString(); + } + + public function buildHeader(): array + { + $header = []; + + foreach ($this->input['report_keys'] as $value) { + $header[] = ctrans("texts.{$value}"); + } + + return $header; + } +} diff --git a/openapi/api-docs.yaml b/openapi/api-docs.yaml index d428eb44f4..51a914f377 100644 --- a/openapi/api-docs.yaml +++ b/openapi/api-docs.yaml @@ -116,7 +116,6 @@ paths: items: $ref: '#/components/schemas/Activity' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -381,7 +380,6 @@ paths: items: $ref: '#/components/schemas/BankIntegration' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -837,7 +835,6 @@ paths: items: $ref: '#/components/schemas/BankTransaction' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -1244,7 +1241,6 @@ paths: items: $ref: '#/components/schemas/BankTransactionRule' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -1620,7 +1616,6 @@ paths: items: $ref: '#/components/schemas/ClientGatewayToken' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -1913,7 +1908,6 @@ paths: items: $ref: '#/components/schemas/Company' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -2349,7 +2343,6 @@ paths: items: $ref: '#/components/schemas/CompanyGateway' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -2671,7 +2664,6 @@ paths: items: $ref: '#/components/schemas/CompanyLedger' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -2783,7 +2775,6 @@ paths: items: $ref: '#/components/schemas/Design' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -3099,7 +3090,6 @@ paths: items: $ref: '#/components/schemas/Document' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -3216,7 +3206,6 @@ paths: items: $ref: '#/components/schemas/ExpenseCategory' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -3520,7 +3509,6 @@ paths: items: $ref: '#/components/schemas/Expense' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -3913,7 +3901,6 @@ paths: items: $ref: '#/components/schemas/GroupSetting' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -4609,7 +4596,6 @@ paths: items: $ref: '#/components/schemas/PaymentTerm' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -5051,7 +5037,6 @@ paths: items: $ref: '#/components/schemas/RecurringExpense' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -5418,7 +5403,6 @@ paths: items: $ref: '#/components/schemas/RecurringQuote' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -6322,7 +6306,6 @@ paths: items: $ref: '#/components/schemas/Subscription' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -6671,7 +6654,6 @@ paths: items: $ref: '#/components/schemas/SystemLog' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -6984,7 +6966,6 @@ paths: items: $ref: '#/components/schemas/TaskStatus' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -7297,7 +7278,6 @@ paths: items: $ref: '#/components/schemas/TaxRate' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -7614,7 +7594,6 @@ paths: items: $ref: '#/components/schemas/CompanyToken' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -7922,7 +7901,6 @@ paths: items: $ref: '#/components/schemas/User' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -8378,7 +8356,6 @@ paths: items: $ref: '#/components/schemas/Webhook' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -8987,18 +8964,6 @@ paths: $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Credit" - meta: - type: object - $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" 403: @@ -9206,9 +9171,6 @@ paths: type: array items: $ref: '#/components/schemas/Location' - meta: - type: object - $ref: '#/components/schemas/Meta' 401: $ref: '#/components/responses/401' 403: @@ -9615,15 +9577,7 @@ paths: content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Location' - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: '#/components/schemas/Location' 401: $ref: '#/components/responses/401' 403: @@ -10163,15 +10117,7 @@ paths: content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/RecurringInvoice" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/RecurringInvoice" 401: $ref: "#/components/responses/401" 403: @@ -10669,15 +10615,7 @@ paths: content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Task" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/Task" 401: $ref: "#/components/responses/401" 403: @@ -11449,15 +11387,7 @@ paths: content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Quote" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/Quote" 401: $ref: "#/components/responses/401" 403: @@ -12399,18 +12329,6 @@ paths: $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Invoice" - meta: - type: object - $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" 403: @@ -13009,15 +12927,7 @@ paths: content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Project" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/Project" 401: $ref: "#/components/responses/401" 403: @@ -13420,15 +13330,7 @@ paths: content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Vendor" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/Vendor" 401: $ref: "#/components/responses/401" 403: @@ -13944,15 +13846,7 @@ paths: content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Payment" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/Payment" 401: $ref: "#/components/responses/401" 403: @@ -14304,15 +14198,7 @@ paths: content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Client' - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: '#/components/schemas/Client' 401: $ref: '#/components/responses/401' 403: @@ -14832,15 +14718,7 @@ paths: content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Client' - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: '#/components/schemas/Client' 401: $ref: '#/components/responses/401' 403: @@ -15592,18 +15470,6 @@ paths: $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/PurchaseOrder" - meta: - type: object - $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" 403: @@ -16291,15 +16157,7 @@ paths: content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Product" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/Product" 401: $ref: '#/components/responses/401' 403: @@ -18100,12 +17958,6 @@ components: example: 1.00 description: 'The total amount of tax applied to the product offered for this line item' readOnly: true - date: - type: string - format: date-time - example: '2023-03-19T00:00:00Z' - description: 'Deprecated' - deprecated: true custom_value1: type: string example: 'Custom value 1' diff --git a/openapi/components/schemas/invoice_item.yaml b/openapi/components/schemas/invoice_item.yaml index 0dcf42204a..7754fefcf2 100644 --- a/openapi/components/schemas/invoice_item.yaml +++ b/openapi/components/schemas/invoice_item.yaml @@ -82,12 +82,6 @@ example: 1.00 description: 'The total amount of tax applied to the product offered for this line item' readOnly: true - date: - type: string - format: date-time - example: '2023-03-19T00:00:00Z' - description: 'Deprecated' - deprecated: true custom_value1: type: string example: 'Custom value 1' diff --git a/openapi/paths.yaml b/openapi/paths.yaml index b127ec9b92..f0dd5ae378 100644 --- a/openapi/paths.yaml +++ b/openapi/paths.yaml @@ -33,7 +33,6 @@ paths: items: $ref: '#/components/schemas/Activity' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -298,7 +297,6 @@ paths: items: $ref: '#/components/schemas/BankIntegration' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -754,7 +752,6 @@ paths: items: $ref: '#/components/schemas/BankTransaction' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -1161,7 +1158,6 @@ paths: items: $ref: '#/components/schemas/BankTransactionRule' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -1537,7 +1533,6 @@ paths: items: $ref: '#/components/schemas/ClientGatewayToken' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -1830,7 +1825,6 @@ paths: items: $ref: '#/components/schemas/Company' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -2266,7 +2260,6 @@ paths: items: $ref: '#/components/schemas/CompanyGateway' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -2588,7 +2581,6 @@ paths: items: $ref: '#/components/schemas/CompanyLedger' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -2700,7 +2692,6 @@ paths: items: $ref: '#/components/schemas/Design' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -3016,7 +3007,6 @@ paths: items: $ref: '#/components/schemas/Document' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -3133,7 +3123,6 @@ paths: items: $ref: '#/components/schemas/ExpenseCategory' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -3437,7 +3426,6 @@ paths: items: $ref: '#/components/schemas/Expense' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -3830,7 +3818,6 @@ paths: items: $ref: '#/components/schemas/GroupSetting' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -4526,7 +4513,6 @@ paths: items: $ref: '#/components/schemas/PaymentTerm' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -4968,7 +4954,6 @@ paths: items: $ref: '#/components/schemas/RecurringExpense' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -5335,7 +5320,6 @@ paths: items: $ref: '#/components/schemas/RecurringQuote' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -6239,7 +6223,6 @@ paths: items: $ref: '#/components/schemas/Subscription' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -6588,7 +6571,6 @@ paths: items: $ref: '#/components/schemas/SystemLog' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -6901,7 +6883,6 @@ paths: items: $ref: '#/components/schemas/TaskStatus' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -7214,7 +7195,6 @@ paths: items: $ref: '#/components/schemas/TaxRate' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -7531,7 +7511,6 @@ paths: items: $ref: '#/components/schemas/CompanyToken' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -7839,7 +7818,6 @@ paths: items: $ref: '#/components/schemas/User' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" @@ -8295,7 +8273,6 @@ paths: items: $ref: '#/components/schemas/Webhook' meta: - type: object $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" diff --git a/openapi/paths/clients.yaml b/openapi/paths/clients.yaml index c22001c689..ef653a0f6f 100644 --- a/openapi/paths/clients.yaml +++ b/openapi/paths/clients.yaml @@ -220,15 +220,7 @@ content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Client' - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: '#/components/schemas/Client' 401: $ref: '#/components/responses/401' 403: @@ -748,15 +740,7 @@ content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Client' - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: '#/components/schemas/Client' 401: $ref: '#/components/responses/401' 403: diff --git a/openapi/paths/credits.yaml b/openapi/paths/credits.yaml index 7dafdf7cf3..e4cb8a8822 100644 --- a/openapi/paths/credits.yaml +++ b/openapi/paths/credits.yaml @@ -329,18 +329,6 @@ $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Credit" - meta: - type: object - $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" 403: diff --git a/openapi/paths/invoices.yaml b/openapi/paths/invoices.yaml index 5813457591..6215682601 100644 --- a/openapi/paths/invoices.yaml +++ b/openapi/paths/invoices.yaml @@ -770,18 +770,6 @@ $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Invoice" - meta: - type: object - $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" 403: diff --git a/openapi/paths/locations.yaml b/openapi/paths/locations.yaml index 38b2c97792..8e58372719 100644 --- a/openapi/paths/locations.yaml +++ b/openapi/paths/locations.yaml @@ -88,9 +88,6 @@ type: array items: $ref: '#/components/schemas/Location' - meta: - type: object - $ref: '#/components/schemas/Meta' 401: $ref: '#/components/responses/401' 403: @@ -497,15 +494,7 @@ content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: '#/components/schemas/Location' - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: '#/components/schemas/Location' 401: $ref: '#/components/responses/401' 403: diff --git a/openapi/paths/payments.yaml b/openapi/paths/payments.yaml index b429788335..a568031fb8 100644 --- a/openapi/paths/payments.yaml +++ b/openapi/paths/payments.yaml @@ -439,15 +439,7 @@ content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Payment" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/Payment" 401: $ref: "#/components/responses/401" 403: diff --git a/openapi/paths/products.yaml b/openapi/paths/products.yaml index 7f85848013..cf47ee45d0 100644 --- a/openapi/paths/products.yaml +++ b/openapi/paths/products.yaml @@ -516,15 +516,7 @@ content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Product" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/Product" 401: $ref: '#/components/responses/401' 403: diff --git a/openapi/paths/projects.yaml b/openapi/paths/projects.yaml index 350799fe4e..b736daa834 100644 --- a/openapi/paths/projects.yaml +++ b/openapi/paths/projects.yaml @@ -326,15 +326,7 @@ content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Project" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/Project" 401: $ref: "#/components/responses/401" 403: diff --git a/openapi/paths/purchase_orders.yaml b/openapi/paths/purchase_orders.yaml index ffd3c524d6..0dbf99a55d 100644 --- a/openapi/paths/purchase_orders.yaml +++ b/openapi/paths/purchase_orders.yaml @@ -325,18 +325,6 @@ $ref: "#/components/headers/X-RateLimit-Remaining" X-RateLimit-Limit: $ref: "#/components/headers/X-RateLimit-Limit" - content: - application/json: - schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/PurchaseOrder" - meta: - type: object - $ref: '#/components/schemas/Meta' 401: $ref: "#/components/responses/401" 403: diff --git a/openapi/paths/quotes.yaml b/openapi/paths/quotes.yaml index 9576cea3f7..afd08a7c7d 100644 --- a/openapi/paths/quotes.yaml +++ b/openapi/paths/quotes.yaml @@ -662,15 +662,7 @@ content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Quote" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/Quote" 401: $ref: "#/components/responses/401" 403: diff --git a/openapi/paths/recurring_invoices.yaml b/openapi/paths/recurring_invoices.yaml index 06b1065b9c..267e8d5282 100644 --- a/openapi/paths/recurring_invoices.yaml +++ b/openapi/paths/recurring_invoices.yaml @@ -526,15 +526,7 @@ content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/RecurringInvoice" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/RecurringInvoice" 401: $ref: "#/components/responses/401" 403: diff --git a/openapi/paths/tasks.yaml b/openapi/paths/tasks.yaml index e44d33f426..f85eab59ee 100644 --- a/openapi/paths/tasks.yaml +++ b/openapi/paths/tasks.yaml @@ -326,15 +326,7 @@ content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Task" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/Task" 401: $ref: "#/components/responses/401" 403: diff --git a/openapi/paths/vendors.yaml b/openapi/paths/vendors.yaml index 4383de7ae0..d75a66763c 100644 --- a/openapi/paths/vendors.yaml +++ b/openapi/paths/vendors.yaml @@ -326,15 +326,7 @@ content: application/json: schema: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/Vendor" - meta: - type: object - $ref: '#/components/schemas/Meta' + $ref: "#/components/schemas/Vendor" 401: $ref: "#/components/responses/401" 403: