Skip to content

enhancement: Extract Form and Table Schema Generation into Reusable Services - #32

Open
glitched-matrix44 wants to merge 4 commits into
iquesters:mainfrom
glitched-matrix44:IQU-enhancement-30
Open

enhancement: Extract Form and Table Schema Generation into Reusable Services#32
glitched-matrix44 wants to merge 4 commits into
iquesters:mainfrom
glitched-matrix44:IQU-enhancement-30

Conversation

@glitched-matrix44

Copy link
Copy Markdown
Collaborator

Summary

Refactored schema generation logic from EntityController into dedicated reusable services that can be shared across Entity and Business Entity workflows.

Problem Addressed

Schema generation responsibilities, including form schema generation, table schema generation, schema persistence, and schema regeneration, were previously tightly coupled to EntityController. This made the functionality difficult to reuse and increased duplication risk as Business Entities began requiring the same capabilities.

Changes Implemented

  • Created a dedicated service for form schema generation.
  • Created a dedicated service for table schema generation.
  • Moved schema generation logic out of EntityController.
  • Moved schema persistence logic into reusable services.
  • Added support for schema generation from Entity definitions.
  • Added support for schema generation from Business Entity definitions.
  • Updated controllers to consume shared services instead of maintaining generation logic directly.
  • Preserved existing schema structures and generation behavior.
  • Reduced duplication between Entity and Business Entity workflows.

Files Added

  • src/Services/FormSchemaService.php
  • src/Services/TableSchemaService.php

Files Modified

  • src/Http/Controllers/EntityController.php
  • src/Http/Controllers/BusinessEntityController.php
  • routes/api.php

Benefits

  • Improved separation of concerns.
  • Increased code reusability across modules.
  • Simplified controller responsibilities.
  • Easier maintenance and future schema-related enhancements.
  • Provides a common foundation for future dynamic UI schema generation features.

Testing

  • Verified form schema generation for Entities.
  • Verified table schema generation for Entities.
  • Verified schema generation for Business Entities.
  • Verified generated schema structure remains unchanged.
  • Verified schema persistence and regeneration workflows continue to function correctly.

closes #30

@glitched-matrix44 glitched-matrix44 self-assigned this Jun 23, 2026
@glitched-matrix44 glitched-matrix44 added the enhancement New feature or request label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enhancement: create service for table schema and form schema generation in business entities and entities

2 participants