@ng-forge/openapi-generator 0.9.0 → 0.10.0-next.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.
@@ -623,11 +623,17 @@ function mapPropertyToField(prop, options, seen, ambiguousFields, warnings) {
623
623
  if (prop.schema.default !== void 0) {
624
624
  field.value = prop.schema.default;
625
625
  }
626
- if (!ngForgeType && finalType === typeResult.fieldType && typeResult.props && Object.keys(typeResult.props).length > 0) {
626
+ if (!ngForgeType && finalType === typeResult.fieldType && typeResult.props && Object.keys(typeResult.props).length > 0 && !CONTAINER_FIELD_TYPES.has(finalType)) {
627
627
  field.props = typeResult.props;
628
628
  }
629
629
  if (prop.schema.description) {
630
- field.props = { ...field.props, hint: prop.schema.description };
630
+ if (CONTAINER_FIELD_TYPES.has(finalType)) {
631
+ logger.verbose(
632
+ `Field '${fieldPath}': '${finalType}' container fields do not accept props \u2014 dropped description hint. Add a sibling 'text' field manually if you want to render this description.`
633
+ );
634
+ } else {
635
+ field.props = { ...field.props, hint: prop.schema.description };
636
+ }
631
637
  }
632
638
  if (prop.schema.enum) {
633
639
  const filteredEnum = prop.schema.enum.filter((v) => v !== null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-forge/openapi-generator",
3
- "version": "0.9.0",
3
+ "version": "0.10.0-next.2",
4
4
  "description": "Generate @ng-forge/dynamic-forms configurations from OpenAPI specs",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/index.js CHANGED
@@ -615,11 +615,17 @@ function mapPropertyToField(prop, options, seen, ambiguousFields, warnings) {
615
615
  if (prop.schema.default !== void 0) {
616
616
  field.value = prop.schema.default;
617
617
  }
618
- if (!ngForgeType && finalType === typeResult.fieldType && typeResult.props && Object.keys(typeResult.props).length > 0) {
618
+ if (!ngForgeType && finalType === typeResult.fieldType && typeResult.props && Object.keys(typeResult.props).length > 0 && !CONTAINER_FIELD_TYPES.has(finalType)) {
619
619
  field.props = typeResult.props;
620
620
  }
621
621
  if (prop.schema.description) {
622
- field.props = { ...field.props, hint: prop.schema.description };
622
+ if (CONTAINER_FIELD_TYPES.has(finalType)) {
623
+ logger.verbose(
624
+ `Field '${fieldPath}': '${finalType}' container fields do not accept props \u2014 dropped description hint. Add a sibling 'text' field manually if you want to render this description.`
625
+ );
626
+ } else {
627
+ field.props = { ...field.props, hint: prop.schema.description };
628
+ }
623
629
  }
624
630
  if (prop.schema.enum) {
625
631
  const filteredEnum = prop.schema.enum.filter((v) => v !== null);