diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4d78d2a8..20d31e5d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+## [0.14.0](https://github.com/aspida/openapi2aspida/compare/v0.13.0...v0.14.0) (2020-11-25)
+
+
+### ⚠ BREAKING CHANGES
+
+* change reqHeaders to optional
+
+### Features
+
+* add nullable ([1ff57a0](https://github.com/aspida/openapi2aspida/commit/1ff57a006b49f98e3fca4b8323a5ba9235db87e2))
+* change reqHeaders to optional ([25c94f3](https://github.com/aspida/openapi2aspida/commit/25c94f3c65731c108592d1a2195fc35dd1def8b3))
+
## [0.13.0](https://github.com/aspida/openapi2aspida/compare/v0.12.0...v0.13.0) (2020-11-14)
diff --git a/README.md b/README.md
index db40ae6d..aae9a749 100644
--- a/README.md
+++ b/README.md
@@ -30,8 +30,12 @@
-## Breaking change (2020/11/14) :warning:
+## Breaking change :warning:
+### 2020/11/26
+Since openapi2aspida >= `0.14.0` , request headers are forced to be optional.
+
+### 2020/11/14
Since openapi2aspida >= `0.13.0` , optional for aspida only if the 'required' property of OpenAPI is set to `false`.
## Getting Started
diff --git a/package.json b/package.json
index a4270617..43b9fda8 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "openapi2aspida",
- "version": "0.13.0",
+ "version": "0.14.0",
"description": "Convert OpenAPI 3.0 or Swagger 2.0 definitions into aspida",
"author": "Solufa ",
"license": "MIT",
@@ -88,27 +88,27 @@
"aspida": "^0.22.2",
"openapi-types": "^7.0.1",
"swagger-parser": "^10.0.2",
- "swagger2openapi": "^7.0.3"
+ "swagger2openapi": "^7.0.4"
},
"devDependencies": {
"@types/jest": "^26.0.15",
"@types/js-yaml": "^3.12.5",
"@types/minimist": "^1.2.1",
- "@typescript-eslint/eslint-plugin": "^4.7.0",
- "@typescript-eslint/parser": "^4.7.0",
- "eslint": "^7.13.0",
+ "@typescript-eslint/eslint-plugin": "^4.8.2",
+ "@typescript-eslint/parser": "^4.8.2",
+ "eslint": "^7.14.0",
"eslint-config-prettier": "^6.15.0",
- "eslint-config-standard": "^16.0.1",
+ "eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1",
- "eslint-plugin-jest": "^24.1.0",
+ "eslint-plugin-jest": "^24.1.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-promise": "^4.2.1",
- "eslint-plugin-standard": "^4.1.0",
+ "eslint-plugin-standard": "^5.0.0",
"jest": "^26.6.3",
- "prettier": "^2.1.2",
+ "prettier": "^2.2.0",
"standard-version": "^9.0.0",
"ts-jest": "^26.4.4",
- "typescript": "^4.0.5"
+ "typescript": "^4.1.2"
}
}
diff --git a/samples/freee/@types.ts b/samples/freee/@types.ts
index 94e48aaf..2f03e444 100644
--- a/samples/freee/@types.ts
+++ b/samples/freee/@types.ts
@@ -61,7 +61,7 @@ export type dealUpdateParams = {
description?: string
vat?: number
}[]
- receipt_ids?: number[]
+ receipt_ids?: number[] | null
}
export type manualJournalCreateParams = {
@@ -244,7 +244,7 @@ export type partnerCreateParams = {
phone?: string
contact_name?: string
email?: string
- payer_walletable_id?: number
+ payer_walletable_id?: number | null
transfer_fee_handling_side?: 'payer' | 'payee'
address_attributes?: {
@@ -295,7 +295,7 @@ export type partnerUpdateParams = {
phone?: string
contact_name?: string
email?: string
- payer_walletable_id?: number
+ payer_walletable_id?: number | null
transfer_fee_handling_side?: 'payer' | 'payee'
address_attributes?: {
@@ -375,20 +375,20 @@ export type accountItemsResponse = {
account_items: {
id: number
name: string
- shortcut?: string
- shortcut_num?: string
+ shortcut?: string | null
+ shortcut_num?: string | null
default_tax_id?: number
default_tax_code: number
account_category: string
account_category_id: number
categories: string[]
available: boolean
- walletable_id: number
- group_name?: string
- corresponding_income_name?: string
- corresponding_income_id?: number
- corresponding_expense_name?: string
- corresponding_expense_id?: number
+ walletable_id: number | null
+ group_name?: string | null
+ corresponding_income_name?: string | null
+ corresponding_income_id?: number | null
+ corresponding_expense_name?: string | null
+ corresponding_expense_id?: number | null
}[]
}
@@ -415,12 +415,12 @@ export type accountItemResponse = {
name: string
}[]
available: boolean
- walletable_id: number
- group_name?: string
- corresponding_income_name?: string
- corresponding_income_id?: number
- corresponding_expense_name?: string
- corresponding_expense_id?: number
+ walletable_id: number | null
+ group_name?: string | null
+ corresponding_income_name?: string | null
+ corresponding_income_id?: number | null
+ corresponding_expense_name?: string | null
+ corresponding_expense_id?: number | null
}
}
@@ -429,7 +429,7 @@ export type bankResponse = {
id: number
name?: string
type?: 'bank_account' | 'credit_card' | 'wallet'
- name_kana?: string
+ name_kana?: string | null
}
}
@@ -843,10 +843,10 @@ export type sectionResponse = {
section: {
id: number
name: string
- long_name?: string
+ long_name?: string | null
company_id: number
- shortcut1?: string
- shortcut2?: string
+ shortcut1?: string | null
+ shortcut2?: string | null
}
}
@@ -860,7 +860,7 @@ export type dealCreateResponse = {
due_amount?: number
type?: 'income' | 'expense'
partner_id: number
- partner_code?: string
+ partner_code?: string | null
ref_number?: string
status: 'unsettled' | 'settled'
details?: {
@@ -868,12 +868,12 @@ export type dealCreateResponse = {
account_item_id: number
tax_id?: number
tax_code: number
- item_id?: number
- section_id?: number
+ item_id?: number | null
+ section_id?: number | null
tag_ids?: number[]
- segment_1_tag_id?: number
- segment_2_tag_id?: number
- segment_3_tag_id?: number
+ segment_1_tag_id?: number | null
+ segment_2_tag_id?: number | null
+ segment_3_tag_id?: number | null
amount: number
vat: number
description?: string
@@ -899,7 +899,7 @@ export type dealResponse = {
due_amount?: number
type?: 'income' | 'expense'
partner_id: number
- partner_code?: string
+ partner_code?: string | null
ref_number?: string
status: 'unsettled' | 'settled'
details?: {
@@ -907,12 +907,12 @@ export type dealResponse = {
account_item_id: number
tax_id?: number
tax_code: number
- item_id?: number
- section_id?: number
+ item_id?: number | null
+ section_id?: number | null
tag_ids?: number[]
- segment_1_tag_id?: number
- segment_2_tag_id?: number
- segment_3_tag_id?: number
+ segment_1_tag_id?: number | null
+ segment_2_tag_id?: number | null
+ segment_3_tag_id?: number | null
amount: number
vat: number
description?: string
@@ -928,15 +928,15 @@ export type dealResponse = {
entry_side: 'credit' | 'debit'
account_item_id: number
tax_code: number
- item_id?: number
- section_id?: number
+ item_id?: number | null
+ section_id?: number | null
tag_ids: number[]
- segment_1_tag_id?: number
- segment_2_tag_id?: number
- segment_3_tag_id?: number
+ segment_1_tag_id?: number | null
+ segment_2_tag_id?: number | null
+ segment_3_tag_id?: number | null
amount: number
vat: number
- description?: string
+ description?: string | null
}[]
}[]
payments?: {
@@ -959,7 +959,7 @@ export type dealResponse = {
user: {
id: number
email: string
- display_name?: string
+ display_name?: string | null
}
}[]
}
@@ -1009,8 +1009,8 @@ export type itemResponse = {
id: number
company_id: number
name: string
- shortcut1?: string
- shortcut2?: string
+ shortcut1?: string | null
+ shortcut2?: string | null
}
}
@@ -1020,20 +1020,20 @@ export type manualJournalResponse = {
company_id: number
issue_date: string
adjustment: boolean
- txn_number: string
+ txn_number: string | null
details: {
id: number
entry_side: 'credit' | 'debit'
account_item_id: number
tax_code: number
- partner_id: number
- partner_name: string
- partner_code?: string
- partner_long_name: string
- item_id: number
- item_name: string
- section_id: number
- section_name: string
+ partner_id: number | null
+ partner_name: string | null
+ partner_code?: string | null
+ partner_long_name: string | null
+ item_id: number | null
+ item_name: string | null
+ section_id: number | null
+ section_name: string | null
tag_ids: number[]
tag_names: string[]
segment_1_tag_id?: number
@@ -1060,21 +1060,21 @@ export type tagResponse = {
tag: {
id: number
company_id: number
- name: string
- shortcut1?: string
- shortcut2?: string
+ name: string | null
+ shortcut1?: string | null
+ shortcut2?: string | null
}
}
export type companyUpdateResponse = {
company: {
id: number
- name: string
- name_kana: string
+ name: string | null
+ name_kana: string | null
display_name: string
tax_at_source_calc_type: number
- contact_name: string
- head_count: number
+ contact_name: string | null
+ head_count: number | null
corporate_number: string
txn_number_format: 'not_used' | 'digits' | 'alnum'
default_wallet_account_id?: number
@@ -1082,8 +1082,8 @@ export type companyUpdateResponse = {
minus_format: number
role: 'admin' | 'simple_accounting' | 'self_only' | 'read_only'
phone1: string
- phone2: string
- fax: string
+ phone2: string | null
+ fax: string | null
zipcode: string
prefecture_code: number
street_name1: string
@@ -1112,9 +1112,9 @@ export type companyUpdateResponse = {
export type companyIndexResponse = {
companies: {
id: number
- name: string
- name_kana: string
- display_name: string
+ name: string | null
+ name_kana: string | null
+ display_name: string | null
role: 'admin' | 'simple_accounting' | 'self_only' | 'read_only'
}[]
}
@@ -1122,12 +1122,12 @@ export type companyIndexResponse = {
export type companyResponse = {
company: {
id: number
- name: string
- name_kana: string
+ name: string | null
+ name_kana: string | null
display_name: string
tax_at_source_calc_type: number
- contact_name: string
- head_count: number
+ contact_name: string | null
+ head_count: number | null
corporate_number: string
txn_number_format: 'not_used' | 'digits' | 'alnum'
default_wallet_account_id?: number
@@ -1135,8 +1135,8 @@ export type companyResponse = {
minus_format: number
role: 'admin' | 'simple_accounting' | 'self_only' | 'read_only'
phone1: string
- phone2: string
- fax: string
+ phone2: string | null
+ fax: string | null
zipcode: string
prefecture_code: number
street_name1: string
@@ -1211,74 +1211,74 @@ export type serviceUnavailableError = {
export type partnersResponse = {
partners: {
id: number
- code: string
+ code: string | null
company_id: number
name: string
- shortcut1?: string
- shortcut2?: string
- long_name?: string
- name_kana?: string
- default_title?: string
- phone?: string
- contact_name?: string
- email?: string
- payer_walletable_id?: number
+ shortcut1?: string | null
+ shortcut2?: string | null
+ long_name?: string | null
+ name_kana?: string | null
+ default_title?: string | null
+ phone?: string | null
+ contact_name?: string | null
+ email?: string | null
+ payer_walletable_id?: number | null
transfer_fee_handling_side?: 'payer' | 'payee'
- 'address_attributes[zipcode]'?: string
+ 'address_attributes[zipcode]'?: string | null
'address_attributes[prefecture_code]'?: number
- 'address_attributes[street_name1]'?: string
- 'address_attributes[street_name2]'?: string
- 'partner_doc_setting_attributes[sending_method]'?: 'mail' | 'posting' | 'main_and_posting'
- 'partner_bank_account_attributes[bank_name]'?: string
- 'partner_bank_account_attributes[bank_name_kana]'?: string
- 'partner_bank_account_attributes[bank_code]'?: string
- 'partner_bank_account_attributes[branch_name]'?: string
- 'partner_bank_account_attributes[branch_kana]'?: string
- 'partner_bank_account_attributes[branch_code]'?: string
- 'partner_bank_account_attributes[account_type]'?: 'ordinary' | 'checking' | 'earmarked' | 'savings' | 'other'
- 'partner_bank_account_attributes[account_number]'?: string
- 'partner_bank_account_attributes[account_name]'?: string
- 'partner_bank_account_attributes[long_account_name]'?: string
+ 'address_attributes[street_name1]'?: string | null
+ 'address_attributes[street_name2]'?: string | null
+ 'partner_doc_setting_attributes[sending_method]'?: 'mail' | 'posting' | 'main_and_posting' | null
+ 'partner_bank_account_attributes[bank_name]'?: string | null
+ 'partner_bank_account_attributes[bank_name_kana]'?: string | null
+ 'partner_bank_account_attributes[bank_code]'?: string | null
+ 'partner_bank_account_attributes[branch_name]'?: string | null
+ 'partner_bank_account_attributes[branch_kana]'?: string | null
+ 'partner_bank_account_attributes[branch_code]'?: string | null
+ 'partner_bank_account_attributes[account_type]'?: 'ordinary' | 'checking' | 'earmarked' | 'savings' | 'other' | null
+ 'partner_bank_account_attributes[account_number]'?: string | null
+ 'partner_bank_account_attributes[account_name]'?: string | null
+ 'partner_bank_account_attributes[long_account_name]'?: string | null
}[]
}
export type partnerResponse = {
partner: {
id: number
- code: string
+ code: string | null
company_id: number
name: string
- shortcut1?: string
- shortcut2?: string
- long_name?: string
- name_kana?: string
- default_title?: string
- phone?: string
- contact_name?: string
- email?: string
- payer_walletable_id?: number
+ shortcut1?: string | null
+ shortcut2?: string | null
+ long_name?: string | null
+ name_kana?: string | null
+ default_title?: string | null
+ phone?: string | null
+ contact_name?: string | null
+ email?: string | null
+ payer_walletable_id?: number | null
transfer_fee_handling_side?: 'payer' | 'payee'
- 'address_attributes[zipcode]'?: string
+ 'address_attributes[zipcode]'?: string | null
'address_attributes[prefecture_code]'?: number
- 'address_attributes[street_name1]'?: string
- 'address_attributes[street_name2]'?: string
- 'partner_doc_setting_attributes[sending_method]'?: 'email' | 'posting' | 'email_and_posting'
- 'partner_bank_account_attributes[bank_name]'?: string
- 'partner_bank_account_attributes[bank_name_kana]'?: string
- 'partner_bank_account_attributes[bank_code]'?: string
- 'partner_bank_account_attributes[branch_name]'?: string
- 'partner_bank_account_attributes[branch_kana]'?: string
- 'partner_bank_account_attributes[branch_code]'?: string
- 'partner_bank_account_attributes[account_type]'?: 'ordinary' | 'checking' | 'earmarked' | 'savings' | 'other'
- 'partner_bank_account_attributes[account_number]'?: string
- 'partner_bank_account_attributes[account_name]'?: string
- 'partner_bank_account_attributes[long_account_name]'?: string
- 'payment_term_attributes[cutoff_day]'?: number
- 'payment_term_attributes[additional_months]'?: number
- 'payment_term_attributes[fixed_day]'?: number
- 'invoice_payment_term_attributes[cutoff_day]'?: number
- 'invoice_payment_term_attributes[additional_months]'?: number
- 'invoice_payment_term_attributes[fixed_day]'?: number
+ 'address_attributes[street_name1]'?: string | null
+ 'address_attributes[street_name2]'?: string | null
+ 'partner_doc_setting_attributes[sending_method]'?: 'email' | 'posting' | 'email_and_posting' | null
+ 'partner_bank_account_attributes[bank_name]'?: string | null
+ 'partner_bank_account_attributes[bank_name_kana]'?: string | null
+ 'partner_bank_account_attributes[bank_code]'?: string | null
+ 'partner_bank_account_attributes[branch_name]'?: string | null
+ 'partner_bank_account_attributes[branch_kana]'?: string | null
+ 'partner_bank_account_attributes[branch_code]'?: string | null
+ 'partner_bank_account_attributes[account_type]'?: 'ordinary' | 'checking' | 'earmarked' | 'savings' | 'other' | null
+ 'partner_bank_account_attributes[account_number]'?: string | null
+ 'partner_bank_account_attributes[account_name]'?: string | null
+ 'partner_bank_account_attributes[long_account_name]'?: string | null
+ 'payment_term_attributes[cutoff_day]'?: number | null
+ 'payment_term_attributes[additional_months]'?: number | null
+ 'payment_term_attributes[fixed_day]'?: number | null
+ 'invoice_payment_term_attributes[cutoff_day]'?: number | null
+ 'invoice_payment_term_attributes[additional_months]'?: number | null
+ 'invoice_payment_term_attributes[fixed_day]'?: number | null
}
}
@@ -1294,7 +1294,7 @@ export type walletableResponse = {
walletable: {
id: number
name: string
- bank_id: number
+ bank_id: number | null
type: 'bank_account' | 'credit_card' | 'wallet'
last_balance?: number
walletable_balance?: number
@@ -1334,9 +1334,9 @@ export type transferResponse = {
company_id: number
amount: number
date: string
- from_walletable_type: 'bank_account' | 'wallet' | 'credit_card'
+ from_walletable_type: 'bank_account' | 'wallet' | 'credit_card' | null
from_walletable_id: number
- to_walletable_type: 'bank_account' | 'wallet' | 'credit_card'
+ to_walletable_type: 'bank_account' | 'wallet' | 'credit_card' | null
to_walletable_id: number
description: string
}
@@ -1354,11 +1354,11 @@ export type userResponse = {
user: {
id: number
email: string
- display_name?: string
- first_name?: string
- last_name?: string
- first_name_kana?: string
- last_name_kana?: string
+ display_name?: string | null
+ first_name?: string | null
+ last_name?: string | null
+ first_name_kana?: string | null
+ last_name_kana?: string | null
}
}
@@ -1366,11 +1366,11 @@ export type meResponse = {
user: {
id: number
email: string
- display_name?: string
- first_name?: string
- last_name?: string
- first_name_kana?: string
- last_name_kana?: string
+ display_name?: string | null
+ first_name?: string | null
+ last_name?: string | null
+ first_name_kana?: string | null
+ last_name_kana?: string | null
companies?: {
id: number
display_name: string
@@ -1401,7 +1401,7 @@ export type receiptResponse = {
user: {
id: number
email: string
- display_name?: string
+ display_name?: string | null
}
}
}
@@ -1424,12 +1424,12 @@ export type expenseApplicationResponse = {
id: number
company_id: number
title: string
- issue_date: string
+ issue_date: string | null
description?: string
editable_on_web: boolean
total_amount?: number
status: 'draft' | 'in_progress' | 'approved' | 'rejected' | 'feedback'
- section_id?: number
+ section_id?: number | null
tag_ids?: number[]
expense_application_lines: {
id: number
@@ -1439,8 +1439,8 @@ export type expenseApplicationResponse = {
expense_application_line_template_id?: number
receipt_id?: number
}[]
- deal_id: number
- deal_status: 'settled' | 'unsettled'
+ deal_id: number | null
+ deal_status: 'settled' | 'unsettled' | null
}
}
@@ -1501,7 +1501,7 @@ export type generalApplicationUpdateParams = {
export type generalApplicationActionCreateParams = {
company_id: number
approval_action: 'approve' | 'force_approve' | 'cancel' | 'reject' | 'feedback' | 'force_feedback'
- next_approver_id?: number
+ next_approver_id?: number | null
}
export type renewCreateParams = {
@@ -1558,7 +1558,7 @@ export type approvalRequestResponse = {
application_date: string
title: string
applicant_id: number
- approver_id: number
+ approver_id: number | null
application_number: string
status: 'draft'
request_items: {
@@ -1576,7 +1576,7 @@ export type generalApplicationsIndexResponse = {
application_date: string
title: string
applicant_id: number
- approver_id: number
+ approver_id: number | null
application_number: string
status: 'draft' | 'in_progress' | 'approved' | 'rejected' | 'feedback'
request_items: {
@@ -1596,7 +1596,7 @@ export type generalApplicationResponse = {
application_date: string
title: string
applicant_id: number
- approver_id: number
+ approver_id: number | null
application_number: string
status: 'draft' | 'in_progress' | 'approved' | 'rejected' | 'feedback'
request_items: {
@@ -1606,8 +1606,8 @@ export type generalApplicationResponse = {
}[]
form_id: number
approval_flow_route_id: number
- last_approver_id: number
- last_approved_at: string
+ last_approver_id: number | null
+ last_approved_at: string | null
comments: {
comment: string
user_id: number
@@ -1629,20 +1629,20 @@ export type generalApplicationFormResponse = {
description: string
status: 'draft' | 'active' | 'deleted'
created_date: string
- form_order: number
+ form_order: number | null
parts?: {
id: number
order?: number
type?: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt'
label?: string
- annotation?: string
- required?: boolean
+ annotation?: string | null
+ required?: boolean | null
values?: {
name: string
order: number
- }[]
- max_amount?: number
- min_amount?: number
+ }[] | null
+ max_amount?: number | null
+ min_amount?: number | null
}[]
route_setting_count: number
}
@@ -1653,7 +1653,7 @@ export type approvalFlowRouteResponse = {
id: number
name?: string
description?: string
- user_id?: number
+ user_id?: number | null
definition_system?: boolean
is_in_progress?: boolean
first_step_id?: number
@@ -1665,9 +1665,9 @@ export type segmentTagResponse = {
segment_tag: {
id: number
name: string
- description: string
- shortcut1: string
- shortcut2: string
+ description: string | null
+ shortcut1: string | null
+ shortcut2: string | null
}
}
@@ -1684,73 +1684,73 @@ export type invoiceResponse = {
id: number
company_id: number
issue_date: string
- partner_id: number
- partner_code?: string
+ partner_id: number | null
+ partner_code?: string | null
invoice_number: string
- title?: string
- due_date?: string
+ title?: string | null
+ due_date?: string | null
total_amount: number
total_vat?: number
sub_total?: number
- booking_date?: string
- description?: string
+ booking_date?: string | null
+ description?: string | null
invoice_status: 'draft' | 'applying' | 'remanded' | 'rejected' | 'approved' | 'issued'
payment_status?: '' | 'unsettled' | 'settled'
- payment_date?: string
- web_published_at?: string
- web_downloaded_at?: string
- web_confirmed_at?: string
- mail_sent_at?: string
+ payment_date?: string | null
+ web_published_at?: string | null
+ web_downloaded_at?: string | null
+ web_confirmed_at?: string | null
+ mail_sent_at?: string | null
posting_status: '' | 'unrequested' | 'preview_registered' | 'preview_failed' | 'ordered' | 'order_failed' | 'printing' | 'canceled' | 'posted'
- partner_name?: string
- partner_long_name?: string
- partner_title?: string
- partner_zipcode?: string
- partner_prefecture_code?: number
- partner_prefecture_name?: string
- partner_address1?: string
- partner_address2?: string
- partner_contact_info?: string
+ partner_name?: string | null
+ partner_long_name?: string | null
+ partner_title?: string | null
+ partner_zipcode?: string | null
+ partner_prefecture_code?: number | null
+ partner_prefecture_name?: string | null
+ partner_address1?: string | null
+ partner_address2?: string | null
+ partner_contact_info?: string | null
company_name: string
- company_zipcode?: string
- company_prefecture_code?: number
- company_prefecture_name?: string
- company_address1?: string
- company_address2?: string
- company_contact_info?: string
+ company_zipcode?: string | null
+ company_prefecture_code?: number | null
+ company_prefecture_name?: string | null
+ company_address1?: string | null
+ company_address2?: string | null
+ company_contact_info?: string | null
payment_type: '' | 'transfer' | 'direct_debit'
- payment_bank_info?: string
- message?: string
- notes?: string
+ payment_bank_info?: string | null
+ message?: string | null
+ notes?: string | null
invoice_layout: 'default_classic' | 'standard_classic' | 'envelope_classic' | 'carried_forward_standard_classic' | 'carried_forward_envelope_classic' | 'default_modern' | 'standard_modern' | 'envelope_modern'
tax_entry_method: '' | 'inclusive' | 'exclusive'
- deal_id?: number
+ deal_id?: number | null
invoice_contents?: {
id: number
order: number
type: 'normal' | 'discount' | 'text'
qty: number
- unit: string
+ unit: string | null
unit_price: number
amount: number
vat: number
reduced_vat: boolean
- description: string
- account_item_id: number
- account_item_name: string
- tax_code: number
- item_id: number
- item_name: string
- section_id: number
- section_name: string
+ description: string | null
+ account_item_id: number | null
+ account_item_name: string | null
+ tax_code: number | null
+ item_id: number | null
+ item_name: string | null
+ section_id: number | null
+ section_name: string | null
tag_ids: number[]
tag_names: string[]
- segment_1_tag_id?: number
- segment_1_tag_name?: string
- segment_2_tag_id?: number
- segment_2_tag_name?: string
- segment_3_tag_id?: number
- segment_3_tag_name?: string
+ segment_1_tag_id?: number | null
+ segment_1_tag_name?: string | null
+ segment_2_tag_id?: number | null
+ segment_2_tag_name?: string | null
+ segment_3_tag_id?: number | null
+ segment_3_tag_name?: string | null
}[]
total_amount_per_vat_rate: {
@@ -1765,21 +1765,21 @@ export type invoiceResponse = {
export type invoiceCreateParams = {
company_id: number
issue_date?: string
- partner_id?: number
- partner_code?: string
+ partner_id?: number | null
+ partner_code?: string | null
invoice_number?: string
title?: string
due_date?: string
booking_date?: string
description?: string
invoice_status?: 'draft' | 'issue'
- partner_name?: string
- partner_title?: string
- partner_contact_info?: string
- partner_zipcode?: string
- partner_prefecture_code?: number
- partner_address1?: string
- partner_address2?: string
+ partner_name?: string | null
+ partner_title?: string | null
+ partner_contact_info?: string | null
+ partner_zipcode?: string | null
+ partner_prefecture_code?: number | null
+ partner_address1?: string | null
+ partner_address2?: string | null
company_name?: string
company_zipcode?: string
company_prefecture_code?: number
@@ -1799,7 +1799,7 @@ export type invoiceCreateParams = {
qty?: number
unit?: string
unit_price?: number
- vat?: number
+ vat?: number | null
description?: string
account_item_id?: number
tax_code?: number
@@ -1815,21 +1815,21 @@ export type invoiceCreateParams = {
export type invoiceUpdateParams = {
company_id: number
issue_date?: string
- partner_id?: number
- partner_code?: string
+ partner_id?: number | null
+ partner_code?: string | null
invoice_number?: string
title?: string
due_date?: string
booking_date?: string
description?: string
invoice_status?: 'draft' | 'issue'
- partner_name?: string
- partner_title?: string
- partner_contact_info?: string
- partner_zipcode?: string
- partner_prefecture_code?: number
- partner_address1?: string
- partner_address2?: string
+ partner_name?: string | null
+ partner_title?: string | null
+ partner_contact_info?: string | null
+ partner_zipcode?: string | null
+ partner_prefecture_code?: number | null
+ partner_address1?: string | null
+ partner_address2?: string | null
company_name?: string
company_zipcode?: string
company_prefecture_code?: number
@@ -1850,7 +1850,7 @@ export type invoiceUpdateParams = {
qty?: number
unit?: string
unit_price?: number
- vat?: number
+ vat?: number | null
description?: string
account_item_id?: number
tax_code?: number
@@ -1868,37 +1868,37 @@ export type quotationResponse = {
id: number
company_id: number
issue_date: string
- partner_id: number
- partner_code?: string
+ partner_id: number | null
+ partner_code?: string | null
quotation_number: string
- title?: string
+ title?: string | null
total_amount: number
total_vat?: number
sub_total?: number
- description?: string
+ description?: string | null
quotation_status: 'unsubmitted' | 'submitted' | 'all'
- web_published_at?: string
- web_downloaded_at?: string
- web_confirmed_at?: string
- mail_sent_at?: string
- partner_name?: string
- partner_display_name?: string
- partner_title: '御中' | '様' | '(空白)'
- partner_zipcode?: string
- partner_prefecture_code?: number
- partner_prefecture_name?: string
- partner_address1?: string
- partner_address2?: string
- partner_contact_info?: string
+ web_published_at?: string | null
+ web_downloaded_at?: string | null
+ web_confirmed_at?: string | null
+ mail_sent_at?: string | null
+ partner_name?: string | null
+ partner_display_name?: string | null
+ partner_title: '御中' | '様' | '(空白)' | null
+ partner_zipcode?: string | null
+ partner_prefecture_code?: number | null
+ partner_prefecture_name?: string | null
+ partner_address1?: string | null
+ partner_address2?: string | null
+ partner_contact_info?: string | null
company_name: string
- company_zipcode?: string
- company_prefecture_code?: number
- company_prefecture_name?: string
- company_address1?: string
- company_address2?: string
- company_contact_info?: string
- message?: string
- notes?: string
+ company_zipcode?: string | null
+ company_prefecture_code?: number | null
+ company_prefecture_name?: string | null
+ company_address1?: string | null
+ company_address2?: string | null
+ company_contact_info?: string | null
+ message?: string | null
+ notes?: string | null
quotation_layout: 'default_classic' | 'standard_classic' | 'envelope_classic' | 'carried_forward_standard_classic' | 'carried_forward_envelope_classic' | 'default_modern' | 'standard_modern' | 'envelope_modern'
tax_entry_method: '' | 'inclusive' | 'exclusive'
quotation_contents?: {
@@ -1906,27 +1906,27 @@ export type quotationResponse = {
order: number
type: 'normal' | 'discount' | 'text'
qty: number
- unit: string
+ unit: string | null
unit_price: number
amount: number
vat: number
reduced_vat: boolean
- description: string
- account_item_id: number
- account_item_name: string
- tax_code: number
- item_id: number
- item_name: string
- section_id: number
- section_name: string
+ description: string | null
+ account_item_id: number | null
+ account_item_name: string | null
+ tax_code: number | null
+ item_id: number | null
+ item_name: string | null
+ section_id: number | null
+ section_name: string | null
tag_ids: number[]
tag_names: string[]
- segment_1_tag_id?: number
- segment_1_tag_name?: string
- segment_2_tag_id?: number
- segment_2_tag_name?: string
- segment_3_tag_id?: number
- segment_3_tag_name?: string
+ segment_1_tag_id?: number | null
+ segment_1_tag_name?: string | null
+ segment_2_tag_id?: number | null
+ segment_2_tag_name?: string | null
+ segment_3_tag_id?: number | null
+ segment_3_tag_name?: string | null
}[]
total_amount_per_vat_rate: {
@@ -1941,19 +1941,19 @@ export type quotationResponse = {
export type quotationCreateParams = {
company_id: number
issue_date?: string
- partner_id?: number
- partner_code?: string
+ partner_id?: number | null
+ partner_code?: string | null
quotation_number?: string
title?: string
description?: string
quotation_status?: 'unsubmitted' | 'submitted'
partner_display_name: string
partner_title: string
- partner_contact_info?: string
- partner_zipcode?: string
- partner_prefecture_code?: number
- partner_address1?: string
- partner_address2?: string
+ partner_contact_info?: string | null
+ partner_zipcode?: string | null
+ partner_prefecture_code?: number | null
+ partner_address1?: string | null
+ partner_address2?: string | null
company_name?: string
company_zipcode?: string
company_prefecture_code?: number
@@ -1970,7 +1970,7 @@ export type quotationCreateParams = {
qty?: number
unit?: string
unit_price?: number
- vat?: number
+ vat?: number | null
description?: string
account_item_id?: number
tax_code?: number
@@ -1986,19 +1986,19 @@ export type quotationCreateParams = {
export type quotationUpdateParams = {
company_id: number
issue_date?: string
- partner_id?: number
- partner_code?: string
+ partner_id?: number | null
+ partner_code?: string | null
quotation_number?: string
title?: string
description?: string
quotation_status?: 'unsubmitted' | 'submitted'
partner_display_name: string
partner_title: string
- partner_contact_info?: string
- partner_zipcode?: string
- partner_prefecture_code?: number
- partner_address1?: string
- partner_address2?: string
+ partner_contact_info?: string | null
+ partner_zipcode?: string | null
+ partner_prefecture_code?: number | null
+ partner_address1?: string | null
+ partner_address2?: string | null
company_name?: string
company_zipcode?: string
company_prefecture_code?: number
@@ -2016,7 +2016,7 @@ export type quotationUpdateParams = {
qty?: number
unit?: string
unit_price?: number
- vat?: number
+ vat?: number | null
description?: string
account_item_id?: number
tax_code?: number
diff --git a/samples/freee/api/1/taxes/companies/_company_id@number/index.ts b/samples/freee/api/1/taxes/companies/_company_id@number/index.ts
index 6b35a636..d088c31f 100644
--- a/samples/freee/api/1/taxes/companies/_company_id@number/index.ts
+++ b/samples/freee/api/1/taxes/companies/_company_id@number/index.ts
@@ -8,7 +8,7 @@ export type Methods = {
code: number
name: string
name_ja: string
- display_category: 'tax_5' | 'tax_8' | 'tax_r8' | 'tax_10'
+ display_category: 'tax_5' | 'tax_8' | 'tax_r8' | 'tax_10' | null
available: boolean
}[]
}
diff --git a/samples/openapi/$api.ts b/samples/openapi/$api.ts
index 04032079..41f07e0b 100644
--- a/samples/openapi/$api.ts
+++ b/samples/openapi/$api.ts
@@ -201,9 +201,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
},
v3: {
$2fa: {
- post: (option: { body: Methods10['post']['reqBody'], headers: Methods10['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH8, POST, option).json(),
- $post: (option: { body: Methods10['post']['reqBody'], headers: Methods10['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH8, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH8}`
},
@@ -222,9 +222,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const prefix5 = `${prefix4}${PATH11}/${val5}`
return {
- post: (option: { body: Methods12['post']['reqBody'], headers: Methods12['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix5, POST, option).json(),
- $post: (option: { body: Methods12['post']['reqBody'], headers: Methods12['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix5, POST, option).json().then(r => r.body),
$path: () => `${prefix}${prefix5}`
}
@@ -234,9 +234,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
}
},
news_feed: {
- get: (option: { query: Methods13['get']['query'], headers: Methods13['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods13['get']['query'], headers?: Methods13['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix3}${PATH12}`, GET, option).json(),
- $get: (option: { query: Methods13['get']['query'], headers: Methods13['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods13['get']['query'], headers?: Methods13['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix3}${PATH12}`, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods13['get']['query'] }) =>
`${prefix}${prefix3}${PATH12}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
@@ -254,111 +254,111 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
return {
items: {
audio: {
- post: (option: { body: Methods18['post']['reqBody'], headers: Methods18['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH13}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods18['post']['reqBody'], headers: Methods18['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH13}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix7}${PATH13}`
},
image: {
- post: (option: { body: Methods19['post']['reqBody'], headers: Methods19['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH14}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods19['post']['reqBody'], headers: Methods19['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH14}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix7}${PATH14}`
},
video: {
- post: (option: { body: Methods20['post']['reqBody'], headers: Methods20['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods20['post']['reqBody'], headers?: Methods20['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH15}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods20['post']['reqBody'], headers: Methods20['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods20['post']['reqBody'], headers?: Methods20['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH15}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix7}${PATH15}`
},
- get: (option: { query: Methods17['get']['query'], headers: Methods17['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods17['get']['query'], headers?: Methods17['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH11}`, GET, option).json(),
- $get: (option: { query: Methods17['get']['query'], headers: Methods17['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods17['get']['query'], headers?: Methods17['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH11}`, GET, option).json().then(r => r.body),
- post: (option: { body: Methods17['post']['reqBody'], headers: Methods17['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH11}`, POST, option).json(),
- $post: (option: { body: Methods17['post']['reqBody'], headers: Methods17['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH11}`, POST, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods17['get']['query'] }) =>
`${prefix}${prefix7}${PATH11}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
},
itemslist: {
- get: (option: { query: Methods21['get']['query'], headers: Methods21['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods21['get']['query'], headers?: Methods21['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH16}`, GET, option).json(),
- $get: (option: { query: Methods21['get']['query'], headers: Methods21['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods21['get']['query'], headers?: Methods21['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH16}`, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods21['get']['query'] }) =>
`${prefix}${prefix7}${PATH16}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
},
users: {
remove: {
- post: (option: { body: Methods23['post']['reqBody'], headers: Methods23['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH18}`, POST, option).send(),
- $post: (option: { body: Methods23['post']['reqBody'], headers: Methods23['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH18}`, POST, option).send().then(r => r.body),
$path: () => `${prefix}${prefix7}${PATH18}`
},
- get: (option: { headers: Methods22['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods22['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH17}`, GET, option).json(),
- $get: (option: { headers: Methods22['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods22['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH17}`, GET, option).json().then(r => r.body),
- post: (option: { body: Methods22['post']['reqBody'], headers: Methods22['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH17}`, POST, option).send(),
- $post: (option: { body: Methods22['post']['reqBody'], headers: Methods22['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH17}`, POST, option).send().then(r => r.body),
- put: (option: { body: Methods22['put']['reqBody'], headers: Methods22['put']['reqHeaders'], config?: T }) =>
+ put: (option: { body: Methods22['put']['reqBody'], headers?: Methods22['put']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH17}`, PUT, option).send(),
- $put: (option: { body: Methods22['put']['reqBody'], headers: Methods22['put']['reqHeaders'], config?: T }) =>
+ $put: (option: { body: Methods22['put']['reqBody'], headers?: Methods22['put']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH17}`, PUT, option).send().then(r => r.body),
$path: () => `${prefix}${prefix7}${PATH17}`
},
- get: (option: { headers: Methods16['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods16['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix7, GET, option).json(),
- $get: (option: { headers: Methods16['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods16['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix7, GET, option).json().then(r => r.body),
- put: (option: { body: Methods16['put']['reqBody'], headers: Methods16['put']['reqHeaders'], config?: T }) =>
+ put: (option: { body: Methods16['put']['reqBody'], headers?: Methods16['put']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix7, PUT, option).send(),
- $put: (option: { body: Methods16['put']['reqBody'], headers: Methods16['put']['reqHeaders'], config?: T }) =>
+ $put: (option: { body: Methods16['put']['reqBody'], headers?: Methods16['put']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix7, PUT, option).send().then(r => r.body),
- delete: (option: { headers: Methods16['delete']['reqHeaders'], config?: T }) =>
+ delete: (option?: { headers?: Methods16['delete']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix7, DELETE, option).send(),
- $delete: (option: { headers: Methods16['delete']['reqHeaders'], config?: T }) =>
+ $delete: (option?: { headers?: Methods16['delete']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix7, DELETE, option).send().then(r => r.body),
$path: () => `${prefix}${prefix7}`
}
},
- get: (option: { headers: Methods15['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods15['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix6}${PATH10}`, GET, option).json(),
- $get: (option: { headers: Methods15['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods15['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix6}${PATH10}`, GET, option).json().then(r => r.body),
- post: (option: { body: Methods15['post']['reqBody'], headers: Methods15['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix6}${PATH10}`, POST, option).json(),
- $post: (option: { body: Methods15['post']['reqBody'], headers: Methods15['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix6}${PATH10}`, POST, option).json().then(r => r.body),
$path: () => `${prefix}${prefix6}${PATH10}`
},
notifications: {
- get: (option: { query: Methods24['get']['query'], headers: Methods24['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods24['get']['query'], headers?: Methods24['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix6}${PATH19}`, GET, option).json(),
- $get: (option: { query: Methods24['get']['query'], headers: Methods24['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods24['get']['query'], headers?: Methods24['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix6}${PATH19}`, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods24['get']['query'] }) =>
`${prefix}${prefix6}${PATH19}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
},
- get: (option: { query: Methods14['get']['query'], headers: Methods14['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods14['get']['query'], headers?: Methods14['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix6, GET, option).send(),
- $get: (option: { query: Methods14['get']['query'], headers: Methods14['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods14['get']['query'], headers?: Methods14['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix6, GET, option).send().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods14['get']['query'] }) =>
`${prefix}${prefix6}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
}
},
- get: (option: { query: Methods11['get']['query'], headers: Methods11['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods11['get']['query'], headers?: Methods11['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH9, GET, option).json(),
- $get: (option: { query: Methods11['get']['query'], headers: Methods11['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods11['get']['query'], headers?: Methods11['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH9, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods11['get']['query'] }) =>
`${prefix}${PATH9}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
@@ -373,13 +373,13 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const prefix9 = `${prefix8}${PATH11}/${val9}`
return {
- post: (option: { body: Methods25['post']['reqBody'], headers: Methods25['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix9, POST, option).json(),
- $post: (option: { body: Methods25['post']['reqBody'], headers: Methods25['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix9, POST, option).json().then(r => r.body),
- get: (option: { headers: Methods25['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods25['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix9, GET, option).json(),
- $get: (option: { headers: Methods25['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods25['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix9, GET, option).json().then(r => r.body),
$path: () => `${prefix}${prefix9}`
}
@@ -393,33 +393,33 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
return {
items: {
audio: {
- post: (option: { body: Methods27['post']['reqBody'], headers: Methods27['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH13}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods27['post']['reqBody'], headers: Methods27['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH13}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix10}${PATH13}`
},
image: {
- post: (option: { body: Methods28['post']['reqBody'], headers: Methods28['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH14}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods28['post']['reqBody'], headers: Methods28['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH14}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix10}${PATH14}`
},
video: {
- post: (option: { body: Methods29['post']['reqBody'], headers: Methods29['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH15}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods29['post']['reqBody'], headers: Methods29['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH15}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix10}${PATH15}`
},
- get: (option: { query?: Methods26['get']['query'], headers: Methods26['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { query?: Methods26['get']['query'], headers?: Methods26['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH11}`, GET, option).json(),
- $get: (option: { query?: Methods26['get']['query'], headers: Methods26['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { query?: Methods26['get']['query'], headers?: Methods26['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH11}`, GET, option).json().then(r => r.body),
- post: (option: { body: Methods26['post']['reqBody'], headers: Methods26['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH11}`, POST, option).json(),
- $post: (option: { body: Methods26['post']['reqBody'], headers: Methods26['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH11}`, POST, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods26['get']['query'] }) =>
`${prefix}${prefix10}${PATH11}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
@@ -427,32 +427,32 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
}
},
keys: {
- get: (option: { headers: Methods30['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods30['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH21, GET, option).json(),
- $get: (option: { headers: Methods30['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods30['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH21, GET, option).json().then(r => r.body),
$path: () => `${prefix}${PATH21}`
}
},
extension: {
audio: {
- post: (option: { body: Methods31['post']['reqBody'], headers: Methods31['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH22, POST, option, 'FormData').json(),
- $post: (option: { body: Methods31['post']['reqBody'], headers: Methods31['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH22, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${PATH22}`
},
image: {
- post: (option: { body: Methods32['post']['reqBody'], headers: Methods32['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH23, POST, option, 'FormData').json(),
- $post: (option: { body: Methods32['post']['reqBody'], headers: Methods32['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH23, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${PATH23}`
},
parse: {
- post: (option: { body: Methods33['post']['reqBody'], headers: Methods33['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods33['post']['reqBody'], headers?: Methods33['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH24, POST, option).json(),
- $post: (option: { body: Methods33['post']['reqBody'], headers: Methods33['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods33['post']['reqBody'], headers?: Methods33['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH24, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH24}`
},
@@ -462,89 +462,89 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
return {
audio: {
- post: (option: { body: Methods35['post']['reqBody'], headers: Methods35['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods35['post']['reqBody'], headers?: Methods35['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix11}${PATH26}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods35['post']['reqBody'], headers: Methods35['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods35['post']['reqBody'], headers?: Methods35['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix11}${PATH26}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix11}${PATH26}`
},
image: {
- post: (option: { body: Methods36['post']['reqBody'], headers: Methods36['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods36['post']['reqBody'], headers?: Methods36['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix11}${PATH27}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods36['post']['reqBody'], headers: Methods36['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods36['post']['reqBody'], headers?: Methods36['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix11}${PATH27}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix11}${PATH27}`
},
video: {
- post: (option: { body: Methods37['post']['reqBody'], headers: Methods37['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods37['post']['reqBody'], headers?: Methods37['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix11}${PATH28}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods37['post']['reqBody'], headers: Methods37['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods37['post']['reqBody'], headers?: Methods37['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix11}${PATH28}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix11}${PATH28}`
},
- post: (option: { body: Methods34['post']['reqBody'], headers: Methods34['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods34['post']['reqBody'], headers?: Methods34['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix11, POST, option, 'FormData').json(),
- $post: (option: { body: Methods34['post']['reqBody'], headers: Methods34['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods34['post']['reqBody'], headers?: Methods34['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix11, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix11}`
}
}
},
video: {
- post: (option: { body: Methods38['post']['reqBody'], headers: Methods38['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH29, POST, option, 'FormData').json(),
- $post: (option: { body: Methods38['post']['reqBody'], headers: Methods38['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH29, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${PATH29}`
}
},
fcm_token: {
- post: (option: { body: Methods39['post']['reqBody'], headers: Methods39['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods39['post']['reqBody'], headers?: Methods39['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH30, POST, option).send(),
- $post: (option: { body: Methods39['post']['reqBody'], headers: Methods39['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods39['post']['reqBody'], headers?: Methods39['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH30, POST, option).send().then(r => r.body),
$path: () => `${prefix}${PATH30}`
},
info: {
- get: (option: { headers: Methods40['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods40['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH31, GET, option).json(),
- $get: (option: { headers: Methods40['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods40['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH31, GET, option).json().then(r => r.body),
$path: () => `${prefix}${PATH31}`
},
login: {
- post: (option: { body: Methods41['post']['reqBody'], headers: Methods41['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods41['post']['reqBody'], headers?: Methods41['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH32, POST, option).json(),
- $post: (option: { body: Methods41['post']['reqBody'], headers: Methods41['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods41['post']['reqBody'], headers?: Methods41['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH32, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH32}`
},
logout: {
- post: (option: { body: Methods42['post']['reqBody'], headers: Methods42['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods42['post']['reqBody'], headers?: Methods42['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH33, POST, option).send(),
- $post: (option: { body: Methods42['post']['reqBody'], headers: Methods42['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods42['post']['reqBody'], headers?: Methods42['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH33, POST, option).send().then(r => r.body),
$path: () => `${prefix}${PATH33}`
},
me: {
- get: (option: { headers: Methods43['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods43['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH34, GET, option).json(),
- $get: (option: { headers: Methods43['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods43['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH34, GET, option).json().then(r => r.body),
$path: () => `${prefix}${PATH34}`
},
organisation: {
users: {
- get: (option: { query: Methods45['get']['query'], headers: Methods45['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods45['get']['query'], headers?: Methods45['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH36, GET, option).json(),
- $get: (option: { query: Methods45['get']['query'], headers: Methods45['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods45['get']['query'], headers?: Methods45['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH36, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods45['get']['query'] }) =>
`${prefix}${PATH36}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
},
- get: (option: { headers: Methods44['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods44['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH35, GET, option).json(),
- $get: (option: { headers: Methods44['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods44['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH35, GET, option).json().then(r => r.body),
$path: () => `${prefix}${PATH35}`
},
@@ -559,22 +559,22 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
return {
reaction: {
- post: (option: { body: Methods48['post']['reqBody'], headers: Methods48['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods48['post']['reqBody'], headers?: Methods48['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix13}${PATH38}`, POST, option).json(),
- $post: (option: { body: Methods48['post']['reqBody'], headers: Methods48['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods48['post']['reqBody'], headers?: Methods48['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix13}${PATH38}`, POST, option).json().then(r => r.body),
$path: () => `${prefix}${prefix13}${PATH38}`
},
- get: (option: { headers: Methods47['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods47['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix13, GET, option).json(),
- $get: (option: { headers: Methods47['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods47['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix13, GET, option).json().then(r => r.body),
$path: () => `${prefix}${prefix13}`
}
},
- get: (option: { query: Methods46['get']['query'], headers: Methods46['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods46['get']['query'], headers?: Methods46['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix12}${PATH11}`, GET, option).json(),
- $get: (option: { query: Methods46['get']['query'], headers: Methods46['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods46['get']['query'], headers?: Methods46['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix12}${PATH11}`, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods46['get']['query'] }) =>
`${prefix}${prefix12}${PATH11}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
@@ -587,23 +587,23 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const prefix14 = `${PATH39}/${val14}`
return {
- get: (option: { headers: Methods50['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods50['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix14, GET, option).json(),
- $get: (option: { headers: Methods50['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods50['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix14, GET, option).json().then(r => r.body),
$path: () => `${prefix}${prefix14}`
}
},
profile: {
- put: (option: { body: Methods51['put']['reqBody'], headers: Methods51['put']['reqHeaders'], config?: T }) =>
+ put: (option: { body: Methods51['put']['reqBody'], headers?: Methods51['put']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH40, PUT, option, 'FormData').send(),
- $put: (option: { body: Methods51['put']['reqBody'], headers: Methods51['put']['reqHeaders'], config?: T }) =>
+ $put: (option: { body: Methods51['put']['reqBody'], headers?: Methods51['put']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH40, PUT, option, 'FormData').send().then(r => r.body),
$path: () => `${prefix}${PATH40}`
},
- get: (option: { headers: Methods49['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods49['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH39, GET, option).json(),
- $get: (option: { headers: Methods49['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods49['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH39, GET, option).json().then(r => r.body),
$path: () => `${prefix}${PATH39}`
}
diff --git a/samples/openapi/api/$api.ts b/samples/openapi/api/$api.ts
index 5bd7d027..bb3e6d15 100644
--- a/samples/openapi/api/$api.ts
+++ b/samples/openapi/api/$api.ts
@@ -200,9 +200,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
},
v3: {
$2fa: {
- post: (option: { body: Methods10['post']['reqBody'], headers: Methods10['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH8, POST, option).json(),
- $post: (option: { body: Methods10['post']['reqBody'], headers: Methods10['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH8, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH8}`
},
@@ -221,9 +221,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const prefix5 = `${prefix4}${PATH11}/${val5}`
return {
- post: (option: { body: Methods12['post']['reqBody'], headers: Methods12['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix5, POST, option).json(),
- $post: (option: { body: Methods12['post']['reqBody'], headers: Methods12['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix5, POST, option).json().then(r => r.body),
$path: () => `${prefix}${prefix5}`
}
@@ -233,9 +233,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
}
},
news_feed: {
- get: (option: { query: Methods13['get']['query'], headers: Methods13['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods13['get']['query'], headers?: Methods13['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix3}${PATH12}`, GET, option).json(),
- $get: (option: { query: Methods13['get']['query'], headers: Methods13['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods13['get']['query'], headers?: Methods13['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix3}${PATH12}`, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods13['get']['query'] }) =>
`${prefix}${prefix3}${PATH12}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
@@ -253,111 +253,111 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
return {
items: {
audio: {
- post: (option: { body: Methods18['post']['reqBody'], headers: Methods18['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH13}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods18['post']['reqBody'], headers: Methods18['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH13}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix7}${PATH13}`
},
image: {
- post: (option: { body: Methods19['post']['reqBody'], headers: Methods19['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH14}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods19['post']['reqBody'], headers: Methods19['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH14}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix7}${PATH14}`
},
video: {
- post: (option: { body: Methods20['post']['reqBody'], headers: Methods20['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods20['post']['reqBody'], headers?: Methods20['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH15}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods20['post']['reqBody'], headers: Methods20['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods20['post']['reqBody'], headers?: Methods20['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH15}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix7}${PATH15}`
},
- get: (option: { query: Methods17['get']['query'], headers: Methods17['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods17['get']['query'], headers?: Methods17['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH11}`, GET, option).json(),
- $get: (option: { query: Methods17['get']['query'], headers: Methods17['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods17['get']['query'], headers?: Methods17['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH11}`, GET, option).json().then(r => r.body),
- post: (option: { body: Methods17['post']['reqBody'], headers: Methods17['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH11}`, POST, option).json(),
- $post: (option: { body: Methods17['post']['reqBody'], headers: Methods17['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH11}`, POST, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods17['get']['query'] }) =>
`${prefix}${prefix7}${PATH11}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
},
itemslist: {
- get: (option: { query: Methods21['get']['query'], headers: Methods21['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods21['get']['query'], headers?: Methods21['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH16}`, GET, option).json(),
- $get: (option: { query: Methods21['get']['query'], headers: Methods21['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods21['get']['query'], headers?: Methods21['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH16}`, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods21['get']['query'] }) =>
`${prefix}${prefix7}${PATH16}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
},
users: {
remove: {
- post: (option: { body: Methods23['post']['reqBody'], headers: Methods23['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH18}`, POST, option).send(),
- $post: (option: { body: Methods23['post']['reqBody'], headers: Methods23['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH18}`, POST, option).send().then(r => r.body),
$path: () => `${prefix}${prefix7}${PATH18}`
},
- get: (option: { headers: Methods22['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods22['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH17}`, GET, option).json(),
- $get: (option: { headers: Methods22['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods22['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH17}`, GET, option).json().then(r => r.body),
- post: (option: { body: Methods22['post']['reqBody'], headers: Methods22['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH17}`, POST, option).send(),
- $post: (option: { body: Methods22['post']['reqBody'], headers: Methods22['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH17}`, POST, option).send().then(r => r.body),
- put: (option: { body: Methods22['put']['reqBody'], headers: Methods22['put']['reqHeaders'], config?: T }) =>
+ put: (option: { body: Methods22['put']['reqBody'], headers?: Methods22['put']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH17}`, PUT, option).send(),
- $put: (option: { body: Methods22['put']['reqBody'], headers: Methods22['put']['reqHeaders'], config?: T }) =>
+ $put: (option: { body: Methods22['put']['reqBody'], headers?: Methods22['put']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix7}${PATH17}`, PUT, option).send().then(r => r.body),
$path: () => `${prefix}${prefix7}${PATH17}`
},
- get: (option: { headers: Methods16['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods16['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix7, GET, option).json(),
- $get: (option: { headers: Methods16['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods16['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix7, GET, option).json().then(r => r.body),
- put: (option: { body: Methods16['put']['reqBody'], headers: Methods16['put']['reqHeaders'], config?: T }) =>
+ put: (option: { body: Methods16['put']['reqBody'], headers?: Methods16['put']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix7, PUT, option).send(),
- $put: (option: { body: Methods16['put']['reqBody'], headers: Methods16['put']['reqHeaders'], config?: T }) =>
+ $put: (option: { body: Methods16['put']['reqBody'], headers?: Methods16['put']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix7, PUT, option).send().then(r => r.body),
- delete: (option: { headers: Methods16['delete']['reqHeaders'], config?: T }) =>
+ delete: (option?: { headers?: Methods16['delete']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix7, DELETE, option).send(),
- $delete: (option: { headers: Methods16['delete']['reqHeaders'], config?: T }) =>
+ $delete: (option?: { headers?: Methods16['delete']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix7, DELETE, option).send().then(r => r.body),
$path: () => `${prefix}${prefix7}`
}
},
- get: (option: { headers: Methods15['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods15['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix6}${PATH10}`, GET, option).json(),
- $get: (option: { headers: Methods15['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods15['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix6}${PATH10}`, GET, option).json().then(r => r.body),
- post: (option: { body: Methods15['post']['reqBody'], headers: Methods15['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix6}${PATH10}`, POST, option).json(),
- $post: (option: { body: Methods15['post']['reqBody'], headers: Methods15['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix6}${PATH10}`, POST, option).json().then(r => r.body),
$path: () => `${prefix}${prefix6}${PATH10}`
},
notifications: {
- get: (option: { query: Methods24['get']['query'], headers: Methods24['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods24['get']['query'], headers?: Methods24['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix6}${PATH19}`, GET, option).json(),
- $get: (option: { query: Methods24['get']['query'], headers: Methods24['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods24['get']['query'], headers?: Methods24['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix6}${PATH19}`, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods24['get']['query'] }) =>
`${prefix}${prefix6}${PATH19}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
},
- get: (option: { query: Methods14['get']['query'], headers: Methods14['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods14['get']['query'], headers?: Methods14['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix6, GET, option).send(),
- $get: (option: { query: Methods14['get']['query'], headers: Methods14['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods14['get']['query'], headers?: Methods14['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix6, GET, option).send().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods14['get']['query'] }) =>
`${prefix}${prefix6}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
}
},
- get: (option: { query: Methods11['get']['query'], headers: Methods11['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods11['get']['query'], headers?: Methods11['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH9, GET, option).json(),
- $get: (option: { query: Methods11['get']['query'], headers: Methods11['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods11['get']['query'], headers?: Methods11['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH9, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods11['get']['query'] }) =>
`${prefix}${PATH9}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
@@ -372,13 +372,13 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const prefix9 = `${prefix8}${PATH11}/${val9}`
return {
- post: (option: { body: Methods25['post']['reqBody'], headers: Methods25['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix9, POST, option).json(),
- $post: (option: { body: Methods25['post']['reqBody'], headers: Methods25['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix9, POST, option).json().then(r => r.body),
- get: (option: { headers: Methods25['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods25['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix9, GET, option).json(),
- $get: (option: { headers: Methods25['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods25['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix9, GET, option).json().then(r => r.body),
$path: () => `${prefix}${prefix9}`
}
@@ -392,33 +392,33 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
return {
items: {
audio: {
- post: (option: { body: Methods27['post']['reqBody'], headers: Methods27['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH13}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods27['post']['reqBody'], headers: Methods27['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH13}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix10}${PATH13}`
},
image: {
- post: (option: { body: Methods28['post']['reqBody'], headers: Methods28['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH14}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods28['post']['reqBody'], headers: Methods28['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH14}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix10}${PATH14}`
},
video: {
- post: (option: { body: Methods29['post']['reqBody'], headers: Methods29['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH15}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods29['post']['reqBody'], headers: Methods29['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH15}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix10}${PATH15}`
},
- get: (option: { query?: Methods26['get']['query'], headers: Methods26['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { query?: Methods26['get']['query'], headers?: Methods26['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH11}`, GET, option).json(),
- $get: (option: { query?: Methods26['get']['query'], headers: Methods26['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { query?: Methods26['get']['query'], headers?: Methods26['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH11}`, GET, option).json().then(r => r.body),
- post: (option: { body: Methods26['post']['reqBody'], headers: Methods26['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH11}`, POST, option).json(),
- $post: (option: { body: Methods26['post']['reqBody'], headers: Methods26['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix10}${PATH11}`, POST, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods26['get']['query'] }) =>
`${prefix}${prefix10}${PATH11}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
@@ -426,32 +426,32 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
}
},
keys: {
- get: (option: { headers: Methods30['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods30['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH21, GET, option).json(),
- $get: (option: { headers: Methods30['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods30['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH21, GET, option).json().then(r => r.body),
$path: () => `${prefix}${PATH21}`
}
},
extension: {
audio: {
- post: (option: { body: Methods31['post']['reqBody'], headers: Methods31['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH22, POST, option, 'FormData').json(),
- $post: (option: { body: Methods31['post']['reqBody'], headers: Methods31['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH22, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${PATH22}`
},
image: {
- post: (option: { body: Methods32['post']['reqBody'], headers: Methods32['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH23, POST, option, 'FormData').json(),
- $post: (option: { body: Methods32['post']['reqBody'], headers: Methods32['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH23, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${PATH23}`
},
parse: {
- post: (option: { body: Methods33['post']['reqBody'], headers: Methods33['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods33['post']['reqBody'], headers?: Methods33['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH24, POST, option).json(),
- $post: (option: { body: Methods33['post']['reqBody'], headers: Methods33['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods33['post']['reqBody'], headers?: Methods33['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH24, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH24}`
},
@@ -461,89 +461,89 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
return {
audio: {
- post: (option: { body: Methods35['post']['reqBody'], headers: Methods35['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods35['post']['reqBody'], headers?: Methods35['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix11}${PATH26}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods35['post']['reqBody'], headers: Methods35['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods35['post']['reqBody'], headers?: Methods35['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix11}${PATH26}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix11}${PATH26}`
},
image: {
- post: (option: { body: Methods36['post']['reqBody'], headers: Methods36['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods36['post']['reqBody'], headers?: Methods36['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix11}${PATH27}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods36['post']['reqBody'], headers: Methods36['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods36['post']['reqBody'], headers?: Methods36['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix11}${PATH27}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix11}${PATH27}`
},
video: {
- post: (option: { body: Methods37['post']['reqBody'], headers: Methods37['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods37['post']['reqBody'], headers?: Methods37['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix11}${PATH28}`, POST, option, 'FormData').json(),
- $post: (option: { body: Methods37['post']['reqBody'], headers: Methods37['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods37['post']['reqBody'], headers?: Methods37['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix11}${PATH28}`, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix11}${PATH28}`
},
- post: (option: { body: Methods34['post']['reqBody'], headers: Methods34['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods34['post']['reqBody'], headers?: Methods34['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix11, POST, option, 'FormData').json(),
- $post: (option: { body: Methods34['post']['reqBody'], headers: Methods34['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods34['post']['reqBody'], headers?: Methods34['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix11, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${prefix11}`
}
}
},
video: {
- post: (option: { body: Methods38['post']['reqBody'], headers: Methods38['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH29, POST, option, 'FormData').json(),
- $post: (option: { body: Methods38['post']['reqBody'], headers: Methods38['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH29, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${PATH29}`
}
},
fcm_token: {
- post: (option: { body: Methods39['post']['reqBody'], headers: Methods39['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods39['post']['reqBody'], headers?: Methods39['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH30, POST, option).send(),
- $post: (option: { body: Methods39['post']['reqBody'], headers: Methods39['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods39['post']['reqBody'], headers?: Methods39['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH30, POST, option).send().then(r => r.body),
$path: () => `${prefix}${PATH30}`
},
info: {
- get: (option: { headers: Methods40['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods40['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH31, GET, option).json(),
- $get: (option: { headers: Methods40['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods40['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH31, GET, option).json().then(r => r.body),
$path: () => `${prefix}${PATH31}`
},
login: {
- post: (option: { body: Methods41['post']['reqBody'], headers: Methods41['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods41['post']['reqBody'], headers?: Methods41['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH32, POST, option).json(),
- $post: (option: { body: Methods41['post']['reqBody'], headers: Methods41['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods41['post']['reqBody'], headers?: Methods41['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH32, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH32}`
},
logout: {
- post: (option: { body: Methods42['post']['reqBody'], headers: Methods42['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods42['post']['reqBody'], headers?: Methods42['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH33, POST, option).send(),
- $post: (option: { body: Methods42['post']['reqBody'], headers: Methods42['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods42['post']['reqBody'], headers?: Methods42['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH33, POST, option).send().then(r => r.body),
$path: () => `${prefix}${PATH33}`
},
me: {
- get: (option: { headers: Methods43['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods43['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH34, GET, option).json(),
- $get: (option: { headers: Methods43['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods43['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH34, GET, option).json().then(r => r.body),
$path: () => `${prefix}${PATH34}`
},
organisation: {
users: {
- get: (option: { query: Methods45['get']['query'], headers: Methods45['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods45['get']['query'], headers?: Methods45['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH36, GET, option).json(),
- $get: (option: { query: Methods45['get']['query'], headers: Methods45['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods45['get']['query'], headers?: Methods45['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH36, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods45['get']['query'] }) =>
`${prefix}${PATH36}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
},
- get: (option: { headers: Methods44['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods44['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH35, GET, option).json(),
- $get: (option: { headers: Methods44['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods44['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH35, GET, option).json().then(r => r.body),
$path: () => `${prefix}${PATH35}`
},
@@ -558,22 +558,22 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
return {
reaction: {
- post: (option: { body: Methods48['post']['reqBody'], headers: Methods48['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods48['post']['reqBody'], headers?: Methods48['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix13}${PATH38}`, POST, option).json(),
- $post: (option: { body: Methods48['post']['reqBody'], headers: Methods48['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods48['post']['reqBody'], headers?: Methods48['post']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix13}${PATH38}`, POST, option).json().then(r => r.body),
$path: () => `${prefix}${prefix13}${PATH38}`
},
- get: (option: { headers: Methods47['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods47['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix13, GET, option).json(),
- $get: (option: { headers: Methods47['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods47['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix13, GET, option).json().then(r => r.body),
$path: () => `${prefix}${prefix13}`
}
},
- get: (option: { query: Methods46['get']['query'], headers: Methods46['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods46['get']['query'], headers?: Methods46['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix12}${PATH11}`, GET, option).json(),
- $get: (option: { query: Methods46['get']['query'], headers: Methods46['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods46['get']['query'], headers?: Methods46['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix12}${PATH11}`, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods46['get']['query'] }) =>
`${prefix}${prefix12}${PATH11}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
@@ -586,23 +586,23 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const prefix14 = `${PATH39}/${val14}`
return {
- get: (option: { headers: Methods50['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods50['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix14, GET, option).json(),
- $get: (option: { headers: Methods50['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods50['get']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix14, GET, option).json().then(r => r.body),
$path: () => `${prefix}${prefix14}`
}
},
profile: {
- put: (option: { body: Methods51['put']['reqBody'], headers: Methods51['put']['reqHeaders'], config?: T }) =>
+ put: (option: { body: Methods51['put']['reqBody'], headers?: Methods51['put']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH40, PUT, option, 'FormData').send(),
- $put: (option: { body: Methods51['put']['reqBody'], headers: Methods51['put']['reqHeaders'], config?: T }) =>
+ $put: (option: { body: Methods51['put']['reqBody'], headers?: Methods51['put']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH40, PUT, option, 'FormData').send().then(r => r.body),
$path: () => `${prefix}${PATH40}`
},
- get: (option: { headers: Methods49['get']['reqHeaders'], config?: T }) =>
+ get: (option?: { headers?: Methods49['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH39, GET, option).json(),
- $get: (option: { headers: Methods49['get']['reqHeaders'], config?: T }) =>
+ $get: (option?: { headers?: Methods49['get']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH39, GET, option).json().then(r => r.body),
$path: () => `${prefix}${PATH39}`
}
diff --git a/samples/openapi/api/v3/$api.ts b/samples/openapi/api/v3/$api.ts
index 9367495d..a5093643 100644
--- a/samples/openapi/api/v3/$api.ts
+++ b/samples/openapi/api/v3/$api.ts
@@ -85,9 +85,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
return {
$2fa: {
- post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH0, POST, option).json(),
- $post: (option: { body: Methods0['post']['reqBody'], headers: Methods0['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods0['post']['reqBody'], headers?: Methods0['post']['reqHeaders'], config?: T }) =>
fetch(prefix, PATH0, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH0}`
},
@@ -106,9 +106,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const prefix2 = `${prefix1}${PATH3}/${val2}`
return {
- post: (option: { body: Methods2['post']['reqBody'], headers: Methods2['post']['reqHeaders'], config?: T }) =>
+ post: (option: { body: Methods2['post']['reqBody'], headers?: Methods2['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix2, POST, option).json(),
- $post: (option: { body: Methods2['post']['reqBody'], headers: Methods2['post']['reqHeaders'], config?: T }) =>
+ $post: (option: { body: Methods2['post']['reqBody'], headers?: Methods2['post']['reqHeaders'], config?: T }) =>
fetch(prefix, prefix2, POST, option).json().then(r => r.body),
$path: () => `${prefix}${prefix2}`
}
@@ -118,9 +118,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
}
},
news_feed: {
- get: (option: { query: Methods3['get']['query'], headers: Methods3['get']['reqHeaders'], config?: T }) =>
+ get: (option: { query: Methods3['get']['query'], headers?: Methods3['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix0}${PATH4}`, GET, option).json(),
- $get: (option: { query: Methods3['get']['query'], headers: Methods3['get']['reqHeaders'], config?: T }) =>
+ $get: (option: { query: Methods3['get']['query'], headers?: Methods3['get']['reqHeaders'], config?: T }) =>
fetch(prefix, `${prefix0}${PATH4}`, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods3['get']['query'] }) =>
`${prefix}${prefix0}${PATH4}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
@@ -138,111 +138,111 @@ const api = ({ baseURL, fetch }: AspidaClient