Skip to content

Make GameController a RestController so it shows up in Swagger - #1209

Merged
Brutus5000 merged 1 commit into
developfrom
fix-swagger-game-controller
Nov 16, 2026
Merged

Brutus5000 merged 1 commit into
developfrom
fix-swagger-game-controller

Conversation

@Brutus5000

Copy link
Copy Markdown
Member

Problem

`GET /game/{id}/replay` is missing from the `custom` Swagger spec (`/v3/api-docs`). `GameController` is a plain `@Controller` with a `void` method and no `@ResponseBody`, which springdoc does not treat as a REST endpoint.

Change

  • `@Controller` -> `@RestController` (behaviour is unchanged: the method still sets the `Location` header and the 302 status itself)
  • Add `@Operation` and a 302 `@ApiResponse`

Notes

  • CI on this PR will stay red until Adapt ElideConfig to Elide 7.2.0 #1208 (Elide 7.2.0 compile fix on `develop`) is merged. Locally I verified the change compiles with Elide 7.1.17.
  • I did not start the app to confirm the endpoint now appears in `/v3/api-docs`; please check in Swagger UI after merging.

🤖 Generated with Claude Code

springdoc only documents @RestController (or @responsebody) endpoints, so
GET /game/{id}/replay was missing from /v3/api-docs. Also add an @operation
and the 302 response.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 29c5cf44-3635-4a17-81bb-6162e5c9e45b
Commits

Reviewing files that changed from the base of the PR and between 63e349c and 39e1c8b.

Files selected for processing: 1

  • src/main/java/com/faforever/api/game/GameController.java
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@Brutus5000
Brutus5000 merged commit 92e8074 into develop Nov 16, 2026
2 of 4 checks passed
@Brutus5000
Brutus5000 deleted the fix-swagger-game-controller branch November 16, 2026 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant