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 === "
|
|
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"
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/dist/node.export.js
CHANGED
package/package.json
CHANGED
|
@@ -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 === "
|
|
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, "__"),
|