@skmtc/core 0.0.797 → 0.0.798

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 (59) hide show
  1. package/esm/context/CoreContext.d.ts +10 -1
  2. package/esm/context/CoreContext.d.ts.map +1 -1
  3. package/esm/context/GenerateContext.d.ts +180 -0
  4. package/esm/context/GenerateContext.d.ts.map +1 -1
  5. package/esm/context/GenerateContext.js +25 -0
  6. package/esm/context/ParseContext.d.ts +6 -0
  7. package/esm/context/ParseContext.d.ts.map +1 -1
  8. package/esm/context/ParseContext.js +6 -0
  9. package/esm/oas/example/toExamplesV3.d.ts +39 -0
  10. package/esm/oas/example/toExamplesV3.d.ts.map +1 -1
  11. package/esm/oas/example/toExamplesV3.js +29 -0
  12. package/esm/oas/object/Object.d.ts +6 -0
  13. package/esm/oas/object/Object.d.ts.map +1 -1
  14. package/esm/oas/object/Object.js +6 -0
  15. package/esm/oas/operation/Operation.d.ts +34 -0
  16. package/esm/oas/operation/Operation.d.ts.map +1 -1
  17. package/esm/oas/operation/Operation.js +14 -0
  18. package/esm/oas/parameter/Parameter.d.ts +3 -0
  19. package/esm/oas/parameter/Parameter.d.ts.map +1 -1
  20. package/esm/oas/parameter/Parameter.js +3 -0
  21. package/esm/oas/ref/ref-types.d.ts +42 -0
  22. package/esm/oas/ref/ref-types.d.ts.map +1 -1
  23. package/esm/oas/ref/ref-types.js +9 -0
  24. package/esm/oas/securitySchemes/security-scheme-types.d.ts +63 -0
  25. package/esm/oas/securitySchemes/security-scheme-types.d.ts.map +1 -1
  26. package/esm/oas/securitySchemes/security-scheme-types.js +15 -0
  27. package/esm/types/Results.d.ts +32 -0
  28. package/esm/types/Results.d.ts.map +1 -1
  29. package/esm/types/Results.js +12 -0
  30. package/package.json +1 -1
  31. package/script/context/CoreContext.d.ts +10 -1
  32. package/script/context/CoreContext.d.ts.map +1 -1
  33. package/script/context/GenerateContext.d.ts +180 -0
  34. package/script/context/GenerateContext.d.ts.map +1 -1
  35. package/script/context/GenerateContext.js +25 -0
  36. package/script/context/ParseContext.d.ts +6 -0
  37. package/script/context/ParseContext.d.ts.map +1 -1
  38. package/script/context/ParseContext.js +6 -0
  39. package/script/oas/example/toExamplesV3.d.ts +39 -0
  40. package/script/oas/example/toExamplesV3.d.ts.map +1 -1
  41. package/script/oas/example/toExamplesV3.js +29 -0
  42. package/script/oas/object/Object.d.ts +6 -0
  43. package/script/oas/object/Object.d.ts.map +1 -1
  44. package/script/oas/object/Object.js +6 -0
  45. package/script/oas/operation/Operation.d.ts +34 -0
  46. package/script/oas/operation/Operation.d.ts.map +1 -1
  47. package/script/oas/operation/Operation.js +14 -0
  48. package/script/oas/parameter/Parameter.d.ts +3 -0
  49. package/script/oas/parameter/Parameter.d.ts.map +1 -1
  50. package/script/oas/parameter/Parameter.js +3 -0
  51. package/script/oas/ref/ref-types.d.ts +42 -0
  52. package/script/oas/ref/ref-types.d.ts.map +1 -1
  53. package/script/oas/ref/ref-types.js +9 -0
  54. package/script/oas/securitySchemes/security-scheme-types.d.ts +63 -0
  55. package/script/oas/securitySchemes/security-scheme-types.d.ts.map +1 -1
  56. package/script/oas/securitySchemes/security-scheme-types.js +15 -0
  57. package/script/types/Results.d.ts +32 -0
  58. package/script/types/Results.d.ts.map +1 -1
  59. package/script/types/Results.js +12 -0
