microsoft / vscode-spring-boot-dashboard

Spring Boot Dashboard for VS Code
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-spring-boot-dashboard
Other
56 stars 31 forks source link

Add support for custom `RequestMappingHandlerMapping` #341

Open josevsgeon opened 5 months ago

josevsgeon commented 5 months ago

I have a custom implementation of RequestMappingHandlerMapping so that I can use @ApiVersion annotation to prefix version to the start of request endpoint by annotating either controller class or individual methods. However, this extension does not provide an option to use the custom implementation and end up with duplicate endpoints for different versions as version information would be missing without the custom implementation.

@RestController
@ApiVersion("2")
@RequestMapping("base")
public class SomeController {
  @Deprecated
  @ApiVersion("1")
  @GetMapping("endpoint") // mapped to `/v1/base/endpoint`
  ResponseEntity someOldMethodForBackwardCompatibility() { /** ... */ }

  @GetMapping("endpoint") // mapped to `/v2/base/endpoint`
  ResponseEntity newAndImprovedMethod() { /** ... */ }
}

Please add support for custom implementations of RequestMappingHandlerMapping.