Fix remaining swagger docs errors

+ Take @hillelcoren remarks into account
This commit is contained in:
Louis-Rémi Babé 2017-03-09 11:11:45 +01:00
parent e16e730138
commit 9f1df5e924
24 changed files with 73 additions and 169 deletions

View File

@ -52,7 +52,7 @@ class $STUDLY_NAME$ApiController extends BaseAPIController
* in="path", * in="path",
* name="$LOWER_NAME$_id", * name="$LOWER_NAME$_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -110,7 +110,7 @@ class $STUDLY_NAME$ApiController extends BaseAPIController
* in="path", * in="path",
* name="$LOWER_NAME$_id", * name="$LOWER_NAME$_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Parameter( * @SWG\Parameter(
* in="body", * in="body",
@ -149,7 +149,7 @@ class $STUDLY_NAME$ApiController extends BaseAPIController
* in="path", * in="path",
* name="$LOWER_NAME$_id", * name="$LOWER_NAME$_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -162,7 +162,7 @@ class $STUDLY_NAME$ApiController extends BaseAPIController
* ) * )
* ) * )
*/ */
public function destroy($STUDLY_NAME$Request $request) public function destroy(Update$STUDLY_NAME$Request $request)
{ {
$$LOWER_NAME$ = $request->entity(); $$LOWER_NAME$ = $request->entity();

View File

@ -15,8 +15,8 @@ class $STUDLY_NAME$Transformer extends EntityTransformer
* @SWG\Property(property="id", type="integer", example=1, readOnly=true) * @SWG\Property(property="id", type="integer", example=1, readOnly=true)
* @SWG\Property(property="user_id", type="integer", example=1) * @SWG\Property(property="user_id", type="integer", example=1)
* @SWG\Property(property="account_key", type="string", example="123456") * @SWG\Property(property="account_key", type="string", example="123456")
* @SWG\Property(property="updated_at", type="string", format="date-time", example="2016-01-01 12:10:00") * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="archived_at", type="string", format="date-time", example="2016-01-01 12:10:00") * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
*/ */
/** /**

View File

@ -64,7 +64,7 @@ class ClientApiController extends BaseAPIController
* in="path", * in="path",
* name="client_id", * name="client_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -119,7 +119,7 @@ class ClientApiController extends BaseAPIController
* in="path", * in="path",
* name="client_id", * name="client_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Parameter( * @SWG\Parameter(
* in="body", * in="body",
@ -163,7 +163,7 @@ class ClientApiController extends BaseAPIController
* in="path", * in="path",
* name="client_id", * name="client_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -176,7 +176,7 @@ class ClientApiController extends BaseAPIController
* ) * )
* ) * )
*/ */
public function destroy(ClientRequest $request) public function destroy(UpdateClientRequest $request)
{ {
$client = $request->entity(); $client = $request->entity();

View File

@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Http\Requests\DocumentRequest; use App\Http\Requests\DocumentRequest;
use App\Http\Requests\CreateDocumentRequest; use App\Http\Requests\CreateDocumentRequest;
use App\Http\Requests\UpdateDocumentRequest;
use App\Models\Document; use App\Models\Document;
use App\Ninja\Repositories\DocumentRepository; use App\Ninja\Repositories\DocumentRepository;
@ -71,7 +72,7 @@ class DocumentAPIController extends BaseAPIController
* in="path", * in="path",
* name="document_id", * name="document_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -132,7 +133,7 @@ class DocumentAPIController extends BaseAPIController
* in="path", * in="path",
* name="document_id", * name="document_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -145,7 +146,7 @@ class DocumentAPIController extends BaseAPIController
* ) * )
* ) * )
*/ */
public function destroy(DocumentRequest $request) public function destroy(UpdateDocumentRequest $request)
{ {
$entity = $request->entity(); $entity = $request->entity();

View File

@ -2,8 +2,8 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Http\Requests\CreateExpenseRequest;
use App\Http\Requests\ExpenseRequest; use App\Http\Requests\ExpenseRequest;
use App\Http\Requests\CreateExpenseRequest;
use App\Http\Requests\UpdateExpenseRequest; use App\Http\Requests\UpdateExpenseRequest;
use App\Models\Expense; use App\Models\Expense;
use App\Ninja\Repositories\ExpenseRepository; use App\Ninja\Repositories\ExpenseRepository;
@ -60,7 +60,7 @@ class ExpenseApiController extends BaseAPIController
* in="path", * in="path",
* name="expense_id", * name="expense_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -119,7 +119,7 @@ class ExpenseApiController extends BaseAPIController
* in="path", * in="path",
* name="expense_id", * name="expense_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Parameter( * @SWG\Parameter(
* in="body", * in="body",
@ -161,7 +161,7 @@ class ExpenseApiController extends BaseAPIController
* in="path", * in="path",
* name="expense_id", * name="expense_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -174,7 +174,7 @@ class ExpenseApiController extends BaseAPIController
* ) * )
* ) * )
*/ */
public function destroy(ExpenseRequest $request) public function destroy(UpdateExpenseRequest $request)
{ {
$expense = $request->entity(); $expense = $request->entity();

View File

@ -58,7 +58,7 @@ class ExpenseCategoryApiController extends BaseAPIController
* in="path", * in="path",
* name="expense_category_id", * name="expense_category_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -113,7 +113,7 @@ class ExpenseCategoryApiController extends BaseAPIController
* in="path", * in="path",
* name="expense_category_id", * name="expense_category_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Parameter( * @SWG\Parameter(
* in="body", * in="body",
@ -147,7 +147,7 @@ class ExpenseCategoryApiController extends BaseAPIController
* in="path", * in="path",
* name="expense_category_id", * name="expense_category_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -160,7 +160,7 @@ class ExpenseCategoryApiController extends BaseAPIController
* ) * )
* ) * )
*/ */
public function destroy(ExpenseCategoryRequest $request) public function destroy(UpdateExpenseCategoryRequest $request)
{ {
$entity = $request->entity(); $entity = $request->entity();

View File

@ -2,8 +2,8 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Http\Requests\CreateInvoiceAPIRequest;
use App\Http\Requests\InvoiceRequest; use App\Http\Requests\InvoiceRequest;
use App\Http\Requests\CreateInvoiceAPIRequest;
use App\Http\Requests\UpdateInvoiceAPIRequest; use App\Http\Requests\UpdateInvoiceAPIRequest;
use App\Jobs\SendInvoiceEmail; use App\Jobs\SendInvoiceEmail;
use App\Jobs\SendPaymentEmail; use App\Jobs\SendPaymentEmail;
@ -74,7 +74,7 @@ class InvoiceApiController extends BaseAPIController
* in="path", * in="path",
* name="invoice_id", * name="invoice_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -320,7 +320,7 @@ class InvoiceApiController extends BaseAPIController
* in="path", * in="path",
* name="invoice_id", * name="invoice_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Parameter( * @SWG\Parameter(
* in="body", * in="body",
@ -371,7 +371,7 @@ class InvoiceApiController extends BaseAPIController
* in="path", * in="path",
* name="invoice_id", * name="invoice_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -384,7 +384,7 @@ class InvoiceApiController extends BaseAPIController
* ) * )
* ) * )
*/ */
public function destroy(InvoiceRequest $request) public function destroy(UpdateInvoiceRequest $request)
{ {
$invoice = $request->entity(); $invoice = $request->entity();

View File

@ -61,7 +61,7 @@ class PaymentApiController extends BaseAPIController
* in="path", * in="path",
* name="payment_id", * name="payment_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -123,7 +123,7 @@ class PaymentApiController extends BaseAPIController
* in="path", * in="path",
* name="payment_id", * name="payment_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Parameter( * @SWG\Parameter(
* in="body", * in="body",
@ -165,7 +165,7 @@ class PaymentApiController extends BaseAPIController
* in="path", * in="path",
* name="payment_id", * name="payment_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -178,7 +178,7 @@ class PaymentApiController extends BaseAPIController
* ) * )
* ) * )
*/ */
public function destroy(PaymentRequest $request) public function destroy(UpdatePaymentRequest $request)
{ {
$payment = $request->entity(); $payment = $request->entity();

View File

@ -69,7 +69,7 @@ class ProductApiController extends BaseAPIController
* in="path", * in="path",
* name="product_id", * name="product_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -124,7 +124,7 @@ class ProductApiController extends BaseAPIController
* in="path", * in="path",
* name="product_id", * name="product_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Parameter( * @SWG\Parameter(
* in="body", * in="body",
@ -158,7 +158,7 @@ class ProductApiController extends BaseAPIController
} }
/** /**
* @SWG\Get( * @SWG\Delete(
* path="/products/{product_id}", * path="/products/{product_id}",
* tags={"product"}, * tags={"product"},
* summary="Delete a product", * summary="Delete a product",
@ -166,7 +166,7 @@ class ProductApiController extends BaseAPIController
* in="path", * in="path",
* name="product_id", * name="product_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -179,7 +179,7 @@ class ProductApiController extends BaseAPIController
* ) * )
* ) * )
*/ */
public function destroy(ProductRequest $request) public function destroy(UpdateProductRequest $request)
{ {
$product = $request->entity(); $product = $request->entity();

View File

@ -45,100 +45,4 @@ class QuoteApiController extends InvoiceAPIController
return $this->listResponse($invoices); return $this->listResponse($invoices);
} }
/**
* @SWG\Get(
* path="/quotes/{quote_id}",
* summary="Individual Quote",
* tags={"quote"},
* @SWG\Parameter(
* in="path",
* name="quote_id",
* type="integer",
* required="true"
* ),
* @SWG\Response(
* response=200,
* description="A single quote",
* @SWG\Schema(type="object", @SWG\Items(ref="#/definitions/Invoice"))
* ),
* @SWG\Response(
* response="default",
* description="an ""unexpected"" error"
* )
* )
*/
/**
* @SWG\Post(
* path="/quotes",
* tags={"quote"},
* summary="Create a quote",
* @SWG\Parameter(
* in="body",
* name="quote",
* @SWG\Schema(ref="#/definitions/Invoice")
* ),
* @SWG\Response(
* response=200,
* description="New quote",
* @SWG\Schema(type="object", @SWG\Items(ref="#/definitions/Invoice"))
* ),
* @SWG\Response(
* response="default",
* description="an ""unexpected"" error"
* )
* )
*/
/**
* @SWG\Put(
* path="/quotes/{quote_id}",
* tags={"quote"},
* summary="Update a quote",
* @SWG\Parameter(
* in="path",
* name="quote_id",
* type="integer",
* required="true"
* ),
* @SWG\Parameter(
* in="body",
* name="quote",
* @SWG\Schema(ref="#/definitions/Invoice")
* ),
* @SWG\Response(
* response=200,
* description="Updated quote",
* @SWG\Schema(type="object", @SWG\Items(ref="#/definitions/Invoice"))
* ),
* @SWG\Response(
* response="default",
* description="an ""unexpected"" error"
* )
* )
*/
/**
* @SWG\Delete(
* path="/quotes/{quote_id}",
* tags={"quote"},
* summary="Delete a quote",
* @SWG\Parameter(
* in="path",
* name="quote_id",
* type="integer",
* required="true"
* ),
* @SWG\Response(
* response=200,
* description="Deleted quote",
* @SWG\Schema(type="object", @SWG\Items(ref="#/definitions/Invoice"))
* ),
* @SWG\Response(
* response="default",
* description="an ""unexpected"" error"
* )
* )
*/
} }

