@workos/oagen 0.11.0 → 0.12.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/README.md CHANGED
@@ -196,6 +196,11 @@ export default {
196
196
  Connections: 'SSO', // All Connections ops mount on SSO
197
197
  DirectoryGroups: 'DirectorySync',
198
198
  },
199
+ modelHints: {
200
+ // Pin a model's placement when "first service to reference it wins"
201
+ // would otherwise drift as the spec evolves.
202
+ User: 'UserManagementUsers',
203
+ },
199
204
  };
200
205
  ```
201
206
 
@@ -4700,6 +4700,7 @@ function buildEmitterContext(spec, options) {
4700
4700
  apiSurface: options.apiSurface,
4701
4701
  overlayLookup: options.overlayLookup,
4702
4702
  resolvedOperations: resolveOperations(spec, options.operationHints, options.mountRules),
4703
+ modelHints: options.modelHints,
4703
4704
  targetDir: options.target,
4704
4705
  priorTargetManifestPaths: options.priorTargetManifestPaths
4705
4706
  };
@@ -5932,6 +5933,7 @@ async function generateCommand(opts) {
5932
5933
  overlayLookup,
5933
5934
  operationHints: opts.operationHints,
5934
5935
  mountRules: opts.mountRules,
5936
+ modelHints: opts.modelHints,
5935
5937
  noPrune: opts.prune === false
5936
5938
  });
5937
5939
  if (opts.dryRun) for (const f of files) console.log(f.path);
@@ -8378,6 +8380,7 @@ let configSchemaNameTransform;
8378
8380
  let configDocUrl;
8379
8381
  let configOperationHints;
8380
8382
  let configMountRules;
8383
+ let configModelHints;
8381
8384
  let configCompat;
8382
8385
  try {
8383
8386
  const config = await loadConfig(explicitConfigPath);
@@ -8389,6 +8392,7 @@ try {
8389
8392
  configDocUrl = config.docUrl;
8390
8393
  configOperationHints = config.operationHints;
8391
8394
  configMountRules = config.mountRules;
8395
+ configModelHints = config.modelHints;
8392
8396
  configCompat = config.compat;
8393
8397
  }
8394
8398
  } catch (err) {
@@ -8415,7 +8419,8 @@ program.command("generate").description("Run a registered emitter against an Ope
8415
8419
  schemaNameTransform: configSchemaNameTransform,
8416
8420
  docUrl: configDocUrl,
8417
8421
  operationHints: configOperationHints,
8418
- mountRules: configMountRules
8422
+ mountRules: configMountRules,
8423
+ modelHints: configModelHints
8419
8424
  }).catch(handleError);
8420
8425
  });
8421
8426
  program.command("diff").description("Compare two OpenAPI specs and output a diff report").requiredOption("--old <path>", "Path to old spec").requiredOption("--new <path>", "Path to new spec").action((opts) => {