@ng-forge/openapi-generator 1.3.0-next.1 → 1.3.0-next.3
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/bin/ng-forge-generator.js +40 -11
- package/package.json +1 -1
- package/src/generator/interface-generator.d.ts.map +1 -1
- package/src/index.js +40 -11
- package/src/parser/schema-walker.d.ts +1 -1
- package/src/parser/schema-walker.d.ts.map +1 -1
- package/src/utils/openapi-utils.d.ts +3 -0
- package/src/utils/openapi-utils.d.ts.map +1 -1
|
@@ -26,6 +26,15 @@ function isReferenceObject(obj) {
|
|
|
26
26
|
function isBinarySchema(schema) {
|
|
27
27
|
return typeof schema === "object" && schema !== null && schema["format"] === "binary";
|
|
28
28
|
}
|
|
29
|
+
function hasOnlyDynamicKeys(schema) {
|
|
30
|
+
const s = schema;
|
|
31
|
+
if (Object.keys(schema.properties ?? {}).length > 0 || s["allOf"] || s["oneOf"] || s["anyOf"]) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
const patternProperties = s["patternProperties"];
|
|
35
|
+
const additionalProperties = s["additionalProperties"];
|
|
36
|
+
return Object.keys(patternProperties ?? {}).length > 0 || additionalProperties !== void 0 && additionalProperties !== false;
|
|
37
|
+
}
|
|
29
38
|
|
|
30
39
|
// packages/openapi-generator/src/parser/endpoint-extractor.ts
|
|
31
40
|
var SUPPORTED_METHODS = ["get", "post", "put", "patch"];
|
|
@@ -78,7 +87,7 @@ function formatEndpointLabel(endpoint) {
|
|
|
78
87
|
}
|
|
79
88
|
|
|
80
89
|
// packages/openapi-generator/src/parser/schema-walker.ts
|
|
81
|
-
function walkSchema(schema, requiredFields = [], seen = /* @__PURE__ */ new WeakSet()) {
|
|
90
|
+
function walkSchema(schema, requiredFields = [], seen = /* @__PURE__ */ new WeakSet(), path) {
|
|
82
91
|
const warnings = [];
|
|
83
92
|
if (seen.has(schema)) {
|
|
84
93
|
return { properties: [], warnings: ["Circular schema reference detected during allOf merge \u2014 nested schema skipped"] };
|
|
@@ -86,7 +95,7 @@ function walkSchema(schema, requiredFields = [], seen = /* @__PURE__ */ new Weak
|
|
|
86
95
|
seen.add(schema);
|
|
87
96
|
try {
|
|
88
97
|
if (schema.allOf) {
|
|
89
|
-
return walkAllOf(schema.allOf, requiredFields, warnings, seen);
|
|
98
|
+
return walkAllOf(schema.allOf, requiredFields, warnings, seen, path);
|
|
90
99
|
}
|
|
91
100
|
if (schema.oneOf && schema.discriminator) {
|
|
92
101
|
return walkOneOfWithDiscriminator(
|
|
@@ -109,7 +118,7 @@ function walkSchema(schema, requiredFields = [], seen = /* @__PURE__ */ new Weak
|
|
|
109
118
|
return { properties: [], warnings };
|
|
110
119
|
}
|
|
111
120
|
if (schema.additionalProperties && schema.additionalProperties !== false) {
|
|
112
|
-
warnings.push(
|
|
121
|
+
warnings.push(`additionalProperties${path ? ` at '${path}'` : ""} are not supported and were skipped`);
|
|
113
122
|
}
|
|
114
123
|
const properties = [];
|
|
115
124
|
const required = new Set(schema.required ?? requiredFields);
|
|
@@ -126,12 +135,12 @@ function walkSchema(schema, requiredFields = [], seen = /* @__PURE__ */ new Weak
|
|
|
126
135
|
seen.delete(schema);
|
|
127
136
|
}
|
|
128
137
|
}
|
|
129
|
-
function walkAllOf(schemas, requiredFields, warnings, seen) {
|
|
138
|
+
function walkAllOf(schemas, requiredFields, warnings, seen, path) {
|
|
130
139
|
const mergedProperties = /* @__PURE__ */ new Map();
|
|
131
140
|
const allRequired = new Set(requiredFields);
|
|
132
141
|
for (const schema of schemas) {
|
|
133
142
|
if (isReferenceObject(schema)) continue;
|
|
134
|
-
const walked = walkSchema(schema, [], seen);
|
|
143
|
+
const walked = walkSchema(schema, [], seen, path);
|
|
135
144
|
warnings.push(...walked.warnings);
|
|
136
145
|
for (const prop of walked.properties) {
|
|
137
146
|
mergedProperties.set(prop.name, prop);
|
|
@@ -258,7 +267,7 @@ function mapSchemaToFieldType(schema) {
|
|
|
258
267
|
}
|
|
259
268
|
return { fieldType: "array", isContainer: true, isAmbiguous: false, isPrimitiveArray: true };
|
|
260
269
|
}
|
|
261
|
-
if (type === "object" || schema.properties) {
|
|
270
|
+
if (type === "object" || schema.properties || "patternProperties" in schema) {
|
|
262
271
|
return { fieldType: "group", isContainer: true, isAmbiguous: false };
|
|
263
272
|
}
|
|
264
273
|
return { fieldType: "input", props: { type: "text" }, isContainer: false, isAmbiguous: false };
|
|
@@ -501,7 +510,7 @@ function mapSchemaToFieldsInternal(schema, requiredFields, options, seen) {
|
|
|
501
510
|
}
|
|
502
511
|
seen.add(schema);
|
|
503
512
|
try {
|
|
504
|
-
const walked = walkSchema(schema, requiredFields);
|
|
513
|
+
const walked = walkSchema(schema, requiredFields, void 0, options.schemaName);
|
|
505
514
|
const ambiguousFields = [];
|
|
506
515
|
const warnings = [...walked.warnings];
|
|
507
516
|
if (walked.discriminator) {
|
|
@@ -587,6 +596,14 @@ function mapPropertyToField(prop, options, seen, ambiguousFields, warnings) {
|
|
|
587
596
|
const typeResult = mapSchemaToFieldType(prop.schema);
|
|
588
597
|
const schemaPrefix = options.schemaName ?? "";
|
|
589
598
|
const fieldPath = schemaPrefix ? `${schemaPrefix}.${prop.name}` : prop.name;
|
|
599
|
+
const dynamicKeyItems = typeResult.fieldType === "array" && propItems !== void 0 && hasOnlyDynamicKeys(propItems);
|
|
600
|
+
const hasDecision = options.decisions?.[fieldPath] !== void 0;
|
|
601
|
+
if (!ngForgeType && !hasDecision && (typeResult.fieldType === "group" && hasOnlyDynamicKeys(prop.schema) || dynamicKeyItems)) {
|
|
602
|
+
warnings.push(
|
|
603
|
+
`Property '${fieldPath}' only has dynamic keys (additionalProperties/patternProperties) and was skipped; key/value fields are not supported yet`
|
|
604
|
+
);
|
|
605
|
+
return void 0;
|
|
606
|
+
}
|
|
590
607
|
let finalType;
|
|
591
608
|
if (ngForgeType) {
|
|
592
609
|
finalType = ngForgeType;
|
|
@@ -700,10 +717,15 @@ function mapPropertyToField(prop, options, seen, ambiguousFields, warnings) {
|
|
|
700
717
|
if (typeResult.isContainer) {
|
|
701
718
|
const nestedSchemaName = schemaPrefix ? `${schemaPrefix}.${prop.name}` : prop.name;
|
|
702
719
|
const nestedOptions = { ...options, schemaName: nestedSchemaName };
|
|
703
|
-
if (typeResult.fieldType === "group" && prop.schema.properties) {
|
|
720
|
+
if (typeResult.fieldType === "group" && (prop.schema.properties || prop.schema.allOf)) {
|
|
704
721
|
const innerResult = mapSchemaToFieldsInternal(prop.schema, prop.schema.required ?? [], nestedOptions, seen);
|
|
705
|
-
field.fields = innerResult.fields;
|
|
706
722
|
ambiguousFields.push(...innerResult.ambiguousFields);
|
|
723
|
+
warnings.push(...innerResult.warnings);
|
|
724
|
+
if (innerResult.fields.length === 0) {
|
|
725
|
+
warnings.push(`Property '${fieldPath}' has no supported fields left and was skipped`);
|
|
726
|
+
return void 0;
|
|
727
|
+
}
|
|
728
|
+
field.fields = innerResult.fields;
|
|
707
729
|
} else if (typeResult.fieldType === "array" && prop.schema["items"]) {
|
|
708
730
|
const items = prop.schema["items"];
|
|
709
731
|
const fieldLabel = singularize(toLabel(prop.name));
|
|
@@ -901,6 +923,13 @@ ${indent}}`;
|
|
|
901
923
|
function isSkippedBinaryProperty(schema) {
|
|
902
924
|
return isBinarySchema(schema) || isBinarySchema(schema["items"]);
|
|
903
925
|
}
|
|
926
|
+
function isSkippedDynamicKeyProperty(schema) {
|
|
927
|
+
const s = schema;
|
|
928
|
+
if (s["x-ng-forge-type"]) return false;
|
|
929
|
+
const items = s["items"];
|
|
930
|
+
const isObject = (x) => x["type"] === "object" || x["type"] === void 0;
|
|
931
|
+
return isObject(schema) && hasOnlyDynamicKeys(schema) || items !== void 0 && isObject(items) && hasOnlyDynamicKeys(items);
|
|
932
|
+
}
|
|
904
933
|
function generateInterface(schema, options) {
|
|
905
934
|
const interfaceName = toInterfaceName(options.method, options.path, options.operationId);
|
|
906
935
|
const lines = [];
|
|
@@ -1006,7 +1035,7 @@ function resolveSchemaProperties(schema, seen) {
|
|
|
1006
1035
|
const required = new Set(schema.required ?? []);
|
|
1007
1036
|
for (const [name, propSchema] of Object.entries(schema.properties ?? {})) {
|
|
1008
1037
|
if (isReferenceObject(propSchema)) continue;
|
|
1009
|
-
if (isSkippedBinaryProperty(propSchema)) continue;
|
|
1038
|
+
if (isSkippedBinaryProperty(propSchema) || isSkippedDynamicKeyProperty(propSchema)) continue;
|
|
1010
1039
|
properties.push([name, propSchema]);
|
|
1011
1040
|
}
|
|
1012
1041
|
return { properties, required };
|
|
@@ -1097,7 +1126,7 @@ function generateNestedInterface(name, schema, seen) {
|
|
|
1097
1126
|
lines.push(`export interface ${name} {`);
|
|
1098
1127
|
for (const [propName, propSchema] of Object.entries(schema.properties ?? {})) {
|
|
1099
1128
|
if (isReferenceObject(propSchema)) continue;
|
|
1100
|
-
if (isSkippedBinaryProperty(propSchema)) continue;
|
|
1129
|
+
if (isSkippedBinaryProperty(propSchema) || isSkippedDynamicKeyProperty(propSchema)) continue;
|
|
1101
1130
|
const optional = required.has(propName) ? "" : "?";
|
|
1102
1131
|
const tsType = schemaToTsType(propName, propSchema, name, nestedInterfaces, seen);
|
|
1103
1132
|
lines.push(` ${propName}${optional}: ${tsType};`);
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface-generator.d.ts","sourceRoot":"","sources":["../../../../../packages/openapi-generator/src/generator/interface-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5D,KAAK,YAAY,GAAG,SAAS,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"interface-generator.d.ts","sourceRoot":"","sources":["../../../../../packages/openapi-generator/src/generator/interface-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5D,KAAK,YAAY,GAAG,SAAS,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;AAmBtE,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,yBAAyB,GAAG,MAAM,CAkClG"}
|
package/src/index.js
CHANGED
|
@@ -18,6 +18,15 @@ function isReferenceObject(obj) {
|
|
|
18
18
|
function isBinarySchema(schema) {
|
|
19
19
|
return typeof schema === "object" && schema !== null && schema["format"] === "binary";
|
|
20
20
|
}
|
|
21
|
+
function hasOnlyDynamicKeys(schema) {
|
|
22
|
+
const s = schema;
|
|
23
|
+
if (Object.keys(schema.properties ?? {}).length > 0 || s["allOf"] || s["oneOf"] || s["anyOf"]) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
const patternProperties = s["patternProperties"];
|
|
27
|
+
const additionalProperties = s["additionalProperties"];
|
|
28
|
+
return Object.keys(patternProperties ?? {}).length > 0 || additionalProperties !== void 0 && additionalProperties !== false;
|
|
29
|
+
}
|
|
21
30
|
|
|
22
31
|
// packages/openapi-generator/src/parser/endpoint-extractor.ts
|
|
23
32
|
var SUPPORTED_METHODS = ["get", "post", "put", "patch"];
|
|
@@ -70,7 +79,7 @@ function formatEndpointLabel(endpoint) {
|
|
|
70
79
|
}
|
|
71
80
|
|
|
72
81
|
// packages/openapi-generator/src/parser/schema-walker.ts
|
|
73
|
-
function walkSchema(schema, requiredFields = [], seen = /* @__PURE__ */ new WeakSet()) {
|
|
82
|
+
function walkSchema(schema, requiredFields = [], seen = /* @__PURE__ */ new WeakSet(), path) {
|
|
74
83
|
const warnings = [];
|
|
75
84
|
if (seen.has(schema)) {
|
|
76
85
|
return { properties: [], warnings: ["Circular schema reference detected during allOf merge \u2014 nested schema skipped"] };
|
|
@@ -78,7 +87,7 @@ function walkSchema(schema, requiredFields = [], seen = /* @__PURE__ */ new Weak
|
|
|
78
87
|
seen.add(schema);
|
|
79
88
|
try {
|
|
80
89
|
if (schema.allOf) {
|
|
81
|
-
return walkAllOf(schema.allOf, requiredFields, warnings, seen);
|
|
90
|
+
return walkAllOf(schema.allOf, requiredFields, warnings, seen, path);
|
|
82
91
|
}
|
|
83
92
|
if (schema.oneOf && schema.discriminator) {
|
|
84
93
|
return walkOneOfWithDiscriminator(
|
|
@@ -101,7 +110,7 @@ function walkSchema(schema, requiredFields = [], seen = /* @__PURE__ */ new Weak
|
|
|
101
110
|
return { properties: [], warnings };
|
|
102
111
|
}
|
|
103
112
|
if (schema.additionalProperties && schema.additionalProperties !== false) {
|
|
104
|
-
warnings.push(
|
|
113
|
+
warnings.push(`additionalProperties${path ? ` at '${path}'` : ""} are not supported and were skipped`);
|
|
105
114
|
}
|
|
106
115
|
const properties = [];
|
|
107
116
|
const required = new Set(schema.required ?? requiredFields);
|
|
@@ -118,12 +127,12 @@ function walkSchema(schema, requiredFields = [], seen = /* @__PURE__ */ new Weak
|
|
|
118
127
|
seen.delete(schema);
|
|
119
128
|
}
|
|
120
129
|
}
|
|
121
|
-
function walkAllOf(schemas, requiredFields, warnings, seen) {
|
|
130
|
+
function walkAllOf(schemas, requiredFields, warnings, seen, path) {
|
|
122
131
|
const mergedProperties = /* @__PURE__ */ new Map();
|
|
123
132
|
const allRequired = new Set(requiredFields);
|
|
124
133
|
for (const schema of schemas) {
|
|
125
134
|
if (isReferenceObject(schema)) continue;
|
|
126
|
-
const walked = walkSchema(schema, [], seen);
|
|
135
|
+
const walked = walkSchema(schema, [], seen, path);
|
|
127
136
|
warnings.push(...walked.warnings);
|
|
128
137
|
for (const prop of walked.properties) {
|
|
129
138
|
mergedProperties.set(prop.name, prop);
|
|
@@ -250,7 +259,7 @@ function mapSchemaToFieldType(schema) {
|
|
|
250
259
|
}
|
|
251
260
|
return { fieldType: "array", isContainer: true, isAmbiguous: false, isPrimitiveArray: true };
|
|
252
261
|
}
|
|
253
|
-
if (type === "object" || schema.properties) {
|
|
262
|
+
if (type === "object" || schema.properties || "patternProperties" in schema) {
|
|
254
263
|
return { fieldType: "group", isContainer: true, isAmbiguous: false };
|
|
255
264
|
}
|
|
256
265
|
return { fieldType: "input", props: { type: "text" }, isContainer: false, isAmbiguous: false };
|
|
@@ -493,7 +502,7 @@ function mapSchemaToFieldsInternal(schema, requiredFields, options, seen) {
|
|
|
493
502
|
}
|
|
494
503
|
seen.add(schema);
|
|
495
504
|
try {
|
|
496
|
-
const walked = walkSchema(schema, requiredFields);
|
|
505
|
+
const walked = walkSchema(schema, requiredFields, void 0, options.schemaName);
|
|
497
506
|
const ambiguousFields = [];
|
|
498
507
|
const warnings = [...walked.warnings];
|
|
499
508
|
if (walked.discriminator) {
|
|
@@ -579,6 +588,14 @@ function mapPropertyToField(prop, options, seen, ambiguousFields, warnings) {
|
|
|
579
588
|
const typeResult = mapSchemaToFieldType(prop.schema);
|
|
580
589
|
const schemaPrefix = options.schemaName ?? "";
|
|
581
590
|
const fieldPath = schemaPrefix ? `${schemaPrefix}.${prop.name}` : prop.name;
|
|
591
|
+
const dynamicKeyItems = typeResult.fieldType === "array" && propItems !== void 0 && hasOnlyDynamicKeys(propItems);
|
|
592
|
+
const hasDecision = options.decisions?.[fieldPath] !== void 0;
|
|
593
|
+
if (!ngForgeType && !hasDecision && (typeResult.fieldType === "group" && hasOnlyDynamicKeys(prop.schema) || dynamicKeyItems)) {
|
|
594
|
+
warnings.push(
|
|
595
|
+
`Property '${fieldPath}' only has dynamic keys (additionalProperties/patternProperties) and was skipped; key/value fields are not supported yet`
|
|
596
|
+
);
|
|
597
|
+
return void 0;
|
|
598
|
+
}
|
|
582
599
|
let finalType;
|
|
583
600
|
if (ngForgeType) {
|
|
584
601
|
finalType = ngForgeType;
|
|
@@ -692,10 +709,15 @@ function mapPropertyToField(prop, options, seen, ambiguousFields, warnings) {
|
|
|
692
709
|
if (typeResult.isContainer) {
|
|
693
710
|
const nestedSchemaName = schemaPrefix ? `${schemaPrefix}.${prop.name}` : prop.name;
|
|
694
711
|
const nestedOptions = { ...options, schemaName: nestedSchemaName };
|
|
695
|
-
if (typeResult.fieldType === "group" && prop.schema.properties) {
|
|
712
|
+
if (typeResult.fieldType === "group" && (prop.schema.properties || prop.schema.allOf)) {
|
|
696
713
|
const innerResult = mapSchemaToFieldsInternal(prop.schema, prop.schema.required ?? [], nestedOptions, seen);
|
|
697
|
-
field.fields = innerResult.fields;
|
|
698
714
|
ambiguousFields.push(...innerResult.ambiguousFields);
|
|
715
|
+
warnings.push(...innerResult.warnings);
|
|
716
|
+
if (innerResult.fields.length === 0) {
|
|
717
|
+
warnings.push(`Property '${fieldPath}' has no supported fields left and was skipped`);
|
|
718
|
+
return void 0;
|
|
719
|
+
}
|
|
720
|
+
field.fields = innerResult.fields;
|
|
699
721
|
} else if (typeResult.fieldType === "array" && prop.schema["items"]) {
|
|
700
722
|
const items = prop.schema["items"];
|
|
701
723
|
const fieldLabel = singularize(toLabel(prop.name));
|
|
@@ -893,6 +915,13 @@ ${indent}}`;
|
|
|
893
915
|
function isSkippedBinaryProperty(schema) {
|
|
894
916
|
return isBinarySchema(schema) || isBinarySchema(schema["items"]);
|
|
895
917
|
}
|
|
918
|
+
function isSkippedDynamicKeyProperty(schema) {
|
|
919
|
+
const s = schema;
|
|
920
|
+
if (s["x-ng-forge-type"]) return false;
|
|
921
|
+
const items = s["items"];
|
|
922
|
+
const isObject = (x) => x["type"] === "object" || x["type"] === void 0;
|
|
923
|
+
return isObject(schema) && hasOnlyDynamicKeys(schema) || items !== void 0 && isObject(items) && hasOnlyDynamicKeys(items);
|
|
924
|
+
}
|
|
896
925
|
function generateInterface(schema, options) {
|
|
897
926
|
const interfaceName = toInterfaceName(options.method, options.path, options.operationId);
|
|
898
927
|
const lines = [];
|
|
@@ -998,7 +1027,7 @@ function resolveSchemaProperties(schema, seen) {
|
|
|
998
1027
|
const required = new Set(schema.required ?? []);
|
|
999
1028
|
for (const [name, propSchema] of Object.entries(schema.properties ?? {})) {
|
|
1000
1029
|
if (isReferenceObject(propSchema)) continue;
|
|
1001
|
-
if (isSkippedBinaryProperty(propSchema)) continue;
|
|
1030
|
+
if (isSkippedBinaryProperty(propSchema) || isSkippedDynamicKeyProperty(propSchema)) continue;
|
|
1002
1031
|
properties.push([name, propSchema]);
|
|
1003
1032
|
}
|
|
1004
1033
|
return { properties, required };
|
|
@@ -1089,7 +1118,7 @@ function generateNestedInterface(name, schema, seen) {
|
|
|
1089
1118
|
lines.push(`export interface ${name} {`);
|
|
1090
1119
|
for (const [propName, propSchema] of Object.entries(schema.properties ?? {})) {
|
|
1091
1120
|
if (isReferenceObject(propSchema)) continue;
|
|
1092
|
-
if (isSkippedBinaryProperty(propSchema)) continue;
|
|
1121
|
+
if (isSkippedBinaryProperty(propSchema) || isSkippedDynamicKeyProperty(propSchema)) continue;
|
|
1093
1122
|
const optional = required.has(propName) ? "" : "?";
|
|
1094
1123
|
const tsType = schemaToTsType(propName, propSchema, name, nestedInterfaces, seen);
|
|
1095
1124
|
lines.push(` ${propName}${optional}: ${tsType};`);
|
|
@@ -13,5 +13,5 @@ export interface WalkedSchema {
|
|
|
13
13
|
};
|
|
14
14
|
warnings: string[];
|
|
15
15
|
}
|
|
16
|
-
export declare function walkSchema(schema: SchemaObject, requiredFields?: string[], seen?: WeakSet<SchemaObject
|
|
16
|
+
export declare function walkSchema(schema: SchemaObject, requiredFields?: string[], seen?: WeakSet<SchemaObject>, path?: string): WalkedSchema;
|
|
17
17
|
//# sourceMappingURL=schema-walker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-walker.d.ts","sourceRoot":"","sources":["../../../../../packages/openapi-generator/src/parser/schema-walker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5D,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;AAE7E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,aAAa,CAAC,EAAE;QACd,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;KACvC,CAAC;IACF,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wBAAgB,UAAU,
|
|
1
|
+
{"version":3,"file":"schema-walker.d.ts","sourceRoot":"","sources":["../../../../../packages/openapi-generator/src/parser/schema-walker.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5D,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;AAE7E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,aAAa,CAAC,EAAE;QACd,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;KACvC,CAAC;IACF,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wBAAgB,UAAU,CACxB,MAAM,EAAE,YAAY,EACpB,cAAc,GAAE,MAAM,EAAO,EAC7B,IAAI,GAAE,OAAO,CAAC,YAAY,CAAiB,EAC3C,IAAI,CAAC,EAAE,MAAM,GACZ,YAAY,CAoEd"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { OpenAPIV3 } from 'openapi-types';
|
|
2
|
+
import type { SchemaObject } from '../parser/schema-walker.js';
|
|
2
3
|
export declare function isReferenceObject(obj: unknown): obj is OpenAPIV3.ReferenceObject;
|
|
3
4
|
/** Binary file content (`format: binary`) has no field type in this release (issue #485). */
|
|
4
5
|
export declare function isBinarySchema(schema: unknown): boolean;
|
|
6
|
+
/** Object schema whose keys are all dynamic: no fixed `properties`, only additionalProperties/patternProperties. */
|
|
7
|
+
export declare function hasOnlyDynamicKeys(schema: SchemaObject): boolean;
|
|
5
8
|
//# sourceMappingURL=openapi-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/openapi-generator/src/utils/openapi-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"openapi-utils.d.ts","sourceRoot":"","sources":["../../../../../packages/openapi-generator/src/utils/openapi-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,SAAS,CAAC,eAAe,CAEhF;AAED,6FAA6F;AAC7F,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAEvD;AAED,oHAAoH;AACpH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAQhE"}
|