typed-openapi 2.0.1 → 2.0.2

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.
@@ -1233,7 +1233,7 @@ var allowedParamMediaTypes = [
1233
1233
  "*/*"
1234
1234
  ];
1235
1235
  var isAllowedParamMediaTypes = (mediaType) => mediaType.includes("application/") && mediaType.includes("json") || allowedParamMediaTypes.includes(mediaType) || mediaType.includes("text/");
1236
- var isResponseMediaType = (mediaType) => mediaType === "application/json" || mediaType === "*/*";
1236
+ var isResponseMediaType = (mediaType) => mediaType === "*/*" || mediaType.includes("application/") && mediaType.includes("json");
1237
1237
  var getAlias = ({ path, method, operation }) => sanitizeName(
1238
1238
  (method + "_" + capitalize3(operation.operationId ?? pathToVariableName(path))).replace(/-/g, "__"),
1239
1239
  "endpoint"
@@ -5,7 +5,7 @@ import {
5
5
  generateFile,
6
6
  generateTanstackQueryFile,
7
7
  mapOpenApiEndpoints
8
- } from "./chunk-4EZJSCLI.js";
8
+ } from "./chunk-KF4JBLDM.js";
9
9
  import {
10
10
  prettify
11
11
  } from "./chunk-KAEXXJ7X.js";
package/dist/cli.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  generateClientFiles
3
- } from "./chunk-GD55PFNE.js";
3
+ } from "./chunk-Q6LQYDKL.js";
4
4
  import {
5
5
  allowedRuntimes
6
- } from "./chunk-4EZJSCLI.js";
6
+ } from "./chunk-KF4JBLDM.js";
7
7
  import "./chunk-KAEXXJ7X.js";
8
8
 
9
9
  // src/cli.ts
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  openApiSchemaToTs,
9
9
  tsFactory,
10
10
  unwrap
11
- } from "./chunk-4EZJSCLI.js";
11
+ } from "./chunk-KF4JBLDM.js";
12
12
  import "./chunk-KAEXXJ7X.js";
13
13
  export {
14
14
  createBoxFactory,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  generateClientFiles
3
- } from "./chunk-GD55PFNE.js";
4
- import "./chunk-4EZJSCLI.js";
3
+ } from "./chunk-Q6LQYDKL.js";
4
+ import "./chunk-KF4JBLDM.js";
5
5
  import "./chunk-KAEXXJ7X.js";
6
6
  export {
7
7
  generateClientFiles
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "typed-openapi",
3
3
  "type": "module",
4
- "version": "2.0.1",
4
+ "version": "2.0.2",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "exports": {
@@ -233,7 +233,7 @@ const isAllowedParamMediaTypes = (
233
233
  allowedParamMediaTypes.includes(mediaType as any) ||
234
234
  mediaType.includes("text/");
235
235
 
236
- const isResponseMediaType = (mediaType: string) => mediaType === "application/json" || mediaType === "*/*";
236
+ const isResponseMediaType = (mediaType: string) => mediaType === "*/*" || (mediaType.includes("application/") && mediaType.includes("json"));
237
237
  const getAlias = ({ path, method, operation }: Endpoint) =>
238
238
  sanitizeName(
239
239
  (method + "_" + capitalize(operation.operationId ?? pathToVariableName(path))).replace(/-/g, "__"),