View File

@ -59,7 +59,7 @@ class TaskApiController extends BaseAPIController
* in="path", * in="path",
* name="task_id", * name="task_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -125,7 +125,7 @@ class TaskApiController extends BaseAPIController
* in="path", * in="path",
* name="task_id", * name="task_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Parameter( * @SWG\Parameter(
* in="body", * in="body",
@ -161,7 +161,7 @@ class TaskApiController extends BaseAPIController
* in="path", * in="path",
* name="task_id", * name="task_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -174,7 +174,7 @@ class TaskApiController extends BaseAPIController
* ) * )
* ) * )
*/ */
public function destroy(TaskRequest $request) public function destroy(UpdateTaskRequest $request)
{ {
$task = $request->entity(); $task = $request->entity();

View File

@ -66,7 +66,7 @@ class TaxRateApiController extends BaseAPIController
* in="path", * in="path",
* name="tax_rate_id", * name="tax_rate_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -121,7 +121,7 @@ class TaxRateApiController extends BaseAPIController
* in="path", * in="path",
* name="tax_rate_id", * name="tax_rate_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Parameter( * @SWG\Parameter(
* in="body", * in="body",
@ -163,7 +163,7 @@ class TaxRateApiController extends BaseAPIController
* in="path", * in="path",
* name="tax_rate_id", * name="tax_rate_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -176,7 +176,7 @@ class TaxRateApiController extends BaseAPIController
* ) * )
* ) * )
*/ */
public function destroy(TaxRateRequest $request) public function destroy(UpdateTaxRateRequest $request)
{ {
$entity = $request->entity(); $entity = $request->entity();

View File

@ -60,7 +60,7 @@ class UserApiController extends BaseAPIController
* in="path", * in="path",
* name="user_id", * name="user_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -113,7 +113,7 @@ class UserApiController extends BaseAPIController
* in="path", * in="path",
* name="user_id", * name="user_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Parameter( * @SWG\Parameter(
* in="body", * in="body",
@ -168,7 +168,7 @@ class UserApiController extends BaseAPIController
* in="path", * in="path",
* name="user_id", * name="user_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -181,7 +181,7 @@ class UserApiController extends BaseAPIController
* ) * )
* ) * )
*/ */
public function destroy(UserRequest $request) public function destroy(UpdateUserRequest $request)
{ {
$entity = $request->entity(); $entity = $request->entity();

View File

@ -2,10 +2,9 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
// vendor use App\Http\Requests\VendorRequest;
use App\Http\Requests\CreateVendorRequest; use App\Http\Requests\CreateVendorRequest;
use App\Http\Requests\UpdateVendorRequest; use App\Http\Requests\UpdateVendorRequest;
use App\Http\Requests\VendorRequest;
use App\Models\Vendor; use App\Models\Vendor;
use App\Ninja\Repositories\VendorRepository; use App\Ninja\Repositories\VendorRepository;
use Input; use Input;
@ -66,7 +65,7 @@ class VendorApiController extends BaseAPIController
* in="path", * in="path",
* name="vendor_id", * name="vendor_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -125,7 +124,7 @@ class VendorApiController extends BaseAPIController
* in="path", * in="path",
* name="vendor_id", * name="vendor_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Parameter( * @SWG\Parameter(
* in="body", * in="body",
@ -169,7 +168,7 @@ class VendorApiController extends BaseAPIController
* in="path", * in="path",
* name="vendor_id", * name="vendor_id",
* type="integer", * type="integer",
* required="true" * required=true
* ), * ),
* @SWG\Response( * @SWG\Response(
* response=200, * response=200,
@ -182,7 +181,7 @@ class VendorApiController extends BaseAPIController
* ) * )
* ) * )
*/ */
public function destroy(VendorRequest $request) public function destroy(UpdateVendorRequest $request)
{ {
$vendor = $request->entity(); $vendor = $request->entity();

View File

@ -303,7 +303,7 @@ Route::group(['middleware' => 'api', 'prefix' => 'api/v1'], function () {
Route::get('accounts', 'AccountApiController@show'); Route::get('accounts', 'AccountApiController@show');
Route::put('accounts', 'AccountApiController@update'); Route::put('accounts', 'AccountApiController@update');
Route::resource('clients', 'ClientApiController'); Route::resource('clients', 'ClientApiController');
Route::ressource('quotes', 'QuoteApiController'); Route::get('quotes', 'QuoteApiController@index');
Route::get('download/{invoice_id}', 'InvoiceApiController@download'); Route::get('download/{invoice_id}', 'InvoiceApiController@download');
Route::resource('invoices', 'InvoiceApiController'); Route::resource('invoices', 'InvoiceApiController');
Route::resource('payments', 'PaymentApiController'); Route::resource('payments', 'PaymentApiController');

View File

@ -15,8 +15,8 @@ class ClientTransformer extends EntityTransformer
* @SWG\Property(property="paid_to_date", type="number", format="float", example=10, readOnly=true) * @SWG\Property(property="paid_to_date", type="number", format="float", example=10, readOnly=true)
* @SWG\Property(property="user_id", type="integer", example=1) * @SWG\Property(property="user_id", type="integer", example=1)
* @SWG\Property(property="account_key", type="string", example="123456") * @SWG\Property(property="account_key", type="string", example="123456")
* @SWG\Property(property="updated_at", type="string", format="date-time", example="2016-01-01 12:10:00") * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="archived_at", type="string", format="date-time", example="2016-01-01 12:10:00") * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="address1", type="string", example="10 Main St.") * @SWG\Property(property="address1", type="string", example="10 Main St.")
* @SWG\Property(property="address2", type="string", example="1st Floor") * @SWG\Property(property="address2", type="string", example="1st Floor")
* @SWG\Property(property="city", type="string", example="New York") * @SWG\Property(property="city", type="string", example="New York")

View File

@ -14,8 +14,8 @@ class DocumentTransformer extends EntityTransformer
* @SWG\Property(property="name", type="string", example="Test") * @SWG\Property(property="name", type="string", example="Test")
* @SWG\Property(property="type", type="string", example="CSV") * @SWG\Property(property="type", type="string", example="CSV")
* @SWG\Property(property="invoice_id", type="integer", example=1) * @SWG\Property(property="invoice_id", type="integer", example=1)
* @SWG\Property(property="updated_at", type="string", format="date-time", example="2016-01-01 12:10:00", readOnly=true) * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="archived_at", type="string", format="date-time", example="2016-01-01 12:10:00", readOnly=true) * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
*/ */
public function transform(Document $document) public function transform(Document $document)
{ {

View File

@ -12,8 +12,8 @@ class ExpenseCategoryTransformer extends EntityTransformer
/** /**
* @SWG\Property(property="id", type="integer", example=1, readOnly=true) * @SWG\Property(property="id", type="integer", example=1, readOnly=true)
* @SWG\Property(property="name", type="string", example="Sample") * @SWG\Property(property="name", type="string", example="Sample")
* @SWG\Property(property="updated_at", type="string", format="date-time", example="2016-01-01 12:10:00", readOnly=true) * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="archived_at", type="string", format="date-time", example="2016-01-01 12:10:00", readOnly=true) * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
*/ */
public function transform(ExpenseCategory $expenseCategory) public function transform(ExpenseCategory $expenseCategory)
{ {

View File

@ -14,8 +14,8 @@ class ExpenseTransformer extends EntityTransformer
* @SWG\Property(property="private_notes", type="string", example="Notes...") * @SWG\Property(property="private_notes", type="string", example="Notes...")
* @SWG\Property(property="public_notes", type="string", example="Notes...") * @SWG\Property(property="public_notes", type="string", example="Notes...")
* @SWG\Property(property="should_be_invoiced", type="boolean", example=false) * @SWG\Property(property="should_be_invoiced", type="boolean", example=false)
* @SWG\Property(property="updated_at", type="string", format="date-time", example="2016-01-01 12:10:00") * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="archived_at", type="string", format="date-time", example="2016-01-01 12:10:00") * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="transaction_id", type="integer", example=1) * @SWG\Property(property="transaction_id", type="integer", example=1)
* @SWG\Property(property="bank_id", type="integer", example=1) * @SWG\Property(property="bank_id", type="integer", example=1)
* @SWG\Property(property="expense_currency_id", type="integer", example=1) * @SWG\Property(property="expense_currency_id", type="integer", example=1)

View File

@ -16,8 +16,8 @@ class ProductTransformer extends EntityTransformer
* @SWG\Property(property="cost", type="number", format="float", example=10.00) * @SWG\Property(property="cost", type="number", format="float", example=10.00)
* @SWG\Property(property="qty", type="number", format="float", example=1) * @SWG\Property(property="qty", type="number", format="float", example=1)
* @SWG\Property(property="default_tax_rate_id", type="integer", example=1) * @SWG\Property(property="default_tax_rate_id", type="integer", example=1)
* @SWG\Property(property="updated_at", type="string", format="date-time", example="2016-01-01 12:10:00", readOnly=true) * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="archived_at", type="string", format="date-time", example="2016-01-01 12:10:00", readOnly=true) * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
*/ */
public function transform(Product $product) public function transform(Product $product)
{ {

View File

@ -13,8 +13,8 @@ class ProjectTransformer extends EntityTransformer
* @SWG\Property(property="id", type="integer", example=1, readOnly=true) * @SWG\Property(property="id", type="integer", example=1, readOnly=true)
* @SWG\Property(property="name", type="string", example="Sample") * @SWG\Property(property="name", type="string", example="Sample")
* @SWG\Property(property="client_id", type="integer", example=1) * @SWG\Property(property="client_id", type="integer", example=1)
* @SWG\Property(property="updated_at", type="timestamp", example=1451160233, readOnly=true) * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="archived_at", type="timestamp", 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="is_deleted", type="boolean", example=false, readOnly=true)
*/ */
public function transform(Project $project) public function transform(Project $project)

View File

@ -15,8 +15,8 @@ class TaxRateTransformer extends EntityTransformer
* @SWG\Property(property="account_key", type="string", example="asimplestring", readOnly=true) * @SWG\Property(property="account_key", type="string", example="asimplestring", readOnly=true)
* @SWG\Property(property="rate", type="number", format="float", example=17.5) * @SWG\Property(property="rate", type="number", format="float", example=17.5)
* @SWG\Property(property="is_inclusive", type="boolean", example=false) * @SWG\Property(property="is_inclusive", type="boolean", example=false)
* @SWG\Property(property="updated_at", type="string", format="date-time", example="2016-01-01 12:10:00") * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="archived_at", type="string", format="date-time", example="2016-01-01 12:10:00") * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
*/ */
public function transform(TaxRate $taxRate) public function transform(TaxRate $taxRate)
{ {

View File

@ -16,8 +16,8 @@ class UserTransformer extends EntityTransformer
* @SWG\Property(property="last_name", type="string", example="Doe") * @SWG\Property(property="last_name", type="string", example="Doe")
* @SWG\Property(property="email", type="string", example="johndoe@isp.com") * @SWG\Property(property="email", type="string", example="johndoe@isp.com")
* @SWG\Property(property="account_key", type="string", example="123456") * @SWG\Property(property="account_key", type="string", example="123456")
* @SWG\Property(property="updated_at", type="string", format="date-time", example="2016-01-01 12:10:00") * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="deleted_at", type="string", format="date-time", example="2016-01-01 12:10:00") * @SWG\Property(property="deleted_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="phone", type="string", example="(212) 555-1212") * @SWG\Property(property="phone", type="string", example="(212) 555-1212")
* @SWG\Property(property="registered", type="boolean", example=false) * @SWG\Property(property="registered", type="boolean", example=false)
* @SWG\Property(property="confirmed", type="boolean", example=false) * @SWG\Property(property="confirmed", type="boolean", example=false)

View File

@ -17,8 +17,8 @@ class VendorTransformer extends EntityTransformer
* @SWG\Property(property="paid_to_date", type="number", format="float", example=10, readOnly=true) * @SWG\Property(property="paid_to_date", type="number", format="float", example=10, readOnly=true)
* @SWG\Property(property="user_id", type="integer", example=1) * @SWG\Property(property="user_id", type="integer", example=1)
* @SWG\Property(property="account_key", type="string", example="123456") * @SWG\Property(property="account_key", type="string", example="123456")
* @SWG\Property(property="updated_at", type="string", format="date-time", example="2016-01-01 12:10:00") * @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="archived_at", type="string", format="date-time", example="2016-01-01 12:10:00") * @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
* @SWG\Property(property="address1", type="string", example="10 Main St.") * @SWG\Property(property="address1", type="string", example="10 Main St.")
* @SWG\Property(property="address2", type="string", example="1st Floor") * @SWG\Property(property="address2", type="string", example="1st Floor")
* @SWG\Property(property="city", type="string", example="New York") * @SWG\Property(property="city", type="string", example="New York")