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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const require_src = require("./src-BFo1mwTu.cjs");
2
+ const require_src = require("./src-DEFrSruL.cjs");
3
3
  let node_path = require("node:path");
4
4
  node_path = require_src.__toESM(node_path);
5
5
  let c12 = require("c12");
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-sIP2rLyu.mjs";
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-BFo1mwTu.cjs");
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-sIP2rLyu.mjs";
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.0";
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 originalPathObject = get(originalPaths, route) || get(originalPaths, routeWithoutBase.startsWith("/") ? routeWithoutBase : `/${routeWithoutBase}`) || {};
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-sIP2rLyu.mjs.map
3471
+ //# sourceMappingURL=src-BPSpx7Sf.mjs.map