@scalar/fastify-api-reference 1.25.88 → 1.25.89

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/index.js CHANGED
@@ -19186,21 +19186,33 @@ function upgradeFromThreeToThreeOne(originalSpecification) {
19186
19186
  }
19187
19187
  return schema2;
19188
19188
  });
19189
- specification = traverse(specification, (schema2) => {
19189
+ specification = traverse(specification, (schema2, path2) => {
19190
19190
  if (schema2.type === "object" && schema2.properties !== void 0) {
19191
- const entries = Object.entries(schema2.properties);
19192
- for (const [_, value] of entries) {
19193
- if (typeof value === "object" && value.type === "string" && value.format === "binary") {
19194
- value.contentEncoding = "application/octet-stream";
19195
- delete value.format;
19191
+ const parentPath = path2.slice(0, -1);
19192
+ const isMultipart = parentPath.some((segment, index) => {
19193
+ return segment === "content" && path2[index + 1] === "multipart/form-data";
19194
+ });
19195
+ if (isMultipart) {
19196
+ const entries = Object.entries(schema2.properties);
19197
+ for (const [_, value] of entries) {
19198
+ if (typeof value === "object" && value.type === "string" && value.format === "binary") {
19199
+ value.contentMediaType = "application/octet-stream";
19200
+ delete value.format;
19201
+ }
19196
19202
  }
19197
19203
  }
19198
19204
  }
19199
19205
  return schema2;
19200
19206
  });
19201
- specification = traverse(specification, (schema2) => {
19207
+ specification = traverse(specification, (schema2, path2) => {
19208
+ if (path2.includes("content") && path2.includes("application/octet-stream")) {
19209
+ return {};
19210
+ }
19202
19211
  if (schema2.type === "string" && schema2.format === "binary") {
19203
- return void 0;
19212
+ return {
19213
+ type: "string",
19214
+ contentMediaType: "application/octet-stream"
19215
+ };
19204
19216
  }
19205
19217
  return schema2;
19206
19218
  });