swagger-typescript-api 13.12.4 → 13.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +5 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-C55JbE2j.cjs → src-BY6Hz6vz.cjs} +8 -5
- package/dist/src-BY6Hz6vz.cjs.map +1 -0
- package/dist/{src-BZg10unC.mjs → src-Dex5t5WU.mjs} +8 -5
- package/dist/src-Dex5t5WU.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/src-BZg10unC.mjs.map +0 -1
- package/dist/src-C55JbE2j.cjs.map +0 -1
|
@@ -171,7 +171,7 @@ var ComponentTypeNameResolver = class extends NameResolver {
|
|
|
171
171
|
//#endregion
|
|
172
172
|
//#region package.json
|
|
173
173
|
var name = "swagger-typescript-api";
|
|
174
|
-
var version = "13.12.
|
|
174
|
+
var version = "13.12.6";
|
|
175
175
|
var description = "Generate the API client for Fetch or Axios from an OpenAPI Specification";
|
|
176
176
|
//#endregion
|
|
177
177
|
//#region src/constants.ts
|
|
@@ -261,6 +261,7 @@ const TsKeyword = {
|
|
|
261
261
|
String: "string",
|
|
262
262
|
Boolean: "boolean",
|
|
263
263
|
Any: "any",
|
|
264
|
+
Never: "never",
|
|
264
265
|
Void: "void",
|
|
265
266
|
Unknown: "unknown",
|
|
266
267
|
Null: "null",
|
|
@@ -1009,10 +1010,11 @@ var MonoSchemaParser = class {
|
|
|
1009
1010
|
var ArraySchemaParser = class extends MonoSchemaParser {
|
|
1010
1011
|
parse() {
|
|
1011
1012
|
let contentType;
|
|
1012
|
-
const { type, description, items } = this.schema || {};
|
|
1013
|
-
|
|
1013
|
+
const { type, description, items, prefixItems } = this.schema || {};
|
|
1014
|
+
const tupleItems = Array.isArray(prefixItems) ? prefixItems : Array.isArray(items) ? items : null;
|
|
1015
|
+
if (tupleItems && type === SCHEMA_TYPES$1.ARRAY) {
|
|
1014
1016
|
const tupleContent = [];
|
|
1015
|
-
for (const item of
|
|
1017
|
+
for (const item of tupleItems) tupleContent.push(this.schemaParserFabric.createSchemaParser({
|
|
1016
1018
|
schema: item,
|
|
1017
1019
|
schemaPath: this.schemaPath
|
|
1018
1020
|
}).getInlineParseContent());
|
|
@@ -1561,6 +1563,7 @@ var SchemaParser = class {
|
|
|
1561
1563
|
}
|
|
1562
1564
|
};
|
|
1563
1565
|
parseSchema = () => {
|
|
1566
|
+
if (typeof this.schema === "boolean") return this._baseSchemaParsers[SCHEMA_TYPES$1.PRIMITIVE]({ type: this.schema ? this.config.Ts.Keyword.Any : this.config.Ts.Keyword.Never }, this.typeName);
|
|
1564
1567
|
if (!this.schema) return this._baseSchemaParsers[SCHEMA_TYPES$1.PRIMITIVE](null, this.typeName);
|
|
1565
1568
|
let schemaType = null;
|
|
1566
1569
|
let parsedSchema = null;
|
|
@@ -4223,4 +4226,4 @@ async function generateApi(config) {
|
|
|
4223
4226
|
//#endregion
|
|
4224
4227
|
export { SCHEMA_TYPES as a, constants_exports as c, version as d, RequestContentKind as i, description as l, generateTemplates as n, CodeGenConfig as o, TemplatesGenConfig as r, HTTP_CLIENT as s, generateApi as t, name as u };
|
|
4225
4228
|
|
|
4226
|
-
//# sourceMappingURL=src-
|
|
4229
|
+
//# sourceMappingURL=src-Dex5t5WU.mjs.map
|