diff --git a/CHANGELOG.md b/CHANGELOG.md
index f848daf9..4d78d2a8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,17 @@
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.13.0](https://github.com/aspida/openapi2aspida/compare/v0.12.0...v0.13.0) (2020-11-14)
+
+
+### ⚠ BREAKING CHANGES
+
+* change property without required to strict
+
+### Features
+
+* change property without required to strict ([8452b49](https://github.com/aspida/openapi2aspida/commit/8452b49aeb20a6c053990d70df8a9ea269faa84f))
+
## [0.12.0](https://github.com/aspida/openapi2aspida/compare/v0.11.0...v0.12.0) (2020-11-07)
diff --git a/README.md b/README.md
index c74cc3a7..db40ae6d 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,10 @@
+## Breaking change (2020/11/14) :warning:
+
+Since openapi2aspida >= `0.13.0` , optional for aspida only if the 'required' property of OpenAPI is set to `false`.
+
## Getting Started
Compatible with yaml/json of OpenAPI3.0/Swagger2.0
diff --git a/__tests__/index.spec.ts b/__tests__/index.spec.ts
index a5b59995..6b82a68b 100644
--- a/__tests__/index.spec.ts
+++ b/__tests__/index.spec.ts
@@ -1,6 +1,18 @@
import fs from 'fs'
import { ConfigFile } from '../src/getConfig'
import build from '../src'
+import path from 'path'
+
+function readDirRecursive(dirPath: string): string[] {
+ return fs
+ .readdirSync(dirPath, { withFileTypes: true })
+ .map(file =>
+ file.isDirectory()
+ ? readDirRecursive(path.join(dirPath, file.name))
+ : [path.join(dirPath, file.name)]
+ )
+ .reduce((acc, x) => acc.concat(x), [])
+}
describe('cli test', () => {
beforeAll(() => fs.mkdirSync('_samples'))
@@ -16,9 +28,11 @@ describe('cli test', () => {
input: `_${config.input}`
})[0]
- expect(fs.readFileSync(`_${config.input}/$api.ts`, 'utf8')).toBe(
- fs.readFileSync(`${config.input}/$api.ts`, 'utf8').replace(/\r/g, '')
- )
+ for (const filePath of readDirRecursive(config.input)) {
+ expect(fs.readFileSync(`_${filePath}`, 'utf8')).toBe(
+ fs.readFileSync(filePath, 'utf8').replace(/\r/g, '')
+ )
+ }
})
)
})
diff --git a/package.json b/package.json
index 3d03d5a9..a4270617 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "openapi2aspida",
- "version": "0.12.0",
+ "version": "0.13.0",
"description": "Convert OpenAPI 3.0 or Swagger 2.0 definitions into aspida",
"author": "Solufa ",
"license": "MIT",
@@ -93,10 +93,10 @@
"devDependencies": {
"@types/jest": "^26.0.15",
"@types/js-yaml": "^3.12.5",
- "@types/minimist": "^1.2.0",
- "@typescript-eslint/eslint-plugin": "^4.6.1",
- "@typescript-eslint/parser": "^4.6.1",
- "eslint": "^7.12.1",
+ "@types/minimist": "^1.2.1",
+ "@typescript-eslint/eslint-plugin": "^4.7.0",
+ "@typescript-eslint/parser": "^4.7.0",
+ "eslint": "^7.13.0",
"eslint-config-prettier": "^6.15.0",
"eslint-config-standard": "^16.0.1",
"eslint-plugin-import": "^2.22.1",
@@ -104,11 +104,11 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-promise": "^4.2.1",
- "eslint-plugin-standard": "^4.0.2",
+ "eslint-plugin-standard": "^4.1.0",
"jest": "^26.6.3",
"prettier": "^2.1.2",
"standard-version": "^9.0.0",
- "ts-jest": "^26.4.3",
+ "ts-jest": "^26.4.4",
"typescript": "^4.0.5"
}
}
diff --git a/samples/docs.baikalplatform.com/common/v2.2/common.json b/samples/docs.baikalplatform.com/common/v2.2/common.json
new file mode 100644
index 00000000..9d04c647
--- /dev/null
+++ b/samples/docs.baikalplatform.com/common/v2.2/common.json
@@ -0,0 +1 @@
+{"info":{"description":"Common data for 4th Platform APIs","version":"2.2.1","title":"Common data for 4th Platform APIs","termsOfService":"https://www.telefonica.es/es/","contact":{"name":"4th Platform Team","email":"4pf@tid.es"}},"definitions":{"MoneyAmount":{"type":"object","description":"Money amount","required":["value","currency"],"properties":{"value":{"type":"number","format":"float","multipleOf":0.01,"description":"Amount value"},"currency":{"type":"string","description":"Currency code in which the amount is expressed. ISO 4217"},"tax_included":{"type":"boolean","description":"true if the amount includes government taxes","default":false}}},"Address":{"type":"object","description":"User's address information","required":["formatted"],"properties":{"formatted":{"type":"string","description":"Full address, formatted for display"},"street_address":{"type":"string","description":"Address information"},"postal_code":{"type":"string","description":"Postal code associated to the address"},"locality":{"type":"string","description":"City or locality where the user lives"},"country":{"type":"string","description":"Country name. Format iso3166-1"}}},"IdDocument":{"type":"object","description":"User legal id document information","required":["country","type","value"],"properties":{"country":{"type":"string","description":"Country of issuance of the id_document. Format iso3166-1"},"type":{"type":"string","description":"Type of document (e.g. passport)"},"value":{"type":"string","description":"Id number associated to the id_document"}}},"CommonQuota":{"type":"object","description":"Quota common information","required":["id","name","categories","start_date","max","consumed","remaining"],"properties":{"id":{"type":"string","description":"Unique identifier of this quota.\n This is a unique id, i.e.: it's the instantiation for a user of a mobile/landline/internet plan charactericic, voucher, etc."},"name":{"type":"string","description":"Name of this quota. User Friendly field."},"description":{"type":"string","description":"Description of this quota. User Friendly field."},"categories":{"type":"array","description":"List of categories of a quota","items":{"$ref":"#/definitions/QuotaCategory"}},"start_date":{"type":"string","description":"start UTC time for the application of the quota","format":"date-time"},"end_date":{"type":"string","description":"end UTC time for the application of the quota. Will not appear for quotas that never expire","format":"date-time"},"active":{"type":"boolean","description":"Whether the quota is active or is currently inhibited","default":true},"max":{"type":"number","description":"maximum amount allowed by current quota. -1 is interpreted as there is no limit","format":"decimal"},"consumed":{"type":"number","description":"amount already consumed of current quota by this phone_number (as identified in the request URL)","format":"decimal"},"remaining":{"type":"number","description":"amount remaining of the quota. -1 when quota is unlimited","format":"decimal"},"is_shared":{"type":"boolean","description":"whether this quota is shared with other lines or not","default":false},"tags":{"type":"array","description":"list of freely defined strings that tag the quota based on some criteria","items":{"type":"string"}}}},"QuotaDestination":{"type":"string","description":"Destinations for which the quota applies. Multiples values must be understood as logical OR.\n Possible values are restricted to country values indicated in ISO 3166-1 alfa-2 and a list of enumerated values indicating 'telefonica', 'non-telefonica', 'rural', 'local', 'regional', 'national', 'international', 'mobile', 'landline', 'any'.","pattern":"^(telefonica|non-telefonica|rural|local|regional|national|international|mobile|landline|any|[A-Z]{2})$","default":["national"]},"QuotaCategory":{"type":"string","enum":["general","promotion","voucher","application","pay_per_use"],"default":"general"},"QuotaTimeBand":{"type":"string","description":"Timebands when the quota applies. Multiples values must be understood as logical OR","enum":["day","night","morning","evening","weekends","workdays","all"],"default":["all"]}},"parameters":{"x-correlator":{"in":"header","name":"x-correlator","type":"string","required":false,"description":"Correlation id for the different services"},"ID":{"in":"path","name":"id","type":"string","required":true,"description":"Resource identifier"},"Page":{"name":"page","in":"query","description":"Requested page number for pagination purpose. If not included, page 1 is returned.","required":false,"type":"integer","format":"int32","default":1},"PerPage":{"name":"per_page","in":"query","description":"Number of element per page. If not included, a default number of 100 elements per page are returned.","required":false,"type":"integer","format":"int32","default":100},"QuotaCategories":{"name":"categories","description":"List of wanted categories separated by commas","in":"query","required":false,"type":"array","items":{"type":"string","enum":["general","promotion","voucher","application","pay_per_use"]}}}}
\ No newline at end of file
diff --git a/samples/docs.baikalplatform.com/errors/v2.0/errors.json b/samples/docs.baikalplatform.com/errors/v2.0/errors.json
new file mode 100644
index 00000000..e40580d2
--- /dev/null
+++ b/samples/docs.baikalplatform.com/errors/v2.0/errors.json
@@ -0,0 +1 @@
+{"info":{"description":"Common errors for 4th Platform APIs","version":"2.0.2","title":"Common errors for 4th Platform APIs","termsOfService":"https://www.telefonica.es/es/","contact":{"name":"4th Platform Team","email":"4pf@tid.es"}},"definitions":{"ModelError":{"type":"object","required":["message"],"properties":{"message":{"type":"string","description":"A human readable description of what the event represent"}}},"InvalidArgument":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["INVALID_ARGUMENT"],"default":"INVALID_ARGUMENT","description":"Client specified an invalid argument, request body or query param."}}},{"$ref":"#/definitions/ModelError"}]},"Conflict":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["CONFLICT"],"default":"CONFLICT","description":"A specified resource duplicate entry found"}}},{"$ref":"#/definitions/ModelError"}]},"FailedPrecondition":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["FAILED_PRECONDITION"],"default":"FAILED_PRECONDITION","description":"Request cannot be executed in the current system state."}}},{"$ref":"#/definitions/ModelError"}]},"OutOfRange":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["OUT_OF_RANGE"],"default":"OUT_OF_RANGE","description":"Client specified an invalid range"}}},{"$ref":"#/definitions/ModelError"}]},"Unauthenticated":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["UNAUTHENTICATED"],"default":"UNAUTHENTICATED","description":"Request not authenticated due to missing, invalid, or expired credentials."}}},{"$ref":"#/definitions/ModelError"}]},"PermissionDenied":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["PERMISSION_DENIED"],"default":"PERMISSION_DENIED","description":"Client does not have sufficient permissions to perform this action."}}},{"$ref":"#/definitions/ModelError"}]},"NotFound":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["NOT_FOUND"],"default":"NOT_FOUND","description":"The specified resource is not found"}}},{"$ref":"#/definitions/ModelError"}]},"Aborted":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["ABORTED"],"default":"ABORTED","description":"Concurrency conflict."}}},{"$ref":"#/definitions/ModelError"}]},"AlreadyExists":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["ALREADY_EXISTS"],"default":"ALREADY_EXISTS","description":"The resource that a client tried to create already exists."}}},{"$ref":"#/definitions/ModelError"}]},"TooManyRequests":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"default":"TOO_MANY_REQUESTS","description":"Either out of resource quota or reaching rate limiting."}}},{"$ref":"#/definitions/ModelError"}]},"DataLoss":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["DATA_LOSS"],"default":"DATA_LOSS","description":"Unrecoverable data loss or data corruption."}}},{"$ref":"#/definitions/ModelError"}]},"Internal":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["INTERNAL"],"default":"INTERNAL","description":"Unknown server error.Typically a server bug."}}},{"$ref":"#/definitions/ModelError"}]},"BadGateway":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BAD_GATEWAY"],"default":"BAD_GATEWAY","description":"Couldn't reach an upstream internal service."}}},{"$ref":"#/definitions/ModelError"}]},"Unavailable":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["UNAVAILABLE"],"default":"UNAVAILABLE","description":"Request timeout exceeded"}}},{"$ref":"#/definitions/ModelError"}]},"Timeout":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["TIMEOUT"],"default":"TIMEOUT","description":"Request timeout exceeded"}}},{"$ref":"#/definitions/ModelError"}]},"NotImplemented":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["NOT_IMPLEMENTED"],"default":"NOT_IMPLEMENTED","description":"This functionality is not implemented yet"}}},{"$ref":"#/definitions/ModelError"}]},"AuthenticationRequired":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["AUTHENTICATION_REQUIRED"],"default":"AUTHENTICATION_REQUIRED","description":"New authentication is required"}}},{"$ref":"#/definitions/ModelError"}]},"NotFoundAndOutOfRange":{"allOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["NOT_FOUND","OUT_OF_RANGE"],"default":"NOT_FOUND","description":"Not found."}}},{"$ref":"#/definitions/ModelError"}]}}}
\ No newline at end of file
diff --git a/samples/externals.json b/samples/externals.json
index 697824cd..d1db21a8 100644
--- a/samples/externals.json
+++ b/samples/externals.json
@@ -69,7 +69,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -93,7 +93,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -117,7 +117,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -138,7 +138,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
},
"examples": {
"response": {
@@ -162,7 +162,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -181,7 +181,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -256,7 +256,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -280,7 +280,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -304,7 +304,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -325,7 +325,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
},
"examples": {
"response": {
@@ -349,7 +349,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -368,7 +368,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -438,7 +438,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -462,7 +462,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -486,7 +486,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -507,7 +507,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
},
"examples": {
"response": {
@@ -531,7 +531,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -550,7 +550,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -636,7 +636,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -660,7 +660,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -684,7 +684,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -705,7 +705,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -724,7 +724,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -794,7 +794,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -818,7 +818,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -842,7 +842,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -863,7 +863,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
},
"examples": {
"response": {
@@ -887,7 +887,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -906,7 +906,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -997,7 +997,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -1021,7 +1021,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -1045,7 +1045,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -1066,7 +1066,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -1085,7 +1085,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -1158,7 +1158,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -1182,7 +1182,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -1206,7 +1206,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -1227,7 +1227,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
},
"examples": {
"response": {
@@ -1251,7 +1251,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -1270,7 +1270,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -1469,7 +1469,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -1493,7 +1493,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -1517,7 +1517,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -1538,7 +1538,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -1557,7 +1557,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -1627,7 +1627,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -1651,7 +1651,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -1675,7 +1675,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -1696,7 +1696,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
},
"examples": {
"response": {
@@ -1720,7 +1720,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -1739,7 +1739,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -1843,7 +1843,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -1867,7 +1867,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -1891,7 +1891,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -1912,7 +1912,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -1931,7 +1931,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -2004,7 +2004,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -2028,7 +2028,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -2052,7 +2052,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -2073,7 +2073,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/AlreadyExists"
},
"examples": {
"response": {
@@ -2097,7 +2097,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -2116,7 +2116,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -2185,7 +2185,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -2209,7 +2209,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -2233,7 +2233,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -2254,7 +2254,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -2273,7 +2273,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -2361,7 +2361,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -2385,7 +2385,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -2409,7 +2409,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -2430,7 +2430,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -2449,7 +2449,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -2540,7 +2540,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/InvalidArgument"
},
"examples": {
"response": {
@@ -2564,7 +2564,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/PermissionDenied"
},
"examples": {
"response": {
@@ -2588,7 +2588,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/NotFound"
},
"examples": {
"response": {
@@ -2609,7 +2609,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Internal"
},
"examples": {
"response": { "value": { "code": "INTERNAL", "message": "Server error" } }
@@ -2628,7 +2628,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "https://docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
+ "$ref": "docs.baikalplatform.com/errors/v2.0/errors.json#/definitions/Timeout"
},
"examples": {
"response": {
@@ -3103,7 +3103,7 @@
"pattern": "^(day|week|month|year|\\d{1,4}-(days|hours))$"
},
"amount": {
- "$ref": "https://docs.baikalplatform.com/common/v2.2/common.json#/definitions/MoneyAmount"
+ "$ref": "docs.baikalplatform.com/common/v2.2/common.json#/definitions/MoneyAmount"
},
"tax": {
"type": "number",
diff --git a/samples/externals/@types.ts b/samples/externals/@types.ts
index 4b952471..7b39331f 100644
--- a/samples/externals/@types.ts
+++ b/samples/externals/@types.ts
@@ -63,7 +63,7 @@ export type SubscriptionType = 'prepaid' | 'postpaid' | 'control'
export type ProductType = 'mobile' | 'landline' | 'internet' | 'iptv' | 'bundle' | 'device' | 'voucher' | 'value_added_service' | 'bolt-on' | 'dth'
export type OfferedProduct = Product & {
- sub_products?: OfferedProduct[]
+ sub_products: OfferedProduct[]
}
export type SubscribedProduct = Product & {
@@ -77,9 +77,9 @@ export type SubscribedProduct = Product & {
}
export type Quotas = {
- data?: DataQuota[]
- voice?: VoiceQuota[]
- sms?: SmsQuota[]
+ data: DataQuota[]
+ voice: VoiceQuota[]
+ sms: SmsQuota[]
}
export type CommonQuota = {
diff --git a/samples/freee/$api.ts b/samples/freee/$api.ts
index 956ab9e9..3e30c0b9 100644
--- a/samples/freee/$api.ts
+++ b/samples/freee/$api.ts
@@ -152,9 +152,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
$path: () => `${prefix}${prefix1}`
}
},
- get: (option?: { query?: Methods2['get']['query'], config?: T }) =>
+ get: (option: { query: Methods2['get']['query'], config?: T }) =>
fetch(prefix, PATH1, GET, option).json(),
- $get: (option?: { query?: Methods2['get']['query'], config?: T }) =>
+ $get: (option: { query: Methods2['get']['query'], config?: T }) =>
fetch(prefix, PATH1, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods2['get']['query'] }) =>
`${prefix}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
@@ -164,9 +164,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const prefix2 = `${PATH2}/${val2}`
return {
- get: (option?: { query?: Methods5['get']['query'], config?: T }) =>
+ get: (option: { query: Methods5['get']['query'], config?: T }) =>
fetch(prefix, prefix2, GET, option).json(),
- $get: (option?: { query?: Methods5['get']['query'], config?: T }) =>
+ $get: (option: { query: Methods5['get']['query'], config?: T }) =>
fetch(prefix, prefix2, GET, option).json().then(r => r.body),
put: (option?: { body?: Methods5['put']['reqBody'], config?: T }) =>
fetch(prefix, prefix2, PUT, option, 'URLSearchParams').json(),
@@ -804,9 +804,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
`${prefix}${PATH35}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
},
me: {
- get: (option?: { query?: Methods53['get']['query'], config?: T }) =>
+ get: (option: { query: Methods53['get']['query'], config?: T }) =>
fetch(prefix, PATH36, GET, option).json(),
- $get: (option?: { query?: Methods53['get']['query'], config?: T }) =>
+ $get: (option: { query: Methods53['get']['query'], config?: T }) =>
fetch(prefix, PATH36, GET, option).json().then(r => r.body),
put: (option?: { body?: Methods53['put']['reqBody'], config?: T }) =>
fetch(prefix, PATH36, PUT, option, 'URLSearchParams').json(),
diff --git a/samples/freee/@types.ts b/samples/freee/@types.ts
index d0b6bae4..94e48aaf 100644
--- a/samples/freee/@types.ts
+++ b/samples/freee/@types.ts
@@ -110,49 +110,49 @@ export type manualJournalUpdateParams = {
}
export type companyParams = {
- name?: string
- name_kana?: string
- contact_name?: string
+ name: string
+ name_kana: string
+ contact_name: string
- address_attributes?: {
- zipcode?: string
- prefecture_code?: number
- street_name1?: string
- street_name2?: string
+ address_attributes: {
+ zipcode: string
+ prefecture_code: number
+ street_name1: string
+ street_name2: string
}
- phone1?: string
- phone2?: string
- fax?: string
+ phone1: string
+ phone2: string
+ fax: string
- sales_information_attributes?: {
- industry_class?: 'agriculture_forestry_fisheries_ore' | 'construction' | 'manufacturing_processing' | 'it' | 'transportation_logistics' | 'retail_wholesale' | 'finance_insurance' | 'real_estate_rental' | 'profession' | 'design_production' | 'food' | 'leisure_entertainment' | 'lifestyle' | 'education' | 'medical_welfare' | 'other_services' | 'other'
- industry_code?: 'agriculture' | 'forestry' | 'fishing_industry' | 'mining' | 'civil_contractors' | 'pavement' | 'carpenter' | 'renovation' | 'electrical_plumbing' | 'grocery' | 'machinery_manufacturing' | 'printing' | 'other_manufacturing' | 'software_development' | 'system_development' | 'survey_analysis' | 'server_management' | 'website_production' | 'online_service_management' | 'online_advertising_agency' | 'online_advertising_planning_production' | 'online_media_management' | 'portal_site_management' | 'other_it_services' | 'transport_delivery' | 'delivery' | 'other_transportation_logistics' | 'other_wholesale' | 'clothing_wholesale_fiber' | 'food_wholesale' | 'entrusted_development_wholesale' | 'online_shop' | 'fashion_grocery_store' | 'food_store' | 'entrusted_store' | 'other_store' | 'financial_instruments_exchange' | 'commodity_futures_investment_advisor' | 'other_financial' | 'brokerage_insurance' | 'other_insurance' | 'real_estate_developer' | 'real_estate_brokerage' | 'rent_coin_parking_management' | 'rental_office_co_working_space' | 'rental_lease' | 'cpa_tax_accountant' | 'law_office' | 'judicial_and_administrative_scrivener' | 'labor_consultant' | 'other_profession' | 'business_consultant' | 'academic_research_development' | 'advertising_agency' | 'advertising_planning_production' | 'design_development' | 'apparel_industry_design' | 'website_design' | 'advertising_planning_design' | 'other_design' | 'restaurants_coffee_shops' | 'sale_of_lunch' | 'bread_confectionery_manufacture_sale' | 'delivery_catering_mobile_catering' | 'hotel_inn' | 'homestay' | 'travel_agency' | 'leisure_sports_facility_management' | 'show_event_management' | 'barber' | 'beauty_salon' | 'spa_sand_bath_sauna' | 'este_ail_salon' | 'bridal_planning_introduce_wedding' | 'memorial_ceremony_funeral' | 'moving' | 'courier_industry' | 'house_maid_cleaning_agency' | 're_tailoring_clothes' | 'training_institute_management' | 'tutoring_school' | 'music_calligraphy_abacus_classroom' | 'english_school' | 'tennis_yoga_judo_school' | 'culture_school' | 'seminar_planning_management' | 'hospital_clinic' | 'dental_clinic' | 'other_medical_services' | 'nursery' | 'nursing_home' | 'rehabilitation_support_services' | 'other_welfare' | 'visit_welfare_service' | 'recruitment_temporary_staffing' | 'life_related_recruitment_temporary_staffing' | 'car_maintenance_car_repair' | 'machinery_equipment_maintenance_repair' | 'cleaning_maintenance_building_management' | 'security' | 'other_services' | 'npo' | 'general_incorporated_association' | 'general_incorporated_foundation' | 'other_association'
+ sales_information_attributes: {
+ industry_class: 'agriculture_forestry_fisheries_ore' | 'construction' | 'manufacturing_processing' | 'it' | 'transportation_logistics' | 'retail_wholesale' | 'finance_insurance' | 'real_estate_rental' | 'profession' | 'design_production' | 'food' | 'leisure_entertainment' | 'lifestyle' | 'education' | 'medical_welfare' | 'other_services' | 'other'
+ industry_code: 'agriculture' | 'forestry' | 'fishing_industry' | 'mining' | 'civil_contractors' | 'pavement' | 'carpenter' | 'renovation' | 'electrical_plumbing' | 'grocery' | 'machinery_manufacturing' | 'printing' | 'other_manufacturing' | 'software_development' | 'system_development' | 'survey_analysis' | 'server_management' | 'website_production' | 'online_service_management' | 'online_advertising_agency' | 'online_advertising_planning_production' | 'online_media_management' | 'portal_site_management' | 'other_it_services' | 'transport_delivery' | 'delivery' | 'other_transportation_logistics' | 'other_wholesale' | 'clothing_wholesale_fiber' | 'food_wholesale' | 'entrusted_development_wholesale' | 'online_shop' | 'fashion_grocery_store' | 'food_store' | 'entrusted_store' | 'other_store' | 'financial_instruments_exchange' | 'commodity_futures_investment_advisor' | 'other_financial' | 'brokerage_insurance' | 'other_insurance' | 'real_estate_developer' | 'real_estate_brokerage' | 'rent_coin_parking_management' | 'rental_office_co_working_space' | 'rental_lease' | 'cpa_tax_accountant' | 'law_office' | 'judicial_and_administrative_scrivener' | 'labor_consultant' | 'other_profession' | 'business_consultant' | 'academic_research_development' | 'advertising_agency' | 'advertising_planning_production' | 'design_development' | 'apparel_industry_design' | 'website_design' | 'advertising_planning_design' | 'other_design' | 'restaurants_coffee_shops' | 'sale_of_lunch' | 'bread_confectionery_manufacture_sale' | 'delivery_catering_mobile_catering' | 'hotel_inn' | 'homestay' | 'travel_agency' | 'leisure_sports_facility_management' | 'show_event_management' | 'barber' | 'beauty_salon' | 'spa_sand_bath_sauna' | 'este_ail_salon' | 'bridal_planning_introduce_wedding' | 'memorial_ceremony_funeral' | 'moving' | 'courier_industry' | 'house_maid_cleaning_agency' | 're_tailoring_clothes' | 'training_institute_management' | 'tutoring_school' | 'music_calligraphy_abacus_classroom' | 'english_school' | 'tennis_yoga_judo_school' | 'culture_school' | 'seminar_planning_management' | 'hospital_clinic' | 'dental_clinic' | 'other_medical_services' | 'nursery' | 'nursing_home' | 'rehabilitation_support_services' | 'other_welfare' | 'visit_welfare_service' | 'recruitment_temporary_staffing' | 'life_related_recruitment_temporary_staffing' | 'car_maintenance_car_repair' | 'machinery_equipment_maintenance_repair' | 'cleaning_maintenance_building_management' | 'security' | 'other_services' | 'npo' | 'general_incorporated_association' | 'general_incorporated_foundation' | 'other_association'
}
- head_count?: 0 | 1 | 2 | 3 | 13 | 14 | 15 | 18 | 16 | 17
- corporate_number?: string
+ head_count: 0 | 1 | 2 | 3 | 13 | 14 | 15 | 18 | 16 | 17
+ corporate_number: string
- fiscal_years_attributes?: {
- use_industry_template?: number
- indirect_write_off_method?: number
- indirect_write_off_method_type?: number
- start_date?: string
- end_date?: string
- accounting_period?: number
- depreciation_fraction?: number
- return_code?: number
- tax_fraction?: number
+ fiscal_years_attributes: {
+ use_industry_template: number
+ indirect_write_off_method: number
+ indirect_write_off_method_type: number
+ start_date: string
+ end_date: string
+ accounting_period: number
+ depreciation_fraction: number
+ return_code: number
+ tax_fraction: number
}
- doc_template?: {
- invoice_layout?: number
- invoice_style?: number
- amount_fraction?: number
+ doc_template: {
+ invoice_layout: number
+ invoice_style: number
+ amount_fraction: number
}
- txn_number_format?: 'not_used' | 'digits' | 'alnum'
- private_settlement?: number
+ txn_number_format: 'not_used' | 'digits' | 'alnum'
+ private_settlement: number
}
export type itemParams = {
@@ -206,11 +206,11 @@ export type expenseApplicationCreateParams = {
section_id?: number
tag_ids?: number[]
expense_application_lines: {
- transaction_date?: string
- description?: string
- amount?: number
- expense_application_line_template_id?: number
- receipt_id?: number
+ transaction_date: string
+ description: string
+ amount: number
+ expense_application_line_template_id: number
+ receipt_id: number
}[]
}
@@ -223,12 +223,12 @@ export type expenseApplicationUpdateParams = {
section_id?: number
tag_ids?: number[]
expense_application_lines: {
- id?: number
- transaction_date?: string
- description?: string
- amount?: number
- expense_application_line_template_id?: number
- receipt_id?: number
+ id: number
+ transaction_date: string
+ description: string
+ amount: number
+ expense_application_line_template_id: number
+ receipt_id: number
}[]
}
@@ -248,39 +248,39 @@ export type partnerCreateParams = {
transfer_fee_handling_side?: 'payer' | 'payee'
address_attributes?: {
- zipcode?: string
- prefecture_code?: number
- street_name1?: string
- street_name2?: string
+ zipcode: string
+ prefecture_code: number
+ street_name1: string
+ street_name2: string
}
partner_doc_setting_attributes?: {
- sending_method?: 'email' | 'posting' | 'email_and_posting'
+ sending_method: 'email' | 'posting' | 'email_and_posting'
}
partner_bank_account_attributes?: {
- bank_name?: string
- bank_name_kana?: string
- bank_code?: string
- branch_name?: string
- branch_kana?: string
- branch_code?: string
- account_type?: string
- account_number?: string
- long_account_name?: string
- account_name?: string
+ bank_name: string
+ bank_name_kana: string
+ bank_code: string
+ branch_name: string
+ branch_kana: string
+ branch_code: string
+ account_type: string
+ account_number: string
+ long_account_name: string
+ account_name: string
}
payment_term_attributes?: {
- cutoff_day?: number
- additional_months?: number
- fixed_day?: number
+ cutoff_day: number
+ additional_months: number
+ fixed_day: number
}
invoice_payment_term_attributes?: {
- cutoff_day?: number
- additional_months?: number
- fixed_day?: number
+ cutoff_day: number
+ additional_months: number
+ fixed_day: number
}
}
@@ -299,39 +299,39 @@ export type partnerUpdateParams = {
transfer_fee_handling_side?: 'payer' | 'payee'
address_attributes?: {
- zipcode?: string
- prefecture_code?: number
- street_name1?: string
- street_name2?: string
+ zipcode: string
+ prefecture_code: number
+ street_name1: string
+ street_name2: string
}
partner_doc_setting_attributes?: {
- sending_method?: 'email' | 'posting' | 'email_and_posting'
+ sending_method: 'email' | 'posting' | 'email_and_posting'
}
partner_bank_account_attributes?: {
- bank_name?: string
- bank_name_kana?: string
- bank_code?: string
- branch_name?: string
- branch_kana?: string
- branch_code?: string
- account_type?: string
- account_number?: string
- long_account_name?: string
- account_name?: string
+ bank_name: string
+ bank_name_kana: string
+ bank_code: string
+ branch_name: string
+ branch_kana: string
+ branch_code: string
+ account_type: string
+ account_number: string
+ long_account_name: string
+ account_name: string
}
payment_term_attributes?: {
- cutoff_day?: number
- additional_months?: number
- fixed_day?: number
+ cutoff_day: number
+ additional_months: number
+ fixed_day: number
}
invoice_payment_term_attributes?: {
- cutoff_day?: number
- additional_months?: number
- fixed_day?: number
+ cutoff_day: number
+ additional_months: number
+ fixed_day: number
}
}
@@ -363,10 +363,10 @@ export type accountItemParams = {
accumulated_dep_account_item_name?: string
searchable?: number
items?: {
- id?: number
+ id: number
}[]
partners?: {
- id?: number
+ id: number
}[]
}
}
@@ -476,9 +476,9 @@ export type trialBsResponse = {
adjustment?: 'only' | 'without'
created_at?: string
balances: {
- account_item_id?: number
- account_item_name?: string
- partners?: {
+ account_item_id: number
+ account_item_name: string
+ partners: {
id: number
name?: string
opening_balance?: number
@@ -487,7 +487,7 @@ export type trialBsResponse = {
closing_balance?: number
composition_ratio?: number
}[]
- items?: {
+ items: {
id: number
name?: string
opening_balance?: number
@@ -496,17 +496,17 @@ export type trialBsResponse = {
closing_balance?: number
composition_ratio?: number
}[]
- account_category_id?: number
- account_category_name?: string
- total_line?: boolean
- hierarchy_level?: number
- parent_account_category_id?: number
- parent_account_category_name?: string
- opening_balance?: number
- debit_amount?: number
- credit_amount?: number
- closing_balance?: number
- composition_ratio?: number
+ account_category_id: number
+ account_category_name: string
+ total_line: boolean
+ hierarchy_level: number
+ parent_account_category_id: number
+ parent_account_category_name: string
+ opening_balance: number
+ debit_amount: number
+ credit_amount: number
+ closing_balance: number
+ composition_ratio: number
}[]
}
}
@@ -528,31 +528,31 @@ export type trialBsTwoYearsResponse = {
adjustment?: 'only' | 'without'
created_at?: string
balances: {
- account_item_id?: number
- account_item_name?: string
- partners?: {
+ account_item_id: number
+ account_item_name: string
+ partners: {
id: number
name?: string
last_year_closing_balance?: number
closing_balance?: number
year_on_year?: number
}[]
- items?: {
+ items: {
id: number
name?: string
last_year_closing_balance?: number
closing_balance?: number
year_on_year?: number
}[]
- account_category_id?: number
- account_category_name?: string
- total_line?: boolean
- hierarchy_level?: number
- parent_account_category_id?: number
- parent_account_category_name?: string
- last_year_closing_balance?: number
- closing_balance?: number
- year_on_year?: number
+ account_category_id: number
+ account_category_name: string
+ total_line: boolean
+ hierarchy_level: number
+ parent_account_category_id: number
+ parent_account_category_name: string
+ last_year_closing_balance: number
+ closing_balance: number
+ year_on_year: number
}[]
}
}
@@ -574,9 +574,9 @@ export type trialBsThreeYearsResponse = {
adjustment?: 'only' | 'without'
created_at?: string
balances: {
- account_item_id?: number
- account_item_name?: string
- partners?: {
+ account_item_id: number
+ account_item_name: string
+ partners: {
id: number
name?: string
two_years_before_closing_balance?: number
@@ -584,7 +584,7 @@ export type trialBsThreeYearsResponse = {
closing_balance?: number
year_on_year?: number
}[]
- items?: {
+ items: {
id: number
name?: string
two_years_before_closing_balance?: number
@@ -592,16 +592,16 @@ export type trialBsThreeYearsResponse = {
closing_balance?: number
year_on_year?: number
}[]
- account_category_id?: number
- account_category_name?: string
- total_line?: boolean
- hierarchy_level?: number
- parent_account_category_id?: number
- parent_account_category_name?: string
- two_years_before_closing_balance?: number
- last_year_closing_balance?: number
- closing_balance?: number
- year_on_year?: number
+ account_category_id: number
+ account_category_name: string
+ total_line: boolean
+ hierarchy_level: number
+ parent_account_category_id: number
+ parent_account_category_name: string
+ two_years_before_closing_balance: number
+ last_year_closing_balance: number
+ closing_balance: number
+ year_on_year: number
}[]
}
}
@@ -625,9 +625,9 @@ export type trialPlResponse = {
cost_allocation?: 'only' | 'without'
created_at?: string
balances: {
- account_item_id?: number
- account_item_name?: string
- partners?: {
+ account_item_id: number
+ account_item_name: string
+ partners: {
id: number
name?: string
opening_balance?: number
@@ -636,7 +636,7 @@ export type trialPlResponse = {
closing_balance?: number
composition_ratio?: number
}[]
- items?: {
+ items: {
id: number
name?: string
opening_balance?: number
@@ -645,7 +645,7 @@ export type trialPlResponse = {
closing_balance?: number
composition_ratio?: number
}[]
- sections?: {
+ sections: {
id: number
name?: string
opening_balance?: number
@@ -654,17 +654,17 @@ export type trialPlResponse = {
closing_balance?: number
composition_ratio?: number
}[]
- account_category_id?: number
- account_category_name?: string
- total_line?: boolean
- hierarchy_level?: number
- parent_account_category_id?: number
- parent_account_category_name?: string
- opening_balance?: number
- debit_amount?: number
- credit_amount?: number
- closing_balance?: number
- composition_ratio?: number
+ account_category_id: number
+ account_category_name: string
+ total_line: boolean
+ hierarchy_level: number
+ parent_account_category_id: number
+ parent_account_category_name: string
+ opening_balance: number
+ debit_amount: number
+ credit_amount: number
+ closing_balance: number
+ composition_ratio: number
}[]
}
}
@@ -688,38 +688,38 @@ export type trialPlTwoYearsResponse = {
cost_allocation?: 'only' | 'without'
created_at?: string
balances: {
- account_item_id?: number
- account_item_name?: string
- partners?: {
+ account_item_id: number
+ account_item_name: string
+ partners: {
id: number
name?: string
last_year_closing_balance?: number
closing_balance?: number
year_on_year?: number
}[]
- items?: {
+ items: {
id: number
name?: string
last_year_closing_balance?: number
closing_balance?: number
year_on_year?: number
}[]
- sections?: {
+ sections: {
id: number
name?: string
last_year_closing_balance?: number
closing_balance?: number
year_on_year?: number
}[]
- account_category_id?: number
- account_category_name?: string
- total_line?: boolean
- hierarchy_level?: number
- parent_account_category_id?: number
- parent_account_category_name?: string
- last_year_closing_balance?: number
- closing_balance?: number
- year_on_year?: number
+ account_category_id: number
+ account_category_name: string
+ total_line: boolean
+ hierarchy_level: number
+ parent_account_category_id: number
+ parent_account_category_name: string
+ last_year_closing_balance: number
+ closing_balance: number
+ year_on_year: number
}[]
}
}
@@ -743,9 +743,9 @@ export type trialPlThreeYearsResponse = {
cost_allocation?: 'only' | 'without'
created_at?: string
balances: {
- account_item_id?: number
- account_item_name?: string
- partners?: {
+ account_item_id: number
+ account_item_name: string
+ partners: {
id: number
name?: string
two_years_before_closing_balance?: number
@@ -753,7 +753,7 @@ export type trialPlThreeYearsResponse = {
closing_balance?: number
year_on_year?: number
}[]
- items?: {
+ items: {
id: number
name?: string
two_years_before_closing_balance?: number
@@ -761,7 +761,7 @@ export type trialPlThreeYearsResponse = {
closing_balance?: number
year_on_year?: number
}[]
- sections?: {
+ sections: {
id: number
name?: string
two_years_before_closing_balance?: number
@@ -769,16 +769,16 @@ export type trialPlThreeYearsResponse = {
closing_balance?: number
year_on_year?: number
}[]
- account_category_id?: number
- account_category_name?: string
- total_line?: boolean
- hierarchy_level?: number
- parent_account_category_id?: number
- parent_account_category_name?: string
- two_years_before_closing_balance?: number
- last_year_closing_balance?: number
- closing_balance?: number
- year_on_year?: number
+ account_category_id: number
+ account_category_name: string
+ total_line: boolean
+ hierarchy_level: number
+ parent_account_category_id: number
+ parent_account_category_name: string
+ two_years_before_closing_balance: number
+ last_year_closing_balance: number
+ closing_balance: number
+ year_on_year: number
}[]
}
}
@@ -802,9 +802,9 @@ export type trialPlSectionsResponse = {
cost_allocation?: 'only' | 'without'
created_at?: string
balances: {
- account_item_id?: number
- account_item_name?: string
- sections?: {
+ account_item_id: number
+ account_item_name: string
+ sections: {
id: number
name?: string
closing_balance?: number
@@ -819,13 +819,13 @@ export type trialPlSectionsResponse = {
closing_balance?: number
}[]
}[]
- account_category_id?: number
- account_category_name?: string
- total_line?: boolean
- hierarchy_level?: number
- parent_account_category_id?: number
- parent_account_category_name?: string
- closing_balance?: number
+ account_category_id: number
+ account_category_name: string
+ total_line: boolean
+ hierarchy_level: number
+ parent_account_category_id: number
+ parent_account_category_name: string
+ closing_balance: number
}[]
}
}
@@ -966,7 +966,7 @@ export type dealResponse = {
}
export type selectablesIndexResponse = {
- account_categories?: {
+ account_categories: {
balance: 'expense' | 'income'
org_code: 'personal' | 'corporate'
role: string
@@ -980,19 +980,19 @@ export type selectablesIndexResponse = {
shortcut?: string
default_tax?: {
- tax_rate_5?: {
- id?: number
- name?: string
+ tax_rate_5: {
+ id: number
+ name: string
}
- tax_rate_8?: {
- id?: number
- name?: string
+ tax_rate_8: {
+ id: number
+ name: string
}
}
}[]
}[]
- account_groups?: {
+ account_groups: {
id: number
name: string
account_structure_id: number
@@ -1153,18 +1153,18 @@ export type companyResponse = {
}
export type unauthorizedError = {
- message?: string
- messages?: string
+ message: string
+ messages: string
}
export type forbiddenError = {
- message?: string
- messages?: string
+ message: string
+ messages: string
}
export type badRequestError = {
- status_code?: number
- errors?: {
+ status_code: number
+ errors: {
messages: Partial
type: 'status' | 'validation' | 'error'
@@ -1172,8 +1172,8 @@ export type badRequestError = {
}
export type badRequestNotFoundError = {
- status_code?: number
- errors?: {
+ status_code: number
+ errors: {
messages: Partial
type: 'status' | 'validation' | 'error'
@@ -1192,8 +1192,8 @@ export type tooManyRequestsError = {
}
export type internalServerError = {
- status_code?: number
- errors?: {
+ status_code: number
+ errors: {
messages: Partial
type: 'status' | 'validation' | 'error'
@@ -1300,7 +1300,7 @@ export type walletableResponse = {
walletable_balance?: number
meta?: {
- up_to_date?: boolean
+ up_to_date: boolean
}
}
}
@@ -1343,15 +1343,15 @@ export type transferResponse = {
}
export type userParams = {
- display_name?: string
- first_name?: string
- last_name?: string
- first_name_kana?: string
- last_name_kana?: string
+ display_name: string
+ first_name: string
+ last_name: string
+ first_name_kana: string
+ last_name_kana: string
}
export type userResponse = {
- user?: {
+ user: {
id: number
email: string
display_name?: string
@@ -1381,10 +1381,10 @@ export type meResponse = {
}
export type userCapability = {
- read?: boolean
- create?: boolean
- update?: boolean
- destroy?: boolean
+ read: boolean
+ create: boolean
+ update: boolean
+ destroy: boolean
}
export type receiptResponse = {
@@ -1464,9 +1464,9 @@ export type approvalRequestParams = {
approver_id?: number
title: string
request_items?: {
- id?: number
- type?: 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt'
- value?: string
+ id: number
+ type: 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt'
+ value: string
}[]
}
@@ -1479,9 +1479,9 @@ export type generalApplicationCreateParams = {
draft: boolean
parent_id?: number
request_items: {
- id?: number
- type?: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt'
- value?: string
+ id: number
+ type: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt'
+ value: string
}[]
}
@@ -1492,9 +1492,9 @@ export type generalApplicationUpdateParams = {
approver_id?: number
draft: boolean
request_items: {
- id?: number
- type?: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt'
- value?: string
+ id: number
+ type: 'title' | 'single_line' | 'multi_line' | 'select' | 'date' | 'amount' | 'receipt'
+ value: string
}[]
}
diff --git a/samples/freee/api/$api.ts b/samples/freee/api/$api.ts
index 48240fd4..48d3eba2 100644
--- a/samples/freee/api/$api.ts
+++ b/samples/freee/api/$api.ts
@@ -151,9 +151,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
$path: () => `${prefix}${prefix1}`
}
},
- get: (option?: { query?: Methods2['get']['query'], config?: T }) =>
+ get: (option: { query: Methods2['get']['query'], config?: T }) =>
fetch(prefix, PATH1, GET, option).json(),
- $get: (option?: { query?: Methods2['get']['query'], config?: T }) =>
+ $get: (option: { query: Methods2['get']['query'], config?: T }) =>
fetch(prefix, PATH1, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods2['get']['query'] }) =>
`${prefix}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
@@ -163,9 +163,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const prefix2 = `${PATH2}/${val2}`
return {
- get: (option?: { query?: Methods5['get']['query'], config?: T }) =>
+ get: (option: { query: Methods5['get']['query'], config?: T }) =>
fetch(prefix, prefix2, GET, option).json(),
- $get: (option?: { query?: Methods5['get']['query'], config?: T }) =>
+ $get: (option: { query: Methods5['get']['query'], config?: T }) =>
fetch(prefix, prefix2, GET, option).json().then(r => r.body),
put: (option?: { body?: Methods5['put']['reqBody'], config?: T }) =>
fetch(prefix, prefix2, PUT, option, 'URLSearchParams').json(),
@@ -803,9 +803,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
`${prefix}${PATH35}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
},
me: {
- get: (option?: { query?: Methods53['get']['query'], config?: T }) =>
+ get: (option: { query: Methods53['get']['query'], config?: T }) =>
fetch(prefix, PATH36, GET, option).json(),
- $get: (option?: { query?: Methods53['get']['query'], config?: T }) =>
+ $get: (option: { query: Methods53['get']['query'], config?: T }) =>
fetch(prefix, PATH36, GET, option).json().then(r => r.body),
put: (option?: { body?: Methods53['put']['reqBody'], config?: T }) =>
fetch(prefix, PATH36, PUT, option, 'URLSearchParams').json(),
diff --git a/samples/freee/api/1/$api.ts b/samples/freee/api/1/$api.ts
index d556f077..91d162f4 100644
--- a/samples/freee/api/1/$api.ts
+++ b/samples/freee/api/1/$api.ts
@@ -150,9 +150,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
$path: () => `${prefix}${prefix1}`
}
},
- get: (option?: { query?: Methods2['get']['query'], config?: T }) =>
+ get: (option: { query: Methods2['get']['query'], config?: T }) =>
fetch(prefix, PATH1, GET, option).json(),
- $get: (option?: { query?: Methods2['get']['query'], config?: T }) =>
+ $get: (option: { query: Methods2['get']['query'], config?: T }) =>
fetch(prefix, PATH1, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods2['get']['query'] }) =>
`${prefix}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
@@ -162,9 +162,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const prefix2 = `${PATH2}/${val2}`
return {
- get: (option?: { query?: Methods5['get']['query'], config?: T }) =>
+ get: (option: { query: Methods5['get']['query'], config?: T }) =>
fetch(prefix, prefix2, GET, option).json(),
- $get: (option?: { query?: Methods5['get']['query'], config?: T }) =>
+ $get: (option: { query: Methods5['get']['query'], config?: T }) =>
fetch(prefix, prefix2, GET, option).json().then(r => r.body),
put: (option?: { body?: Methods5['put']['reqBody'], config?: T }) =>
fetch(prefix, prefix2, PUT, option, 'URLSearchParams').json(),
@@ -802,9 +802,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
`${prefix}${PATH35}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
},
me: {
- get: (option?: { query?: Methods53['get']['query'], config?: T }) =>
+ get: (option: { query: Methods53['get']['query'], config?: T }) =>
fetch(prefix, PATH36, GET, option).json(),
- $get: (option?: { query?: Methods53['get']['query'], config?: T }) =>
+ $get: (option: { query: Methods53['get']['query'], config?: T }) =>
fetch(prefix, PATH36, GET, option).json().then(r => r.body),
put: (option?: { body?: Methods53['put']['reqBody'], config?: T }) =>
fetch(prefix, PATH36, PUT, option, 'URLSearchParams').json(),
diff --git a/samples/freee/api/1/account_items/index.ts b/samples/freee/api/1/account_items/index.ts
index 02c013ce..923b9775 100644
--- a/samples/freee/api/1/account_items/index.ts
+++ b/samples/freee/api/1/account_items/index.ts
@@ -5,7 +5,7 @@ export type Methods = {
get: {
query: {
company_id: number
- base_date?: string
+ base_date: string
}
status: 200
diff --git a/samples/freee/api/1/banks/$api.ts b/samples/freee/api/1/banks/$api.ts
index 76814ca4..28b3938e 100644
--- a/samples/freee/api/1/banks/$api.ts
+++ b/samples/freee/api/1/banks/$api.ts
@@ -20,9 +20,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
$path: () => `${prefix}${prefix0}`
}
},
- get: (option?: { query?: Methods0['get']['query'], config?: T }) =>
+ get: (option: { query: Methods0['get']['query'], config?: T }) =>
fetch(prefix, PATH0, GET, option).json(),
- $get: (option?: { query?: Methods0['get']['query'], config?: T }) =>
+ $get: (option: { query: Methods0['get']['query'], config?: T }) =>
fetch(prefix, PATH0, GET, option).json().then(r => r.body),
$path: (option?: { method?: 'get'; query: Methods0['get']['query'] }) =>
`${prefix}${PATH0}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
diff --git a/samples/freee/api/1/banks/index.ts b/samples/freee/api/1/banks/index.ts
index 9c9b1c5b..4c37302b 100644
--- a/samples/freee/api/1/banks/index.ts
+++ b/samples/freee/api/1/banks/index.ts
@@ -3,10 +3,10 @@ import * as Types from '../../../@types'
export type Methods = {
get: {
- query?: {
- offset?: number
- limit?: number
- type?: 'bank' | 'credit_card' | 'wallet'
+ query: {
+ offset: number
+ limit: number
+ type: 'bank' | 'credit_card' | 'wallet'
}
status: 200
diff --git a/samples/freee/api/1/companies/$api.ts b/samples/freee/api/1/companies/$api.ts
index dc4479cd..5a5e100a 100644
--- a/samples/freee/api/1/companies/$api.ts
+++ b/samples/freee/api/1/companies/$api.ts
@@ -14,9 +14,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const prefix0 = `${PATH0}/${val0}`
return {
- get: (option?: { query?: Methods1['get']['query'], config?: T }) =>
+ get: (option: { query: Methods1['get']['query'], config?: T }) =>
fetch(prefix, prefix0, GET, option).json(),
- $get: (option?: { query?: Methods1['get']['query'], config?: T }) =>
+ $get: (option: { query: Methods1['get']['query'], config?: T }) =>
fetch(prefix, prefix0, GET, option).json().then(r => r.body),
put: (option?: { body?: Methods1['put']['reqBody'], config?: T }) =>
fetch(prefix, prefix0, PUT, option, 'URLSearchParams').json(),
diff --git a/samples/freee/api/1/companies/_id@number/index.ts b/samples/freee/api/1/companies/_id@number/index.ts
index 5aa03019..88cb0b61 100644
--- a/samples/freee/api/1/companies/_id@number/index.ts
+++ b/samples/freee/api/1/companies/_id@number/index.ts
@@ -3,15 +3,15 @@ import * as Types from '../../../../@types'
export type Methods = {
get: {
- query?: {
- details?: true
- account_items?: true
- taxes?: true
- items?: true
- partners?: true
- sections?: true
- tags?: true
- walletables?: true
+ query: {
+ details: true
+ account_items: true
+ taxes: true
+ items: true
+ partners: true
+ sections: true
+ tags: true
+ walletables: true
}
status: 200
diff --git a/samples/freee/api/1/deals/_id@number/index.ts b/samples/freee/api/1/deals/_id@number/index.ts
index 84733c19..f0718dd1 100644
--- a/samples/freee/api/1/deals/_id@number/index.ts
+++ b/samples/freee/api/1/deals/_id@number/index.ts
@@ -5,7 +5,7 @@ export type Methods = {
get: {
query: {
company_id: number
- accruals?: 'without' | 'with'
+ accruals: 'without' | 'with'
}
status: 200
diff --git a/samples/freee/api/1/deals/index.ts b/samples/freee/api/1/deals/index.ts
index 69410421..9f86383d 100644
--- a/samples/freee/api/1/deals/index.ts
+++ b/samples/freee/api/1/deals/index.ts
@@ -5,21 +5,21 @@ export type Methods = {
get: {
query: {
company_id: number
- partner_id?: number
- account_item_id?: number
- partner_code?: string
- status?: 'unsettled' | 'settled'
- type?: 'income' | 'expense'
- start_issue_date?: string
- end_issue_date?: string
- start_due_date?: string
- end_due_date?: string
- start_renew_date?: string
- end_renew_date?: string
- offset?: number
- limit?: number
- registered_from?: 'me'
- accruals?: 'without' | 'with'
+ partner_id: number
+ account_item_id: number
+ partner_code: string
+ status: 'unsettled' | 'settled'
+ type: 'income' | 'expense'
+ start_issue_date: string
+ end_issue_date: string
+ start_due_date: string
+ end_due_date: string
+ start_renew_date: string
+ end_renew_date: string
+ offset: number
+ limit: number
+ registered_from: 'me'
+ accruals: 'without' | 'with'
}
status: 200
diff --git a/samples/freee/api/1/expense_application_line_templates/index.ts b/samples/freee/api/1/expense_application_line_templates/index.ts
index 7204553a..f031aff5 100644
--- a/samples/freee/api/1/expense_application_line_templates/index.ts
+++ b/samples/freee/api/1/expense_application_line_templates/index.ts
@@ -5,8 +5,8 @@ export type Methods = {
get: {
query: {
company_id: number
- offset?: number
- limit?: number
+ offset: number
+ limit: number
}
status: 200
diff --git a/samples/freee/api/1/expense_applications/index.ts b/samples/freee/api/1/expense_applications/index.ts
index 608c85fd..3edd0925 100644
--- a/samples/freee/api/1/expense_applications/index.ts
+++ b/samples/freee/api/1/expense_applications/index.ts
@@ -5,8 +5,8 @@ export type Methods = {
get: {
query: {
company_id: number
- offset?: number
- limit?: number
+ offset: number
+ limit: number
}
status: 200
diff --git a/samples/freee/api/1/forms/selectables/index.ts b/samples/freee/api/1/forms/selectables/index.ts
index 02a4be96..fc54f240 100644
--- a/samples/freee/api/1/forms/selectables/index.ts
+++ b/samples/freee/api/1/forms/selectables/index.ts
@@ -5,7 +5,7 @@ export type Methods = {
get: {
query: {
company_id: number
- includes?: 'account_item'
+ includes: 'account_item'
}
status: 200
diff --git a/samples/freee/api/1/invoices/index.ts b/samples/freee/api/1/invoices/index.ts
index e3bdfdf6..b2b225c7 100644
--- a/samples/freee/api/1/invoices/index.ts
+++ b/samples/freee/api/1/invoices/index.ts
@@ -5,18 +5,18 @@ export type Methods = {
get: {
query: {
company_id: number
- partner_id?: number
- partner_code?: string
- issue_date_start?: string
- issue_date_end?: string
- due_date_start?: string
- due_date_end?: string
- invoice_number?: string
- description?: string
- invoice_status?: 'draft' | 'applying' | 'remanded' | 'rejected' | 'approved' | 'issued' | 'unsubmitted'
- payment_status?: 'unsettled' | 'settled'
- offset?: number
- limit?: number
+ partner_id: number
+ partner_code: string
+ issue_date_start: string
+ issue_date_end: string
+ due_date_start: string
+ due_date_end: string
+ invoice_number: string
+ description: string
+ invoice_status: 'draft' | 'applying' | 'remanded' | 'rejected' | 'approved' | 'issued' | 'unsubmitted'
+ payment_status: 'unsettled' | 'settled'
+ offset: number
+ limit: number
}
status: 200
diff --git a/samples/freee/api/1/journals/index.ts b/samples/freee/api/1/journals/index.ts
index 854dc9f4..6d34d0cd 100644
--- a/samples/freee/api/1/journals/index.ts
+++ b/samples/freee/api/1/journals/index.ts
@@ -6,9 +6,9 @@ export type Methods = {
query: {
download_type: 'csv' | 'pdf' | 'yayoi' | 'generic'
company_id: number
- visible_tags?: ('partner' | 'item' | 'tag' | 'section' | 'description' | 'wallet_txn_description' | 'all')[]
- start_date?: string
- end_date?: string
+ visible_tags: ('partner' | 'item' | 'tag' | 'section' | 'description' | 'wallet_txn_description' | 'all')[]
+ start_date: string
+ end_date: string
}
status: 202
diff --git a/samples/freee/api/1/journals/reports/_id@number/status/index.ts b/samples/freee/api/1/journals/reports/_id@number/status/index.ts
index 930ab013..db4da89a 100644
--- a/samples/freee/api/1/journals/reports/_id@number/status/index.ts
+++ b/samples/freee/api/1/journals/reports/_id@number/status/index.ts
@@ -5,9 +5,9 @@ export type Methods = {
get: {
query: {
company_id: number
- visible_tags?: ('partner' | 'item' | 'tag' | 'section' | 'description' | 'wallet_txn_description' | 'all')[]
- start_date?: string
- end_date?: string
+ visible_tags: ('partner' | 'item' | 'tag' | 'section' | 'description' | 'wallet_txn_description' | 'all')[]
+ start_date: string
+ end_date: string
}
status: 200
diff --git a/samples/freee/api/1/manual_journals/index.ts b/samples/freee/api/1/manual_journals/index.ts
index 3053288b..2c5f6e4a 100644
--- a/samples/freee/api/1/manual_journals/index.ts
+++ b/samples/freee/api/1/manual_journals/index.ts
@@ -5,25 +5,25 @@ export type Methods = {
get: {
query: {
company_id: number
- start_issue_date?: string
- end_issue_date?: string
- entry_side?: 'credit' | 'debit'
- account_item_id?: number
- min_amount?: number
- max_amount?: number
- partner_id?: number
- partner_code?: string
- item_id?: number
- section_id?: number
- segment_1_tag_id?: number
- segment_2_tag_id?: number
- segment_3_tag_id?: number
- comment_status?: 'posted_with_mention' | 'raised_with_mention' | 'resolved_with_mention' | 'posted' | 'raised' | 'resolved' | 'none'
- comment_important?: boolean
- adjustment?: 'only' | 'without'
- txn_number?: string
- offset?: number
- limit?: number
+ start_issue_date: string
+ end_issue_date: string
+ entry_side: 'credit' | 'debit'
+ account_item_id: number
+ min_amount: number
+ max_amount: number
+ partner_id: number
+ partner_code: string
+ item_id: number
+ section_id: number
+ segment_1_tag_id: number
+ segment_2_tag_id: number
+ segment_3_tag_id: number
+ comment_status: 'posted_with_mention' | 'raised_with_mention' | 'resolved_with_mention' | 'posted' | 'raised' | 'resolved' | 'none'
+ comment_important: boolean
+ adjustment: 'only' | 'without'
+ txn_number: string
+ offset: number
+ limit: number
}
status: 200
diff --git a/samples/freee/api/1/partners/index.ts b/samples/freee/api/1/partners/index.ts
index 4b596930..b4628f1d 100644
--- a/samples/freee/api/1/partners/index.ts
+++ b/samples/freee/api/1/partners/index.ts
@@ -5,9 +5,9 @@ export type Methods = {
get: {
query: {
company_id: number
- offset?: number
- limit?: number
- keyword?: string
+ offset: number
+ limit: number
+ keyword: string
}
status: 200
diff --git a/samples/freee/api/1/quotations/index.ts b/samples/freee/api/1/quotations/index.ts
index fe46a97e..2c39140b 100644
--- a/samples/freee/api/1/quotations/index.ts
+++ b/samples/freee/api/1/quotations/index.ts
@@ -5,15 +5,15 @@ export type Methods = {
get: {
query: {
company_id: number
- partner_id?: number
- partner_code?: string
- start_issue_date?: string
- end_issue_date?: string
- quotation_number?: string
- description?: string
- quotation_status?: 'all' | 'unsubmitted' | 'submitted'
- offset?: number
- limit?: number
+ partner_id: number
+ partner_code: string
+ start_issue_date: string
+ end_issue_date: string
+ quotation_number: string
+ description: string
+ quotation_status: 'all' | 'unsubmitted' | 'submitted'
+ offset: number
+ limit: number
}
status: 200
diff --git a/samples/freee/api/1/receipts/index.ts b/samples/freee/api/1/receipts/index.ts
index 0fa7ad17..de40a3e0 100644
--- a/samples/freee/api/1/receipts/index.ts
+++ b/samples/freee/api/1/receipts/index.ts
@@ -7,13 +7,13 @@ export type Methods = {
company_id: number
start_date: string
end_date: string
- user_name?: string
- number?: number
- comment_type?: 'posted' | 'raised' | 'resolved'
- comment_important?: boolean
- category?: 'all' | 'without_deal' | 'with_expense_application_line' | 'with_deal' | 'ignored'
- offset?: number
- limit?: number
+ user_name: string
+ number: number
+ comment_type: 'posted' | 'raised' | 'resolved'
+ comment_important: boolean
+ category: 'all' | 'without_deal' | 'with_expense_application_line' | 'with_deal' | 'ignored'
+ offset: number
+ limit: number
}
status: 200
diff --git a/samples/freee/api/1/reports/trial_bs/index.ts b/samples/freee/api/1/reports/trial_bs/index.ts
index b6163b8f..6d1b898c 100644
--- a/samples/freee/api/1/reports/trial_bs/index.ts
+++ b/samples/freee/api/1/reports/trial_bs/index.ts
@@ -5,17 +5,17 @@ export type Methods = {
get: {
query: {
company_id: number
- fiscal_year?: number
- start_month?: number
- end_month?: number
- start_date?: string
- end_date?: string
- account_item_display_type?: 'account_item' | 'group'
- breakdown_display_type?: 'partner' | 'item' | 'account_item'
- partner_id?: number
- partner_code?: string
- item_id?: number
- adjustment?: 'only' | 'without'
+ fiscal_year: number
+ start_month: number
+ end_month: number
+ start_date: string
+ end_date: string
+ account_item_display_type: 'account_item' | 'group'
+ breakdown_display_type: 'partner' | 'item' | 'account_item'
+ partner_id: number
+ partner_code: string
+ item_id: number
+ adjustment: 'only' | 'without'
}
status: 200
diff --git a/samples/freee/api/1/reports/trial_bs_three_years/index.ts b/samples/freee/api/1/reports/trial_bs_three_years/index.ts
index 6f3f886c..1f2e6f02 100644
--- a/samples/freee/api/1/reports/trial_bs_three_years/index.ts
+++ b/samples/freee/api/1/reports/trial_bs_three_years/index.ts
@@ -5,17 +5,17 @@ export type Methods = {
get: {
query: {
company_id: number
- fiscal_year?: number
- start_month?: number
- end_month?: number
- start_date?: string
- end_date?: string
- account_item_display_type?: 'account_item' | 'group'
- breakdown_display_type?: 'partner' | 'item' | 'account_item'
- partner_id?: number
- partner_code?: string
- item_id?: number
- adjustment?: 'only' | 'without'
+ fiscal_year: number
+ start_month: number
+ end_month: number
+ start_date: string
+ end_date: string
+ account_item_display_type: 'account_item' | 'group'
+ breakdown_display_type: 'partner' | 'item' | 'account_item'
+ partner_id: number
+ partner_code: string
+ item_id: number
+ adjustment: 'only' | 'without'
}
status: 200
diff --git a/samples/freee/api/1/reports/trial_bs_two_years/index.ts b/samples/freee/api/1/reports/trial_bs_two_years/index.ts
index 8fe3401f..02c302d8 100644
--- a/samples/freee/api/1/reports/trial_bs_two_years/index.ts
+++ b/samples/freee/api/1/reports/trial_bs_two_years/index.ts
@@ -5,17 +5,17 @@ export type Methods = {
get: {
query: {
company_id: number
- fiscal_year?: number
- start_month?: number
- end_month?: number
- start_date?: string
- end_date?: string
- account_item_display_type?: 'account_item' | 'group'
- breakdown_display_type?: 'partner' | 'item' | 'account_item'
- partner_id?: number
- partner_code?: string
- item_id?: number
- adjustment?: 'only' | 'without'
+ fiscal_year: number
+ start_month: number
+ end_month: number
+ start_date: string
+ end_date: string
+ account_item_display_type: 'account_item' | 'group'
+ breakdown_display_type: 'partner' | 'item' | 'account_item'
+ partner_id: number
+ partner_code: string
+ item_id: number
+ adjustment: 'only' | 'without'
}
status: 200
diff --git a/samples/freee/api/1/reports/trial_pl/index.ts b/samples/freee/api/1/reports/trial_pl/index.ts
index 183b6eac..c72cdc3d 100644
--- a/samples/freee/api/1/reports/trial_pl/index.ts
+++ b/samples/freee/api/1/reports/trial_pl/index.ts
@@ -5,19 +5,19 @@ export type Methods = {
get: {
query: {
company_id: number
- fiscal_year?: number
- start_month?: number
- end_month?: number
- start_date?: string
- end_date?: string
- account_item_display_type?: 'account_item' | 'group'
- breakdown_display_type?: 'partner' | 'item' | 'section' | 'account_item'
- partner_id?: number
- partner_code?: string
- item_id?: number
- section_id?: number
- adjustment?: 'only' | 'without'
- cost_allocation?: 'only' | 'not_include'
+ fiscal_year: number
+ start_month: number
+ end_month: number
+ start_date: string
+ end_date: string
+ account_item_display_type: 'account_item' | 'group'
+ breakdown_display_type: 'partner' | 'item' | 'section' | 'account_item'
+ partner_id: number
+ partner_code: string
+ item_id: number
+ section_id: number
+ adjustment: 'only' | 'without'
+ cost_allocation: 'only' | 'not_include'
}
status: 200
diff --git a/samples/freee/api/1/reports/trial_pl_sections/index.ts b/samples/freee/api/1/reports/trial_pl_sections/index.ts
index a66dc1e8..eb984568 100644
--- a/samples/freee/api/1/reports/trial_pl_sections/index.ts
+++ b/samples/freee/api/1/reports/trial_pl_sections/index.ts
@@ -6,18 +6,18 @@ export type Methods = {
query: {
company_id: number
section_ids: string
- fiscal_year?: number
- start_month?: number
- end_month?: number
- start_date?: string
- end_date?: string
- account_item_display_type?: 'account_item' | 'group'
- breakdown_display_type?: 'partner' | 'item' | 'section' | 'account_item'
- partner_id?: number
- partner_code?: string
- item_id?: number
- adjustment?: 'only' | 'without'
- cost_allocation?: 'only' | 'not_include'
+ fiscal_year: number
+ start_month: number
+ end_month: number
+ start_date: string
+ end_date: string
+ account_item_display_type: 'account_item' | 'group'
+ breakdown_display_type: 'partner' | 'item' | 'section' | 'account_item'
+ partner_id: number
+ partner_code: string
+ item_id: number
+ adjustment: 'only' | 'without'
+ cost_allocation: 'only' | 'not_include'
}
status: 200
diff --git a/samples/freee/api/1/reports/trial_pl_three_years/index.ts b/samples/freee/api/1/reports/trial_pl_three_years/index.ts
index 874ae9ea..ec2fc52c 100644
--- a/samples/freee/api/1/reports/trial_pl_three_years/index.ts
+++ b/samples/freee/api/1/reports/trial_pl_three_years/index.ts
@@ -5,19 +5,19 @@ export type Methods = {
get: {
query: {
company_id: number
- fiscal_year?: number
- start_month?: number
- end_month?: number
- start_date?: string
- end_date?: string
- account_item_display_type?: 'account_item' | 'group'
- breakdown_display_type?: 'partner' | 'item' | 'section' | 'account_item'
- partner_id?: number
- partner_code?: string
- item_id?: number
- section_id?: number
- adjustment?: 'only' | 'without'
- cost_allocation?: 'only' | 'not_include'
+ fiscal_year: number
+ start_month: number
+ end_month: number
+ start_date: string
+ end_date: string
+ account_item_display_type: 'account_item' | 'group'
+ breakdown_display_type: 'partner' | 'item' | 'section' | 'account_item'
+ partner_id: number
+ partner_code: string
+ item_id: number
+ section_id: number
+ adjustment: 'only' | 'without'
+ cost_allocation: 'only' | 'not_include'
}
status: 200
diff --git a/samples/freee/api/1/reports/trial_pl_two_years/index.ts b/samples/freee/api/1/reports/trial_pl_two_years/index.ts
index 56917cc3..55c9d6f6 100644
--- a/samples/freee/api/1/reports/trial_pl_two_years/index.ts
+++ b/samples/freee/api/1/reports/trial_pl_two_years/index.ts
@@ -5,19 +5,19 @@ export type Methods = {
get: {
query: {
company_id: number
- fiscal_year?: number
- start_month?: number
- end_month?: number
- start_date?: string
- end_date?: string
- account_item_display_type?: 'account_item' | 'group'
- breakdown_display_type?: 'partner' | 'item' | 'section' | 'account_item'
- partner_id?: number
- partner_code?: string
- item_id?: number
- section_id?: number
- adjustment?: 'only' | 'without'
- cost_allocation?: 'only' | 'not_include'
+ fiscal_year: number
+ start_month: number
+ end_month: number
+ start_date: string
+ end_date: string
+ account_item_display_type: 'account_item' | 'group'
+ breakdown_display_type: 'partner' | 'item' | 'section' | 'account_item'
+ partner_id: number
+ partner_code: string
+ item_id: number
+ section_id: number
+ adjustment: 'only' | 'without'
+ cost_allocation: 'only' | 'not_include'
}
status: 200
diff --git a/samples/freee/api/1/segments/_segment_id@number/tags/index.ts b/samples/freee/api/1/segments/_segment_id@number/tags/index.ts
index 4cea3cfe..86f4724d 100644
--- a/samples/freee/api/1/segments/_segment_id@number/tags/index.ts
+++ b/samples/freee/api/1/segments/_segment_id@number/tags/index.ts
@@ -5,8 +5,8 @@ export type Methods = {
get: {
query: {
company_id: number
- offset?: number
- limit?: number
+ offset: number
+ limit: number
}
status: 200
diff --git a/samples/freee/api/1/transfers/index.ts b/samples/freee/api/1/transfers/index.ts
index 4701c35d..b9a1f84d 100644
--- a/samples/freee/api/1/transfers/index.ts
+++ b/samples/freee/api/1/transfers/index.ts
@@ -5,10 +5,10 @@ export type Methods = {
get: {
query: {
company_id: number
- start_date?: string
- end_date?: string
- offset?: number
- limit?: number
+ start_date: string
+ end_date: string
+ offset: number
+ limit: number
}
status: 200
diff --git a/samples/freee/api/1/users/$api.ts b/samples/freee/api/1/users/$api.ts
index c80534fb..e9915eb2 100644
--- a/samples/freee/api/1/users/$api.ts
+++ b/samples/freee/api/1/users/$api.ts
@@ -22,9 +22,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
`${prefix}${PATH1}${option && option.query ? `?${dataToURLString(option.query)}` : ''}`
},
me: {
- get: (option?: { query?: Methods2['get']['query'], config?: T }) =>
+ get: (option: { query: Methods2['get']['query'], config?: T }) =>
fetch(prefix, PATH2, GET, option).json(),
- $get: (option?: { query?: Methods2['get']['query'], config?: T }) =>
+ $get: (option: { query: Methods2['get']['query'], config?: T }) =>
fetch(prefix, PATH2, GET, option).json().then(r => r.body),
put: (option?: { body?: Methods2['put']['reqBody'], config?: T }) =>
fetch(prefix, PATH2, PUT, option, 'URLSearchParams').json(),
diff --git a/samples/freee/api/1/users/index.ts b/samples/freee/api/1/users/index.ts
index 97bf3b6a..54b3b442 100644
--- a/samples/freee/api/1/users/index.ts
+++ b/samples/freee/api/1/users/index.ts
@@ -5,7 +5,7 @@ export type Methods = {
get: {
query: {
company_id: number
- limit?: number
+ limit: number
}
status: 200
diff --git a/samples/freee/api/1/users/me/$api.ts b/samples/freee/api/1/users/me/$api.ts
index 14990971..eaf65cd3 100644
--- a/samples/freee/api/1/users/me/$api.ts
+++ b/samples/freee/api/1/users/me/$api.ts
@@ -9,9 +9,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const PUT = 'PUT'
return {
- get: (option?: { query?: Methods0['get']['query'], config?: T }) =>
+ get: (option: { query: Methods0['get']['query'], config?: T }) =>
fetch(prefix, PATH0, GET, option).json(),
- $get: (option?: { query?: Methods0['get']['query'], config?: T }) =>
+ $get: (option: { query: Methods0['get']['query'], config?: T }) =>
fetch(prefix, PATH0, GET, option).json().then(r => r.body),
put: (option?: { body?: Methods0['put']['reqBody'], config?: T }) =>
fetch(prefix, PATH0, PUT, option, 'URLSearchParams').json(),
diff --git a/samples/freee/api/1/users/me/index.ts b/samples/freee/api/1/users/me/index.ts
index b84837fe..1381167d 100644
--- a/samples/freee/api/1/users/me/index.ts
+++ b/samples/freee/api/1/users/me/index.ts
@@ -3,8 +3,8 @@ import * as Types from '../../../../@types'
export type Methods = {
get: {
- query?: {
- companies?: true
+ query: {
+ companies: true
}
status: 200
diff --git a/samples/freee/api/1/wallet_txns/index.ts b/samples/freee/api/1/wallet_txns/index.ts
index 334b4b11..ed40a902 100644
--- a/samples/freee/api/1/wallet_txns/index.ts
+++ b/samples/freee/api/1/wallet_txns/index.ts
@@ -5,13 +5,13 @@ export type Methods = {
get: {
query: {
company_id: number
- walletable_type?: 'bank_account' | 'credit_card' | 'wallet'
- walletable_id?: number
- start_date?: string
- end_date?: string
- entry_side?: 'income' | 'expense'
- offset?: number
- limit?: number
+ walletable_type: 'bank_account' | 'credit_card' | 'wallet'
+ walletable_id: number
+ start_date: string
+ end_date: string
+ entry_side: 'income' | 'expense'
+ offset: number
+ limit: number
}
status: 200
diff --git a/samples/freee/api/1/walletables/index.ts b/samples/freee/api/1/walletables/index.ts
index ec0b1351..93cd880d 100644
--- a/samples/freee/api/1/walletables/index.ts
+++ b/samples/freee/api/1/walletables/index.ts
@@ -5,8 +5,8 @@ export type Methods = {
get: {
query: {
company_id: number
- with_balance?: boolean
- type?: 'bank_account' | 'credit_card' | 'wallet'
+ with_balance: boolean
+ type: 'bank_account' | 'credit_card' | 'wallet'
}
status: 200
@@ -15,7 +15,7 @@ export type Methods = {
walletables: Types.walletableResponse['walletable'][]
meta?: {
- up_to_date?: boolean
+ up_to_date: boolean
}
}
}
diff --git a/samples/openapi/$api.ts b/samples/openapi/$api.ts
index 0cbf7289..04032079 100644
--- a/samples/openapi/$api.ts
+++ b/samples/openapi/$api.ts
@@ -140,9 +140,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const prefix1 = `${PATH2}/${val1}`
return {
- put: (option?: { body?: Methods4['put']['reqBody'], config?: T }) =>
+ put: (option: { body: Methods4['put']['reqBody'], config?: T }) =>
fetch(prefix, prefix1, PUT, option).send(),
- $put: (option?: { body?: Methods4['put']['reqBody'], config?: T }) =>
+ $put: (option: { body: Methods4['put']['reqBody'], config?: T }) =>
fetch(prefix, prefix1, PUT, option).send().then(r => r.body),
$path: () => `${prefix}${prefix1}`
}
@@ -152,16 +152,16 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
return {
cards: {
- post: (option?: { body?: Methods5['post']['reqBody'], config?: T }) =>
+ post: (option: { body: Methods5['post']['reqBody'], config?: T }) =>
fetch(prefix, `${prefix2}${PATH3}`, POST, option).send(),
- $post: (option?: { body?: Methods5['post']['reqBody'], config?: T }) =>
+ $post: (option: { body: Methods5['post']['reqBody'], config?: T }) =>
fetch(prefix, `${prefix2}${PATH3}`, POST, option).send().then(r => r.body),
$path: () => `${prefix}${prefix2}${PATH3}`
},
url: {
- post: (option?: { body?: Methods6['post']['reqBody'], config?: T }) =>
+ post: (option: { body: Methods6['post']['reqBody'], config?: T }) =>
fetch(prefix, `${prefix2}${PATH4}`, POST, option).send(),
- $post: (option?: { body?: Methods6['post']['reqBody'], config?: T }) =>
+ $post: (option: { body: Methods6['post']['reqBody'], config?: T }) =>
fetch(prefix, `${prefix2}${PATH4}`, POST, option).send().then(r => r.body),
$path: () => `${prefix}${prefix2}${PATH4}`
}
@@ -171,39 +171,39 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
fetch(prefix, PATH2, GET, option).json(),
$get: (option?: { config?: T }) =>
fetch(prefix, PATH2, GET, option).json().then(r => r.body),
- post: (option?: { body?: Methods3['post']['reqBody'], config?: T }) =>
+ post: (option: { body: Methods3['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH2, POST, option).json(),
- $post: (option?: { body?: Methods3['post']['reqBody'], config?: T }) =>
+ $post: (option: { body: Methods3['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH2, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH2}`
},
parse: {
image: {
- post: (option?: { body?: Methods8['post']['reqBody'], config?: T }) =>
+ post: (option: { body: Methods8['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH6, POST, option, 'FormData').json(),
- $post: (option?: { body?: Methods8['post']['reqBody'], config?: T }) =>
+ $post: (option: { body: Methods8['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH6, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${PATH6}`
},
- post: (option?: { body?: Methods7['post']['reqBody'], config?: T }) =>
+ post: (option: { body: Methods7['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH5, POST, option).json(),
- $post: (option?: { body?: Methods7['post']['reqBody'], config?: T }) =>
+ $post: (option: { body: Methods7['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH5, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH5}`
},
token: {
- post: (option?: { body?: Methods9['post']['reqBody'], config?: T }) =>
+ post: (option: { body: Methods9['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH7, POST, option).json(),
- $post: (option?: { body?: Methods9['post']['reqBody'], config?: T }) =>
+ $post: (option: { body: Methods9['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH7, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH7}`
}
},
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/@types.ts b/samples/openapi/@types.ts
index e5d22278..17bbe03f 100644
--- a/samples/openapi/@types.ts
+++ b/samples/openapi/@types.ts
@@ -16,15 +16,15 @@ export type UserTokenHeader = {
}
export type AppOrganisationToken = {
- 'x-tchop-app-organisation-token'?: string
+ 'x-tchop-app-organisation-token': string
}
export type UserPublicKey = {
- 'x-tchop-user-public-key'?: string
+ 'x-tchop-user-public-key': string
}
export type UserSignedChallenge = {
- 'x-tchop-user-signed-challenge'?: string
+ 'x-tchop-user-signed-challenge': string
}
export type AppOrganisationTokenRequired = {
@@ -32,7 +32,7 @@ export type AppOrganisationTokenRequired = {
}
export type UserInstanceIdHeader = {
- 'x-tchop-firebase-instance-id'?: string
+ 'x-tchop-firebase-instance-id': string
}
export type ErrorModel = {
@@ -163,39 +163,39 @@ export type ReactionEnumModel = 'like' | 'love' | 'haha' | 'wow' | 'sad' | 'angr
export type CardEnumModel = 'article' | 'image' | 'video' | 'quote' | 'editorial' | 'audio'
export type ReactionCountModel = {
- like?: number
- love?: number
- haha?: number
- wow?: number
- sad?: number
- angry?: number
+ like: number
+ love: number
+ haha: number
+ wow: number
+ sad: number
+ angry: number
}
export type MediaEXIFModel = {
- gps?: {
+ gps: {
x: number
y: number
}
}
export type CardStyleModel = {
- showAuthor?: boolean
- teaserStyle?: 'standard' | 'small_with_text' | 'small_without_text' | 'big_without_text'
+ showAuthor: boolean
+ teaserStyle: 'standard' | 'small_with_text' | 'small_without_text' | 'big_without_text'
}
export type QuoteModel = {
- quotePerson?: string
- quotePersonHandle?: string
- quote?: string
- quoteSource?: string
- image?: string
- quotePersonImage?: string
- quoteCreated?: string
+ quotePerson: string
+ quotePersonHandle: string
+ quote: string
+ quoteSource: string
+ image: string
+ quotePersonImage: string
+ quoteCreated: string
}
export type ArticleModel = {
- title?: string
- abstract?: string
- sourceName?: string
- image?: string
+ title: string
+ abstract: string
+ sourceName: string
+ image: string
}
diff --git a/samples/openapi/api/$api.ts b/samples/openapi/api/$api.ts
index 2b5312fa..5bd7d027 100644
--- a/samples/openapi/api/$api.ts
+++ b/samples/openapi/api/$api.ts
@@ -139,9 +139,9 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
const prefix1 = `${PATH2}/${val1}`
return {
- put: (option?: { body?: Methods4['put']['reqBody'], config?: T }) =>
+ put: (option: { body: Methods4['put']['reqBody'], config?: T }) =>
fetch(prefix, prefix1, PUT, option).send(),
- $put: (option?: { body?: Methods4['put']['reqBody'], config?: T }) =>
+ $put: (option: { body: Methods4['put']['reqBody'], config?: T }) =>
fetch(prefix, prefix1, PUT, option).send().then(r => r.body),
$path: () => `${prefix}${prefix1}`
}
@@ -151,16 +151,16 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
return {
cards: {
- post: (option?: { body?: Methods5['post']['reqBody'], config?: T }) =>
+ post: (option: { body: Methods5['post']['reqBody'], config?: T }) =>
fetch(prefix, `${prefix2}${PATH3}`, POST, option).send(),
- $post: (option?: { body?: Methods5['post']['reqBody'], config?: T }) =>
+ $post: (option: { body: Methods5['post']['reqBody'], config?: T }) =>
fetch(prefix, `${prefix2}${PATH3}`, POST, option).send().then(r => r.body),
$path: () => `${prefix}${prefix2}${PATH3}`
},
url: {
- post: (option?: { body?: Methods6['post']['reqBody'], config?: T }) =>
+ post: (option: { body: Methods6['post']['reqBody'], config?: T }) =>
fetch(prefix, `${prefix2}${PATH4}`, POST, option).send(),
- $post: (option?: { body?: Methods6['post']['reqBody'], config?: T }) =>
+ $post: (option: { body: Methods6['post']['reqBody'], config?: T }) =>
fetch(prefix, `${prefix2}${PATH4}`, POST, option).send().then(r => r.body),
$path: () => `${prefix}${prefix2}${PATH4}`
}
@@ -170,39 +170,39 @@ const api = ({ baseURL, fetch }: AspidaClient) => {
fetch(prefix, PATH2, GET, option).json(),
$get: (option?: { config?: T }) =>
fetch(prefix, PATH2, GET, option).json().then(r => r.body),
- post: (option?: { body?: Methods3['post']['reqBody'], config?: T }) =>
+ post: (option: { body: Methods3['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH2, POST, option).json(),
- $post: (option?: { body?: Methods3['post']['reqBody'], config?: T }) =>
+ $post: (option: { body: Methods3['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH2, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH2}`
},
parse: {
image: {
- post: (option?: { body?: Methods8['post']['reqBody'], config?: T }) =>
+ post: (option: { body: Methods8['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH6, POST, option, 'FormData').json(),
- $post: (option?: { body?: Methods8['post']['reqBody'], config?: T }) =>
+ $post: (option: { body: Methods8['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH6, POST, option, 'FormData').json().then(r => r.body),
$path: () => `${prefix}${PATH6}`
},
- post: (option?: { body?: Methods7['post']['reqBody'], config?: T }) =>
+ post: (option: { body: Methods7['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH5, POST, option).json(),
- $post: (option?: { body?: Methods7['post']['reqBody'], config?: T }) =>
+ $post: (option: { body: Methods7['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH5, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH5}`
},
token: {
- post: (option?: { body?: Methods9['post']['reqBody'], config?: T }) =>
+ post: (option: { body: Methods9['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH7, POST, option).json(),
- $post: (option?: { body?: Methods9['post']['reqBody'], config?: T }) =>
+ $post: (option: { body: Methods9['post']['reqBody'], config?: T }) =>
fetch(prefix, PATH7, POST, option).json().then(r => r.body),
$path: () => `${prefix}${PATH7}`
}
},
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