@@ -326,7 +326,16 @@ export declare class CoreContext {
326
326
  */
327
327
  export type JsonFormatterArgs = {
328
328
  /** The Deno log record containing log level, message, and metadata */
329
- logRecord: log.LogRecord;
329
+ logRecord: {
330
+ /** The log level name */
331
+ levelName: string;
332
+ /** The timestamp when the log was created */
333
+ datetime: Date;
334
+ /** The log message */
335
+ msg: string;
336
+ /** Additional log arguments */
337
+ args: unknown[];
338
+ };
330
339
  /** String representation of the current stack trail position */
331
340
  stackTrail: string;
332
341
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CoreContext.d.ts","sourceRoot":"","sources":["../../src/context/CoreContext.ts"],"names":[],"mappings":"AAA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AAG;QAAE,WAAW,EAAE,WAAW,CAAA;KAAE;IAUvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsEG;IACG,WAAW,CAAC,EAAE,cAAc,EAAE,QAAQ,EAAE,oBAAoB,EAAE,QAAQ,EAAE,EAAE,eAAe,GAAG,OAAO,CAAC,YAAY,CAAC;IA2DvH;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC;IAkClD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,oBAAoB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;CAkB/C;AAED;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,sEAAsE;IACtE,SAAS,EAAE;QACT,yBAAyB;QACzB,SAAS,EAAE,MAAM,CAAA;QACjB,6CAA6C;QAC7C,QAAQ,EAAE,IAAI,CAAA;QACd,sBAAsB;QACtB,GAAG,EAAE,MAAM,CAAA;QACX,+BAA+B;QAC/B,IAAI,EAAE,OAAO,EAAE,CAAA;KAChB,CAAA;IACD,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,cAAc,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,iBAAiB,GAAG,MAAM,CAQnF"}
@@ -30,76 +30,231 @@ type ConstructorArgs = {
30
30
  captureCurrentResult: (result: ResultType) => void;
31
31
  toGeneratorConfigMap: <EnrichmentType = undefined>() => GeneratorsMapContainer<EnrichmentType>;
32
32
  };
33
+ /**
34
+ * Arguments for picking a specific export from a generator module.
35
+ *
36
+ * Used to select and configure specific exports from generator modules
37
+ * during the artifact generation process.
38
+ */
33
39
  export type PickArgs = {
40
+ /** The name of the export to pick from the generator module */
34
41
  name: string;
42
+ /** The file path where the export should be made available */
35
43
  exportPath: string;
36
44
  };
45
+ /**
46
+ * Arguments for registering a JSON file in the generation context.
47
+ *
48
+ * Used to register JSON configuration files, manifests, or other JSON
49
+ * data that should be included in the generated output artifacts.
50
+ */
37
51
  export type RegisterJsonArgs = {
52
+ /** The destination file path where the JSON should be written */
38
53
  destinationPath: string;
54
+ /** The JSON object to write to the file */
39
55
  json: Record<string, unknown>;
40
56
  };
57
+ /**
58
+ * Arguments for applying package imports to a generated file.
59
+ *
60
+ * Used to configure import statements and dependencies when generating
61
+ * code files that need to reference external packages or modules.
62
+ */
41
63
  export type ApplyPackageImportsArgs = {
64
+ /** The destination file path where imports should be applied */
42
65
  destinationPath: string;
66
+ /** The export path for the module being imported */
43
67
  exportPath: string;
44
68
  };
69
+ /**
70
+ * Base arguments for registering generated content in the generation context.
71
+ *
72
+ * Provides the fundamental configuration options for registering imports,
73
+ * re-exports, and definitions that will be included in generated files.
74
+ */
45
75
  export type BaseRegisterArgs = {
76
+ /** Import statements to include, organized by module path */
46
77
  imports?: Record<string, ImportNameArg[]>;
78
+ /** Re-export statements to include, organized by module path */
47
79
  reExports?: Record<string, Identifier[]>;
80
+ /** Definition objects to include in the generated content */
48
81
  definitions?: (Definition | undefined)[];
49
82
  };
83
+ /**
84
+ * Arguments for registering generated content with a specific destination.
85
+ *
86
+ * Extends BaseRegisterArgs to include a destination path, allowing content
87
+ * to be registered and associated with a specific output file location.
88
+ */
50
89
  export type RegisterArgs = {
90
+ /** Import statements to include, organized by module path */
51
91
  imports?: Record<string, ImportNameArg[]>;
92
+ /** Re-export statements to include, organized by module path */
52
93
  reExports?: Record<string, Identifier[]>;
94
+ /** Definition objects to include in the generated content */
53
95
  definitions?: (Definition | undefined)[];
96
+ /** The destination file path where the content should be registered */
54
97
  destinationPath: string;
55
98
  };
99
+ /**
100
+ * Arguments for creating and registering a definition from a schema.
101
+ *
102
+ * Used to transform OpenAPI schema objects into code definitions and
103
+ * register them in the generation context for output file creation.
104
+ *
105
+ * @template Schema - The schema type extending SchemaType
106
+ */
56
107
  export type CreateAndRegisterDefinition<Schema extends SchemaType> = {
108
+ /** The OpenAPI schema to transform into a definition */
57
109
  schema: Schema;
110
+ /** The identifier for the generated definition */
58
111
  identifier: Identifier;
112
+ /** The destination file path where the definition should be registered */
59
113
  destinationPath: string;
114
+ /** Function to transform the schema into a generated value */
60
115
  schemaToValueFn: SchemaToValueFn;
116
+ /** Optional root reference name for the schema */
61
117
  rootRef?: RefName;
118
+ /** Whether to exclude this definition from exports */
62
119
  noExport?: boolean;
63
120
  };
121
+ /**
122
+ * Arguments for defining and registering a value in the generation context.
123
+ *
124
+ * Used to create definitions from pre-generated values and register them
125
+ * in the generation context for inclusion in output files.
126
+ *
127
+ * @template V - The generated value type extending GeneratedValue
128
+ */
64
129
  export type DefineAndRegisterArgs<V extends GeneratedValue> = {
130
+ /** The identifier for the definition */
65
131
  identifier: Identifier;
132
+ /** The generated value to define */
66
133
  value: V;
134
+ /** The destination file path where the definition should be registered */
67
135
  destinationPath: string;
136
+ /** Whether to exclude this definition from exports */
68
137
  noExport?: boolean;
69
138
  };
139
+ /**
140
+ * Arguments for retrieving operation-specific settings.
141
+ *
142
+ * Used to get generator-specific configuration for a particular
143
+ * OpenAPI operation based on its path and HTTP method.
144
+ */
70
145
  export type GetOperationSettingsArgs = {
146
+ /** The ID of the generator requesting settings */
71
147
  generatorId: string;
148
+ /** The API path for the operation */
72
149
  path: string;
150
+ /** The HTTP method for the operation */
73
151
  method: Method;
74
152
  };
153
+ /**
154
+ * Arguments for adding render dependencies for an operation.
155
+ *
156
+ * Used to specify additional dependencies that should be included
157
+ * when rendering code for a specific OpenAPI operation.
158
+ */
75
159
  export type AddRenderDependencyArgs = {
160
+ /** The ID of the generator adding dependencies */
76
161
  generatorId: string;
162
+ /** The OpenAPI operation requiring dependencies */
77
163
  operation: OasOperation;
164
+ /** Array of dependency names or paths to include */
78
165
  dependencies: string[];
79
166
  };
167
+ /**
168
+ * Arguments for retrieving model-specific settings.
169
+ *
170
+ * Used to get generator-specific configuration for a particular
171
+ * OpenAPI model based on its reference name.
172
+ */
80
173
  export type ToModelSettingsArgs = {
174
+ /** The ID of the generator requesting model settings */
81
175
  generatorId: string;
176
+ /** The reference name of the model */
82
177
  refName: RefName;
83
178
  };
179
+ /**
180
+ * Options for inserting an operation into the generation context.
181
+ *
182
+ * Configures how an OpenAPI operation should be processed and
183
+ * included in the generated code output.
184
+ *
185
+ * @template T - The generation type extending GenerationType
186
+ */
84
187
  export type InsertOperationOptions<T extends GenerationType> = {
188
+ /** Whether to exclude this operation from exports */
85
189
  noExport?: boolean;
190
+ /** The type of generation to apply */
86
191
  generation?: T;
192
+ /** Custom destination path for the operation */
87
193
  destinationPath?: string;
88
194
  };
195
+ /**
196
+ * Arguments for inserting a normalized model into the generation context.
197
+ *
198
+ * Used to process and register OpenAPI schema objects as normalized
199
+ * model definitions with fallback naming when schema names are unavailable.
200
+ *
201
+ * @template Schema - The schema type (OasSchema, OasRef, or OasVoid)
202
+ */
89
203
  export type InsertNormalisedModelArgs<Schema extends OasSchema | OasRef<'schema'> | OasVoid> = {
204
+ /** Fallback name to use if the schema doesn't have a name */
90
205
  fallbackName: string;
206
+ /** The OpenAPI schema to normalize and insert */
91
207
  schema: Schema;
208
+ /** The destination file path for the model */
92
209
  destinationPath: string;
93
210
  };
211
+ /**
212
+ * Options for inserting a normalized model.
213
+ *
214
+ * Configures how a normalized model should be processed and
215
+ * included in the generated code output.
216
+ */
94
217
  export type InsertNormalisedModelOptions = {
218
+ /** Whether to exclude this model from exports */
95
219
  noExport?: boolean;
96
220
  };
221
+ /**
222
+ * Return type for inserting a normalized model.
223
+ *
224
+ * Provides type-safe return values based on the schema type being processed.
225
+ * Returns different Definition types depending on whether the schema is a
226
+ * reference or a concrete schema.
227
+ *
228
+ * @template V - The generated value type
229
+ * @template Schema - The schema type being processed
230
+ */
97
231
  export type InsertNormalisedModelReturn<V extends GeneratedValue, Schema extends OasSchema | OasRef<'schema'> | OasVoid> = Schema extends OasRef<'schema'> ? Definition<V> : Definition<TypeSystemOutput<SchemaToNonRef<Schema>['type']>>;
232
+ /**
233
+ * Options for inserting a model into the generation context.
234
+ *
235
+ * Configures how a model should be processed and included in
236
+ * the generated code output.
237
+ *
238
+ * @template T - The generation type extending GenerationType
239
+ */
98
240
  export type InsertModelOptions<T extends GenerationType> = {
241
+ /** Whether to exclude this model from exports */
99
242
  noExport?: boolean;
243
+ /** The type of generation to apply */
100
244
  generation?: T;
245
+ /** Custom destination path for the model */
101
246
  destinationPath?: string;
102
247
  };
248
+ /**
249
+ * Return type for insert operations in the generation context.
250
+ *
251
+ * Represents the result of inserting content into the generation
252
+ * context, providing type-safe access to the inserted content.
253
+ *
254
+ * @template V - The generated value type
255
+ * @template T - The generation type
256
+ * @template EnrichmentType - The enrichment data type
257
+ */
103
258
  export type InsertReturn<V extends GeneratedValue, T extends GenerationType, EnrichmentType> = Inserted<V, T, EnrichmentType>;
104
259
  type ToOperationSettingsArgs<V, EnrichmentType = undefined> = {
105
260
  operation: OasOperation;
@@ -211,12 +366,19 @@ type GenerateResult = {
211
366
  */
212
367
  export declare class GenerateContext {
213
368
  #private;
369
+ /** The parsed OpenAPI document being processed */
214
370
  oasDocument: OasDocument;
371
+ /** Client settings for customization (optional) */
215
372
  settings: ClientSettings | undefined;
373
+ /** Logger instance for tracking generation progress */
216
374
  logger: log.Logger;
375
+ /** Function to capture processing results at current stack position */
217
376
  captureCurrentResult: (result: ResultType) => void;
377
+ /** Function that returns the generator configuration map */
218
378
  toGeneratorConfigMap: <EnrichmentType = undefined>() => GeneratorsMapContainer<EnrichmentType>;
379
+ /** Stack trail for tracking current processing context */
219
380
  stackTrail: StackTrail;
381
+ /** Tracking model nesting depth to prevent infinite recursion */
220
382
  modelDepth: Record<string, number>;
221
383
  constructor({ oasDocument, settings, logger, captureCurrentResult, stackTrail, toGeneratorConfigMap }: ConstructorArgs);
222
384
  /**
@@ -316,11 +478,29 @@ type ToOperationSourceArgs = {
316
478
  operation: OasOperation;
317
479
  generatorId: string;
318
480
  };
481
+ /**
482
+ * Creates an OperationSource from an operation and generator ID.
483
+ *
484
+ * Transforms operation and generator information into a source descriptor
485
+ * that can be used for tracking operation origins in the generation pipeline.
486
+ *
487
+ * @param args - Arguments containing operation and generator ID
488
+ * @returns OperationSource descriptor for the operation
489
+ */
319
490
  export declare const toOperationSource: ({ operation, generatorId }: ToOperationSourceArgs) => OperationSource;
320
491
  type ToModelSourceArgs = {
321
492
  refName: RefName;
322
493
  generatorId: string;
323
494
  };
495
+ /**
496
+ * Creates a ModelSource from a reference name and generator ID.
497
+ *
498
+ * Transforms model reference and generator information into a source descriptor
499
+ * that can be used for tracking model origins in the generation pipeline.
500
+ *
501
+ * @param args - Arguments containing reference name and generator ID
502
+ * @returns ModelSource descriptor for the model
503
+ */
324
504
  export declare const toModelSource: ({ refName, generatorId }: ToModelSourceArgs) => ModelSource;
325
505
  export {};
326
506
  //# sourceMappingURL=GenerateContext.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenerateContext.d.ts","sourceRoot":"","sources":["../../src/context/GenerateContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,sBAAsB,CAAA;AACjG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,EAAmB,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AACrF,OAAO,KAAK,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AAE,cAAc,EAAE,EAC5C,SAAS,EACT,UAAU,EACX,EAAE,uBAAuB,CAAC,CAAC,EAAE,cAAc,CAAC,GAAG,eAAe,CAAC,cAAc,CAAC;IAQ/E;;;;;;;;OAQG;IACH,sBAAsB,CAAC,CAAC,EAAE,cAAc,EAAE,EACxC,OAAO,EACP,UAAU,EACX,EAAE,sBAAsB,CAAC,CAAC,EAAE,cAAc,CAAC,GAAG,eAAe,CAAC,cAAc,CAAC;IAuB9E;;;;;OAKG;IACH,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;IAYzF;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS;CAOvE;AAED,KAAK,qBAAqB,GAAG;IAC3B,SAAS,EAAE,YAAY,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAAI,4BAG/B,qBAAqB,KAAG,eAKzB,CAAA;AAEF,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GAAI,0BAA0B,iBAAiB,KAAG,WAI1E,CAAA"}
@@ -124,42 +124,49 @@ export class GenerateContext {
124
124
  _GenerateContext_files.set(this, void 0);
125
125
  _GenerateContext_previews.set(this, void 0);
126
126
  _GenerateContext_mappings.set(this, void 0);
127
+ /** The parsed OpenAPI document being processed */
127
128
  Object.defineProperty(this, "oasDocument", {
128
129
  enumerable: true,
129
130
  configurable: true,
130
131
  writable: true,
131
132
  value: void 0
132
133
  });
134
+ /** Client settings for customization (optional) */
133
135
  Object.defineProperty(this, "settings", {
134
136
  enumerable: true,
135
137
  configurable: true,
136
138
  writable: true,
137
139
  value: void 0
138
140
  });
141
+ /** Logger instance for tracking generation progress */
139
142
  Object.defineProperty(this, "logger", {
140
143
  enumerable: true,
141
144
  configurable: true,
142
145
  writable: true,
143
146
  value: void 0
144
147
  });
148
+ /** Function to capture processing results at current stack position */
145
149
  Object.defineProperty(this, "captureCurrentResult", {
146
150
  enumerable: true,
147
151
  configurable: true,
148
152
  writable: true,
149
153
  value: void 0
150
154
  });
155
+ /** Function that returns the generator configuration map */
151
156
  Object.defineProperty(this, "toGeneratorConfigMap", {
152
157
  enumerable: true,
153
158
  configurable: true,
154
159
  writable: true,
155
160
  value: void 0
156
161
  });
162
+ /** Stack trail for tracking current processing context */
157
163
  Object.defineProperty(this, "stackTrail", {
158
164
  enumerable: true,
159
165
  configurable: true,
160
166
  writable: true,
161
167
  value: void 0
162
168
  });
169
+ /** Tracking model nesting depth to prevent infinite recursion */
163
170
  Object.defineProperty(this, "modelDepth", {
164
171
  enumerable: true,
165
172
  configurable: true,
@@ -543,12 +550,30 @@ _GenerateContext_files = new WeakMap(), _GenerateContext_previews = new WeakMap(
543
550
  __classPrivateFieldGet(this, _GenerateContext_files, "f").set(normalisedPath, newFile);
544
551
  return newFile;
545
552
  };
553
+ /**
554
+ * Creates an OperationSource from an operation and generator ID.
555
+ *
556
+ * Transforms operation and generator information into a source descriptor
557
+ * that can be used for tracking operation origins in the generation pipeline.
558
+ *
559
+ * @param args - Arguments containing operation and generator ID
560
+ * @returns OperationSource descriptor for the operation
561
+ */
546
562
  export const toOperationSource = ({ operation, generatorId }) => ({
547
563
  type: 'operation',
548
564
  generatorId,
549
565
  operationPath: operation.path,
550
566
  operationMethod: operation.method
551
567
  });
568
+ /**
569
+ * Creates a ModelSource from a reference name and generator ID.
570
+ *
571
+ * Transforms model reference and generator information into a source descriptor
572
+ * that can be used for tracking model origins in the generation pipeline.
573
+ *
574
+ * @param args - Arguments containing reference name and generator ID
575
+ * @returns ModelSource descriptor for the model
576
+ */
552
577
  export const toModelSource = ({ refName, generatorId }) => ({
553
578
  type: 'model',
554
579
  generatorId,
@@ -241,11 +241,17 @@ export type ParseIssue = ParseError | ParseWarning;
241
241
  */
242
242
  export declare class ParseContext {
243
243
  #private;
244
+ /** The original OpenAPI v3 document being parsed */
244
245
  documentObject: OpenAPIV3.Document;
246
+ /** Logger instance for tracking parse progress and issues */
245
247
  logger: log.Logger;
248
+ /** The parsed OAS document result */
246
249
  oasDocument: OasDocument;
250
+ /** Stack trail for tracking current parsing context */
247
251
  stackTrail: StackTrail;
252
+ /** Collection of parsing issues encountered during processing */
248
253
  issues: ParseIssue[];
254
+ /** Whether to suppress console output during parsing */
249
255
  silent: boolean;
250
256
  constructor({ documentObject, logger, stackTrail, silent }: ConstructorArgs);
251
257
  parse(): OasDocument;
@@ -1 +1 @@
1
- {"version":3,"file":"ParseContext.d.ts","sourceRoot":"","sources":["../../src/context/ParseContext.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,KAAK,KAAK,GAAG,MAAM,yCAAyC,CAAA;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C;;GAEG;AACH,KAAK,eAAe,GAAG;IACrB,uCAAuC;IACvC,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAA;IAClC,4CAA4C;IAC5C,MAAM,EAAE,GAAG,CAAC,MAAM,CAAA;IAClB,0CAA0C;IAC1C,UAAU,EAAE,UAAU,CAAA;IACtB,yCAAyC;IACzC,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,8BAA8B;IAC9B,WAAW,EAAE,WAAW,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ger, stackTrail, silent = true }) {
129
+ /** The original OpenAPI v3 document being parsed */
129
130
  Object.defineProperty(this, "documentObject", {
130
131
  enumerable: true,
131
132
  configurable: true,
132
133
  writable: true,
133
134
  value: void 0
134
135
  });
136
+ /** Logger instance for tracking parse progress and issues */
135
137
  Object.defineProperty(this, "logger", {
136
138
  enumerable: true,
137
139
  configurable: true,
138
140
  writable: true,
139
141
  value: void 0
140
142
  });
143
+ /** The parsed OAS document result */
141
144
  Object.defineProperty(this, "oasDocument", {
142
145
  enumerable: true,
143
146
  configurable: true,
144
147
  writable: true,
145
148
  value: void 0
146
149
  });
150
+ /** Stack trail for tracking current parsing context */
147
151
  Object.defineProperty(this, "stackTrail", {
148
152
  enumerable: true,
149
153
  configurable: true,
150
154
  writable: true,
151
155
  value: void 0
152
156
  });
157
+ /** Collection of parsing issues encountered during processing */
153
158
  Object.defineProperty(this, "issues", {
154
159
  enumerable: true,
155
160
  configurable: true,
156
161
  writable: true,
157
162
  value: void 0
158
163
  });
164
+ /** Whether to suppress console output during parsing */
159
165
  Object.defineProperty(this, "silent", {
160
166
  enumerable: true,
161
167
  configurable: true,
@@ -5,18 +5,57 @@ import type { OasRef } from '../ref/Ref.js';
5
5
  type ToExampleSimpleV3Args = {
6
6
  example: unknown;
7
7
  };
8
+ /**
9
+ * Creates a simple OAS example from a value.
10
+ *
11
+ * Converts a raw example value into an OasExample object with basic
12
+ * fields. Used for simple example scenarios where only the value matters.
13
+ *
14
+ * @param args - Arguments containing the example value
15
+ * @returns OasExample object with the provided value
16
+ */
8
17
  export declare const toExampleSimpleV3: ({ example }: ToExampleSimpleV3Args) => OasExample | OasRef<"example">;
18
+ /**
19
+ * Arguments for processing OpenAPI v3 examples into OAS example objects.
20
+ *
21
+ * Handles both single example and examples collection scenarios,
22
+ * with context for tracing and error handling.
23
+ */
9
24
  export type ToExamplesV3Args = {
25
+ /** Single example object (OpenAPI v3 format) */
10
26
  example: OpenAPIV3.ExampleObject | undefined;
27
+ /** Collection of named examples (OpenAPI v3 format) */
11
28
  examples: Record<string, OpenAPIV3.ExampleObject | OpenAPIV3.ReferenceObject> | undefined;
29
+ /** Key name for the example context */
12
30
  exampleKey: string;
31
+ /** Parse context for tracing and error handling */
13
32
  context: ParseContext;
14
33
  };
34
+ /**
35
+ * Processes OpenAPI v3 examples into OAS example objects.
36
+ *
37
+ * Handles both single example and examples collection scenarios,
38
+ * converting them to the internal OAS representation. Provides
39
+ * warnings when both formats are specified simultaneously.
40
+ *
41
+ * @param args - Arguments containing example data and context
42
+ * @returns Record of processed examples, or undefined if no examples
43
+ */
15
44
  export declare const toExamplesV3: ({ example, examples, exampleKey, context }: ToExamplesV3Args) => Record<string, OasExample | OasRef<"example">> | undefined;
16
45
  type ToExampleV3Args = {
17
46
  example: OpenAPIV3.ExampleObject | OpenAPIV3.ReferenceObject;
18
47
  context: ParseContext;
19
48
  };
49
+ /**
50
+ * Processes a single OpenAPI v3 example into an OAS example object.
51
+ *
52
+ * Converts OpenAPI v3 example objects or references into the internal
53
+ * OAS representation, handling both direct examples and $ref references.
54
+ * Processes specification extensions and maintains all example metadata.
55
+ *
56
+ * @param args - Arguments containing the example and parsing context
57
+ * @returns OasExample object or reference to an example
58
+ */
20
59
  export declare const toExampleV3: ({ example, context }: ToExampleV3Args) => OasExample | OasRef<"example">;
21
60
  export {};
22
61
  //# sourceMappingURL=toExamplesV3.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toExamplesV3.d.ts","sourceRoot":"","sources":["../../../src/oas/example/toExamplesV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAG3C,KAAK,qBAAqB,GAAG;IAC3B,OAAO,EAAE,OAAO,CAA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AAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,gDAAgD;IAChD,OAAO,EAAE,SAAS,CAAC,aAAa,GAAG,SAAS,CAAA;IAC5C,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,aAAa,GAAG,SAAS,CAAC,eAAe,CAAC,GAAG,SAAS,CAAA;IACzF,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAA;IAClB,mDAAmD;IACnD,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GAAI,4CAK1B,gBAAgB,KAAG,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,GAAG,SAsBtE,CAAA;AAED,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,SAAS,CAAC,aAAa,GAAG,SAAS,CAAC,eAAe,CAAA;IAC5D,OAAO,EAAE,YAAY,CAAA;CACtB,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,GAAI,sBAGzB,eAAe,KAAG,UAAU,GAAG,MAAM,CAAC,SAAS,CAoBjD,CAAA"}
@@ -2,6 +2,15 @@ import { isRef } from '../../helpers/refFns.js';
2
2
  import { toRefV31 } from '../ref/toRefV31.js';
3
3
  import { OasExample } from './Example.js';
4
4
  import { toSpecificationExtensionsV3 } from '../specificationExtensions/toSpecificationExtensionsV3.js';
5
+ /**
6
+ * Creates a simple OAS example from a value.
7
+ *
8
+ * Converts a raw example value into an OasExample object with basic
9
+ * fields. Used for simple example scenarios where only the value matters.
10
+ *
11
+ * @param args - Arguments containing the example value
12
+ * @returns OasExample object with the provided value
13
+ */
5
14
  export const toExampleSimpleV3 = ({ example }) => {
6
15
  const fields = {
7
16
  value: example,
@@ -10,6 +19,16 @@ export const toExampleSimpleV3 = ({ example }) => {
10
19
  };
11
20
  return new OasExample(fields);
12
21
  };
22
+ /**
23
+ * Processes OpenAPI v3 examples into OAS example objects.
24
+ *
25
+ * Handles both single example and examples collection scenarios,
26
+ * converting them to the internal OAS representation. Provides
27
+ * warnings when both formats are specified simultaneously.
28
+ *
29
+ * @param args - Arguments containing example data and context
30
+ * @returns Record of processed examples, or undefined if no examples
31
+ */
13
32
  export const toExamplesV3 = ({ example, examples, exampleKey, context }) => {
14
33
  if (example && examples) {
15
34
  context.logger.warn(`Both example and examples are defined for ${exampleKey}`);
@@ -28,6 +47,16 @@ export const toExamplesV3 = ({ example, examples, exampleKey, context }) => {
28
47
  }
29
48
  return undefined;
30
49
  };
50
+ /**
51
+ * Processes a single OpenAPI v3 example into an OAS example object.
52
+ *
53
+ * Converts OpenAPI v3 example objects or references into the internal
54
+ * OAS representation, handling both direct examples and $ref references.
55
+ * Processes specification extensions and maintains all example metadata.
56
+ *
57
+ * @param args - Arguments containing the example and parsing context
58
+ * @returns OasExample object or reference to an example
59
+ */
31
60
  export const toExampleV3 = ({ example, context }) => {
32
61
  if (isRef(example)) {
33
62
  return toRefV31({ ref: example, refType: 'example', context });
@@ -182,11 +182,17 @@ export declare class OasObject<Nullable extends boolean | undefined = boolean |
182
182
  * The default value of the object.
183
183
  */
184
184
  default: Nullable extends true ? Record<string, unknown> | null | undefined : Record<string, unknown> | undefined;
185
+ /** Maximum number of properties allowed in the object */
185
186
  maxProperties?: number;
187
+ /** Minimum number of properties required in the object */
186
188
  minProperties?: number;
189
+ /** Whether the object is read-only */
187
190
  readOnly?: boolean;
191
+ /** Whether the object is write-only */
188
192
  writeOnly?: boolean;
193
+ /** Whether the object schema is deprecated */
189
194
  deprecated?: boolean;
195
+ /** Array of valid enum values for the object */
190
196
  enums?: Nullable extends true ? (Record<string, unknown> | null)[] | undefined : Record<string, unknown>[] | undefined;
191
197
  /**
192
198
  * Creates a new OasObject instance.