@workos/openapi-spec 0.68.0 → 0.69.0

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/policy.mjs CHANGED
@@ -578,6 +578,16 @@ function transformSpec(spec) {
578
578
  const createJson = paths["/organization_domains"]?.post?.responses?.["201"]?.content?.["application/json"];
579
579
  if (createJson && !createJson.schema?.$ref) createJson.schema = { $ref: newRef };
580
580
  }
581
+ const paginationOrder = schemas["PaginationOrder"];
582
+ if (paginationOrder && paginationOrder["default"] == null) paginationOrder["default"] = "desc";
583
+ for (const pathItem of Object.values(paths)) for (const op of Object.values(pathItem)) {
584
+ const params = op.parameters;
585
+ if (!Array.isArray(params)) continue;
586
+ for (const param of params) {
587
+ if (param.name !== "order" || typeof param.description !== "string") continue;
588
+ param.description = param.description.replace(/\s*Defaults to `[^`]+`\.\s*$/, "");
589
+ }
590
+ }
581
591
  return spec;
582
592
  }
583
593
  //#endregion