You've already forked restcountries
mirror of
https://gitlab.com/restcountries/restcountries.git
synced 2026-04-05 12:32:54 +01:00
remove micronaut openapi spec generation for previous versions and add / in front of controller paths to make the controller definition openapi compatible
This commit is contained in:
@@ -13,6 +13,8 @@ import io.micronaut.http.annotation.Controller;
|
||||
import io.micronaut.http.annotation.Get;
|
||||
import io.micronaut.http.annotation.PathVariable;
|
||||
import io.micronaut.http.annotation.QueryValue;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -20,7 +22,8 @@ import java.util.Optional;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
@Controller("v2/")
|
||||
@Hidden
|
||||
@Controller("/v2/")
|
||||
public class CountryControllerV2 {
|
||||
|
||||
@Get(uri = "all", produces = MediaType.APPLICATION_JSON)
|
||||
|
||||
@@ -14,6 +14,8 @@ import io.micronaut.http.annotation.Controller;
|
||||
import io.micronaut.http.annotation.Get;
|
||||
import io.micronaut.http.annotation.PathVariable;
|
||||
import io.micronaut.http.annotation.QueryValue;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -22,7 +24,8 @@ import java.util.Set;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
@Controller("v3/")
|
||||
@Hidden
|
||||
@Controller("/v3/")
|
||||
public class CountryControllerV3 extends ControllerHelper {
|
||||
|
||||
@Get(uri = "all", produces = MediaType.APPLICATION_JSON)
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.Set;
|
||||
import javax.ws.rs.QueryParam;
|
||||
import javax.ws.rs.core.Response;
|
||||
|
||||
@Controller("v3.1/")
|
||||
@Controller("/v3.1/")
|
||||
public class CountryControllerV31 extends ControllerHelper {
|
||||
|
||||
@Get(uri = "all", produces = MediaType.APPLICATION_JSON)
|
||||
|
||||
Reference in New Issue
Block a user