mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Clients OpenAPI
This commit is contained in:
parent
6d81f981f8
commit
24714dc9f4
@ -67,6 +67,40 @@ class ClientController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* @OA\Get(
|
||||
* path="/api/v1/clients",
|
||||
* operationId="getClients",
|
||||
* tags={"clients"},
|
||||
* summary="Gets a list of clients",
|
||||
* description="Lists clients, search and filters allow fine grained lists to be generated.
|
||||
|
||||
Query parameters can be added to performed more fine grained filtering of the clients, these are handled by the ClientFilters class which defines the methods available",
|
||||
* @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\Parameter(ref="#/components/parameters/index"),
|
||||
* @OA\Response(
|
||||
* response=200,
|
||||
* description="A list of clients",
|
||||
* @OA\Header(header="X-API-TOKEN", ref="#/components/headers/X-API-TOKEN"),
|
||||
* @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"),
|
||||
* @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"),
|
||||
* @OA\JsonContent(ref="#/components/schemas/Client"),
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response=422,
|
||||
* description="Validation error",
|
||||
* @OA\JsonContent(ref="#/components/schemas/ValidationError"),
|
||||
|
||||
* ),
|
||||
* @OA\Response(
|
||||
* response="default",
|
||||
* description="Unexpected Error",
|
||||
* @OA\JsonContent(ref="#/components/schemas/Error"),
|
||||
* ),
|
||||
* )
|
||||
*
|
||||
*/
|
||||
public function index(ClientFilters $filters)
|
||||
{
|
||||
|
33
app/Http/Controllers/OpenAPI/ClientContactSchema.php
Normal file
33
app/Http/Controllers/OpenAPI/ClientContactSchema.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* @OA\Schema(
|
||||
* schema="ClientContact",
|
||||
* type="object",
|
||||
* @OA\Property(property="id", type="string", example="Opnel5aKBz", description="_________"),
|
||||
* @OA\Property(property="user_id", type="string", example="", description="__________"),
|
||||
* @OA\Property(property="company_id", type="string", example="", description="________"),
|
||||
* @OA\Property(property="client_id", type="string", example="", description="________"),
|
||||
* @OA\Property(property="first_name", type="string", example="", description="________"),
|
||||
* @OA\Property(property="last_name", type="string", example="", description="________"),
|
||||
* @OA\Property(property="phone", type="string", example="", description="________"),
|
||||
* @OA\Property(property="custom_value1", type="string", example="", description="________"),
|
||||
* @OA\Property(property="custom_value2", type="string", example="", description="________"),
|
||||
* @OA\Property(property="custom_value3", type="string", example="", description="________"),
|
||||
* @OA\Property(property="custom_value4", type="string", example="", description="________"),
|
||||
* @OA\Property(property="email", type="string", example="", description="________"),
|
||||
* @OA\Property(property="accepted_terms_version", type="string", example="", description="________"),
|
||||
* @OA\Property(property="password", type="string", example="", description="________"),
|
||||
* @OA\Property(property="confirmation-code", type="string", example="", description="________"),
|
||||
* @OA\Property(property="token", type="string", example="", description="________"),
|
||||
* @OA\Property(property="is_primary", type="boolean", example=true, description="________"),
|
||||
* @OA\Property(property="confirmed", type="boolean", example=true, description="________"),
|
||||
* @OA\Property(property="is_locked", type="boolean", example=true, description="________"),
|
||||
* @OA\Property(property="failed_logins", type="number", format="integer", example="3", description="________"),
|
||||
* @OA\Property(property="email_verified_at", type="number", format="integer", example="134341234234", description="________"),
|
||||
* @OA\Property(property="paid_to_date", type="number", format="float", example="10.00", description="________"),
|
||||
* @OA\Property(property="last_login", type="number", format="integer", example="134341234234", description="Timestamp"),
|
||||
* @OA\Property(property="created_at", type="number", format="integer", example="134341234234", description="Timestamp"),
|
||||
* @OA\Property(property="updated_at", type="number", format="integer", example="134341234234", description="Timestamp"),
|
||||
* @OA\Property(property="deleted_at", type="number", format="integer", example="134341234234", description="Timestamp"),
|
||||
* )
|
||||
*/
|
51
app/Http/Controllers/OpenAPI/ClientSchema.php
Normal file
51
app/Http/Controllers/OpenAPI/ClientSchema.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* @OA\Schema(
|
||||
* schema="Client",
|
||||
* type="object",
|
||||
* @OA\Property(property="id", type="string", example="Opnel5aKBz", description="_________"),
|
||||
* @OA\Property(property="user_id", type="string", example="", description="__________"),
|
||||
* @OA\Property(property="company_id", type="string", example="", description="________"),
|
||||
* @OA\Property(property="client_id", type="string", example="", description="________"),
|
||||
* @OA\Property(
|
||||
* property="contacts",
|
||||
* type="array",
|
||||
* @OA\Items(
|
||||
*
|
||||
* ref="#/components/schemas/ClientContact",
|
||||
* ),
|
||||
* ),
|
||||
* @OA\Property(property="name", type="string", example="", description="________"),
|
||||
* @OA\Property(property="website", type="string", example="", description="________"),
|
||||
* @OA\Property(property="private_notes", type="string", example="", description="________"),
|
||||
* @OA\Property(property="client_hash", type="string", example="", description="________"),
|
||||
* @OA\Property(property="industry_id", type="string", example="", description="________"),
|
||||
* @OA\Property(property="size_id", type="string", example="", description="________"),
|
||||
* @OA\Property(property="currency_id", type="string", example="", description="________"),
|
||||
* @OA\Property(property="address1", type="string", example="", description="________"),
|
||||
* @OA\Property(property="address2", type="string", example="", description="________"),
|
||||
* @OA\Property(property="city", type="string", example="", description="________"),
|
||||
* @OA\Property(property="state", type="string", example="", description="________"),
|
||||
* @OA\Property(property="postal_code", type="string", example="", description="________"),
|
||||
* @OA\Property(property="country_id", type="string", example="", description="________"),
|
||||
* @OA\Property(property="custom_value1", type="string", example="", description="________"),
|
||||
* @OA\Property(property="custom_value2", type="string", example="", description="________"),
|
||||
* @OA\Property(property="custom_value3", type="string", example="", description="________"),
|
||||
* @OA\Property(property="custom_value4", type="string", example="", description="________"),
|
||||
* @OA\Property(property="vat_number", type="string", example="", description="________"),
|
||||
* @OA\Property(property="id_number", type="string", example="", description="________"),
|
||||
* @OA\Property(property="shipping_address1", type="string", example="", description="________"),
|
||||
* @OA\Property(property="shipping_address2", type="string", example="", description="________"),
|
||||
* @OA\Property(property="shipping_city", type="string", example="", description="________"),
|
||||
* @OA\Property(property="shipping_state", type="string", example="", description="________"),
|
||||
* @OA\Property(property="shipping_postal_code", type="string", example="", description="________"),
|
||||
* @OA\Property(property="shipping_country_id", type="string", example="", description="________"),
|
||||
* @OA\Property(property="settings", type="object", example="", description="________"),
|
||||
* @OA\Property(property="is_deleted", type="boolean", example=true, description="________"),
|
||||
* @OA\Property(property="balance", type="number", format="float", example="10.00", description="________"),
|
||||
* @OA\Property(property="paid_to_date", type="number", format="float", example="10.00", description="________"),
|
||||
* @OA\Property(property="last_login", type="number", format="integer", example="134341234234", description="Timestamp"),
|
||||
* @OA\Property(property="created_at", type="number", format="integer", example="134341234234", description="Timestamp"),
|
||||
* @OA\Property(property="updated_at", type="number", format="integer", example="134341234234", description="Timestamp"),
|
||||
* )
|
||||
*/
|
12
app/Http/Controllers/OpenAPI/GroupSettingSchema.php
Normal file
12
app/Http/Controllers/OpenAPI/GroupSettingSchema.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @OA\Schema(
|
||||
* schema="GroupSetting",
|
||||
* type="object",
|
||||
* @OA\Property(property="id", type="string", example="Opnel5aKBz", description="_________"),
|
||||
* @OA\Property(property="user_id", type="string", example="", description="__________"),
|
||||
* @OA\Property(property="company_id", type="string", example="", description="________"),
|
||||
* @OA\Property(property="name", type="string", example="", description="________"),
|
||||
* @OA\Property(property="settings", type="object", example="", description="________"),
|
||||
* )
|
||||
*/
|
@ -293,7 +293,6 @@ class CreateUsersTable extends Migration
|
||||
$table->text('settings')->nullable();
|
||||
|
||||
$table->boolean('is_deleted')->default(false);
|
||||
$table->integer('payment_terms')->nullable();
|
||||
$table->unsignedInteger('group_settings_id')->nullable();
|
||||
$table->string('vat_number')->nullable();
|
||||
$table->string('id_number')->nullable();
|
||||
|
Loading…
x
Reference in New Issue
Block a user