@ng-forge/openapi-generator 1.0.0-rc.2 → 1.0.0-rc.4

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
@@ -404,6 +404,12 @@ GET endpoints with top-level array responses are always skipped since they don't
404
404
 
405
405
  To make GET endpoint fields read-only, use `--read-only`.
406
406
 
407
+ ### Which request body content types are supported?
408
+
409
+ `application/json`, `multipart/form-data`, and `application/x-www-form-urlencoded`, in that preference order when an endpoint declares more than one.
410
+
411
+ Binary file properties (`type: string, format: binary`, including arrays of them) are skipped with a warning since there is no file upload field type yet. An endpoint whose body contains only binary properties produces no form and is skipped entirely.
412
+
407
413
  ### Why does the generator say "Swagger 2.0" is not supported?
408
414
 
409
415
  Only OpenAPI 3.x specs are supported. Convert Swagger 2.0 specs using [converter.swagger.io](https://converter.swagger.io) or the `swagger2openapi` npm package.
@@ -23,9 +23,13 @@ function isOpenAPIV3(api) {
23
23
  function isReferenceObject(obj) {
24
24
  return typeof obj === "object" && obj !== null && "$ref" in obj;
25
25
  }
26
+ function isBinarySchema(schema) {
27
+ return typeof schema === "object" && schema !== null && schema["format"] === "binary";
28
+ }
26
29
 
27
30
  // packages/openapi-generator/src/parser/endpoint-extractor.ts
28
31
  var SUPPORTED_METHODS = ["get", "post", "put", "patch"];
32
+ var REQUEST_BODY_CONTENT_TYPES = ["application/json", "multipart/form-data", "application/x-www-form-urlencoded"];
29
33
  function extractEndpoints(spec) {
30
34
  const endpoints = [];
31
35
  for (const [path, pathItem] of Object.entries(spec.paths ?? {})) {
@@ -42,10 +46,13 @@ function extractEndpoints(spec) {
42
46
  };
43
47
  if (operation.requestBody && "content" in operation.requestBody) {
44
48
  const content = operation.requestBody.content;
45
- const jsonContent = content["application/json"];
46
- if (jsonContent?.schema && !isReferenceObject(jsonContent.schema)) {
47
- endpoint.requestBodySchema = jsonContent.schema;
48
- endpoint.requiredFields = jsonContent.schema.required ?? [];
49
+ for (const contentType of REQUEST_BODY_CONTENT_TYPES) {
50
+ const mediaContent = content[contentType];
51
+ if (mediaContent?.schema && !isReferenceObject(mediaContent.schema)) {
52
+ endpoint.requestBodySchema = mediaContent.schema;
53
+ endpoint.requiredFields = mediaContent.schema.required ?? [];
54
+ break;
55
+ }
49
56
  }
50
57
  }
51
58
  if (method === "get") {
@@ -554,6 +561,11 @@ function mapPropertyToField(prop, options, seen, ambiguousFields, warnings) {
554
561
  warnings.push(`Property '${prop.name}' is deprecated and was skipped`);
555
562
  return void 0;
556
563
  }
564
+ const propItems = prop.schema["items"];
565
+ if (isBinarySchema(prop.schema) || isBinarySchema(propItems)) {
566
+ warnings.push(`Property '${prop.name}' is a file upload (format: binary) and was skipped; no file field type is available yet`);
567
+ return void 0;
568
+ }
557
569
  if (prop.schema.oneOf && prop.schema["discriminator"]) {
558
570
  const schemaPrefix2 = options.schemaName ?? "";
559
571
  const nestedSchemaName = schemaPrefix2 ? `${schemaPrefix2}.${prop.name}` : prop.name;
@@ -886,6 +898,9 @@ ${indent}}`;
886
898
  }
887
899
 
888
900
  // packages/openapi-generator/src/generator/interface-generator.ts
901
+ function isSkippedBinaryProperty(schema) {
902
+ return isBinarySchema(schema) || isBinarySchema(schema["items"]);
903
+ }
889
904
  function generateInterface(schema, options) {
890
905
  const interfaceName = toInterfaceName(options.method, options.path, options.operationId);
891
906
  const lines = [];
@@ -991,6 +1006,7 @@ function resolveSchemaProperties(schema, seen) {
991
1006
  const required = new Set(schema.required ?? []);
992
1007
  for (const [name, propSchema] of Object.entries(schema.properties ?? {})) {
993
1008
  if (isReferenceObject(propSchema)) continue;
1009
+ if (isSkippedBinaryProperty(propSchema)) continue;
994
1010
  properties.push([name, propSchema]);
995
1011
  }
996
1012
  return { properties, required };
@@ -1081,6 +1097,7 @@ function generateNestedInterface(name, schema, seen) {
1081
1097
  lines.push(`export interface ${name} {`);
1082
1098
  for (const [propName, propSchema] of Object.entries(schema.properties ?? {})) {
1083
1099
  if (isReferenceObject(propSchema)) continue;
1100
+ if (isSkippedBinaryProperty(propSchema)) continue;
1084
1101
  const optional = required.has(propName) ? "" : "?";
1085
1102
  const tsType = schemaToTsType(propName, propSchema, name, nestedInterfaces, seen);
1086
1103
  lines.push(` ${propName}${optional}: ${tsType};`);
@@ -1404,6 +1421,10 @@ Ambiguous fields in ${endpoint.method} ${endpoint.path}:`);
1404
1421
  decisions: updatedDecisions
1405
1422
  });
1406
1423
  }
1424
+ if (result.fields.length === 0) {
1425
+ logger.warn(`${endpoint.method} ${endpoint.path}: No mappable fields (all properties were skipped), skipping`);
1426
+ continue;
1427
+ }
1407
1428
  const formFileName = toFormFileName(endpoint.method, endpoint.path, endpoint.operationId);
1408
1429
  logger.verbose(`${endpoint.method} ${endpoint.path} \u2192 forms/${formFileName}`);
1409
1430
  for (const field of result.fields) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-forge/openapi-generator",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.4",
4
4
  "description": "Generate @ng-forge/dynamic-forms configurations from OpenAPI specs",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1 +1 @@
1
- {"version":3,"file":"generate.command.d.ts","sourceRoot":"","sources":["../../../../../../packages/openapi-generator/src/cli/commands/generate.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAkBvE,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,+EAA+E;AAC/E,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAkC1D;AAED,+CAA+C;AAC/C,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAe/E;AAkSD,wBAAgB,eAAe,CAAC,YAAY,EAAE,YAAY,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY,EAAE,CAQ7F"}
1
+ {"version":3,"file":"generate.command.d.ts","sourceRoot":"","sources":["../../../../../../packages/openapi-generator/src/cli/commands/generate.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAkBvE,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,+EAA+E;AAC/E,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAkC1D;AAED,+CAA+C;AAC/C,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAe/E;AAuSD,wBAAgB,eAAe,CAAC,YAAY,EAAE,YAAY,EAAE,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY,EAAE,CAQ7F"}
@@ -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;AAEtE,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"}
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;AAStE,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
@@ -15,9 +15,13 @@ function isOpenAPIV3(api) {
15
15
  function isReferenceObject(obj) {
16
16
  return typeof obj === "object" && obj !== null && "$ref" in obj;
17
17
  }
18
+ function isBinarySchema(schema) {
19
+ return typeof schema === "object" && schema !== null && schema["format"] === "binary";
20
+ }
18
21
 
19
22
  // packages/openapi-generator/src/parser/endpoint-extractor.ts
20
23
  var SUPPORTED_METHODS = ["get", "post", "put", "patch"];
24
+ var REQUEST_BODY_CONTENT_TYPES = ["application/json", "multipart/form-data", "application/x-www-form-urlencoded"];
21
25
  function extractEndpoints(spec) {
22
26
  const endpoints = [];
23
27
  for (const [path, pathItem] of Object.entries(spec.paths ?? {})) {
@@ -34,10 +38,13 @@ function extractEndpoints(spec) {
34
38
  };
35
39
  if (operation.requestBody && "content" in operation.requestBody) {
36
40
  const content = operation.requestBody.content;
37
- const jsonContent = content["application/json"];
38
- if (jsonContent?.schema && !isReferenceObject(jsonContent.schema)) {
39
- endpoint.requestBodySchema = jsonContent.schema;
40
- endpoint.requiredFields = jsonContent.schema.required ?? [];
41
+ for (const contentType of REQUEST_BODY_CONTENT_TYPES) {
42
+ const mediaContent = content[contentType];
43
+ if (mediaContent?.schema && !isReferenceObject(mediaContent.schema)) {
44
+ endpoint.requestBodySchema = mediaContent.schema;
45
+ endpoint.requiredFields = mediaContent.schema.required ?? [];
46
+ break;
47
+ }
41
48
  }
42
49
  }
43
50
  if (method === "get") {
@@ -546,6 +553,11 @@ function mapPropertyToField(prop, options, seen, ambiguousFields, warnings) {
546
553
  warnings.push(`Property '${prop.name}' is deprecated and was skipped`);
547
554
  return void 0;
548
555
  }
556
+ const propItems = prop.schema["items"];
557
+ if (isBinarySchema(prop.schema) || isBinarySchema(propItems)) {
558
+ warnings.push(`Property '${prop.name}' is a file upload (format: binary) and was skipped; no file field type is available yet`);
559
+ return void 0;
560
+ }
549
561
  if (prop.schema.oneOf && prop.schema["discriminator"]) {
550
562
  const schemaPrefix2 = options.schemaName ?? "";
551
563
  const nestedSchemaName = schemaPrefix2 ? `${schemaPrefix2}.${prop.name}` : prop.name;
@@ -878,6 +890,9 @@ ${indent}}`;
878
890
  }
879
891
 
880
892
  // packages/openapi-generator/src/generator/interface-generator.ts
893
+ function isSkippedBinaryProperty(schema) {
894
+ return isBinarySchema(schema) || isBinarySchema(schema["items"]);
895
+ }
881
896
  function generateInterface(schema, options) {
882
897
  const interfaceName = toInterfaceName(options.method, options.path, options.operationId);
883
898
  const lines = [];
@@ -983,6 +998,7 @@ function resolveSchemaProperties(schema, seen) {
983
998
  const required = new Set(schema.required ?? []);
984
999
  for (const [name, propSchema] of Object.entries(schema.properties ?? {})) {
985
1000
  if (isReferenceObject(propSchema)) continue;
1001
+ if (isSkippedBinaryProperty(propSchema)) continue;
986
1002
  properties.push([name, propSchema]);
987
1003
  }
988
1004
  return { properties, required };
@@ -1073,6 +1089,7 @@ function generateNestedInterface(name, schema, seen) {
1073
1089
  lines.push(`export interface ${name} {`);
1074
1090
  for (const [propName, propSchema] of Object.entries(schema.properties ?? {})) {
1075
1091
  if (isReferenceObject(propSchema)) continue;
1092
+ if (isSkippedBinaryProperty(propSchema)) continue;
1076
1093
  const optional = required.has(propName) ? "" : "?";
1077
1094
  const tsType = schemaToTsType(propName, propSchema, name, nestedInterfaces, seen);
1078
1095
  lines.push(` ${propName}${optional}: ${tsType};`);
@@ -1402,6 +1419,10 @@ Ambiguous fields in ${endpoint.method} ${endpoint.path}:`);
1402
1419
  decisions: updatedDecisions
1403
1420
  });
1404
1421
  }
1422
+ if (result.fields.length === 0) {
1423
+ logger.warn(`${endpoint.method} ${endpoint.path}: No mappable fields (all properties were skipped), skipping`);
1424
+ continue;
1425
+ }
1405
1426
  const formFileName = toFormFileName(endpoint.method, endpoint.path, endpoint.operationId);
1406
1427
  logger.verbose(`${endpoint.method} ${endpoint.path} \u2192 forms/${formFileName}`);
1407
1428
  for (const field of result.fields) {
@@ -1 +1 @@
1
- {"version":3,"file":"schema-to-fields.d.ts","sourceRoot":"","sources":["../../../../../packages/openapi-generator/src/mapper/schema-to-fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,4BAA4B,CAAC;AAG/E,OAAO,KAAK,E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E,cAAc,EAAE,CAAC;IAClC,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,OAAO,GAAE,cAAmB,GAAG,aAAa,CAI7H"}
1
+ {"version":3,"file":"schema-to-fields.d.ts","sourceRoot":"","sources":["../../../../../packages/openapi-generator/src/mapper/schema-to-fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,4BAA4B,CAAC;AAG/E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAyC9D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAA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G,aAAa,CAI7H"}
@@ -1 +1 @@
1
- {"version":3,"file":"endpoint-extractor.d.ts","sourceRoot":"","sources":["../../../../../packages/openapi-generator/src/parser/endpoint-extractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,SAAS,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IACtE,cAAc,CAAC,EAAE,SAAS,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IACnE,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAID,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,YAAY,EAAE,CA+ClE;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAGlE"}
1
+ {"version":3,"file":"endpoint-extractor.d.ts","sourceRoot":"","sources":["../../../../../packages/openapi-generator/src/parser/endpoint-extractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,SAAS,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IACtE,cAAc,CAAC,EAAE,SAAS,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;IACnE,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAQD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,WAAW,GAAG,YAAY,EAAE,CAkDlE;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAGlE"}
@@ -1,3 +1,5 @@
1
1
  import type { OpenAPIV3 } from 'openapi-types';
2
2
  export declare function isReferenceObject(obj: unknown): obj is OpenAPIV3.ReferenceObject;
3
+ /** Binary file content (`format: binary`) has no field type in this release (issue #485). */
4
+ export declare function isBinarySchema(schema: unknown): boolean;
3
5
  //# 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;AAE/C,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,SAAS,CAAC,eAAe,CAEhF"}
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;AAE/C,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"}