@qualisero/openapi-endpoint 0.21.1 → 0.21.2

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.
Files changed (2) hide show
  1. package/dist/cli.js +6 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -380,6 +380,12 @@ function extractEnumsFromSpec(openApiSpec) {
380
380
  }
381
381
  }
382
382
  }
383
+ // Export enum schemas directly from components.schemas
384
+ // This MUST come before property/parameter extraction so the schema name becomes primary
385
+ // and operation-specific generated names become aliases
386
+ for (const [schemaName, enumValues] of schemaEnumLookup) {
387
+ addEnumIfUnique(schemaName, enumValues, `components.schemas.${schemaName}`, enums, seenEnumValues);
388
+ }
383
389
  // Helper to resolve enum values from a schema (inline or $ref)
384
390
  function resolveEnumValues(schema) {
385
391
  // Inline enum
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qualisero/openapi-endpoint",
3
- "version": "0.21.1",
3
+ "version": "0.21.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/qualisero/openapi-endpoint.git"