package com.github.twostone.leaderboard.model;

import com.github.twostone.leaderboard.model.competition.Competition;
import com.github.twostone.leaderboard.model.competition.CompetitionRegistration;
import com.github.twostone.leaderboard.model.competition.Division;
import com.github.twostone.leaderboard.model.event.Event;

import com.fasterxml.jackson.databind.Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.google.common.eventbus.EventBus;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurerAdapter;
import org.springframework.hateoas.config.EnableHypermediaSupport;
import org.springframework.hateoas.config.EnableHypermediaSupport.HypermediaType;

@Configuration
@EnableAutoConfiguration
@ComponentScan
@EnableHypermediaSupport(type = HypermediaType.HAL)
public class ModelConfiguration extends RepositoryRestConfigurerAdapter {
  
  @Override
  public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config) {
    super.configureRepositoryRestConfiguration(config);
    config.exposeIdsFor(
        Competition.class, 
        Division.class, 
        Event.class, 
        CompetitionRegistration.class);
  }
  
  @Bean
  public EventBus eventBus() {
    return new EventBus();
  }
  
  @Bean
  public Module installJsr310Module() {
    return new JavaTimeModule();
  }
  
}

@@ -1170,15 +1170,104 @@
 ion 
-extends
+%7B%0A  %0A  @Bean%0A  public RepositoryRestConfigurerAdapter configureRestRepository() %7B%0A    return new
  Rep
@@ -1294,22 +1294,25 @@
 rAdapter
+()
  %7B%0A  
-%0A
+  
   @Overr
@@ -1315,16 +1315,20 @@
 verride%0A
+    
   public
@@ -1404,24 +1404,28 @@
 n config) %7B%0A
+    
     super.co
@@ -1468,16 +1468,20 @@
 onfig);%0A
+    
     conf
@@ -1497,32 +1497,36 @@
 IdsFor(%0A        
+  
+  
 Competition.clas
@@ -1521,32 +1521,36 @@
 etition.class, %0A
+    
         Division
@@ -1566,16 +1566,20 @@
         
+    
 Event.cl
@@ -1584,32 +1584,36 @@
 class, %0A        
+ 
+   
 CompetitionRegis
@@ -1628,16 +1628,67 @@
 class);%0A
+        config.setBasePath(%22/api%22);%0A      %7D%0A    %7D;%0A
   %7D%0A  %0A 

Update the Repostory config for using base path "api".