From d313151f2cdf2638e29d986e287c8e74dbe05994 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 26 Aug 2019 18:25:05 +1000 Subject: [PATCH] Clean up transformers of old Swagger documentation stubs --- app/Transformers/AccountTransformer.php | 3 -- .../ClientContactLoginTransformer.php | 2 - app/Transformers/ClientContactTransformer.php | 1 - app/Transformers/ClientTransformer.php | 6 +-- app/Transformers/CompanyTransformer.php | 6 --- app/Transformers/CompanyUserTransformer.php | 3 -- .../Contact/InvoiceTransformer.php | 3 -- .../InvoiceInvitationTransformer.php | 3 -- app/Transformers/InvoiceItemTransformer.php | 18 +------ app/Transformers/InvoiceTransformer.php | 50 +------------------ app/Transformers/PaymentTransformer.php | 19 +------ app/Transformers/ProductTransformer.php | 3 -- app/Transformers/QuoteTransformer.php | 50 +------------------ .../RecurringInvoiceTransformer.php | 50 +------------------ .../RecurringQuoteTransformer.php | 50 +------------------ app/Transformers/UserTransformer.php | 25 +--------- 16 files changed, 9 insertions(+), 283 deletions(-) diff --git a/app/Transformers/AccountTransformer.php b/app/Transformers/AccountTransformer.php index b06bbcc10967..98be784d6d11 100644 --- a/app/Transformers/AccountTransformer.php +++ b/app/Transformers/AccountTransformer.php @@ -27,9 +27,6 @@ use App\Utils\Traits\MakesHash; class AccountTransformer extends EntityTransformer { use MakesHash; - /** - * @SWG\Property(property="account_key", type="string", example="123456") - */ /** * @var array diff --git a/app/Transformers/ClientContactLoginTransformer.php b/app/Transformers/ClientContactLoginTransformer.php index f476f9ddffb4..2c0bcad70944 100644 --- a/app/Transformers/ClientContactLoginTransformer.php +++ b/app/Transformers/ClientContactLoginTransformer.php @@ -16,8 +16,6 @@ use App\Utils\Traits\MakesHash; /** * Class ContactTransformer. - * - * @SWG\Definition(definition="ClientContact", @SWG\Xml(name="ClientContact")) */ class ClientContactLoginTransformer extends EntityTransformer { diff --git a/app/Transformers/ClientContactTransformer.php b/app/Transformers/ClientContactTransformer.php index 58c5059ca36d..dd2aa0cb3714 100644 --- a/app/Transformers/ClientContactTransformer.php +++ b/app/Transformers/ClientContactTransformer.php @@ -17,7 +17,6 @@ use App\Utils\Traits\MakesHash; /** * Class ContactTransformer. * - * @SWG\Definition(definition="ClientContact", @SWG\Xml(name="ClientContact")) */ class ClientContactTransformer extends EntityTransformer { diff --git a/app/Transformers/ClientTransformer.php b/app/Transformers/ClientTransformer.php index 1a670d7c7f86..28b140ca1b7b 100644 --- a/app/Transformers/ClientTransformer.php +++ b/app/Transformers/ClientTransformer.php @@ -16,14 +16,12 @@ use App\Models\ClientContact; use App\Utils\Traits\MakesHash; /** - * @SWG\Definition(definition="Client", @SWG\Xml(name="Client")) + * class ClientTransformer */ class ClientTransformer extends EntityTransformer { use MakesHash; - /** - * @SWG\Property(property="id", type="integer", example=1, readOnly=true) - */ + protected $defaultIncludes = [ 'contacts', ]; diff --git a/app/Transformers/CompanyTransformer.php b/app/Transformers/CompanyTransformer.php index 7ecb61df80af..3b68a686b2ef 100644 --- a/app/Transformers/CompanyTransformer.php +++ b/app/Transformers/CompanyTransformer.php @@ -27,10 +27,6 @@ class CompanyTransformer extends EntityTransformer { use MakesHash; - /** - * @SWG\Property(property="account_key", type="string", example="123456") - */ - /** * @var array */ @@ -77,8 +73,6 @@ class CompanyTransformer extends EntityTransformer 'work_phone' => $company->work_phone, 'work_email' => $company->work_email, 'country_id' => (int) $company->country_id, - 'domain' => $company->domain, - 'db' => $company->db, 'vat_number' => $company->vat_number, 'id_number' => $company->id_number, 'size_id' => (int) $company->size_id, diff --git a/app/Transformers/CompanyUserTransformer.php b/app/Transformers/CompanyUserTransformer.php index 0330c1c11692..015ee0ccea04 100644 --- a/app/Transformers/CompanyUserTransformer.php +++ b/app/Transformers/CompanyUserTransformer.php @@ -17,9 +17,6 @@ use App\Models\CompanyUser; use App\Models\User; use App\Transformers\CompanyTokenTransformer; -/** - * @SWG\Definition(definition="CompanyUser", @SWG\Xml(name="CompanyUser")) - */ class CompanyUserTransformer extends EntityTransformer { diff --git a/app/Transformers/Contact/InvoiceTransformer.php b/app/Transformers/Contact/InvoiceTransformer.php index 46231ca91d0b..67e63bd5f181 100644 --- a/app/Transformers/Contact/InvoiceTransformer.php +++ b/app/Transformers/Contact/InvoiceTransformer.php @@ -15,9 +15,6 @@ use App\Models\Invoice; use App\Transformers\EntityTransformer; use App\Utils\Traits\MakesHash; -/** - * @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice")) - */ class InvoiceTransformer extends EntityTransformer { use MakesHash; diff --git a/app/Transformers/InvoiceInvitationTransformer.php b/app/Transformers/InvoiceInvitationTransformer.php index 5e228bda4d88..4f72e513deb1 100644 --- a/app/Transformers/InvoiceInvitationTransformer.php +++ b/app/Transformers/InvoiceInvitationTransformer.php @@ -15,9 +15,6 @@ use App\Models\Invoice; use App\Models\InvoiceInvitation; use App\Utils\Traits\MakesHash; -/** - * @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice")) - */ class InvoiceInvitationTransformer extends EntityTransformer { use MakesHash; diff --git a/app/Transformers/InvoiceItemTransformer.php b/app/Transformers/InvoiceItemTransformer.php index d3571a94fec1..29e43f58593a 100644 --- a/app/Transformers/InvoiceItemTransformer.php +++ b/app/Transformers/InvoiceItemTransformer.php @@ -13,23 +13,7 @@ namespace App\Transformers; class InvoiceItemTransformer extends EntityTransformer { - /** - * @SWG\Property(property="id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="product_key", type="string", example="Item") - * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="notes", type="string", example="Notes") - * @SWG\Property(property="cost", type="number", format="float", example=10.00) - * @SWG\Property(property="qty", type="number", format="float", example=1) - * @SWG\Property(property="tax_name1", type="string", example="VAT") - * @SWG\Property(property="tax_name2", type="string", example="Upkeep") - * @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5") - * @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0") - * @SWG\Property(property="invoice_item_type_id", type="integer", example=1) - * @SWG\Property(property="custom_value1", type="string", example="Value") - * @SWG\Property(property="custom_value2", type="string", example="Value") - * @SWG\Property(property="discount", type="number", format="float", example=10) - */ + public function transform($item) { return [ diff --git a/app/Transformers/InvoiceTransformer.php b/app/Transformers/InvoiceTransformer.php index 7a3030516687..3487b5b32802 100644 --- a/app/Transformers/InvoiceTransformer.php +++ b/app/Transformers/InvoiceTransformer.php @@ -14,58 +14,10 @@ namespace App\Transformers; use App\Models\Invoice; use App\Utils\Traits\MakesHash; -/** - * @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice")) - */ class InvoiceTransformer extends EntityTransformer { use MakesHash; - /** - * @SWG\Property(property="id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true) - * @SWG\Property(property="balance", type="number", format="float", example=10, readOnly=true) - * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="client_id", type="integer", example=1) - * @SWG\Property(property="status_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="invoice_number", type="string", example="0001") - * @SWG\Property(property="discount", type="number", format="float", example=10) - * @SWG\Property(property="po_number", type="string", example="0001") - * @SWG\Property(property="invoice_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="due_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="terms", type="string", example="sample") - * @SWG\Property(property="private_notes", type="string", example="Notes") - * @SWG\Property(property="public_notes", type="string", example="Notes") - * @SWG\Property(property="invoice_type_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="is_recurring", type="boolean", example=false) - * @SWG\Property(property="frequency_id", type="integer", example=1) - * @SWG\Property(property="start_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="end_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="last_sent_date", type="string", format="date", example="2018-01-01", readOnly=true) - * @SWG\Property(property="recurring_invoice_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="tax_name1", type="string", example="VAT") - * @SWG\Property(property="tax_name2", type="string", example="Upkeep") - * @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5") - * @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0") - * @SWG\Property(property="is_amount_discount", type="boolean", example=false) - * @SWG\Property(property="invoice_footer", type="string", example="Footer") - * @SWG\Property(property="partial", type="number",format="float", example=10) - * @SWG\Property(property="partial_due_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="has_tasks", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="auto_bill", type="boolean", example=false) - * @SWG\Property(property="custom_value1", type="number",format="float", example=10) - * @SWG\Property(property="custom_value2", type="number",format="float", example=10) - * @SWG\Property(property="custom_taxes1", type="boolean", example=false) - * @SWG\Property(property="custom_taxes2", type="boolean", example=false) - * @SWG\Property(property="has_expenses", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="quote_invoice_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="custom_text_value1", type="string", example="Custom Text Value") - * @SWG\Property(property="custom_text_value2", type="string", example="Custom Text Value") - * @SWG\Property(property="is_quote", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="is_public", type="boolean", example=false) - * @SWG\Property(property="filename", type="string", example="Filename", readOnly=true) - */ + protected $defaultIncludes = [ // 'invoice_items', ]; diff --git a/app/Transformers/PaymentTransformer.php b/app/Transformers/PaymentTransformer.php index 96ce0e54a54b..f2f244c621b7 100644 --- a/app/Transformers/PaymentTransformer.php +++ b/app/Transformers/PaymentTransformer.php @@ -17,27 +17,10 @@ use App\Models\Invoice; use App\Models\Payment; use App\Utils\Traits\MakesHash; -/** - * @SWG\Definition(definition="Payment", required={"invoice_id"}, @SWG\Xml(name="Payment")) - */ class PaymentTransformer extends EntityTransformer { use MakesHash; - /** - * @SWG\Property(property="id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true) - * @SWG\Property(property="transaction_reference", type="string", example="Transaction Reference") - * @SWG\Property(property="payment_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="invoice_id", type="integer", example=1) - * @SWG\Property(property="invoice_number", type="string", example="Invoice Number") - * @SWG\Property(property="private_notes", type="string", example="Notes") - * @SWG\Property(property="exchange_rate", type="number", format="float", example=10) - * @SWG\Property(property="exchange_currency_id", type="integer", example=1) - */ - + protected $serializer; protected $defaultIncludes = []; diff --git a/app/Transformers/ProductTransformer.php b/app/Transformers/ProductTransformer.php index b2e8a8efb96d..3b9c814c85e3 100644 --- a/app/Transformers/ProductTransformer.php +++ b/app/Transformers/ProductTransformer.php @@ -16,9 +16,6 @@ use App\Models\Product; use App\Models\User; use App\Utils\Traits\MakesHash; -/** - * @SWG\Definition(definition="Product", @SWG\Xml(name="Product")) - */ class ProductTransformer extends EntityTransformer { use MakesHash; diff --git a/app/Transformers/QuoteTransformer.php b/app/Transformers/QuoteTransformer.php index e59bb4779082..93fb9efafb03 100644 --- a/app/Transformers/QuoteTransformer.php +++ b/app/Transformers/QuoteTransformer.php @@ -14,58 +14,10 @@ namespace App\Transformers; use App\Models\Quote; use App\Utils\Traits\MakesHash; -/** - * @SWG\Definition(definition="quote", required={"quote_number"}, @SWG\Xml(name="quote")) - */ class QuoteTransformer extends EntityTransformer { use MakesHash; - /** - * @SWG\Property(property="id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true) - * @SWG\Property(property="balance", type="number", format="float", example=10, readOnly=true) - * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="client_id", type="integer", example=1) - * @SWG\Property(property="status_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="quote_number", type="string", example="0001") - * @SWG\Property(property="discount", type="number", format="float", example=10) - * @SWG\Property(property="po_number", type="string", example="0001") - * @SWG\Property(property="quote_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="due_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="terms", type="string", example="sample") - * @SWG\Property(property="private_notes", type="string", example="Notes") - * @SWG\Property(property="public_notes", type="string", example="Notes") - * @SWG\Property(property="quote_type_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="is_recurring", type="boolean", example=false) - * @SWG\Property(property="frequency_id", type="integer", example=1) - * @SWG\Property(property="start_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="end_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="last_sent_date", type="string", format="date", example="2018-01-01", readOnly=true) - * @SWG\Property(property="recurring_quote_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="tax_name1", type="string", example="VAT") - * @SWG\Property(property="tax_name2", type="string", example="Upkeep") - * @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5") - * @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0") - * @SWG\Property(property="is_amount_discount", type="boolean", example=false) - * @SWG\Property(property="quote_footer", type="string", example="Footer") - * @SWG\Property(property="partial", type="number",format="float", example=10) - * @SWG\Property(property="partial_due_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="has_tasks", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="auto_bill", type="boolean", example=false) - * @SWG\Property(property="custom_value1", type="number",format="float", example=10) - * @SWG\Property(property="custom_value2", type="number",format="float", example=10) - * @SWG\Property(property="custom_taxes1", type="boolean", example=false) - * @SWG\Property(property="custom_taxes2", type="boolean", example=false) - * @SWG\Property(property="has_expenses", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="quote_quote_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="custom_text_value1", type="string", example="Custom Text Value") - * @SWG\Property(property="custom_text_value2", type="string", example="Custom Text Value") - * @SWG\Property(property="is_quote", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="is_public", type="boolean", example=false) - * @SWG\Property(property="filename", type="string", example="Filename", readOnly=true) - */ + protected $defaultIncludes = [ // 'quote_items', ]; diff --git a/app/Transformers/RecurringInvoiceTransformer.php b/app/Transformers/RecurringInvoiceTransformer.php index 5d07d9d168e2..a45abe86b1d9 100644 --- a/app/Transformers/RecurringInvoiceTransformer.php +++ b/app/Transformers/RecurringInvoiceTransformer.php @@ -15,58 +15,10 @@ use App\Models\Invoice; use App\Models\RecurringInvoice; use App\Utils\Traits\MakesHash; -/** - * @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice")) - */ class RecurringInvoiceTransformer extends EntityTransformer { use MakesHash; - /** - * @SWG\Property(property="id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true) - * @SWG\Property(property="balance", type="number", format="float", example=10, readOnly=true) - * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="client_id", type="integer", example=1) - * @SWG\Property(property="status_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="invoice_number", type="string", example="0001") - * @SWG\Property(property="discount", type="number", format="float", example=10) - * @SWG\Property(property="po_number", type="string", example="0001") - * @SWG\Property(property="invoice_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="due_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="terms", type="string", example="sample") - * @SWG\Property(property="private_notes", type="string", example="Notes") - * @SWG\Property(property="public_notes", type="string", example="Notes") - * @SWG\Property(property="invoice_type_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="is_recurring", type="boolean", example=false) - * @SWG\Property(property="frequency_id", type="integer", example=1) - * @SWG\Property(property="start_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="end_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="last_sent_date", type="string", format="date", example="2018-01-01", readOnly=true) - * @SWG\Property(property="recurring_invoice_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="tax_name1", type="string", example="VAT") - * @SWG\Property(property="tax_name2", type="string", example="Upkeep") - * @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5") - * @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0") - * @SWG\Property(property="is_amount_discount", type="boolean", example=false) - * @SWG\Property(property="invoice_footer", type="string", example="Footer") - * @SWG\Property(property="partial", type="number",format="float", example=10) - * @SWG\Property(property="partial_due_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="has_tasks", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="auto_bill", type="boolean", example=false) - * @SWG\Property(property="custom_value1", type="number",format="float", example=10) - * @SWG\Property(property="custom_value2", type="number",format="float", example=10) - * @SWG\Property(property="custom_taxes1", type="boolean", example=false) - * @SWG\Property(property="custom_taxes2", type="boolean", example=false) - * @SWG\Property(property="has_expenses", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="quote_invoice_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="custom_text_value1", type="string", example="Custom Text Value") - * @SWG\Property(property="custom_text_value2", type="string", example="Custom Text Value") - * @SWG\Property(property="is_quote", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="is_public", type="boolean", example=false) - * @SWG\Property(property="filename", type="string", example="Filename", readOnly=true) - */ + protected $defaultIncludes = [ // 'invoice_items', ]; diff --git a/app/Transformers/RecurringQuoteTransformer.php b/app/Transformers/RecurringQuoteTransformer.php index e1dc21b21daf..5739146241cd 100644 --- a/app/Transformers/RecurringQuoteTransformer.php +++ b/app/Transformers/RecurringQuoteTransformer.php @@ -15,58 +15,10 @@ use App\Models\Quote; use App\Models\RecurringQuote; use App\Utils\Traits\MakesHash; -/** - * @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice")) - */ class RecurringQuoteTransformer extends EntityTransformer { use MakesHash; - /** - * @SWG\Property(property="id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true) - * @SWG\Property(property="balance", type="number", format="float", example=10, readOnly=true) - * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="client_id", type="integer", example=1) - * @SWG\Property(property="status_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="invoice_number", type="string", example="0001") - * @SWG\Property(property="discount", type="number", format="float", example=10) - * @SWG\Property(property="po_number", type="string", example="0001") - * @SWG\Property(property="invoice_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="due_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="terms", type="string", example="sample") - * @SWG\Property(property="private_notes", type="string", example="Notes") - * @SWG\Property(property="public_notes", type="string", example="Notes") - * @SWG\Property(property="invoice_type_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="is_recurring", type="boolean", example=false) - * @SWG\Property(property="frequency_id", type="integer", example=1) - * @SWG\Property(property="start_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="end_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="last_sent_date", type="string", format="date", example="2018-01-01", readOnly=true) - * @SWG\Property(property="recurring_invoice_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="tax_name1", type="string", example="VAT") - * @SWG\Property(property="tax_name2", type="string", example="Upkeep") - * @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5") - * @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0") - * @SWG\Property(property="is_amount_discount", type="boolean", example=false) - * @SWG\Property(property="invoice_footer", type="string", example="Footer") - * @SWG\Property(property="partial", type="number",format="float", example=10) - * @SWG\Property(property="partial_due_date", type="string", format="date", example="2018-01-01") - * @SWG\Property(property="has_tasks", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="auto_bill", type="boolean", example=false) - * @SWG\Property(property="custom_value1", type="number",format="float", example=10) - * @SWG\Property(property="custom_value2", type="number",format="float", example=10) - * @SWG\Property(property="custom_taxes1", type="boolean", example=false) - * @SWG\Property(property="custom_taxes2", type="boolean", example=false) - * @SWG\Property(property="has_expenses", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="quote_invoice_id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="custom_text_value1", type="string", example="Custom Text Value") - * @SWG\Property(property="custom_text_value2", type="string", example="Custom Text Value") - * @SWG\Property(property="is_quote", type="boolean", example=false, readOnly=true) - * @SWG\Property(property="is_public", type="boolean", example=false) - * @SWG\Property(property="filename", type="string", example="Filename", readOnly=true) - */ + protected $defaultIncludes = [ // 'invoice_items', ]; diff --git a/app/Transformers/UserTransformer.php b/app/Transformers/UserTransformer.php index b4f7a50a13d0..79e9140a9bac 100644 --- a/app/Transformers/UserTransformer.php +++ b/app/Transformers/UserTransformer.php @@ -21,33 +21,10 @@ use App\Transformers\CompanyTransformer; use App\Transformers\CompanyUserTransformer; use App\Utils\Traits\MakesHash; -/** - * @SWG\Definition(definition="User", @SWG\Xml(name="User")) - */ class UserTransformer extends EntityTransformer { use MakesHash; - /** - * @SWG\Property(property="id", type="integer", example=1, readOnly=true) - * @SWG\Property(property="first_name", type="string", example="John") - * @SWG\Property(property="last_name", type="string", example="Doe") - * @SWG\Property(property="email", type="string", example="johndoe@isp.com") - * @SWG\Property(property="account_key", type="string", example="123456") - * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="deleted_at", type="integer", example=1451160233, readOnly=true) - * @SWG\Property(property="phone", type="string", example="(212) 555-1212") - * @SWG\Property(property="registered", type="boolean", example=false) - * @SWG\Property(property="confirmed", type="boolean", example=false) - * @SWG\Property(property="oauth_user_id", type="integer", example=1) - * @SWG\Property(property="oauth_provider_id", type="integer", example=1) - * @SWG\Property(property="notify_sent", type="boolean", example=false) - * @SWG\Property(property="notify_viewed", type="boolean", example=false) - * @SWG\Property(property="notify_paid", type="boolean", example=false) - * @SWG\Property(property="notify_approved", type="boolean", example=false) - * @SWG\Property(property="is_admin", type="boolean", example=false) - * @SWG\Property(property="permissions", type="integer", example=1) - */ - + /** * @var array */