If your spring-cloud-gateway offers its own REST API in addition to routing to other backend services, you don’t need to provide routes in the RouteLocatorBuilder for those.
Just expose the API with a @RestController or with router functions (see https://www.baeldung.com/spring-5-functional-web)