@workos/oagen 0.28.1 → 0.29.1
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/cli/index.mjs +16 -12
- package/dist/cli/index.mjs.map +1 -1
- package/dist/compat/index.d.mts +2 -2
- package/dist/{differ-BoYl2n6Y.d.mts → differ-Co0fRniL.d.mts} +2 -2
- package/dist/{differ-BoYl2n6Y.d.mts.map → differ-Co0fRniL.d.mts.map} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +16 -12
- package/dist/index.mjs.map +1 -1
- package/dist/scripts/smoke/baseline.mjs +16 -12
- package/dist/scripts/smoke/baseline.mjs.map +1 -1
- package/dist/smoke.d.mts +7 -0
- package/dist/smoke.d.mts.map +1 -1
- package/dist/smoke.mjs +16 -12
- package/dist/smoke.mjs.map +1 -1
- package/dist/tree-sitter-C6HB4OrC.mjs.map +1 -1
- package/dist/{types-CIAqYpcV.d.mts → types-DqKSnLBP.d.mts} +8 -1
- package/dist/{types-CIAqYpcV.d.mts.map → types-DqKSnLBP.d.mts.map} +1 -1
- package/dist/verify/index.d.mts +2 -2
- package/package.json +3 -3
package/dist/cli/index.mjs
CHANGED
|
@@ -2255,20 +2255,24 @@ function extractBodyParameterGroups(op, operationContext) {
|
|
|
2255
2255
|
if (Object.keys(groupDef.variants).length === 0) continue;
|
|
2256
2256
|
const variants = Object.entries(groupDef.variants).map(([variantName, paramNames]) => {
|
|
2257
2257
|
if (!Array.isArray(paramNames) || paramNames.length === 0) throw new Error(`Malformed x-mutually-exclusive-body-groups.${groupName}.variants.${variantName} in ${operationContext}: expected a non-empty array of parameter names.`);
|
|
2258
|
+
const parameters = paramNames.map((pName) => {
|
|
2259
|
+
const fieldSchema = variantFieldSchemas.get(pName);
|
|
2260
|
+
return {
|
|
2261
|
+
name: pName,
|
|
2262
|
+
type: fieldSchema ? schemaToTypeRef(fieldSchema, toPascalCase(pName)) : {
|
|
2263
|
+
kind: "primitive",
|
|
2264
|
+
type: "string"
|
|
2265
|
+
},
|
|
2266
|
+
required: false,
|
|
2267
|
+
description: fieldSchema?.description
|
|
2268
|
+
};
|
|
2269
|
+
});
|
|
2270
|
+
const rawOptionalFields = groupDef.optionalFields && typeof groupDef.optionalFields === "object" ? groupDef.optionalFields[variantName] : void 0;
|
|
2271
|
+
const optionalParameters = Array.isArray(rawOptionalFields) ? rawOptionalFields.filter((name) => typeof name === "string" && paramNames.includes(name)) : [];
|
|
2258
2272
|
return {
|
|
2259
2273
|
name: variantName,
|
|
2260
|
-
parameters
|
|
2261
|
-
|
|
2262
|
-
return {
|
|
2263
|
-
name: pName,
|
|
2264
|
-
type: fieldSchema ? schemaToTypeRef(fieldSchema, toPascalCase(pName)) : {
|
|
2265
|
-
kind: "primitive",
|
|
2266
|
-
type: "string"
|
|
2267
|
-
},
|
|
2268
|
-
required: false,
|
|
2269
|
-
description: fieldSchema?.description
|
|
2270
|
-
};
|
|
2271
|
-
})
|
|
2274
|
+
parameters,
|
|
2275
|
+
...optionalParameters.length > 0 ? { optionalParameters } : {}
|
|
2272
2276
|
};
|
|
2273
2277
|
});
|
|
2274
2278
|
groups.push({
|