feat(EM-45): Define REST API Standards and Migrate from Springfox to SpringDoc OpenAPI 3#46
Open
devin-ai-integration[bot] wants to merge 1 commit intofeat/microservices-migration-v2from
Conversation
…config - Create libs/ftgo-api-standards/ shared library module - Define standard API response DTOs (ApiResponse, ErrorResponse, PageResponse) - Configure SpringDoc OpenAPI 3 auto-configuration with FtgoApiProperties - Add Bearer JWT security scheme support - Add springdoc-openapi-starter-common to version catalog - Create REST API standards docs (naming conventions, versioning, error handling) - Add unit tests for all DTOs and auto-configuration Co-Authored-By: Alex Baker <alexandercommander453@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(EM-45): Add ftgo-api-standards library with SpringDoc OpenAPI 3 config
Summary
Creates the
libs/ftgo-api-standards/shared library to replace the monolith's Springfox-basedcommon-swaggermodule with SpringDoc OpenAPI 3. Includes:ApiResponse<T>(success/error envelope),ErrorResponse(with field-level errors),PageResponse<T>(pagination wrapper)FtgoOpenApiAutoConfigurationthat creates anOpenAPIbean with configurable info, Bearer JWT security scheme, and server definitions viaFtgoApiProperties(ftgo.api.*prefix)META-INF/spring/AutoConfiguration.importsspringdoc-openapi-starter-commonlibrary alias togradle/libs.versions.tomldocs/api-standards/: naming conventions, versioning strategy (URL path-based), and error handling standardsThe module is a standalone Gradle 8.7 project (matching sibling
ftgo-common's pattern), with unit tests for all DTOs and the auto-configuration. Build passes with all tests green. No existing monolith source files or rootsettings.gradlewere modified.Review & Testing Checklist for Human
settings.gradle, consistent withftgo-common. Confirm this standalone structure works for your composite build / service consumption strategy — services will need to declare a dependency on this module somehow (composite build, local maven publish, etc.)build.gradlehardcodesspringdoc 2.5.0,spring-boot 3.2.5,jackson 2.17.0etc. rather than referencing the version catalog (standalone projects can't). Verify these matchlibs.versions.tomland accept the version-drift risk, or consider adding a comment/checkGlobalExceptionHandler: Theerror-handling.mddoc shows example@RestControllerAdvicecode, but the library only provides theErrorResponseDTO — each service must implement its own handler. Confirm this is the desired boundary/swagger-uior/v3/api-docsendpoint availability. Consider adding a@SpringBootTestintegration test in a follow-up if neededdocs/api-standards/*.mdto ensure naming conventions, versioning strategy, and error codes match team standardsNotes
gradle-wrapper.jar) is included per standard Gradle project structure