@workos/oagen 0.28.0 → 0.29.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/cli/index.mjs +126 -23
- package/dist/cli/index.mjs.map +1 -1
- package/dist/compat/index.d.mts +2 -2
- package/dist/{diff-B9wlNAVX.mjs → diff-DqnHHXvr.mjs} +112 -13
- package/dist/diff-DqnHHXvr.mjs.map +1 -0
- 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 +28 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +18 -14
- 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/dist/verify/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/diff-B9wlNAVX.mjs.map +0 -1
|
@@ -2182,20 +2182,24 @@ function extractBodyParameterGroups(op, operationContext) {
|
|
|
2182
2182
|
if (Object.keys(groupDef.variants).length === 0) continue;
|
|
2183
2183
|
const variants = Object.entries(groupDef.variants).map(([variantName, paramNames]) => {
|
|
2184
2184
|
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.`);
|
|
2185
|
+
const parameters = paramNames.map((pName) => {
|
|
2186
|
+
const fieldSchema = variantFieldSchemas.get(pName);
|
|
2187
|
+
return {
|
|
2188
|
+
name: pName,
|
|
2189
|
+
type: fieldSchema ? schemaToTypeRef(fieldSchema, toPascalCase(pName)) : {
|
|
2190
|
+
kind: "primitive",
|
|
2191
|
+
type: "string"
|
|
2192
|
+
},
|
|
2193
|
+
required: false,
|
|
2194
|
+
description: fieldSchema?.description
|
|
2195
|
+
};
|
|
2196
|
+
});
|
|
2197
|
+
const rawOptionalFields = groupDef.optionalFields && typeof groupDef.optionalFields === "object" ? groupDef.optionalFields[variantName] : void 0;
|
|
2198
|
+
const optionalParameters = Array.isArray(rawOptionalFields) ? rawOptionalFields.filter((name) => typeof name === "string" && paramNames.includes(name)) : [];
|
|
2185
2199
|
return {
|
|
2186
2200
|
name: variantName,
|
|
2187
|
-
parameters
|
|
2188
|
-
|
|
2189
|
-
return {
|
|
2190
|
-
name: pName,
|
|
2191
|
-
type: fieldSchema ? schemaToTypeRef(fieldSchema, toPascalCase(pName)) : {
|
|
2192
|
-
kind: "primitive",
|
|
2193
|
-
type: "string"
|
|
2194
|
-
},
|
|
2195
|
-
required: false,
|
|
2196
|
-
description: fieldSchema?.description
|
|
2197
|
-
};
|
|
2198
|
-
})
|
|
2201
|
+
parameters,
|
|
2202
|
+
...optionalParameters.length > 0 ? { optionalParameters } : {}
|
|
2199
2203
|
};
|
|
2200
2204
|
});
|
|
2201
2205
|
groups.push({
|