Add fields to company transformer (#3132)

* Minor fixes for OpenAPI docs for clients

* Add fields to company transformer
This commit is contained in:
David Bomba 2019-12-06 07:41:13 +11:00 committed by GitHub
parent 01173c66d8
commit d07c11ef62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 15 deletions

View File

@ -125,8 +125,8 @@ class ClientController extends BaseController
* path="/api/v1/clients/{id}",
* operationId="showClient",
* tags={"clients"},
* summary="Shows an company",
* description="Displays an company by id",
* summary="Shows a client",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
@ -144,7 +144,7 @@ class ClientController extends BaseController
* ),
* @OA\Response(
* response=200,
* description="Returns the company object",
* description="Returns the cl.ient object",
* @OA\Header(header="X-API-Version", ref="#/components/headers/X-API-Version"),
* @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"),
* @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"),
@ -182,8 +182,8 @@ class ClientController extends BaseController
* path="/api/v1/clients/{id}/edit",
* operationId="editClient",
* tags={"clients"},
* summary="Shows an company for editting",
* description="Displays an company by id",
* summary="Shows a client for editting",
* description="Displays a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
@ -201,7 +201,7 @@ class ClientController extends BaseController
* ),
* @OA\Response(
* response=200,
* description="Returns the company object",
* description="Returns the client object",
* @OA\Header(header="X-API-Version", ref="#/components/headers/X-API-Version"),
* @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"),
* @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"),
@ -241,8 +241,8 @@ class ClientController extends BaseController
* path="/api/v1/clients/{id}",
* operationId="updateClient",
* tags={"clients"},
* summary="Updates an company",
* description="Handles the updating of an company by id",
* summary="Updates a client",
* description="Handles the updating of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
@ -260,7 +260,7 @@ class ClientController extends BaseController
* ),
* @OA\Response(
* response=200,
* description="Returns the company object",
* description="Returns the client object",
* @OA\Header(header="X-API-Version", ref="#/components/headers/X-API-Version"),
* @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"),
* @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"),
@ -302,7 +302,7 @@ class ClientController extends BaseController
* path="/api/v1/clients/create",
* operationId="getClientsCreate",
* tags={"clients"},
* summary="Gets a new blank company object",
* summary="Gets a new blank client object",
* description="Returns a blank object with default values",
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
@ -310,7 +310,7 @@ class ClientController extends BaseController
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
* response=200,
* description="A blank company object",
* description="A blank client object",
* @OA\Header(header="X-API-Version", ref="#/components/headers/X-API-Version"),
* @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"),
* @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"),
@ -352,14 +352,14 @@ class ClientController extends BaseController
* operationId="storeClient",
* tags={"clients"},
* summary="Adds a client",
* description="Adds an client to a copmany",
* description="Adds an client to a company",
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
* @OA\Parameter(ref="#/components/parameters/include"),
* @OA\Response(
* response=200,
* description="Returns the saved company object",
* description="Returns the saved client object",
* @OA\Header(header="X-API-Version", ref="#/components/headers/X-API-Version"),
* @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"),
* @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"),
@ -403,8 +403,8 @@ class ClientController extends BaseController
* path="/api/v1/clients/{id}",
* operationId="deleteClient",
* tags={"clients"},
* summary="Deletes a company",
* description="Handles the deletion of an company by id",
* summary="Deletes a client",
* description="Handles the deletion of a client by id",
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),

View File

@ -86,6 +86,7 @@ class CompanyTransformer extends EntityTransformer
'show_product_cost' => (bool)$company->show_product_cost,
'enable_invoice_quantity' => (bool)$company->enable_invoice_quantity,
'enable_product_cost' => (bool)$company->enable_product_cost,
'show_product_details' => (bool)$company->show_product_details,
'enable_product_quantity' => (bool)$company->enable_product_quantity,
'default_quantity' => (bool)$company->default_quantity,
'custom_fields' => $company->custom_fields ?: $std,