mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
fix(typescript): typecheck generated samples + fixes (#19903)
* fix(typescript): typecheck generated samples + fixes * wip(today's fortune): The sum of the Universe is zero. * Update .github/workflows/samples-typescript-typecheck.yaml * Update modules/openapi-generator/src/main/resources/typescript/tsconfig.mustache * chore: regenerate samples
This commit is contained in:
parent
ce09134b48
commit
dc3718cd5c
26
.github/workflows/samples-typescript-typecheck.yaml
vendored
Normal file
26
.github/workflows/samples-typescript-typecheck.yaml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: TypeScript clients type checks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/**
|
||||
- bin/ts-typecheck-all.sh
|
||||
- .github/workflows/samples-typescript-typecheck.yaml
|
||||
jobs:
|
||||
build:
|
||||
name: Typecheck TypeScript samples
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version:
|
||||
- 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Run type checker
|
||||
run: ./bin/ts-typecheck-all.sh
|
49
bin/ts-typecheck-all.sh
Executable file
49
bin/ts-typecheck-all.sh
Executable file
@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
log() {
|
||||
echo "$@" >&2
|
||||
}
|
||||
|
||||
npm_install() {
|
||||
# --ignore-scripts because we don't want to run any pre- or postinstall scripts
|
||||
# --no-package-lock because we don't want to update or create the package-lock.json
|
||||
# --no-fund because we don't want to check for funding
|
||||
# --no-audit because we don't want to run an audit
|
||||
# --suppress-warnings because we don't want to see any warnings whilst type checking
|
||||
npm i \
|
||||
--suppress-warnings \
|
||||
--ignore-scripts \
|
||||
--no-package-lock \
|
||||
--no-fund \
|
||||
--no-audit \
|
||||
"$@"
|
||||
}
|
||||
|
||||
main() {
|
||||
local root_dir
|
||||
root_dir=$(git rev-parse --show-toplevel)
|
||||
local dir
|
||||
|
||||
for dir in $(git ls-files samples | grep 'tsconfig.json$' | xargs -n1 dirname | sort -u); do
|
||||
if [[ ! -f "${root_dir}/${dir}/.openapi-generator-ignore" ]]; then
|
||||
# This is not a generated sample; skip it
|
||||
continue
|
||||
fi
|
||||
if [[ ! -f "${root_dir}/${dir}/package.json" ]]; then
|
||||
# we can't really guarantee that all dependencies are there to do a typecheck...
|
||||
continue
|
||||
fi
|
||||
log "➤ ${dir}"
|
||||
pushd "${root_dir}/${dir}" > /dev/null
|
||||
npm_install \
|
||||
|| npm_install --force # --force because we have some incompatible peer-dependencies that can't be fixed
|
||||
npm exec --package=typescript@5.6.3 --yes -- tsc --noEmit
|
||||
log "✓ ${dir}"
|
||||
log
|
||||
popd > /dev/null
|
||||
done
|
||||
}
|
||||
|
||||
main "$@"
|
@ -338,6 +338,7 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
||||
typeMapping.put("Array", "Array");
|
||||
typeMapping.put("array", "Array");
|
||||
typeMapping.put("boolean", "boolean");
|
||||
typeMapping.put("decimal", "string");
|
||||
typeMapping.put("string", "string");
|
||||
typeMapping.put("int", "number");
|
||||
typeMapping.put("float", "number");
|
||||
@ -746,6 +747,11 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp
|
||||
return p.getDefault().toString();
|
||||
}
|
||||
return UNDEFINED_VALUE;
|
||||
} else if (ModelUtils.isDecimalSchema(p)) {
|
||||
if (p.getDefault() != null) {
|
||||
return p.getDefault().toString();
|
||||
}
|
||||
return UNDEFINED_VALUE;
|
||||
} else if (ModelUtils.isDateSchema(p)) {
|
||||
if (p.getDefault() != null) {
|
||||
return p.getDefault().toString();
|
||||
|
@ -59,7 +59,7 @@ export class Api {
|
||||
*/
|
||||
protected ensureParamIsSet<T>(context: string, params: T, paramName: keyof T): void {
|
||||
if (null === params[paramName]) {
|
||||
throw new Error(`Missing required parameter ${paramName} when calling ${context}`);
|
||||
throw new Error(`Missing required parameter ${String(paramName)} when calling ${context}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -326,6 +326,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
{{^withoutRuntimeChecks}}
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
|
@ -13,7 +13,7 @@ export function appFromJS(any: any): any {
|
||||
if (isIndexed(value)) {
|
||||
return knownIndexedSetByKey.indexOf(key) !== -1 ? value.toSet() : value.toList();
|
||||
} // we're reviving an array -> it's a List
|
||||
const MatchingType = knownRecordFactories.get(value.get('recType')) as { new(input?: any): any }; // check if we know a Record with this type
|
||||
const MatchingType = knownRecordFactories.get(value.get('recType') as string) as { new(input?: any): any }; // check if we know a Record with this type
|
||||
if (MatchingType) {
|
||||
return new MatchingType(value);
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ export function *{{nickname}}Saga() {
|
||||
yield takeLatest({{nickname}}, {{nickname}}SagaImp);
|
||||
}
|
||||
|
||||
export function *{{nickname}}SagaImp(_action_: Action<Payload{{#lambda.titlecase}}{{#lambda.camelcase}}{{nickname}}{{/lambda.camelcase}}{{/lambda.titlecase}}>) {
|
||||
export function *{{nickname}}SagaImp(_action_: Action<Payload{{#lambda.titlecase}}{{#lambda.camelcase}}{{nickname}}{{/lambda.camelcase}}{{/lambda.titlecase}}>){{^returnType}}: any{{/returnType}} {
|
||||
const {markErrorsAsHandled, ..._payloadRest_} = _action_.payload;
|
||||
try {
|
||||
{{#returnTypeSupportsEntities}}
|
||||
@ -233,7 +233,7 @@ export function *{{nickname}}SagaImp(_action_: Action<Payload{{#lambda.titlecase
|
||||
{{^returnType}}
|
||||
return undefined;
|
||||
{{/returnType}}
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put({{nickname}}Failure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
|
@ -1,4 +1,9 @@
|
||||
{{#useAxiosHttpModule}}
|
||||
import type { HttpService } from '@nestjs/axios';
|
||||
{{/useAxiosHttpModule}}
|
||||
{{^useAxiosHttpModule}}
|
||||
import type { HttpService } from '@nestjs/common';
|
||||
{{/useAxiosHttpModule}}
|
||||
import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
|
@ -43,7 +43,7 @@
|
||||
"@nestjs/testing": "~{{nestVersion}}",
|
||||
"@types/express": "^4.16.0",
|
||||
"@types/jest": "^24.0.15",
|
||||
"@types/node": "^14.8.2",
|
||||
"@types/node": "*",
|
||||
"@types/supertest": "^2.0.8",
|
||||
"concurrently": "^4.1.1",
|
||||
"nodemon": "^1.19.1",
|
||||
|
@ -123,13 +123,14 @@ export type ApiKeyConfiguration = string;
|
||||
export type HttpBasicConfiguration = { "username": string, "password": string };
|
||||
export type HttpBearerConfiguration = { tokenProvider: TokenProvider };
|
||||
export type OAuth2Configuration = { accessToken: string };
|
||||
export type HttpSignatureConfiguration = unknown; // TODO: Implement
|
||||
|
||||
export type AuthMethodsConfiguration = {
|
||||
{{^useInversify}}
|
||||
"default"?: SecurityAuthentication,
|
||||
{{/useInversify}}
|
||||
{{#authMethods}}
|
||||
"{{name}}"?: {{#isApiKey}}ApiKeyConfiguration{{/isApiKey}}{{#isBasicBasic}}HttpBasicConfiguration{{/isBasicBasic}}{{#isBasicBearer}}HttpBearerConfiguration{{/isBasicBearer}}{{#isOAuth}}OAuth2Configuration{{/isOAuth}}{{^-last}},{{/-last}}
|
||||
"{{name}}"?: {{#isApiKey}}ApiKeyConfiguration{{/isApiKey}}{{#isBasicBasic}}HttpBasicConfiguration{{/isBasicBasic}}{{#isBasicBearer}}HttpBearerConfiguration{{/isBasicBearer}}{{#isOAuth}}OAuth2Configuration{{/isOAuth}}{{#isHttpSignature}}HttpSignatureConfiguration{{/isHttpSignature}}{{^-last}},{{/-last}}
|
||||
{{/authMethods}}
|
||||
}
|
||||
|
||||
|
@ -243,9 +243,12 @@ export class ResponseContext {
|
||||
return result;
|
||||
}
|
||||
|
||||
const parameters = this.headers[headerName].split(";");
|
||||
const parameters = this.headers[headerName]!.split(";");
|
||||
for (const parameter of parameters) {
|
||||
let [key, value] = parameter.split("=", 2);
|
||||
if (!key) {
|
||||
continue;
|
||||
}
|
||||
key = key.toLowerCase().trim();
|
||||
if (value === undefined) {
|
||||
result[""] = key;
|
||||
|
@ -30,9 +30,8 @@ export class ServerConfiguration<T extends { [key: string]: string }> implements
|
||||
|
||||
private getUrl() {
|
||||
let replacedUrl = this.url;
|
||||
for (const key in this.variableConfiguration) {
|
||||
var re = new RegExp("{" + key + "}","g");
|
||||
replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
|
||||
for (const [key, value] of Object.entries(this.variableConfiguration)) {
|
||||
replacedUrl = replacedUrl.replaceAll(`{${key}}`, value);
|
||||
}
|
||||
return replacedUrl
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ type MimeTypeDescriptor = {
|
||||
* the payload.
|
||||
*/
|
||||
const parseMimeType = (mimeType: string): MimeTypeDescriptor => {
|
||||
const [type, subtype] = mimeType.split('/');
|
||||
const [type = '', subtype = ''] = mimeType.split('/');
|
||||
return {
|
||||
type,
|
||||
subtype,
|
||||
@ -272,7 +272,7 @@ export class ObjectSerializer {
|
||||
if (mediaType === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
return mediaType.split(";")[0].trim().toLowerCase();
|
||||
return (mediaType.split(";")[0] ?? '').trim().toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -27,14 +27,14 @@ export class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{
|
||||
{{/vars}}
|
||||
|
||||
{{#discriminator}}
|
||||
static readonly discriminator: string | undefined = "{{discriminatorName}}";
|
||||
static {{#parent}}override {{/parent}}readonly discriminator: string | undefined = "{{discriminatorName}}";
|
||||
{{/discriminator}}
|
||||
{{^discriminator}}
|
||||
static readonly discriminator: string | undefined = undefined;
|
||||
static {{#parent}}override {{/parent}}readonly discriminator: string | undefined = undefined;
|
||||
{{/discriminator}}
|
||||
{{#hasDiscriminatorWithNonEmptyMapping}}
|
||||
|
||||
static readonly mapping: {[index: string]: string} | undefined = {
|
||||
static {{#parent}}override {{/parent}}readonly mapping: {[index: string]: string} | undefined = {
|
||||
{{#discriminator.mappedModels}}
|
||||
"{{mappingName}}": "{{modelName}}",
|
||||
{{/discriminator.mappedModels}}
|
||||
@ -42,11 +42,11 @@ export class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{
|
||||
{{/hasDiscriminatorWithNonEmptyMapping}}
|
||||
{{^hasDiscriminatorWithNonEmptyMapping}}
|
||||
|
||||
static readonly mapping: {[index: string]: string} | undefined = undefined;
|
||||
static {{#parent}}override {{/parent}}readonly mapping: {[index: string]: string} | undefined = undefined;
|
||||
{{/hasDiscriminatorWithNonEmptyMapping}}
|
||||
|
||||
{{^isArray}}
|
||||
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
||||
static {{#parent}}override {{/parent}}readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
||||
{{#vars}}
|
||||
{
|
||||
"name": "{{name}}",
|
||||
@ -58,7 +58,7 @@ export class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{
|
||||
{{/vars}}
|
||||
];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
static {{#parent}}override {{/parent}}getAttributeTypeMap() {
|
||||
{{#parent}}
|
||||
return super.getAttributeTypeMap().concat({{classname}}.attributeTypeMap);
|
||||
{{/parent}}
|
||||
|
@ -69,7 +69,7 @@
|
||||
"rxjs": "^6.4.0",
|
||||
{{/useRxJS}}
|
||||
{{#useInversify}}
|
||||
"inversify": "^5.0.1",
|
||||
"inversify": "^6.0.1",
|
||||
{{/useInversify}}
|
||||
"es6-promise": "^4.2.4",
|
||||
"url-parse": "^1.4.3"
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { inject, injectable, multiInject, optional, interfaces } from "inversify";
|
||||
|
||||
import { Configuration } from "../configuration";
|
||||
import { ServerConfiguration, servers } from "../servers";
|
||||
import { ServerConfiguration, servers{{#servers}}, server1{{/servers}} } from "../servers";
|
||||
import { HttpLibrary{{^useRxJS}}, wrapHttpLibrary{{/useRxJS}} } from "../http/http";
|
||||
import { Middleware{{^useRxJS}}, PromiseMiddlewareWrapper{{/useRxJS}} } from "../middleware";
|
||||
import { authMethodServices, AuthMethods } from "../auth/auth";
|
||||
@ -42,7 +42,7 @@ class InjectableConfiguration implements AbstractConfiguration {
|
||||
public authMethods: AuthMethods = {};
|
||||
|
||||
constructor(
|
||||
@inject(AbstractServerConfiguration) @optional() public baseServer: AbstractServerConfiguration = servers[0],
|
||||
@inject(AbstractServerConfiguration) @optional() public baseServer: AbstractServerConfiguration{{#servers}} = server1{{/servers}},
|
||||
@inject(AbstractHttpLibrary) @optional() httpApi: AbstractHttpLibrary,
|
||||
@multiInject(AbstractMiddleware) @optional() middleware: AbstractMiddleware[] = [],
|
||||
@multiInject(AbstractAuthMethod) @optional() securityConfiguration: AbstractAuthMethod[] = []
|
||||
@ -90,6 +90,9 @@ export class ApiServiceBinder {
|
||||
* return value;
|
||||
*/
|
||||
public bindServerConfigurationToPredefined(idx: number) {
|
||||
if (!servers[idx]) {
|
||||
throw new Error(`Server ${idx} is not available.`);
|
||||
}
|
||||
this.bindServerConfiguration.toConstantValue(servers[idx]);
|
||||
return servers[idx];
|
||||
}
|
||||
|
@ -13,22 +13,29 @@
|
||||
"declaration": true,
|
||||
|
||||
/* Additional Checks */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
||||
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
||||
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"noLib": false,
|
||||
{{#platforms}}
|
||||
"lib": [
|
||||
"es6"
|
||||
,"ES2017.Object"
|
||||
,"ES2021.String"
|
||||
{{#node}}
|
||||
"lib": [ "es6" ],
|
||||
{{/node}}
|
||||
{{#browser}}
|
||||
"lib": [ "es6", "dom" ],
|
||||
,"dom"
|
||||
{{/browser}}
|
||||
],
|
||||
{{/platforms}}
|
||||
{{#useInversify}}
|
||||
"experimentalDecorators": true,
|
||||
|
140
samples/client/echo_api/typescript-axios/build/package-lock.json
generated
Normal file
140
samples/client/echo_api/typescript-axios/build/package-lock.json
generated
Normal file
@ -0,0 +1,140 @@
|
||||
{
|
||||
"name": "@openapitools/typescript-axios-echo-api",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@openapitools/typescript-axios-echo-api",
|
||||
"version": "1.0.0",
|
||||
"license": "Unlicense",
|
||||
"dependencies": {
|
||||
"axios": "^1.6.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "12.11.5 - 12.20.42",
|
||||
"typescript": "^4.0 || ^5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "12.20.42",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.42.tgz",
|
||||
"integrity": "sha512-aI3/oo5DzyiI5R/xAhxxRzfZlWlsbbqdgxfTPkqu/Zt+23GXiJvMCyPJT4+xKSXOnLqoL8jJYMLTwvK2M3a5hw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.7.7",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz",
|
||||
"integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.6",
|
||||
"form-data": "^4.0.0",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.9",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz",
|
||||
"integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz",
|
||||
"integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"mime-types": "^2.1.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.52.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.35",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.52.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/proxy-from-env": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.6.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
|
||||
"integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
574
samples/client/others/typescript-node/encode-decode/build/package-lock.json
generated
Normal file
574
samples/client/others/typescript-node/encode-decode/build/package-lock.json
generated
Normal file
@ -0,0 +1,574 @@
|
||||
{
|
||||
"name": "@openapitools/typescript-node-encode-decode",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@openapitools/typescript-node-encode-decode",
|
||||
"version": "1.0.0",
|
||||
"license": "Unlicense",
|
||||
"dependencies": {
|
||||
"bluebird": "^3.7.2",
|
||||
"request": "^2.88.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bluebird": "^3.5.33",
|
||||
"@types/node": "^12",
|
||||
"@types/request": "^2.48.8",
|
||||
"typescript": "^4.0 || ^5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/bluebird": {
|
||||
"version": "3.5.42",
|
||||
"resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.42.tgz",
|
||||
"integrity": "sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/caseless": {
|
||||
"version": "0.12.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.5.tgz",
|
||||
"integrity": "sha512-hWtVTC2q7hc7xZ/RLbxapMvDMgUnDvKvMOpKal4DrMyfGBUfB1oKaZlIRr6mJL+If3bAP6sV/QneGzF6tJjZDg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "12.20.55",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz",
|
||||
"integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/request": {
|
||||
"version": "2.48.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/request/-/request-2.48.12.tgz",
|
||||
"integrity": "sha512-G3sY+NpsA9jnwm0ixhAFQSJ3Q9JkpLZpJbI3GMv0mIAT0y3mRabYeINzal5WOChIiaTEGQYlHOKgkaM9EisWHw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/caseless": "*",
|
||||
"@types/node": "*",
|
||||
"@types/tough-cookie": "*",
|
||||
"form-data": "^2.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/tough-cookie": {
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz",
|
||||
"integrity": "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/ajv": {
|
||||
"version": "6.12.6",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
|
||||
"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fast-deep-equal": "^3.1.1",
|
||||
"fast-json-stable-stringify": "^2.0.0",
|
||||
"json-schema-traverse": "^0.4.1",
|
||||
"uri-js": "^4.2.2"
|
||||
},
|
||||
"funding": {
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/epoberezkin"
|
||||
}
|
||||
},
|
||||
"node_modules/asn1": {
|
||||
"version": "0.2.6",
|
||||
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
|
||||
"integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safer-buffer": "~2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/assert-plus": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
||||
"integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/aws-sign2": {
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
|
||||
"integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/aws4": {
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz",
|
||||
"integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bcrypt-pbkdf": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
|
||||
"integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"tweetnacl": "^0.14.3"
|
||||
}
|
||||
},
|
||||
"node_modules/bluebird": {
|
||||
"version": "3.7.2",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
|
||||
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/caseless": {
|
||||
"version": "0.12.0",
|
||||
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
|
||||
"integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==",
|
||||
"license": "Apache-2.0"
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/dashdash": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
|
||||
"integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"assert-plus": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ecc-jsbn": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
|
||||
"integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"jsbn": "~0.1.0",
|
||||
"safer-buffer": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/extend": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
|
||||
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/extsprintf": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
|
||||
"integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==",
|
||||
"engines": [
|
||||
"node >=0.6.0"
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fast-deep-equal": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/fast-json-stable-stringify": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
|
||||
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/forever-agent": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
|
||||
"integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.2.tgz",
|
||||
"integrity": "sha512-GgwY0PS7DbXqajuGf4OYlsrIu3zgxD6Vvql43IBhm6MahqA5SK/7mwhtNj2AdH2z35YR34ujJ7BN+3fFC3jP5Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.6",
|
||||
"mime-types": "^2.1.12",
|
||||
"safe-buffer": "^5.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.12"
|
||||
}
|
||||
},
|
||||
"node_modules/getpass": {
|
||||
"version": "0.1.7",
|
||||
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
|
||||
"integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"assert-plus": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/har-schema": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
|
||||
"integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/har-validator": {
|
||||
"version": "5.1.5",
|
||||
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
|
||||
"integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
|
||||
"deprecated": "this library is no longer supported",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ajv": "^6.12.3",
|
||||
"har-schema": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/http-signature": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
|
||||
"integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"assert-plus": "^1.0.0",
|
||||
"jsprim": "^1.2.2",
|
||||
"sshpk": "^1.7.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8",
|
||||
"npm": ">=1.3.7"
|
||||
}
|
||||
},
|
||||
"node_modules/is-typedarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
|
||||
"integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/isstream": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
||||
"integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/jsbn": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
|
||||
"integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/json-schema": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
|
||||
"integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==",
|
||||
"license": "(AFL-2.1 OR BSD-3-Clause)"
|
||||
},
|
||||
"node_modules/json-schema-traverse": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/json-stringify-safe": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
|
||||
"integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/jsprim": {
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz",
|
||||
"integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"assert-plus": "1.0.0",
|
||||
"extsprintf": "1.3.0",
|
||||
"json-schema": "0.4.0",
|
||||
"verror": "1.10.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.52.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.35",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.52.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/oauth-sign": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
|
||||
"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/performance-now": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
|
||||
"integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/psl": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
|
||||
"integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/punycode": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
|
||||
"integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/qs": {
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
|
||||
"integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==",
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/request": {
|
||||
"version": "2.88.2",
|
||||
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
|
||||
"integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
|
||||
"deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"aws-sign2": "~0.7.0",
|
||||
"aws4": "^1.8.0",
|
||||
"caseless": "~0.12.0",
|
||||
"combined-stream": "~1.0.6",
|
||||
"extend": "~3.0.2",
|
||||
"forever-agent": "~0.6.1",
|
||||
"form-data": "~2.3.2",
|
||||
"har-validator": "~5.1.3",
|
||||
"http-signature": "~1.2.0",
|
||||
"is-typedarray": "~1.0.0",
|
||||
"isstream": "~0.1.2",
|
||||
"json-stringify-safe": "~5.0.1",
|
||||
"mime-types": "~2.1.19",
|
||||
"oauth-sign": "~0.9.0",
|
||||
"performance-now": "^2.1.0",
|
||||
"qs": "~6.5.2",
|
||||
"safe-buffer": "^5.1.2",
|
||||
"tough-cookie": "~2.5.0",
|
||||
"tunnel-agent": "^0.6.0",
|
||||
"uuid": "^3.3.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/request/node_modules/form-data": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
|
||||
"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.6",
|
||||
"mime-types": "^2.1.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.12"
|
||||
}
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/sshpk": {
|
||||
"version": "1.18.0",
|
||||
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz",
|
||||
"integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asn1": "~0.2.3",
|
||||
"assert-plus": "^1.0.0",
|
||||
"bcrypt-pbkdf": "^1.0.0",
|
||||
"dashdash": "^1.12.0",
|
||||
"ecc-jsbn": "~0.1.1",
|
||||
"getpass": "^0.1.1",
|
||||
"jsbn": "~0.1.0",
|
||||
"safer-buffer": "^2.0.2",
|
||||
"tweetnacl": "~0.14.0"
|
||||
},
|
||||
"bin": {
|
||||
"sshpk-conv": "bin/sshpk-conv",
|
||||
"sshpk-sign": "bin/sshpk-sign",
|
||||
"sshpk-verify": "bin/sshpk-verify"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tough-cookie": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
|
||||
"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"psl": "^1.1.28",
|
||||
"punycode": "^2.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/tunnel-agent": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"safe-buffer": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/tweetnacl": {
|
||||
"version": "0.14.5",
|
||||
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
|
||||
"integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==",
|
||||
"license": "Unlicense"
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.6.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
|
||||
"integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/uri-js": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
|
||||
"integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"punycode": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
|
||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
||||
"deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/verror": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
|
||||
"integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==",
|
||||
"engines": [
|
||||
"node >=0.6.0"
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"assert-plus": "^1.0.0",
|
||||
"core-util-is": "1.0.2",
|
||||
"extsprintf": "^1.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import * as nock from 'nock';
|
||||
import nock from 'nock';
|
||||
|
||||
export const BASE_URL = 'http://localhost:1234';
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
"target": "ES5",
|
||||
"noImplicitAny": true,
|
||||
"sourceMap": false,
|
||||
"esModuleInterop": true,
|
||||
"outDir": "dist",
|
||||
"types": [
|
||||
"mocha"
|
||||
|
@ -30,6 +30,7 @@ export type ApiKeyConfiguration = string;
|
||||
export type HttpBasicConfiguration = { "username": string, "password": string };
|
||||
export type HttpBearerConfiguration = { tokenProvider: TokenProvider };
|
||||
export type OAuth2Configuration = { accessToken: string };
|
||||
export type HttpSignatureConfiguration = unknown; // TODO: Implement
|
||||
|
||||
export type AuthMethodsConfiguration = {
|
||||
"default"?: SecurityAuthentication,
|
||||
|
@ -179,9 +179,12 @@ export class ResponseContext {
|
||||
return result;
|
||||
}
|
||||
|
||||
const parameters = this.headers[headerName].split(";");
|
||||
const parameters = this.headers[headerName]!.split(";");
|
||||
for (const parameter of parameters) {
|
||||
let [key, value] = parameter.split("=", 2);
|
||||
if (!key) {
|
||||
continue;
|
||||
}
|
||||
key = key.toLowerCase().trim();
|
||||
if (value === undefined) {
|
||||
result[""] = key;
|
||||
|
@ -40,7 +40,7 @@ type MimeTypeDescriptor = {
|
||||
* the payload.
|
||||
*/
|
||||
const parseMimeType = (mimeType: string): MimeTypeDescriptor => {
|
||||
const [type, subtype] = mimeType.split('/');
|
||||
const [type = '', subtype = ''] = mimeType.split('/');
|
||||
return {
|
||||
type,
|
||||
subtype,
|
||||
@ -247,7 +247,7 @@ export class ObjectSerializer {
|
||||
if (mediaType === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
return mediaType.split(";")[0].trim().toLowerCase();
|
||||
return (mediaType.split(";")[0] ?? '').trim().toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,9 +30,8 @@ export class ServerConfiguration<T extends { [key: string]: string }> implements
|
||||
|
||||
private getUrl() {
|
||||
let replacedUrl = this.url;
|
||||
for (const key in this.variableConfiguration) {
|
||||
var re = new RegExp("{" + key + "}","g");
|
||||
replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
|
||||
for (const [key, value] of Object.entries(this.variableConfiguration)) {
|
||||
replacedUrl = replacedUrl.replaceAll(`{${key}}`, value);
|
||||
}
|
||||
return replacedUrl
|
||||
}
|
||||
|
@ -7,16 +7,24 @@
|
||||
"declaration": true,
|
||||
|
||||
/* Additional Checks */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
||||
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
||||
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"noLib": false,
|
||||
"lib": [ "es6", "dom" ],
|
||||
"lib": [
|
||||
"es6"
|
||||
,"ES2017.Object"
|
||||
,"ES2021.String"
|
||||
,"dom"
|
||||
],
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
|
@ -30,6 +30,7 @@ export type ApiKeyConfiguration = string;
|
||||
export type HttpBasicConfiguration = { "username": string, "password": string };
|
||||
export type HttpBearerConfiguration = { tokenProvider: TokenProvider };
|
||||
export type OAuth2Configuration = { accessToken: string };
|
||||
export type HttpSignatureConfiguration = unknown; // TODO: Implement
|
||||
|
||||
export type AuthMethodsConfiguration = {
|
||||
"default"?: SecurityAuthentication,
|
||||
|
@ -179,9 +179,12 @@ export class ResponseContext {
|
||||
return result;
|
||||
}
|
||||
|
||||
const parameters = this.headers[headerName].split(";");
|
||||
const parameters = this.headers[headerName]!.split(";");
|
||||
for (const parameter of parameters) {
|
||||
let [key, value] = parameter.split("=", 2);
|
||||
if (!key) {
|
||||
continue;
|
||||
}
|
||||
key = key.toLowerCase().trim();
|
||||
if (value === undefined) {
|
||||
result[""] = key;
|
||||
|
@ -42,7 +42,7 @@ type MimeTypeDescriptor = {
|
||||
* the payload.
|
||||
*/
|
||||
const parseMimeType = (mimeType: string): MimeTypeDescriptor => {
|
||||
const [type, subtype] = mimeType.split('/');
|
||||
const [type = '', subtype = ''] = mimeType.split('/');
|
||||
return {
|
||||
type,
|
||||
subtype,
|
||||
@ -249,7 +249,7 @@ export class ObjectSerializer {
|
||||
if (mediaType === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
return mediaType.split(";")[0].trim().toLowerCase();
|
||||
return (mediaType.split(";")[0] ?? '').trim().toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,9 +30,8 @@ export class ServerConfiguration<T extends { [key: string]: string }> implements
|
||||
|
||||
private getUrl() {
|
||||
let replacedUrl = this.url;
|
||||
for (const key in this.variableConfiguration) {
|
||||
var re = new RegExp("{" + key + "}","g");
|
||||
replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
|
||||
for (const [key, value] of Object.entries(this.variableConfiguration)) {
|
||||
replacedUrl = replacedUrl.replaceAll(`{${key}}`, value);
|
||||
}
|
||||
return replacedUrl
|
||||
}
|
||||
|
@ -7,16 +7,24 @@
|
||||
"declaration": true,
|
||||
|
||||
/* Additional Checks */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
||||
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
||||
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"noLib": false,
|
||||
"lib": [ "es6", "dom" ],
|
||||
"lib": [
|
||||
"es6"
|
||||
,"ES2017.Object"
|
||||
,"ES2021.String"
|
||||
,"dom"
|
||||
],
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
|
@ -30,6 +30,7 @@ export type ApiKeyConfiguration = string;
|
||||
export type HttpBasicConfiguration = { "username": string, "password": string };
|
||||
export type HttpBearerConfiguration = { tokenProvider: TokenProvider };
|
||||
export type OAuth2Configuration = { accessToken: string };
|
||||
export type HttpSignatureConfiguration = unknown; // TODO: Implement
|
||||
|
||||
export type AuthMethodsConfiguration = {
|
||||
"default"?: SecurityAuthentication,
|
||||
|
@ -179,9 +179,12 @@ export class ResponseContext {
|
||||
return result;
|
||||
}
|
||||
|
||||
const parameters = this.headers[headerName].split(";");
|
||||
const parameters = this.headers[headerName]!.split(";");
|
||||
for (const parameter of parameters) {
|
||||
let [key, value] = parameter.split("=", 2);
|
||||
if (!key) {
|
||||
continue;
|
||||
}
|
||||
key = key.toLowerCase().trim();
|
||||
if (value === undefined) {
|
||||
result[""] = key;
|
||||
|
@ -40,7 +40,7 @@ type MimeTypeDescriptor = {
|
||||
* the payload.
|
||||
*/
|
||||
const parseMimeType = (mimeType: string): MimeTypeDescriptor => {
|
||||
const [type, subtype] = mimeType.split('/');
|
||||
const [type = '', subtype = ''] = mimeType.split('/');
|
||||
return {
|
||||
type,
|
||||
subtype,
|
||||
@ -247,7 +247,7 @@ export class ObjectSerializer {
|
||||
if (mediaType === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
return mediaType.split(";")[0].trim().toLowerCase();
|
||||
return (mediaType.split(";")[0] ?? '').trim().toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,9 +30,8 @@ export class ServerConfiguration<T extends { [key: string]: string }> implements
|
||||
|
||||
private getUrl() {
|
||||
let replacedUrl = this.url;
|
||||
for (const key in this.variableConfiguration) {
|
||||
var re = new RegExp("{" + key + "}","g");
|
||||
replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
|
||||
for (const [key, value] of Object.entries(this.variableConfiguration)) {
|
||||
replacedUrl = replacedUrl.replaceAll(`{${key}}`, value);
|
||||
}
|
||||
return replacedUrl
|
||||
}
|
||||
|
@ -7,16 +7,24 @@
|
||||
"declaration": true,
|
||||
|
||||
/* Additional Checks */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
||||
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
||||
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"noLib": false,
|
||||
"lib": [ "es6", "dom" ],
|
||||
"lib": [
|
||||
"es6"
|
||||
,"ES2017.Object"
|
||||
,"ES2021.String"
|
||||
,"dom"
|
||||
],
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
|
@ -30,6 +30,7 @@ export type ApiKeyConfiguration = string;
|
||||
export type HttpBasicConfiguration = { "username": string, "password": string };
|
||||
export type HttpBearerConfiguration = { tokenProvider: TokenProvider };
|
||||
export type OAuth2Configuration = { accessToken: string };
|
||||
export type HttpSignatureConfiguration = unknown; // TODO: Implement
|
||||
|
||||
export type AuthMethodsConfiguration = {
|
||||
"default"?: SecurityAuthentication,
|
||||
|
@ -179,9 +179,12 @@ export class ResponseContext {
|
||||
return result;
|
||||
}
|
||||
|
||||
const parameters = this.headers[headerName].split(";");
|
||||
const parameters = this.headers[headerName]!.split(";");
|
||||
for (const parameter of parameters) {
|
||||
let [key, value] = parameter.split("=", 2);
|
||||
if (!key) {
|
||||
continue;
|
||||
}
|
||||
key = key.toLowerCase().trim();
|
||||
if (value === undefined) {
|
||||
result[""] = key;
|
||||
|
@ -37,7 +37,7 @@ type MimeTypeDescriptor = {
|
||||
* the payload.
|
||||
*/
|
||||
const parseMimeType = (mimeType: string): MimeTypeDescriptor => {
|
||||
const [type, subtype] = mimeType.split('/');
|
||||
const [type = '', subtype = ''] = mimeType.split('/');
|
||||
return {
|
||||
type,
|
||||
subtype,
|
||||
@ -244,7 +244,7 @@ export class ObjectSerializer {
|
||||
if (mediaType === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
return mediaType.split(";")[0].trim().toLowerCase();
|
||||
return (mediaType.split(";")[0] ?? '').trim().toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,9 +30,8 @@ export class ServerConfiguration<T extends { [key: string]: string }> implements
|
||||
|
||||
private getUrl() {
|
||||
let replacedUrl = this.url;
|
||||
for (const key in this.variableConfiguration) {
|
||||
var re = new RegExp("{" + key + "}","g");
|
||||
replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
|
||||
for (const [key, value] of Object.entries(this.variableConfiguration)) {
|
||||
replacedUrl = replacedUrl.replaceAll(`{${key}}`, value);
|
||||
}
|
||||
return replacedUrl
|
||||
}
|
||||
|
@ -7,16 +7,24 @@
|
||||
"declaration": true,
|
||||
|
||||
/* Additional Checks */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
||||
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
||||
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"noLib": false,
|
||||
"lib": [ "es6", "dom" ],
|
||||
"lib": [
|
||||
"es6"
|
||||
,"ES2017.Object"
|
||||
,"ES2021.String"
|
||||
,"dom"
|
||||
],
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
|
@ -30,6 +30,7 @@ export type ApiKeyConfiguration = string;
|
||||
export type HttpBasicConfiguration = { "username": string, "password": string };
|
||||
export type HttpBearerConfiguration = { tokenProvider: TokenProvider };
|
||||
export type OAuth2Configuration = { accessToken: string };
|
||||
export type HttpSignatureConfiguration = unknown; // TODO: Implement
|
||||
|
||||
export type AuthMethodsConfiguration = {
|
||||
"default"?: SecurityAuthentication,
|
||||
|
@ -185,9 +185,12 @@ export class ResponseContext {
|
||||
return result;
|
||||
}
|
||||
|
||||
const parameters = this.headers[headerName].split(";");
|
||||
const parameters = this.headers[headerName]!.split(";");
|
||||
for (const parameter of parameters) {
|
||||
let [key, value] = parameter.split("=", 2);
|
||||
if (!key) {
|
||||
continue;
|
||||
}
|
||||
key = key.toLowerCase().trim();
|
||||
if (value === undefined) {
|
||||
result[""] = key;
|
||||
|
@ -40,7 +40,7 @@ type MimeTypeDescriptor = {
|
||||
* the payload.
|
||||
*/
|
||||
const parseMimeType = (mimeType: string): MimeTypeDescriptor => {
|
||||
const [type, subtype] = mimeType.split('/');
|
||||
const [type = '', subtype = ''] = mimeType.split('/');
|
||||
return {
|
||||
type,
|
||||
subtype,
|
||||
@ -247,7 +247,7 @@ export class ObjectSerializer {
|
||||
if (mediaType === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
return mediaType.split(";")[0].trim().toLowerCase();
|
||||
return (mediaType.split(";")[0] ?? '').trim().toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
|
238
samples/client/others/typescript/encode-decode/build/package-lock.json
generated
Normal file
238
samples/client/others/typescript/encode-decode/build/package-lock.json
generated
Normal file
@ -0,0 +1,238 @@
|
||||
{
|
||||
"name": "@openapitools/typescript-encode-decode",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@openapitools/typescript-encode-decode",
|
||||
"version": "1.0.0",
|
||||
"license": "Unlicense",
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"@types/node-fetch": "^2.5.7",
|
||||
"es6-promise": "^4.2.4",
|
||||
"form-data": "^2.5.0",
|
||||
"node-fetch": "^2.6.0",
|
||||
"url-parse": "^1.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/url-parse": "1.4.4",
|
||||
"typescript": "^4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "22.7.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.6.tgz",
|
||||
"integrity": "sha512-/d7Rnj0/ExXDMcioS78/kf1lMzYk4BZV8MZGTBKzTGZ6/406ukkbYlIsZmMPhcR5KlkunDHQLrtAVmSq7r+mSw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.19.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node-fetch": {
|
||||
"version": "2.6.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.11.tgz",
|
||||
"integrity": "sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"form-data": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node-fetch/node_modules/form-data": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz",
|
||||
"integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"mime-types": "^2.1.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/url-parse": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/url-parse/-/url-parse-1.4.4.tgz",
|
||||
"integrity": "sha512-KtQLad12+4T/NfSxpoDhmr22+fig3T7/08QCgmutYA6QSznSRmEtuL95GrhVV40/0otTEdFc+etRcCTqhh1q5Q==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/es6-promise": {
|
||||
"version": "4.2.8",
|
||||
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
|
||||
"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.2.tgz",
|
||||
"integrity": "sha512-GgwY0PS7DbXqajuGf4OYlsrIu3zgxD6Vvql43IBhm6MahqA5SK/7mwhtNj2AdH2z35YR34ujJ7BN+3fFC3jP5Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.6",
|
||||
"mime-types": "^2.1.12",
|
||||
"safe-buffer": "^5.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.12"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.52.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.35",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.52.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/node-fetch": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
||||
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "4.x || >=6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"encoding": "^0.1.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"encoding": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/querystringify": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
|
||||
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/requires-port": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
|
||||
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.9.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
|
||||
"integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.19.8",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
|
||||
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/url-parse": {
|
||||
"version": "1.5.10",
|
||||
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
|
||||
"integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"querystringify": "^2.1.1",
|
||||
"requires-port": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
|
||||
"license": "BSD-2-Clause"
|
||||
},
|
||||
"node_modules/whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -30,9 +30,8 @@ export class ServerConfiguration<T extends { [key: string]: string }> implements
|
||||
|
||||
private getUrl() {
|
||||
let replacedUrl = this.url;
|
||||
for (const key in this.variableConfiguration) {
|
||||
var re = new RegExp("{" + key + "}","g");
|
||||
replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
|
||||
for (const [key, value] of Object.entries(this.variableConfiguration)) {
|
||||
replacedUrl = replacedUrl.replaceAll(`{${key}}`, value);
|
||||
}
|
||||
return replacedUrl
|
||||
}
|
||||
|
@ -7,16 +7,23 @@
|
||||
"declaration": true,
|
||||
|
||||
/* Additional Checks */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
||||
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
||||
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"noLib": false,
|
||||
"lib": [ "es6" ],
|
||||
"lib": [
|
||||
"es6"
|
||||
,"ES2017.Object"
|
||||
,"ES2021.String"
|
||||
],
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
|
@ -8,7 +8,7 @@
|
||||
"chai": "^4.3.0",
|
||||
"mocha": "^10.2.0",
|
||||
"ts-node": "^10.9.0",
|
||||
"typescript": "^5.2.2"
|
||||
"typescript": "^5.6.3"
|
||||
},
|
||||
"scripts": {
|
||||
"preinstall": "npm --prefix ../build install",
|
||||
|
5457
samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package-lock.json
generated
Normal file
5457
samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -70,7 +70,7 @@ export class Api {
|
||||
*/
|
||||
protected ensureParamIsSet<T>(context: string, params: T, paramName: keyof T): void {
|
||||
if (null === params[paramName]) {
|
||||
throw new Error(`Missing required parameter ${paramName} when calling ${context}`);
|
||||
throw new Error(`Missing required parameter ${String(paramName)} when calling ${context}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -725,10 +725,10 @@ export interface FormatTest {
|
||||
'double'?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Decimal}
|
||||
* @type {string}
|
||||
* @memberof FormatTest
|
||||
*/
|
||||
'decimal'?: Decimal;
|
||||
'decimal'?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -13,14 +13,6 @@
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { Decimal } from './Decimal';
|
||||
import {
|
||||
DecimalFromJSON,
|
||||
DecimalFromJSONTyped,
|
||||
DecimalToJSON,
|
||||
DecimalToJSONTyped,
|
||||
} from './Decimal';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -65,10 +57,10 @@ export interface FormatTest {
|
||||
_double?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Decimal}
|
||||
* @type {string}
|
||||
* @memberof FormatTest
|
||||
*/
|
||||
decimal?: Decimal;
|
||||
decimal?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@ -152,7 +144,7 @@ export function FormatTestFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
||||
'number': json['number'],
|
||||
'_float': json['float'] == null ? undefined : json['float'],
|
||||
'_double': json['double'] == null ? undefined : json['double'],
|
||||
'decimal': json['decimal'] == null ? undefined : DecimalFromJSON(json['decimal']),
|
||||
'decimal': json['decimal'] == null ? undefined : json['decimal'],
|
||||
'string': json['string'] == null ? undefined : json['string'],
|
||||
'_byte': json['byte'],
|
||||
'binary': json['binary'] == null ? undefined : json['binary'],
|
||||
@ -182,7 +174,7 @@ export function FormatTestFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
||||
'number': value['number'],
|
||||
'float': value['_float'],
|
||||
'double': value['_double'],
|
||||
'decimal': DecimalToJSON(value['decimal']),
|
||||
'decimal': value['decimal'],
|
||||
'string': value['string'],
|
||||
'byte': value['_byte'],
|
||||
'binary': value['binary'],
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -78,7 +78,7 @@ export function *getBehaviorPermissionsSagaImp(_action_: Action<PayloadGetBehavi
|
||||
yield put(getBehaviorPermissionsSuccess(successReturnValue));
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(getBehaviorPermissionsFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -122,7 +122,7 @@ export function *getBehaviorTypeSagaImp(_action_: Action<PayloadGetBehaviorType>
|
||||
yield put(getBehaviorTypeSuccess(successReturnValue));
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(getBehaviorTypeFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
|
@ -86,7 +86,7 @@ export function *addPetSaga() {
|
||||
yield takeLatest(addPet, addPetSagaImp);
|
||||
}
|
||||
|
||||
export function *addPetSagaImp(_action_: Action<PayloadAddPet>) {
|
||||
export function *addPetSagaImp(_action_: Action<PayloadAddPet>): any {
|
||||
const {markErrorsAsHandled, ..._payloadRest_} = _action_.payload;
|
||||
try {
|
||||
const {
|
||||
@ -102,7 +102,7 @@ export function *addPetSagaImp(_action_: Action<PayloadAddPet>) {
|
||||
yield put(addPetSuccess());
|
||||
|
||||
return undefined;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(addPetFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -129,7 +129,7 @@ export function *deletePetSaga() {
|
||||
yield takeLatest(deletePet, deletePetSagaImp);
|
||||
}
|
||||
|
||||
export function *deletePetSagaImp(_action_: Action<PayloadDeletePet>) {
|
||||
export function *deletePetSagaImp(_action_: Action<PayloadDeletePet>): any {
|
||||
const {markErrorsAsHandled, ..._payloadRest_} = _action_.payload;
|
||||
try {
|
||||
const {
|
||||
@ -147,7 +147,7 @@ export function *deletePetSagaImp(_action_: Action<PayloadDeletePet>) {
|
||||
yield put(deletePetSuccess());
|
||||
|
||||
return undefined;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(deletePetFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -200,7 +200,7 @@ export function *findPetsByIdsSagaImp(_action_: Action<PayloadFindPetsByIds>) {
|
||||
}
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(findPetsByIdsFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -253,7 +253,7 @@ export function *findPetsByStatusSagaImp(_action_: Action<PayloadFindPetsByStatu
|
||||
}
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(findPetsByStatusFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -306,7 +306,7 @@ export function *findPetsByTagsSagaImp(_action_: Action<PayloadFindPetsByTags>)
|
||||
}
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(findPetsByTagsFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -359,7 +359,7 @@ export function *findPetsByUserIdsSagaImp(_action_: Action<PayloadFindPetsByUser
|
||||
}
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(findPetsByUserIdsFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -412,7 +412,7 @@ export function *getPetByIdSagaImp(_action_: Action<PayloadGetPetById>) {
|
||||
}
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(getPetByIdFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -456,7 +456,7 @@ export function *getPetRegionsSagaImp(_action_: Action<PayloadGetPetRegions>) {
|
||||
yield put(getPetRegionsSuccess(successReturnValue));
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(getPetRegionsFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -482,7 +482,7 @@ export function *updatePetSaga() {
|
||||
yield takeLatest(updatePet, updatePetSagaImp);
|
||||
}
|
||||
|
||||
export function *updatePetSagaImp(_action_: Action<PayloadUpdatePet>) {
|
||||
export function *updatePetSagaImp(_action_: Action<PayloadUpdatePet>): any {
|
||||
const {markErrorsAsHandled, ..._payloadRest_} = _action_.payload;
|
||||
try {
|
||||
const {
|
||||
@ -498,7 +498,7 @@ export function *updatePetSagaImp(_action_: Action<PayloadUpdatePet>) {
|
||||
yield put(updatePetSuccess());
|
||||
|
||||
return undefined;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(updatePetFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -545,7 +545,7 @@ export function *updatePetRegionsSagaImp(_action_: Action<PayloadUpdatePetRegion
|
||||
yield put(updatePetRegionsSuccess(successReturnValue));
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(updatePetRegionsFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -573,7 +573,7 @@ export function *updatePetWithFormSaga() {
|
||||
yield takeLatest(updatePetWithForm, updatePetWithFormSagaImp);
|
||||
}
|
||||
|
||||
export function *updatePetWithFormSagaImp(_action_: Action<PayloadUpdatePetWithForm>) {
|
||||
export function *updatePetWithFormSagaImp(_action_: Action<PayloadUpdatePetWithForm>): any {
|
||||
const {markErrorsAsHandled, ..._payloadRest_} = _action_.payload;
|
||||
try {
|
||||
const {
|
||||
@ -593,7 +593,7 @@ export function *updatePetWithFormSagaImp(_action_: Action<PayloadUpdatePetWithF
|
||||
yield put(updatePetWithFormSuccess());
|
||||
|
||||
return undefined;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(updatePetWithFormFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -652,7 +652,7 @@ export function *uploadFileSagaImp(_action_: Action<PayloadUploadFile>) {
|
||||
}
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(uploadFileFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
|
@ -79,7 +79,7 @@ export function *getFakePetPartTypeSagaImp(_action_: Action<PayloadGetFakePetPar
|
||||
yield put(getFakePetPartTypeSuccess(successReturnValue));
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(getFakePetPartTypeFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -147,7 +147,7 @@ export function *getMatchingPartsSagaImp(_action_: Action<PayloadGetMatchingPart
|
||||
}
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(getMatchingPartsFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
|
@ -58,7 +58,7 @@ export function *deleteOrderSaga() {
|
||||
yield takeLatest(deleteOrder, deleteOrderSagaImp);
|
||||
}
|
||||
|
||||
export function *deleteOrderSagaImp(_action_: Action<PayloadDeleteOrder>) {
|
||||
export function *deleteOrderSagaImp(_action_: Action<PayloadDeleteOrder>): any {
|
||||
const {markErrorsAsHandled, ..._payloadRest_} = _action_.payload;
|
||||
try {
|
||||
const {
|
||||
@ -74,7 +74,7 @@ export function *deleteOrderSagaImp(_action_: Action<PayloadDeleteOrder>) {
|
||||
yield put(deleteOrderSuccess());
|
||||
|
||||
return undefined;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(deleteOrderFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -110,7 +110,7 @@ export function *getInventorySagaImp(_action_: Action<PayloadGetInventory>) {
|
||||
yield put(getInventorySuccess(response));
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(getInventoryFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -163,7 +163,7 @@ export function *getOrderByIdSagaImp(_action_: Action<PayloadGetOrderById>) {
|
||||
}
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(getOrderByIdFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -216,7 +216,7 @@ export function *placeOrderSagaImp(_action_: Action<PayloadPlaceOrder>) {
|
||||
}
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(placeOrderFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
|
@ -65,7 +65,7 @@ export function *createUserSaga() {
|
||||
yield takeLatest(createUser, createUserSagaImp);
|
||||
}
|
||||
|
||||
export function *createUserSagaImp(_action_: Action<PayloadCreateUser>) {
|
||||
export function *createUserSagaImp(_action_: Action<PayloadCreateUser>): any {
|
||||
const {markErrorsAsHandled, ..._payloadRest_} = _action_.payload;
|
||||
try {
|
||||
const {
|
||||
@ -81,7 +81,7 @@ export function *createUserSagaImp(_action_: Action<PayloadCreateUser>) {
|
||||
yield put(createUserSuccess());
|
||||
|
||||
return undefined;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(createUserFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -107,7 +107,7 @@ export function *createUsersWithArrayInputSaga() {
|
||||
yield takeLatest(createUsersWithArrayInput, createUsersWithArrayInputSagaImp);
|
||||
}
|
||||
|
||||
export function *createUsersWithArrayInputSagaImp(_action_: Action<PayloadCreateUsersWithArrayInput>) {
|
||||
export function *createUsersWithArrayInputSagaImp(_action_: Action<PayloadCreateUsersWithArrayInput>): any {
|
||||
const {markErrorsAsHandled, ..._payloadRest_} = _action_.payload;
|
||||
try {
|
||||
const {
|
||||
@ -123,7 +123,7 @@ export function *createUsersWithArrayInputSagaImp(_action_: Action<PayloadCreate
|
||||
yield put(createUsersWithArrayInputSuccess());
|
||||
|
||||
return undefined;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(createUsersWithArrayInputFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -149,7 +149,7 @@ export function *createUsersWithListInputSaga() {
|
||||
yield takeLatest(createUsersWithListInput, createUsersWithListInputSagaImp);
|
||||
}
|
||||
|
||||
export function *createUsersWithListInputSagaImp(_action_: Action<PayloadCreateUsersWithListInput>) {
|
||||
export function *createUsersWithListInputSagaImp(_action_: Action<PayloadCreateUsersWithListInput>): any {
|
||||
const {markErrorsAsHandled, ..._payloadRest_} = _action_.payload;
|
||||
try {
|
||||
const {
|
||||
@ -165,7 +165,7 @@ export function *createUsersWithListInputSagaImp(_action_: Action<PayloadCreateU
|
||||
yield put(createUsersWithListInputSuccess());
|
||||
|
||||
return undefined;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(createUsersWithListInputFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -191,7 +191,7 @@ export function *deleteUserSaga() {
|
||||
yield takeLatest(deleteUser, deleteUserSagaImp);
|
||||
}
|
||||
|
||||
export function *deleteUserSagaImp(_action_: Action<PayloadDeleteUser>) {
|
||||
export function *deleteUserSagaImp(_action_: Action<PayloadDeleteUser>): any {
|
||||
const {markErrorsAsHandled, ..._payloadRest_} = _action_.payload;
|
||||
try {
|
||||
const {
|
||||
@ -207,7 +207,7 @@ export function *deleteUserSagaImp(_action_: Action<PayloadDeleteUser>) {
|
||||
yield put(deleteUserSuccess());
|
||||
|
||||
return undefined;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(deleteUserFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -260,7 +260,7 @@ export function *getUserByNameSagaImp(_action_: Action<PayloadGetUserByName>) {
|
||||
}
|
||||
|
||||
return successReturnValue;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(getUserByNameFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -306,7 +306,7 @@ export function *loginUserSagaImp(_action_: Action<PayloadLoginUser>) {
|
||||
yield put(loginUserSuccess(response));
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(loginUserFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -329,7 +329,7 @@ export function *logoutUserSaga() {
|
||||
yield takeLatest(logoutUser, logoutUserSagaImp);
|
||||
}
|
||||
|
||||
export function *logoutUserSagaImp(_action_: Action<PayloadLogoutUser>) {
|
||||
export function *logoutUserSagaImp(_action_: Action<PayloadLogoutUser>): any {
|
||||
const {markErrorsAsHandled, ..._payloadRest_} = _action_.payload;
|
||||
try {
|
||||
|
||||
@ -341,7 +341,7 @@ export function *logoutUserSagaImp(_action_: Action<PayloadLogoutUser>) {
|
||||
yield put(logoutUserSuccess());
|
||||
|
||||
return undefined;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(logoutUserFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
@ -386,7 +386,7 @@ export function *updateUserSagaImp(_action_: Action<PayloadUpdateUser>) {
|
||||
yield put(updateUserSuccess());
|
||||
|
||||
return undefined;
|
||||
} catch (error) {
|
||||
} catch (error: any) {
|
||||
if (markErrorsAsHandled) {error.wasHandled = true; }
|
||||
yield put(updateUserFailure({error, requestPayload: _action_.payload}));
|
||||
return error;
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -13,7 +13,7 @@ export function appFromJS(any: any): any {
|
||||
if (isIndexed(value)) {
|
||||
return knownIndexedSetByKey.indexOf(key) !== -1 ? value.toSet() : value.toList();
|
||||
} // we're reviving an array -> it's a List
|
||||
const MatchingType = knownRecordFactories.get(value.get('recType')) as { new(input?: any): any }; // check if we know a Record with this type
|
||||
const MatchingType = knownRecordFactories.get(value.get('recType') as string) as { new(input?: any): any }; // check if we know a Record with this type
|
||||
if (MatchingType) {
|
||||
return new MatchingType(value);
|
||||
}
|
||||
|
@ -13,14 +13,6 @@
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { Decimal } from './Decimal';
|
||||
import {
|
||||
DecimalFromJSON,
|
||||
DecimalFromJSONTyped,
|
||||
DecimalToJSON,
|
||||
DecimalToJSONTyped,
|
||||
} from './Decimal';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -65,10 +57,10 @@ export interface FormatTest {
|
||||
_double?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Decimal}
|
||||
* @type {string}
|
||||
* @memberof FormatTest
|
||||
*/
|
||||
decimal?: Decimal;
|
||||
decimal?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@ -152,7 +144,7 @@ export function FormatTestFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
||||
'number': json['number'],
|
||||
'_float': json['float'] == null ? undefined : json['float'],
|
||||
'_double': json['double'] == null ? undefined : json['double'],
|
||||
'decimal': json['decimal'] == null ? undefined : DecimalFromJSON(json['decimal']),
|
||||
'decimal': json['decimal'] == null ? undefined : json['decimal'],
|
||||
'string': json['string'] == null ? undefined : json['string'],
|
||||
'_byte': json['byte'],
|
||||
'binary': json['binary'] == null ? undefined : json['binary'],
|
||||
@ -182,7 +174,7 @@ export function FormatTestFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
||||
'number': value['number'],
|
||||
'float': value['_float'],
|
||||
'double': value['_double'],
|
||||
'decimal': DecimalToJSON(value['decimal']),
|
||||
'decimal': value['decimal'],
|
||||
'string': value['string'],
|
||||
'byte': value['_byte'],
|
||||
'binary': value['binary'],
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
|
@ -337,6 +337,11 @@ function querystringSingleKey(key: string, value: string | number | null | undef
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
|
||||
export function canConsumeForm(consumes: Consume[]): boolean {
|
||||
for (const consume of consumes) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import type { HttpService } from '@nestjs/axios';
|
||||
import type { HttpService } from '@nestjs/common';
|
||||
import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
|
@ -40,7 +40,7 @@
|
||||
"@nestjs/testing": "~6.0.0",
|
||||
"@types/express": "^4.16.0",
|
||||
"@types/jest": "^24.0.15",
|
||||
"@types/node": "^14.8.2",
|
||||
"@types/node": "*",
|
||||
"@types/supertest": "^2.0.8",
|
||||
"concurrently": "^4.1.1",
|
||||
"nodemon": "^1.19.1",
|
||||
|
@ -41,7 +41,7 @@
|
||||
"@nestjs/testing": "~8.0.0",
|
||||
"@types/express": "^4.16.0",
|
||||
"@types/jest": "^24.0.15",
|
||||
"@types/node": "^14.8.2",
|
||||
"@types/node": "*",
|
||||
"@types/supertest": "^2.0.8",
|
||||
"concurrently": "^4.1.1",
|
||||
"nodemon": "^1.19.1",
|
||||
|
320
samples/client/petstore/typescript-redux-query/builds/default/package-lock.json
generated
Normal file
320
samples/client/petstore/typescript-redux-query/builds/default/package-lock.json
generated
Normal file
@ -0,0 +1,320 @@
|
||||
{
|
||||
"name": "@openapitools/typescript-redux-query-petstore",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@openapitools/typescript-redux-query-petstore",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"redux-query": "^3.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.25.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.7.tgz",
|
||||
"integrity": "sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.14.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/backo": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/backo/-/backo-1.1.0.tgz",
|
||||
"integrity": "sha512-SamJTxoOHq48dB1t+fljlB4cms6E4cQ3VVwg9/mKCKWFCIbKP7+fQfoNFjti2V6OoxWtkC17Q17CydmW6/M2Qw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/call-bind": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz",
|
||||
"integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"set-function-length": "^1.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/define-data-property": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
|
||||
"integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0",
|
||||
"es-errors": "^1.3.0",
|
||||
"gopd": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/es-define-property": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz",
|
||||
"integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.2.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-errors": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
||||
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/get-intrinsic": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
|
||||
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"has-proto": "^1.0.1",
|
||||
"has-symbols": "^1.0.3",
|
||||
"hasown": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/gopd": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
|
||||
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"get-intrinsic": "^1.1.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-property-descriptors": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
|
||||
"integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-define-property": "^1.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-proto": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz",
|
||||
"integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
|
||||
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/invariant": {
|
||||
"version": "2.2.4",
|
||||
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
|
||||
"integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/isarray": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
|
||||
"integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/json-stable-stringify": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.1.tgz",
|
||||
"integrity": "sha512-SU/971Kt5qVQfJpyDveVhQ/vya+5hvrjClFOcr8c0Fq5aODJjMwutrOfCU+eCnVD5gpx1Q3fEqkyom77zH1iIg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.5",
|
||||
"isarray": "^2.0.5",
|
||||
"jsonify": "^0.0.1",
|
||||
"object-keys": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonify": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz",
|
||||
"integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==",
|
||||
"license": "Public Domain",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/loose-envify": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"loose-envify": "cli.js"
|
||||
}
|
||||
},
|
||||
"node_modules/object-keys": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
|
||||
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/redux": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz",
|
||||
"integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.9.2"
|
||||
}
|
||||
},
|
||||
"node_modules/redux-query": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmjs.org/redux-query/-/redux-query-3.6.1.tgz",
|
||||
"integrity": "sha512-Okk3s9DrzMPqar+JStqnG8DXwBbPD25ZfH6gfOTRGDdKy4BOoNypV/FE3kIqonPZzcab94yAtm4W1obK7N7c6w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"backo": "^1.1.0",
|
||||
"invariant": "^2.2.0",
|
||||
"json-stable-stringify": "^1.0.0",
|
||||
"reselect": "^4.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"redux": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/regenerator-runtime": {
|
||||
"version": "0.14.1",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
|
||||
"integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/reselect": {
|
||||
"version": "4.1.8",
|
||||
"resolved": "https://registry.npmjs.org/reselect/-/reselect-4.1.8.tgz",
|
||||
"integrity": "sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/set-function-length": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
|
||||
"integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"define-data-property": "^1.1.4",
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-intrinsic": "^1.2.4",
|
||||
"gopd": "^1.0.1",
|
||||
"has-property-descriptors": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "3.9.10",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
|
||||
"integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -72,6 +72,7 @@ export type ApiKeyConfiguration = string;
|
||||
export type HttpBasicConfiguration = { "username": string, "password": string };
|
||||
export type HttpBearerConfiguration = { tokenProvider: TokenProvider };
|
||||
export type OAuth2Configuration = { accessToken: string };
|
||||
export type HttpSignatureConfiguration = unknown; // TODO: Implement
|
||||
|
||||
export type AuthMethodsConfiguration = {
|
||||
"default"?: SecurityAuthentication,
|
||||
|
@ -179,9 +179,12 @@ export class ResponseContext {
|
||||
return result;
|
||||
}
|
||||
|
||||
const parameters = this.headers[headerName].split(";");
|
||||
const parameters = this.headers[headerName]!.split(";");
|
||||
for (const parameter of parameters) {
|
||||
let [key, value] = parameter.split("=", 2);
|
||||
if (!key) {
|
||||
continue;
|
||||
}
|
||||
key = key.toLowerCase().trim();
|
||||
if (value === undefined) {
|
||||
result[""] = key;
|
||||
|
@ -54,7 +54,7 @@ type MimeTypeDescriptor = {
|
||||
* the payload.
|
||||
*/
|
||||
const parseMimeType = (mimeType: string): MimeTypeDescriptor => {
|
||||
const [type, subtype] = mimeType.split('/');
|
||||
const [type = '', subtype = ''] = mimeType.split('/');
|
||||
return {
|
||||
type,
|
||||
subtype,
|
||||
@ -261,7 +261,7 @@ export class ObjectSerializer {
|
||||
if (mediaType === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
return mediaType.split(";")[0].trim().toLowerCase();
|
||||
return (mediaType.split(";")[0] ?? '').trim().toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,9 +30,8 @@ export class ServerConfiguration<T extends { [key: string]: string }> implements
|
||||
|
||||
private getUrl() {
|
||||
let replacedUrl = this.url;
|
||||
for (const key in this.variableConfiguration) {
|
||||
var re = new RegExp("{" + key + "}","g");
|
||||
replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
|
||||
for (const [key, value] of Object.entries(this.variableConfiguration)) {
|
||||
replacedUrl = replacedUrl.replaceAll(`{${key}}`, value);
|
||||
}
|
||||
return replacedUrl
|
||||
}
|
||||
|
@ -8,16 +8,24 @@
|
||||
"declaration": true,
|
||||
|
||||
/* Additional Checks */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
||||
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
||||
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"noLib": false,
|
||||
"lib": [ "es6", "dom" ],
|
||||
"lib": [
|
||||
"es6"
|
||||
,"ES2017.Object"
|
||||
,"ES2021.String"
|
||||
,"dom"
|
||||
],
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
|
@ -30,6 +30,7 @@ export type ApiKeyConfiguration = string;
|
||||
export type HttpBasicConfiguration = { "username": string, "password": string };
|
||||
export type HttpBearerConfiguration = { tokenProvider: TokenProvider };
|
||||
export type OAuth2Configuration = { accessToken: string };
|
||||
export type HttpSignatureConfiguration = unknown; // TODO: Implement
|
||||
|
||||
export type AuthMethodsConfiguration = {
|
||||
"default"?: SecurityAuthentication,
|
||||
|
@ -179,9 +179,12 @@ export class ResponseContext {
|
||||
return result;
|
||||
}
|
||||
|
||||
const parameters = this.headers[headerName].split(";");
|
||||
const parameters = this.headers[headerName]!.split(";");
|
||||
for (const parameter of parameters) {
|
||||
let [key, value] = parameter.split("=", 2);
|
||||
if (!key) {
|
||||
continue;
|
||||
}
|
||||
key = key.toLowerCase().trim();
|
||||
if (value === undefined) {
|
||||
result[""] = key;
|
||||
|
@ -1,35 +0,0 @@
|
||||
/**
|
||||
* Example
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { HttpFile } from '../http/http';
|
||||
|
||||
export class InlineObject {
|
||||
'file'?: any;
|
||||
|
||||
static readonly discriminator: string | undefined = undefined;
|
||||
|
||||
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
||||
{
|
||||
"name": "file",
|
||||
"baseName": "file",
|
||||
"type": "any",
|
||||
"format": ""
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return InlineObject.attributeTypeMap;
|
||||
}
|
||||
|
||||
public constructor() {
|
||||
}
|
||||
}
|
||||
|
@ -1,29 +0,0 @@
|
||||
/**
|
||||
* Example
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { HttpFile } from '../http/http';
|
||||
|
||||
export class InlineObjectFile {
|
||||
|
||||
static readonly discriminator: string | undefined = undefined;
|
||||
|
||||
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
||||
];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return InlineObjectFile.attributeTypeMap;
|
||||
}
|
||||
|
||||
public constructor() {
|
||||
}
|
||||
}
|
||||
|
@ -1,62 +0,0 @@
|
||||
/**
|
||||
* Example
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { Cat } from './Cat';
|
||||
import { Dog } from './Dog';
|
||||
import { HttpFile } from '../http/http';
|
||||
|
||||
export class InlineRequest {
|
||||
'hunts'?: boolean;
|
||||
'age'?: number;
|
||||
'bark'?: boolean;
|
||||
'breed'?: InlineRequestBreedEnum;
|
||||
|
||||
static readonly discriminator: string | undefined = "petType";
|
||||
|
||||
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
||||
{
|
||||
"name": "hunts",
|
||||
"baseName": "hunts",
|
||||
"type": "boolean",
|
||||
"format": ""
|
||||
},
|
||||
{
|
||||
"name": "age",
|
||||
"baseName": "age",
|
||||
"type": "number",
|
||||
"format": ""
|
||||
},
|
||||
{
|
||||
"name": "bark",
|
||||
"baseName": "bark",
|
||||
"type": "boolean",
|
||||
"format": ""
|
||||
},
|
||||
{
|
||||
"name": "breed",
|
||||
"baseName": "breed",
|
||||
"type": "InlineRequestBreedEnum",
|
||||
"format": ""
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return InlineRequest.attributeTypeMap;
|
||||
}
|
||||
|
||||
public constructor() {
|
||||
this.petType = "InlineRequest";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export type InlineRequestBreedEnum = "Dingo" | "Husky" | "Retriever" | "Shepherd" ;
|
||||
|
@ -1,61 +0,0 @@
|
||||
/**
|
||||
* Example
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { PetByAge } from './PetByAge';
|
||||
import { PetByType } from './PetByType';
|
||||
import { HttpFile } from '../http/http';
|
||||
|
||||
export class InlineRequest1 {
|
||||
'age': number;
|
||||
'nickname'?: string;
|
||||
'petType': InlineRequest1PetTypeEnum;
|
||||
'hunts'?: boolean;
|
||||
|
||||
static readonly discriminator: string | undefined = undefined;
|
||||
|
||||
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
||||
{
|
||||
"name": "age",
|
||||
"baseName": "age",
|
||||
"type": "number",
|
||||
"format": ""
|
||||
},
|
||||
{
|
||||
"name": "nickname",
|
||||
"baseName": "nickname",
|
||||
"type": "string",
|
||||
"format": ""
|
||||
},
|
||||
{
|
||||
"name": "petType",
|
||||
"baseName": "pet_type",
|
||||
"type": "InlineRequest1PetTypeEnum",
|
||||
"format": ""
|
||||
},
|
||||
{
|
||||
"name": "hunts",
|
||||
"baseName": "hunts",
|
||||
"type": "boolean",
|
||||
"format": ""
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return InlineRequest1.attributeTypeMap;
|
||||
}
|
||||
|
||||
public constructor() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export type InlineRequest1PetTypeEnum = "Cat" | "Dog" ;
|
||||
|
@ -1,35 +0,0 @@
|
||||
/**
|
||||
* Example
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { HttpFile } from '../http/http';
|
||||
|
||||
export class InlineRequest2 {
|
||||
'file'?: any;
|
||||
|
||||
static readonly discriminator: string | undefined = undefined;
|
||||
|
||||
static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
|
||||
{
|
||||
"name": "file",
|
||||
"baseName": "file",
|
||||
"type": "any",
|
||||
"format": ""
|
||||
} ];
|
||||
|
||||
static getAttributeTypeMap() {
|
||||
return InlineRequest2.attributeTypeMap;
|
||||
}
|
||||
|
||||
public constructor() {
|
||||
}
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ type MimeTypeDescriptor = {
|
||||
* the payload.
|
||||
*/
|
||||
const parseMimeType = (mimeType: string): MimeTypeDescriptor => {
|
||||
const [type, subtype] = mimeType.split('/');
|
||||
const [type = '', subtype = ''] = mimeType.split('/');
|
||||
return {
|
||||
type,
|
||||
subtype,
|
||||
@ -266,7 +266,7 @@ export class ObjectSerializer {
|
||||
if (mediaType === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
return mediaType.split(";")[0].trim().toLowerCase();
|
||||
return (mediaType.split(";")[0] ?? '').trim().toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,9 +30,8 @@ export class ServerConfiguration<T extends { [key: string]: string }> implements
|
||||
|
||||
private getUrl() {
|
||||
let replacedUrl = this.url;
|
||||
for (const key in this.variableConfiguration) {
|
||||
var re = new RegExp("{" + key + "}","g");
|
||||
replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
|
||||
for (const [key, value] of Object.entries(this.variableConfiguration)) {
|
||||
replacedUrl = replacedUrl.replaceAll(`{${key}}`, value);
|
||||
}
|
||||
return replacedUrl
|
||||
}
|
||||
|
@ -7,16 +7,24 @@
|
||||
"declaration": true,
|
||||
|
||||
/* Additional Checks */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
||||
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
||||
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"noLib": false,
|
||||
"lib": [ "es6", "dom" ],
|
||||
"lib": [
|
||||
"es6"
|
||||
,"ES2017.Object"
|
||||
,"ES2021.String"
|
||||
,"dom"
|
||||
],
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
|
@ -72,6 +72,7 @@ export type ApiKeyConfiguration = string;
|
||||
export type HttpBasicConfiguration = { "username": string, "password": string };
|
||||
export type HttpBearerConfiguration = { tokenProvider: TokenProvider };
|
||||
export type OAuth2Configuration = { accessToken: string };
|
||||
export type HttpSignatureConfiguration = unknown; // TODO: Implement
|
||||
|
||||
export type AuthMethodsConfiguration = {
|
||||
"default"?: SecurityAuthentication,
|
||||
|
@ -185,9 +185,12 @@ export class ResponseContext {
|
||||
return result;
|
||||
}
|
||||
|
||||
const parameters = this.headers[headerName].split(";");
|
||||
const parameters = this.headers[headerName]!.split(";");
|
||||
for (const parameter of parameters) {
|
||||
let [key, value] = parameter.split("=", 2);
|
||||
if (!key) {
|
||||
continue;
|
||||
}
|
||||
key = key.toLowerCase().trim();
|
||||
if (value === undefined) {
|
||||
result[""] = key;
|
||||
|
@ -54,7 +54,7 @@ type MimeTypeDescriptor = {
|
||||
* the payload.
|
||||
*/
|
||||
const parseMimeType = (mimeType: string): MimeTypeDescriptor => {
|
||||
const [type, subtype] = mimeType.split('/');
|
||||
const [type = '', subtype = ''] = mimeType.split('/');
|
||||
return {
|
||||
type,
|
||||
subtype,
|
||||
@ -261,7 +261,7 @@ export class ObjectSerializer {
|
||||
if (mediaType === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
return mediaType.split(";")[0].trim().toLowerCase();
|
||||
return (mediaType.split(";")[0] ?? '').trim().toLowerCase();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,9 +30,8 @@ export class ServerConfiguration<T extends { [key: string]: string }> implements
|
||||
|
||||
private getUrl() {
|
||||
let replacedUrl = this.url;
|
||||
for (const key in this.variableConfiguration) {
|
||||
var re = new RegExp("{" + key + "}","g");
|
||||
replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
|
||||
for (const [key, value] of Object.entries(this.variableConfiguration)) {
|
||||
replacedUrl = replacedUrl.replaceAll(`{${key}}`, value);
|
||||
}
|
||||
return replacedUrl
|
||||
}
|
||||
|
@ -7,16 +7,23 @@
|
||||
"declaration": true,
|
||||
|
||||
/* Additional Checks */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noUnusedLocals": false, /* Report errors on unused locals. */ // TODO: reenable (unused imports!)
|
||||
"noUnusedParameters": false, /* Report errors on unused parameters. */ // TODO: set to true again
|
||||
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
||||
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
|
||||
"noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
|
||||
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "./dist",
|
||||
"noLib": false,
|
||||
"lib": [ "es6" ],
|
||||
"lib": [
|
||||
"es6"
|
||||
,"ES2017.Object"
|
||||
,"ES2021.String"
|
||||
],
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user