feat:Standardize Usage of New @sourceloop/core Controller Enhancements Across All ARC Services#2438
feat:Standardize Usage of New @sourceloop/core Controller Enhancements Across All ARC Services#2438piyushsinghgaur1 wants to merge 14 commits intomasterfrom
Conversation
6edb8fe to
956e33c
Compare
rohit-sourcefuse
left a comment
There was a problem hiding this comment.
Comprehensive PR Review
This PR introduces a significant architectural change by standardizing controller and model bootstrapping across all ARC services. While the modernization effort is commendable, there are several critical issues that need to be addressed.
Critical Issues
1. Trivy Security Scan Failure
The CI shows a security vulnerability that needs to be resolved before merge.
2. Commented Out Code Without Documentation
Multiple services have commented out controller imports (e.g., // import {AuditController} from './controllers';) without clear explanation. This creates maintenance confusion and should either be removed or properly documented.
3. File Extension Configuration Risk
The booter configuration uses .controller.js extensions while source files are .ts. This could cause runtime issues if the booter runs against the wrong file types or directory structure.
4. Node.js Test Matrix Incomplete
Several Node.js test matrix jobs are still pending - we should wait for these to complete before merge.
Architectural Concerns
Large-Scale Change Risk
This PR modifies 10+ services simultaneously, changing from manual controller registration to dynamic booters. While this modernization is valuable, the broad scope increases the risk of introducing subtle runtime issues across the entire ecosystem.
Migration Documentation Missing
The transition from manual (this.controllers = [...]) to dynamic controller loading lacks documentation explaining:
- Why this change was made
- How the new system works
- What could break if misconfigured
Code Quality Issues
Inconsistent Import Cleanup
Changes like switching from getModelSchemaRef to getModelSchemaRefSF lack explanation. API changes need clear rationale for maintainability.
Test Process Changes
The pretest script changes from npm run build to npm run clean && lb-tsc could affect test reliability if the build processes produce different outputs.
Positive Aspects
The overall modernization approach is sound:
✅ Consistent pattern across all services
✅ Reduces manual controller registration maintenance
✅ Centralizes bootstrapping logic
✅ Uses established LoopBack 4 booter patterns
Recommendations
Before merge:
- Fix the Trivy security vulnerability
- Remove commented imports or add clear documentation
- Verify booter file extension configuration
- Wait for all CI tests to complete
- Add comments explaining the architectural change
For future consideration:
- Consider incremental rollout for such large changes
- Add integration tests for the new booter functionality
- Document the migration strategy in the team wiki
The architectural direction is correct, but the execution needs refinement to ensure reliability across the service ecosystem.
| } | ||
| } | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
The package-lock.json file is missing a trailing newline. This can cause issues with git operations and some linting tools that expect files to end with a newline character.
Please add a newline at the end of the file to follow standard practices.
| BooterBasePathMixin(CoreModelBooter, __dirname, { | ||
| interface: AuditServiceComponent.name, | ||
| }), | ||
| BooterBasePathMixin(CoreControllerBooter, __dirname, { |
There was a problem hiding this comment.
Good news: The booter configuration is actually correct. I verified that:
✅ Authentication service structure matches config:
controllersdirectory exists with multiple controller filesmodules/auth/controllersdirectory exists and contains additional controllers- The
dirs: ['controllers', 'modules']configuration properly covers both locations
✅ Audit service structure is simpler:
- Only
controllersdirectory with singleaudit.controller.ts - The
dirs: ['controllers']configuration is appropriate
✅ File extensions are correct:
.controller.jstargets the compiled output in dist/- The booter runs after TypeScript compilation
✅ Core booter tests exist:
packages/core/src/__tests__/unit/booters/core-controller.booter.unit.test.tspackages/core/src/__tests__/unit/booters/core-model.booter.unit.test.ts
The booter implementation appears solid. My concern about file extension mismatch was overly cautious - the configuration is actually correct.
| import {get, param, post, requestBody, response} from '@loopback/rest'; | ||
| import { | ||
| CONTENT_TYPE, | ||
| getModelSchemaRefSF, |
There was a problem hiding this comment.
The getModelSchemaRefSF migration is well-executed and consistent. I verified that:
✅ Complete replacement: All 6 usages of getModelSchemaRef in this controller have been updated
✅ Consistent import: Properly imported from @sourceloop/core
✅ Same API signature: The function calls use identical parameters, indicating API compatibility
What this suggests:
- This is likely a standardized helper that provides enhanced schema reference functionality
- The change maintains backward compatibility while adding new capabilities
- The migration pattern could be documented for other contributors
Recommendation for future:
Consider adding a brief comment about why getModelSchemaRefSF is preferred over getModelSchemaRef to help maintainers understand the architectural decision.
| "openapi-spec": "node ./dist/openapi-spec", | ||
| "apidocs": "npx widdershins --language_tabs 'javascript:JavaScript:request' 'javascript--nodejs:Node.JS' --summary openapi.json -o openapi.md", | ||
| "pretest": "npm run build", | ||
| "pretest": "npm run clean && lb-tsc", |
There was a problem hiding this comment.
The script changes are well-thought-out after examining the actual package.json:
pretest change analysis:
- ✅
npm run clean && lb-tscvsnpm run build - Looking at the build script:
npm run clean && lb-tsc && npm run openapi-spec && npm run apidocs - For testing, we only need compilation (lb-tsc), not docs generation
- This actually improves test performance by skipping unnecessary openapi-spec and apidocs steps
preopenapi-spec addition:
- ✅ Smart cleanup:
rm -rf dist/__tests__prevents test files from interfering with OpenAPI generation - Addresses a common issue where test files might affect spec generation
Validation:
Both changes are improvements that make the build process more efficient and reliable.
| }), | ||
| ]; | ||
|
|
||
| // this.controllers = controllers; |
services/oidc-service/package.json
Outdated
| "openapi-spec": "node ./dist/openapi-spec", | ||
| "apidocs": "npx widdershins --search false --language_tabs 'javascript:JavaScript:request' 'javascript--nodejs:Node.JS' --summary openapi.json -o openapi.md", | ||
| "pretest": "npm run build", | ||
| "pretest": "lb-tsc", |
There was a problem hiding this comment.
not needed here right ?
we have not implemented booters here
There was a problem hiding this comment.
Yes will remove!
There was a problem hiding this comment.
dont change the formating
difficult to review
…oters and getModelSchemaRefSF enable dynamic model schemas using Sourceloop booters and getModelSchemaRefSF GH-2399
…loop booters and getModelSchemaRefSF enable dynamic model schemas using Sourceloop booters and getModelSchemaRefSF GH-2399
…ooters and getModelSchemaRefSF enable dynamic model schemas using Sourceloop booters and getModelSchemaRefSF GH-2399
…booters and getModelSchemaRefSF enable dynamic model schemas using Sourceloop booters and getModelSchemaRefSF GH-2399
…p booters and getModelSchemaRefSF enable dynamic model schemas using Sourceloop booters and getModelSchemaRefSF GH-2399
…oop booters and getModelSchemaRefSF enable dynamic model schemas using Sourceloop booters and getModelSchemaRefSF GH-2399
…ooters and getModelSchemaRefSF enable dynamic model schemas using Sourceloop booters and getModelSchemaRefSF GH-2399
…celoop booters and getModelSchemaRefSF enable dynamic model schemas using Sourceloop booters and getModelSchemaRefSF GH-2399
…Sourceloop booters and getModelSchemaRefSF enable dynamic model schemas using Sourceloop booters and getModelSchemaRefSF GH-2399
…ters and getModelSchemaRefSF enable dynamic model schemas using Sourceloop booters and getModelSchemaRefSF GH-2399
…lint fixes fix ReferenceError: beforeEach is not defined and lint fixes GH-0
956e33c to
360bc91
Compare
…ters and getModelSchemaRefSF enable dynamic model schemas using Sourceloop booters and getModelSchemaRefSF GH-2399
9bb1b1c to
92c4929
Compare
…ters and getModelSchemaRefSF enable dynamic model schemas using Sourceloop booters and getModelSchemaRefSF GH-2399
There was a problem hiding this comment.
Pull request overview
This PR standardizes multiple LoopBack 4 services to use SourceLoop core controller/model booters for dynamic discovery, updates OpenAPI schema generation to use getModelSchemaRefSF, and aligns build/test/openapi scripts across services.
Changes:
- Replace manual controller registration in service components with
CoreModelBooter/CoreControllerBooterviaBooterBasePathMixin. - Update controller OpenAPI schemas to use
getModelSchemaRefSFinstead ofgetModelSchemaRef. - Normalize service scripts (notably
pretestandpreopenapi-spec) and refresh generated OpenAPI artifacts in some services.
Reviewed changes
Copilot reviewed 114 out of 120 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| services/video-conferencing-service/src/controllers/video-chat-session.controller.ts | Switch request body schema ref helper to getModelSchemaRefSF. |
| services/video-conferencing-service/src/component.ts | Replace manual controllers list with dynamic model/controller booters. |
| services/video-conferencing-service/package.json | Standardize scripts (preopenapi-spec, pretest). |
| services/user-tenant-service/src/controllers/user-webhook.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/user-tenant-service/src/controllers/user-tenant.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/user-tenant-service/src/controllers/user-tenant-user-level-permission.controller.ts | Switch schema ref helper to getModelSchemaRefSF for multiple endpoints. |
| services/user-tenant-service/src/controllers/user-tenant-user-group.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/user-tenant-service/src/controllers/user-tenant-prefs.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/user-tenant-service/src/controllers/tenant.controller.ts | Switch schema ref helper to getModelSchemaRefSF and simplify imports. |
| services/user-tenant-service/src/controllers/tenant-user.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/user-tenant-service/src/controllers/tenant-tenant-config.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/user-tenant-service/src/controllers/tenant-role.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/user-tenant-service/src/controllers/tenant-group.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/user-tenant-service/src/controllers/group-user.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/user-tenant-service/src/component.ts | Replace manual controllers list with dynamic model/controller booters. |
| services/user-tenant-service/package.json | Add preopenapi-spec, change pretest to clean && lb-tsc, reformat JSON. |
| services/task-service/src/controllers/task.controller.ts | Switch schema ref helper to getModelSchemaRefSF and reorder imports. |
| services/task-service/src/controllers/task-user-task.controller.ts | Switch schema ref helper to getModelSchemaRefSF and simplify imports. |
| services/task-service/src/controllers/event.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/task-service/src/component.ts | Replace manual controllers list with dynamic model/controller booters. |
| services/task-service/package.json | Standardize scripts (preopenapi-spec, pretest). |
| services/survey-service/src/controllers/template-question.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/survey-service/src/controllers/survey.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/survey-service/src/controllers/survey-response.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/survey-service/src/controllers/survey-response-detail.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/survey-service/src/controllers/survey-responder.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/survey-service/src/controllers/survey-question.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/survey-service/src/controllers/survey-cycle.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/survey-service/src/controllers/section.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/survey-service/src/controllers/question.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/survey-service/src/controllers/question-template.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/survey-service/src/controllers/option.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/survey-service/src/component.ts | Replace manual controllers list with dynamic model/controller booters. |
| services/survey-service/package.json | Standardize scripts (preopenapi-spec, pretest) and JSON formatting. |
| services/search-service/package.json | Standardize scripts (preopenapi-spec, pretest). |
| services/scheduler-service/src/controllers/working-hour.controller.ts | Switch schema ref helper to getModelSchemaRefSF and consolidate imports. |
| services/scheduler-service/src/controllers/theme.controller.ts | Switch schema ref helper to getModelSchemaRefSF and consolidate imports. |
| services/scheduler-service/src/controllers/subscription.controller.ts | Switch schema ref helper to getModelSchemaRefSF and reorder imports. |
| services/scheduler-service/src/controllers/settings.controller.ts | Switch schema ref helper to getModelSchemaRefSF and consolidate imports. |
| services/scheduler-service/src/controllers/event.controller.ts | Switch schema ref helper to getModelSchemaRefSF and reorder imports. |
| services/scheduler-service/src/controllers/event-attendee.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/scheduler-service/src/controllers/event-attachment.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/scheduler-service/src/controllers/calendar.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/scheduler-service/src/controllers/calendar-working-hour.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/scheduler-service/src/controllers/calendar-subscription.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/scheduler-service/src/controllers/calendar-event.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/scheduler-service/src/controllers/attendee.controller.ts | Switch schema ref helper to getModelSchemaRefSF and consolidate imports. |
| services/scheduler-service/src/controllers/attachment.controller.ts | Switch schema ref helper to getModelSchemaRefSF and consolidate imports. |
| services/scheduler-service/src/component.ts | Replace manual controllers list with dynamic model/controller booters. |
| services/scheduler-service/package.json | Standardize scripts (preopenapi-spec, pretest). |
| services/reporting-service/package.json | Standardize scripts (pretest, preopenapi-spec) and formatting. |
| services/reporting-service/openapi.md | Update generated API docs (version header updated). |
| services/reporting-service/openapi.json | Update generated OpenAPI spec (version updated). |
| services/payment-service/package.json | Standardize scripts (pretest, preopenapi-spec) and formatting. |
| services/payment-service/openapi.md | Update generated API docs (version header updated). |
| services/payment-service/openapi.json | Update generated OpenAPI spec (version updated). |
| services/oidc-service/package.json | Formatting-only change (closing brace indentation). |
| services/notification-service/src/controllers/user-notification-settings.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/notification-service/src/controllers/pubnub-notification.controller.ts | Switch schema ref helper to getModelSchemaRefSF and reorder imports. |
| services/notification-service/src/controllers/notification.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/notification-service/src/controllers/notification-user.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/notification-service/src/controllers/notification-user-notification.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/notification-service/src/controllers/notification-notification-user.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/notification-service/src/component.ts | Replace manual controllers list with dynamic model/controller booters. |
| services/notification-service/package.json | Standardize scripts; bump @loopback/core dependency; formatting. |
| services/notification-service/openapi.md | Update generated API docs (schema ordering/contents updated). |
| services/notification-service/openapi.json | Update generated OpenAPI spec (schema ordering/contents updated). |
| services/in-mail-service/src/controllers/reply-and-forward.controller.ts | Switch schema ref helper to getModelSchemaRefSF for manually declared OAS schemas. |
| services/in-mail-service/src/controllers/originator.controller.ts | Switch schema ref helper to getModelSchemaRefSF for manually declared OAS schemas. |
| services/in-mail-service/src/controllers/collector.controller.ts | Switch schema ref helper to getModelSchemaRefSF (and touches response schema definitions). |
| services/in-mail-service/src/component.ts | Replace manual controllers list with dynamic model/controller booters. |
| services/in-mail-service/package.json | Standardize scripts (preopenapi-spec, pretest). |
| services/in-mail-service/openapi.md | Update generated API docs (schema ordering updated). |
| services/in-mail-service/openapi.json | Update generated OpenAPI spec (schema ordering updated). |
| services/feature-toggle-service/src/controllers/strategy.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/feature-toggle-service/src/controllers/feature.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/feature-toggle-service/src/controllers/feature-values.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/feature-toggle-service/src/component.ts | Replace manual controllers list with dynamic model/controller booters. |
| services/feature-toggle-service/package.json | Standardize scripts (pretest, preopenapi-spec) and formatting. |
| services/feature-toggle-service/openapi.md | Update generated API docs (schema sections reordered/updated). |
| services/feature-toggle-service/openapi.json | Update generated OpenAPI spec (schema sections reordered/updated). |
| services/chat-service/src/controllers/message.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/chat-service/src/controllers/message-recipient.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/chat-service/src/controllers/message-recipient-message.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/chat-service/src/controllers/message-message.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/chat-service/src/controllers/message-message-recipient.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/chat-service/src/controllers/message-attachment-file.controller.ts | Switch schema ref helper to getModelSchemaRefSF and reorder imports. |
| services/chat-service/src/component.ts | Replace manual controllers list with dynamic model/controller booters. |
| services/chat-service/package.json | Add preopenapi-spec; update pretest to clean && lb-tsc. |
| services/bpmn-service/src/controllers/workflow.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/bpmn-service/src/component.ts | Replace manual controllers list with dynamic model/controller booters. |
| services/bpmn-service/package.json | Standardize scripts (preopenapi-spec, pretest). |
| services/authentication-service/src/modules/auth/controllers/saml-login.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/authentication-service/src/modules/auth/controllers/logout.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/authentication-service/src/modules/auth/controllers/login.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/authentication-service/src/modules/auth/controllers/keycloak-login.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/authentication-service/src/modules/auth/controllers/instagram-login.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/authentication-service/src/modules/auth/controllers/identity-server.controller.ts | Switch schema ref helper to getModelSchemaRefSF and simplify imports. |
| services/authentication-service/src/modules/auth/controllers/google-login.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/authentication-service/src/modules/auth/controllers/facebook-login.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/authentication-service/src/modules/auth/controllers/cognito-login.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/authentication-service/src/modules/auth/controllers/azure-login.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/authentication-service/src/modules/auth/controllers/auth0-login-controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/authentication-service/src/modules/auth/controllers/apple-login.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/authentication-service/src/controllers/signup-request.controller.ts | Switch schema ref helper to getModelSchemaRefSF and reorder imports. |
| services/authentication-service/src/controllers/login-activity.controller.ts | Switch schema ref helper to getModelSchemaRefSF and reorder imports. |
| services/authentication-service/src/component.ts | Replace static controller list with dynamic model/controller booters. |
| services/authentication-service/package.json | Standardize scripts (preopenapi-spec, pretest) and formatting. |
| services/audit-service/src/controllers/audit.controller.ts | Switch schema ref helper to getModelSchemaRefSF. |
| services/audit-service/src/component.ts | Replace manual controllers list with dynamic model/controller booters. |
| services/audit-service/package.json | Standardize scripts (preopenapi-spec, pretest). |
| package-lock.json | Formatting-only change (final brace indentation). |
Comments suppressed due to low confidence (2)
services/in-mail-service/src/controllers/collector.controller.ts:162
- The OpenAPI response schema for
/mails/{messageId}looks invalid: theitemproperty is declared astype: 'string'but then usesitem: getModelSchemaRefSF(...)(OpenAPI usesschemafor objects anditemsfor arrays). This will generate an incorrect/invalid spec for this endpoint. Please adjust the schema soitemis described as a Message object (and use the correct OpenAPI keywords).
services/notification-service/package.json:75 - This PR bumps
@loopback/coreto^7.0.8only for notification-service, while other services in this repo (e.g. audit-service) remain on^7.0.3. If the monorepo expects aligned LoopBack versions, this can lead to inconsistent dependency trees and harder maintenance; consider updating all services together or documenting why notification-service must be on a newer core version.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "info": { | ||
| "title": "@sourceloop/reporting-service", | ||
| "version": "7.0.4", | ||
| "version": "7.0.7", | ||
| "description": "reporting-service.", | ||
| "contact": { |
There was a problem hiding this comment.
The OpenAPI info.version here is 7.0.7, but services/reporting-service/package.json declares version 7.0.8. Please regenerate the OpenAPI spec from the same build/package version (or update the version field) so published docs/spec stay consistent with the package release.
| @@ -16,7 +16,7 @@ headingLevel: 2 | |||
|
|
|||
| <!-- Generator: Widdershins v4.0.1 --> | |||
|
|
|||
| <h1 id="-sourceloop-reporting-service">@sourceloop/reporting-service v7.0.4</h1> | |||
| <h1 id="-sourceloop-reporting-service">@sourceloop/reporting-service v7.0.7</h1> | |||
There was a problem hiding this comment.
The generated doc header/version is v7.0.7, but services/reporting-service/package.json is 7.0.8. Please regenerate/update this markdown so the published API docs reflect the actual package version.
| "info": { | ||
| "title": "@sourceloop/payment-service", | ||
| "version": "19.0.2", | ||
| "version": "19.0.5", | ||
| "description": "payment microservice", | ||
| "contact": { |
There was a problem hiding this comment.
The OpenAPI info.version is 19.0.5, but services/payment-service/package.json declares version 19.0.6. Please regenerate the spec (or update the version field) so the spec version matches the published package.
| @@ -16,7 +16,7 @@ headingLevel: 2 | |||
|
|
|||
| <!-- Generator: Widdershins v4.0.1 --> | |||
|
|
|||
| <h1 id="-sourceloop-payment-service">@sourceloop/payment-service v19.0.2</h1> | |||
| <h1 id="-sourceloop-payment-service">@sourceloop/payment-service v19.0.5</h1> | |||
There was a problem hiding this comment.
The markdown title/header shows v19.0.5, but services/payment-service/package.json is 19.0.6. Please regenerate/update this file to keep the published API docs consistent with the package version.
Add comprehensive JSDoc to build-schema.ts for getModelSchemaRefSF. | Explain when to use getModelSchemaRefSF vs LoopBack's | Describe runtime schema overrides via OVERRIDE_MODEL_SCHEMA_KEY and include a controller usage example. GH-2399
SonarQube reviewer guide
|



This pull request introduces improvements to the bootstrapping and schema generation processes`. The main changes include switching from manual controller registration to dynamic booters, updating OpenAPI schema generation to use a new helper, and refining build/test scripts for consistency.
Bootstrapping and Controller Registration
CoreModelBooterandCoreControllerBooter) usingBooterBasePathMixinin bothaudit-serviceandauthentication-servicecomponents, allowing automatic discovery and loading of models and controllers. [1] [2] [3] [4] [5] [6] [7] [8]OpenAPI Schema Generation
getModelSchemaRefSFinstead ofgetModelSchemaReffor OpenAPI schema generation, ensuring consistency and possibly improved schema handling. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23]Build and Test Script Updates
pretestscripts in bothpackage.jsonfiles to uselb-tscfor TypeScript compilation, and added apreopenapi-specscript to clean test artifacts before generating OpenAPI specs. [1] [2]These changes collectively modernize the service initialization and schema generation, streamline build/test processes, and reduce manual maintenance.