swagger-typescript-api 13.6.0 → 13.6.1
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.mjs +1 -1
- package/dist/{src-sIP2rLyu.mjs → src-BPSpx7Sf.mjs} +4 -3
- package/dist/{src-sIP2rLyu.mjs.map → src-BPSpx7Sf.mjs.map} +1 -1
- package/dist/{src-BFo1mwTu.cjs → src-DEFrSruL.cjs} +4 -3
- package/dist/{src-BFo1mwTu.cjs.map → src-DEFrSruL.cjs.map} +1 -1
- package/package.json +2 -2
package/dist/cli.cjs
CHANGED
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { d as version, l as description, n as generateTemplates, o as CodeGenConfig, r as TemplatesGenConfig, s as HTTP_CLIENT, t as generateApi, u as name } from "./src-
|
|
2
|
+
import { d as version, l as description, n as generateTemplates, o as CodeGenConfig, r as TemplatesGenConfig, s as HTTP_CLIENT, t as generateApi, u as name } from "./src-BPSpx7Sf.mjs";
|
|
3
3
|
import * as path$1 from "node:path";
|
|
4
4
|
import { loadConfig } from "c12";
|
|
5
5
|
import { defineCommand, runMain } from "citty";
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_src = require("./src-
|
|
2
|
+
const require_src = require("./src-DEFrSruL.cjs");
|
|
3
3
|
exports.RequestContentKind = require_src.RequestContentKind;
|
|
4
4
|
exports.SCHEMA_TYPES = require_src.SCHEMA_TYPES;
|
|
5
5
|
Object.defineProperty(exports, "constants", {
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SCHEMA_TYPES, c as constants_exports, i as RequestContentKind, n as generateTemplates, t as generateApi } from "./src-
|
|
1
|
+
import { a as SCHEMA_TYPES, c as constants_exports, i as RequestContentKind, n as generateTemplates, t as generateApi } from "./src-BPSpx7Sf.mjs";
|
|
2
2
|
export { RequestContentKind, SCHEMA_TYPES, constants_exports as constants, generateApi, generateTemplates };
|
|
@@ -174,7 +174,7 @@ var ComponentTypeNameResolver = class extends NameResolver {
|
|
|
174
174
|
//#endregion
|
|
175
175
|
//#region package.json
|
|
176
176
|
var name = "swagger-typescript-api";
|
|
177
|
-
var version = "13.6.
|
|
177
|
+
var version = "13.6.1";
|
|
178
178
|
var description = "Generate the API client for Fetch or Axios from an OpenAPI Specification";
|
|
179
179
|
//#endregion
|
|
180
180
|
//#region src/constants.ts
|
|
@@ -2758,7 +2758,8 @@ var SwaggerSchemaResolver = class {
|
|
|
2758
2758
|
const originalProducesByRoute = Object.create(null);
|
|
2759
2759
|
for (const [route, usagePathObject] of Object.entries(usagePaths)) {
|
|
2760
2760
|
const routeWithoutBase = basePath && route.startsWith(basePath) ? route.slice(basePath.length) || "/" : route;
|
|
2761
|
-
const
|
|
2761
|
+
const routeWithBase = basePath && !route.startsWith(basePath) ? `${basePath}${route.startsWith("/") ? route : `/${route}`}` : route;
|
|
2762
|
+
const originalPathObject = get(originalPaths, route) || get(originalPaths, routeWithoutBase.startsWith("/") ? routeWithoutBase : `/${routeWithoutBase}`) || get(originalPaths, routeWithBase) || {};
|
|
2762
2763
|
for (const [methodName, usageRouteInfo] of Object.entries(usagePathObject)) {
|
|
2763
2764
|
const originalRouteInfo = get(originalPathObject, methodName) || {};
|
|
2764
2765
|
const usageRouteParams = get(usageRouteInfo, "parameters") || [];
|
|
@@ -3467,4 +3468,4 @@ async function generateApi(config) {
|
|
|
3467
3468
|
//#endregion
|
|
3468
3469
|
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 };
|
|
3469
3470
|
|
|
3470
|
-
//# sourceMappingURL=src-
|
|
3471
|
+
//# sourceMappingURL=src-BPSpx7Sf.mjs.map
|