MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / isJsonMediaType

Function isJsonMediaType

packages/plugins/openapi/src/sdk/extract.ts:178–183  ·  view source on GitHub ↗
(mediaType: string)

Source from the content-addressed store, hash-verified

176 mediaType.split(";")[0]?.trim().toLowerCase() ?? "";
177
178const isJsonMediaType = (mediaType: string): boolean => {
179 const normalized = normalizedMediaType(mediaType);
180 return (
181 normalized === "application/json" || normalized.includes("+json") || normalized.includes("json")
182 );
183};
184
185const binaryStringSchema = (schema: Record<string, unknown>): boolean =>
186 stringType(schema) && (schema.format === "binary" || schema.format === "byte");

Callers 1

detectFileHintFunction · 0.85

Calls 1

normalizedMediaTypeFunction · 0.70

Tested by

no test coverage detected