mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 05:14:37 -04:00
Fixes for openapi spec
This commit is contained in:
parent
958e0bbfc6
commit
2c25371011
@ -79,6 +79,7 @@ class OpenApiYaml extends Command
|
|||||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components.yaml'));
|
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components.yaml'));
|
||||||
|
|
||||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components/examples.yaml'));
|
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components/examples.yaml'));
|
||||||
|
|
||||||
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components/responses.yaml'));
|
Storage::disk('base')->append('/openapi/api-docs.yaml', file_get_contents($path.'/components/responses.yaml'));
|
||||||
|
|
||||||
$directory = new DirectoryIterator($path . '/components/responses/');
|
$directory = new DirectoryIterator($path . '/components/responses/');
|
||||||
|
14675
openapi/api-docs.yaml
14675
openapi/api-docs.yaml
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,6 @@ components:
|
|||||||
description: 'The total number of requests in a given time window.'
|
description: 'The total number of requests in a given time window.'
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
components:
|
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
ApiKeyAuth:
|
ApiKeyAuth:
|
||||||
type: apiKey
|
type: apiKey
|
||||||
|
@ -1,72 +1,75 @@
|
|||||||
examples:
|
#examples:
|
||||||
Client:
|
# Client:
|
||||||
- id: Opnel5aKBz
|
# $ref: '#/components/schemas/Client'
|
||||||
user_id: Ua6Rw4pVbS
|
|
||||||
assigned_user_id: Ua6Rw4pVbS
|
# Client:
|
||||||
company_id: Co7Vn3yLmW
|
# id: Opnel5aKBz
|
||||||
name: "Jim's Housekeeping"
|
# user_id: Ua6Rw4pVbS
|
||||||
website: https://www.jims-housekeeping.com
|
# assigned_user_id: Ua6Rw4pVbS
|
||||||
private_notes: Client prefers email communication over phone calls
|
# company_id: Co7Vn3yLmW
|
||||||
client_hash: asdfkjhk342hjhbfdvmnfb1
|
# name: "Jim's Housekeeping"
|
||||||
industry_id: 5
|
# website: https://www.jims-housekeeping.com
|
||||||
size_id: 2
|
# private_notes: Client prefers email communication over phone calls
|
||||||
address1: 123 Main St
|
# client_hash: asdfkjhk342hjhbfdvmnfb1
|
||||||
address2: Apt 4B
|
# industry_id: 5
|
||||||
city: Beverly Hills
|
# size_id: 2
|
||||||
state: California
|
# address1: 123 Main St
|
||||||
postal_code: 90210
|
# address2: Apt 4B
|
||||||
phone: 555-3434-3434
|
# city: Beverly Hills
|
||||||
country_id: 1
|
# state: California
|
||||||
custom_value1: Email
|
# postal_code: 90210
|
||||||
custom_value2: John Doe
|
# phone: 555-3434-3434
|
||||||
custom_value3: Yes
|
# country_id: 1
|
||||||
custom_value4: $50,000
|
# custom_value1: Email
|
||||||
vat_number: VAT123456
|
# custom_value2: John Doe
|
||||||
id_number: ID123456
|
# custom_value3: Yes
|
||||||
number: CL-0001
|
# custom_value4: $50,000
|
||||||
shipping_address1: 5 Wallaby Way
|
# vat_number: VAT123456
|
||||||
shipping_address2: Suite 5
|
# id_number: ID123456
|
||||||
shipping_city: Perth
|
# number: CL-0001
|
||||||
shipping_state: Western Australia
|
# shipping_address1: 5 Wallaby Way
|
||||||
shipping_postal_code: 6110
|
# shipping_address2: Suite 5
|
||||||
shipping_country_id: 4
|
# shipping_city: Perth
|
||||||
is_deleted: false
|
# shipping_state: Western Australia
|
||||||
balance: 500.00
|
# shipping_postal_code: 6110
|
||||||
paid_to_date: 2000.00
|
# shipping_country_id: 4
|
||||||
credit_balance: 100.00
|
# is_deleted: false
|
||||||
last_login: 1628686031
|
# balance: 500.00
|
||||||
created_at: 1617629031
|
# paid_to_date: 2000.00
|
||||||
updated_at: 1628445631
|
# credit_balance: 100.00
|
||||||
group_settings_id: Opnel5aKBz
|
# last_login: 1628686031
|
||||||
routing_id: Opnel5aKBz3489-dfkiu-2239-sdsd
|
# created_at: 1617629031
|
||||||
is_tax_exempt: false
|
# updated_at: 1628445631
|
||||||
has_valid_vat_number: false
|
# group_settings_id: Opnel5aKBz
|
||||||
payment_balance: 100
|
# routing_id: Opnel5aKBz3489-dfkiu-2239-sdsd
|
||||||
contacts:
|
# is_tax_exempt: false
|
||||||
- id: Opnel5aKBz
|
# has_valid_vat_number: false
|
||||||
first_name: John
|
# payment_balance: 100
|
||||||
last_name: Doe
|
# contacts:
|
||||||
email: jim@gmail.com
|
# id: Opnel5aKBz
|
||||||
phone: 555-3434-3434
|
# first_name: John
|
||||||
send_invoice: true
|
# last_name: Doe
|
||||||
custom_value1: Email
|
# email: jim@gmail.com
|
||||||
custom_value2: John Doe
|
# phone: 555-3434-3434
|
||||||
custom_value3: Yes
|
# send_invoice: true
|
||||||
custom_value4: $50,000
|
# custom_value1: Email
|
||||||
is_primary: true
|
# custom_value2: John Doe
|
||||||
created_at: 1617629031
|
# custom_value3: Yes
|
||||||
updated_at: 1628445631
|
# custom_value4: $50,000
|
||||||
deleted_at: 1628445631
|
# is_primary: true
|
||||||
Meta:
|
# created_at: 1617629031
|
||||||
value:
|
# updated_at: 1628445631
|
||||||
pagination:
|
# deleted_at: 1628445631
|
||||||
total: 1
|
# Meta:
|
||||||
count: 1
|
# value:
|
||||||
per_page: 20
|
# pagination:
|
||||||
current_page: 1
|
# total: 1
|
||||||
total_pages: 1
|
# count: 1
|
||||||
links:
|
# per_page: 20
|
||||||
- first: https://invoicing.co/api/v1/invoices?page=1
|
# current_page: 1
|
||||||
- last: https://invoicing.co/api/v1/invoices?page=1
|
# total_pages: 1
|
||||||
- prev: null
|
# links:
|
||||||
- next: null
|
# - first: https://invoicing.co/api/v1/invoices?page=1
|
||||||
|
# - last: https://invoicing.co/api/v1/invoices?page=1
|
||||||
|
# - prev: null
|
||||||
|
# - next: null
|
@ -139,7 +139,7 @@
|
|||||||
description: The number of records to return for each request, default is 20
|
description: The number of records to return for each request, default is 20
|
||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
type: int
|
type: integer
|
||||||
example: 20
|
example: 20
|
||||||
page_meta:
|
page_meta:
|
||||||
name: page
|
name: page
|
||||||
@ -147,7 +147,7 @@
|
|||||||
description: The page number to return for this request (when performing pagination), default is 1
|
description: The page number to return for this request (when performing pagination), default is 1
|
||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
type: int
|
type: integer
|
||||||
example: 1
|
example: 1
|
||||||
include:
|
include:
|
||||||
name: include
|
name: include
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
Filters the entity list by entities that have been deleted.
|
Filters the entity list by entities that have been deleted.
|
||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
type: booleans
|
type: boolean
|
||||||
example: ?is_deleted=true
|
example: ?is_deleted=true
|
||||||
vendor_id:
|
vendor_id:
|
||||||
name: vendor_id
|
name: vendor_id
|
||||||
|
@ -143,7 +143,7 @@
|
|||||||
type: boolean
|
type: boolean
|
||||||
example: true
|
example: true
|
||||||
default_auto_bill:
|
default_auto_bill:
|
||||||
type: enum
|
type: string
|
||||||
example: 'always'
|
example: 'always'
|
||||||
description: |
|
description: |
|
||||||
A flag determining whether to auto-bill clients by default
|
A flag determining whether to auto-bill clients by default
|
||||||
|
@ -7,11 +7,9 @@
|
|||||||
settings:
|
settings:
|
||||||
description: 'Settings that are used for the frontend applications to store user preferences / metadata'
|
description: 'Settings that are used for the frontend applications to store user preferences / metadata'
|
||||||
type: object
|
type: object
|
||||||
example: 'json object'
|
|
||||||
react_settings:
|
react_settings:
|
||||||
description: 'Dedicated settings object for the react web application'
|
description: 'Dedicated settings object for the react web application'
|
||||||
type: object'
|
type: object
|
||||||
example: 'json object'
|
|
||||||
is_owner:
|
is_owner:
|
||||||
description: 'Determines whether the user owns this company'
|
description: 'Determines whether the user owns this company'
|
||||||
type: boolean
|
type: boolean
|
||||||
|
@ -101,7 +101,7 @@
|
|||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
example: '10.00'
|
example: '10.00'
|
||||||
readOnly:
|
readOnly: true
|
||||||
line_items:
|
line_items:
|
||||||
type: array
|
type: array
|
||||||
description: 'An array of objects which define the line items of the invoice'
|
description: 'An array of objects which define the line items of the invoice'
|
||||||
|
@ -31,6 +31,6 @@
|
|||||||
example: 1
|
example: 1
|
||||||
readOnly: true
|
readOnly: true
|
||||||
links:
|
links:
|
||||||
type: array
|
type: object
|
||||||
description: 'The pagination links'
|
description: 'The pagination links'
|
||||||
readOnly: true
|
readOnly: true
|
@ -10,99 +10,99 @@
|
|||||||
type: string
|
type: string
|
||||||
description: 'The hashed ID of the user assigned to this product.'
|
description: 'The hashed ID of the user assigned to this product.'
|
||||||
example: pR0j3
|
example: pR0j3
|
||||||
required: false
|
|
||||||
project_id:
|
project_id:
|
||||||
type: string
|
type: string
|
||||||
description: 'The hashed ID of the project that this product is associated with.'
|
description: 'The hashed ID of the project that this product is associated with.'
|
||||||
example: pR0j3
|
example: pR0j3
|
||||||
required: false
|
|
||||||
vendor_id:
|
vendor_id:
|
||||||
type: string
|
type: string
|
||||||
description: 'The hashed ID of the vendor that this product is associated with.'
|
description: 'The hashed ID of the vendor that this product is associated with.'
|
||||||
example: pR0j3
|
example: pR0j3
|
||||||
required: false
|
|
||||||
custom_value1:
|
custom_value1:
|
||||||
type: string
|
type: string
|
||||||
description: 'Custom value field 1.'
|
description: 'Custom value field 1.'
|
||||||
example: 'Custom value 1'
|
example: 'Custom value 1'
|
||||||
required: false
|
|
||||||
custom_value2:
|
custom_value2:
|
||||||
type: string
|
type: string
|
||||||
description: 'Custom value field 2.'
|
description: 'Custom value field 2.'
|
||||||
example: 'Custom value 2'
|
example: 'Custom value 2'
|
||||||
required: false
|
|
||||||
custom_value3:
|
custom_value3:
|
||||||
type: string
|
type: string
|
||||||
description: 'Custom value field 3.'
|
description: 'Custom value field 3.'
|
||||||
example: 'Custom value 3'
|
example: 'Custom value 3'
|
||||||
required: false
|
|
||||||
custom_value4:
|
custom_value4:
|
||||||
type: string
|
type: string
|
||||||
description: 'Custom value field 4.'
|
description: 'Custom value field 4.'
|
||||||
example: 'Custom value 4'
|
example: 'Custom value 4'
|
||||||
required: false
|
|
||||||
product_key:
|
product_key:
|
||||||
type: string
|
type: string
|
||||||
description: 'The product key.'
|
description: 'The product key.'
|
||||||
example: '1234'
|
example: '1234'
|
||||||
required: false
|
|
||||||
notes:
|
notes:
|
||||||
type: string
|
type: string
|
||||||
description: 'Notes about the product.'
|
description: 'Notes about the product.'
|
||||||
example: 'These are some notes about the product.'
|
example: 'These are some notes about the product.'
|
||||||
required: false
|
|
||||||
cost:
|
cost:
|
||||||
type: number
|
type: number
|
||||||
format: double
|
format: double
|
||||||
description: 'The cost of the product.'
|
description: 'The cost of the product.'
|
||||||
example: 10.0
|
example: 10.0
|
||||||
required: false
|
|
||||||
price:
|
price:
|
||||||
type: number
|
type: number
|
||||||
format: double
|
format: double
|
||||||
description: 'The price of the product.'
|
description: 'The price of the product.'
|
||||||
example: 20.0
|
example: 20.0
|
||||||
required: false
|
|
||||||
quantity:
|
quantity:
|
||||||
type: number
|
type: number
|
||||||
format: double
|
format: double
|
||||||
description: 'The quantity of the product.'
|
description: 'The quantity of the product.'
|
||||||
example: 5.0
|
example: 5.0
|
||||||
required: false
|
|
||||||
default: 1
|
default: 1
|
||||||
tax_name1:
|
tax_name1:
|
||||||
type: string
|
type: string
|
||||||
description: 'The name of tax 1.'
|
description: 'The name of tax 1.'
|
||||||
example: 'Tax 1'
|
example: 'Tax 1'
|
||||||
required: false
|
|
||||||
tax_rate1:
|
tax_rate1:
|
||||||
type: number
|
type: number
|
||||||
format: double
|
format: double
|
||||||
description: 'The rate of tax 1.'
|
description: 'The rate of tax 1.'
|
||||||
example: 10.0
|
example: 10.0
|
||||||
required: false
|
|
||||||
tax_name2:
|
tax_name2:
|
||||||
type: string
|
type: string
|
||||||
description: 'The name of tax 2.'
|
description: 'The name of tax 2.'
|
||||||
example: 'Tax 2'
|
example: 'Tax 2'
|
||||||
required: false
|
|
||||||
tax_rate2:
|
tax_rate2:
|
||||||
type: number
|
type: number
|
||||||
format: double
|
format: double
|
||||||
description: 'The rate of tax 2.'
|
description: 'The rate of tax 2.'
|
||||||
example: 5.0
|
example: 5.0
|
||||||
required: false
|
|
||||||
tax_name3:
|
tax_name3:
|
||||||
type: string
|
type: string
|
||||||
description: 'The name of tax 3.'
|
description: 'The name of tax 3.'
|
||||||
example: 'Tax 3'
|
example: 'Tax 3'
|
||||||
required: false
|
|
||||||
tax_rate3:
|
tax_rate3:
|
||||||
type: number
|
type: number
|
||||||
format: double
|
format: double
|
||||||
description: 'The rate of tax 3.'
|
description: 'The rate of tax 3.'
|
||||||
example: 0.0
|
example: 0.0
|
||||||
required: false
|
|
||||||
in_stock_quantity:
|
in_stock_quantity:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
@ -114,32 +114,32 @@
|
|||||||
The query parameter ?update_in_stock_quantity=true **MUST** be passed if you wish to update this value manually.
|
The query parameter ?update_in_stock_quantity=true **MUST** be passed if you wish to update this value manually.
|
||||||
|
|
||||||
default: 0
|
default: 0
|
||||||
required: false
|
|
||||||
stock_notification:
|
stock_notification:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Indicates whether stock notifications are enabled for this product
|
description: Indicates whether stock notifications are enabled for this product
|
||||||
default: true
|
default: true
|
||||||
required: false
|
|
||||||
stock_notification_threshold:
|
stock_notification_threshold:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
description: The minimum quantity threshold for which stock notifications will be triggered
|
description: The minimum quantity threshold for which stock notifications will be triggered
|
||||||
default: 0
|
default: 0
|
||||||
required: false
|
|
||||||
max_quantity:
|
max_quantity:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
description: The maximum quantity that can be ordered for this product
|
description: The maximum quantity that can be ordered for this product
|
||||||
required: false
|
|
||||||
product_image:
|
product_image:
|
||||||
type: string
|
type: string
|
||||||
description: The URL of the product image
|
description: The URL of the product image
|
||||||
format: uri-reference
|
format: uri-reference
|
||||||
required: false
|
|
||||||
tax_id:
|
tax_id:
|
||||||
type: string
|
type: string
|
||||||
default: '1'
|
default: '1'
|
||||||
required: false
|
|
||||||
description: |
|
description: |
|
||||||
The tax category id for this product.'
|
The tax category id for this product.'
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ tags:
|
|||||||
description: |
|
description: |
|
||||||
Endpoint definitions for interacting with vendors.
|
Endpoint definitions for interacting with vendors.
|
||||||
- name: Purchase Orders
|
- name: Purchase Orders
|
||||||
summary: Purchase Orders
|
|
||||||
description: |
|
description: |
|
||||||
Endpoint definitions for interacting with purchase orders.
|
Endpoint definitions for interacting with purchase orders.
|
||||||
- name: expenses
|
- name: expenses
|
||||||
|
@ -91,8 +91,6 @@ paths:
|
|||||||
summary: "Attempts authentication"
|
summary: "Attempts authentication"
|
||||||
description: "Returns a CompanyUser object on success"
|
description: "Returns a CompanyUser object on success"
|
||||||
operationId: postLogin
|
operationId: postLogin
|
||||||
security:
|
|
||||||
- []
|
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/components/parameters/X-API-SECRET"
|
- $ref: "#/components/parameters/X-API-SECRET"
|
||||||
- $ref: "#/components/parameters/X-API-TOKEN"
|
- $ref: "#/components/parameters/X-API-TOKEN"
|
||||||
|
@ -125,12 +125,12 @@
|
|||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Client'
|
$ref: '#/components/schemas/Client'
|
||||||
example:
|
example:
|
||||||
$ref: '#/components/examples/Client'
|
$ref: '#/components/schemas/Client'
|
||||||
meta:
|
meta:
|
||||||
type: object
|
type: object
|
||||||
$ref: '#/components/schemas/Meta'
|
$ref: '#/components/schemas/Meta'
|
||||||
example:
|
example:
|
||||||
$ref: '#/components/examples/Meta'
|
$ref: '#/components/schemas/Meta'
|
||||||
401:
|
401:
|
||||||
$ref: '#/components/responses/401'
|
$ref: '#/components/responses/401'
|
||||||
403:
|
403:
|
||||||
|
@ -437,7 +437,6 @@
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
action:
|
action:
|
||||||
required: true
|
|
||||||
type: string
|
type: string
|
||||||
description: |
|
description: |
|
||||||
The action to be performed, options include:
|
The action to be performed, options include:
|
||||||
@ -470,7 +469,6 @@
|
|||||||
- `send_email`
|
- `send_email`
|
||||||
Emails an array of invoices. Requires additional properties to be sent. `email_type`
|
Emails an array of invoices. Requires additional properties to be sent. `email_type`
|
||||||
ids:
|
ids:
|
||||||
required: true
|
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']"
|
description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user