Conversation
📝 WalkthroughWalkthroughAdds environment-configured Swagger/OpenAPI server URLs (dev/uat/demo) by injecting Spring Environment into SwaggerConfig and reading new properties; updates application properties with three API URL entries; changes GitHub workflow PR branch naming to a fixed branch Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/main/java/com/iemr/tm/config/SwaggerConfig.java`:
- Around line 22-31: Replace the placeholder API version and mismatched
description in the OpenAPI builder: update the OpenAPI().info(...) call used in
SwaggerConfig (the OpenAPI() builder expression) to set a real version string
(e.g., "1.0.0") or wire it from a property/POM and change the description text
to accurately describe the TeleMedicine service rather than "creation and
management of beneficiaries"; ensure the change is applied to the Info()
instance used in the return statement so Swagger UI shows the correct version
and service description.
🧹 Nitpick comments (1)
src/main/java/com/iemr/tm/config/SwaggerConfig.java (1)
27-31: Use imports instead of inline fully-qualified class names.
io.swagger.v3.oas.models.servers.Serverandjava.util.Arraysare used via FQCNs inline. Adding proper imports improves readability.Proposed fix
Add imports at the top of the file:
import java.util.Arrays; import io.swagger.v3.oas.models.servers.Server;Then simplify the server list construction:
- .servers(java.util.Arrays.asList( - new io.swagger.v3.oas.models.servers.Server().url(devUrl).description("Dev"), - new io.swagger.v3.oas.models.servers.Server().url(uatUrl).description("UAT"), - new io.swagger.v3.oas.models.servers.Server().url(demoUrl).description("Demo") + .servers(Arrays.asList( + new Server().url(devUrl).description("Dev"), + new Server().url(uatUrl).description("UAT"), + new Server().url(demoUrl).description("Demo") ));Or use
java.util.List.of(...)if on Java 9+ (Java 17 is used in CI):- .servers(java.util.Arrays.asList( - new io.swagger.v3.oas.models.servers.Server().url(devUrl).description("Dev"), - new io.swagger.v3.oas.models.servers.Server().url(uatUrl).description("UAT"), - new io.swagger.v3.oas.models.servers.Server().url(demoUrl).description("Demo") - )); + .servers(List.of( + new Server().url(devUrl).description("Dev"), + new Server().url(uatUrl).description("UAT"), + new Server().url(demoUrl).description("Demo") + ));
|



Summary by CodeRabbit
New Features
Chores