File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed
java/fr/fxjavadevblog/aid Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 2020
2121@ OpenAPIDefinition (
2222 info = @ Info (title = ApplicationConfig .APP_NAME , version = ApplicationConfig .APP_VERSION ),
23- servers = @ Server (url = ApplicationConfig .API_VERSIONED_BASE_PATH ),
23+ servers = @ Server (url = ApplicationConfig .APPLICATION_ROOT_VERSIONED ),
2424 components = @ Components (
2525 responses = {
2626 @ APIResponse (name = ApplicationConfig .RESPONSE_API_ERROR ,
@@ -45,12 +45,16 @@ public class ApplicationConfig extends Application {
4545 // these constants are used by OpenApi definition and by the response of /health
4646
4747 public static final String PATH_DELIM = "/" ;
48-
48+
4949 public static final String APP_NAME = "API for Atari ST Floppy Catalog" ;
5050 public static final String APP_VERSION = "0.0.5" ;
5151 public static final String API_BASE_PATH = "api" ;
5252 public static final String API_VERSION = "v1" ;
53- public static final String API_VERSIONED_BASE_PATH = PATH_DELIM + API_BASE_PATH + PATH_DELIM + API_VERSION ;
53+ public static final String API_VERSIONED_BASE_PATH = PATH_DELIM + API_VERSION + PATH_DELIM + API_BASE_PATH ;
54+
55+ public static final String APPLICATION_ROOT_VERSIONED = PATH_DELIM + API_VERSION ;
56+
57+
5458
5559 // aliases for OpenApi references via "ref=" annotation attribute.
5660 public static final String SCHEMA_API_ERROR = "ApiError" ;
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public void filterOpenAPI(OpenAPI openAPI) {
3737 for (Entry <String , PathItem > entry : map .entrySet ())
3838 {
3939 String jaxRsPath = entry .getKey ();
40- String openApiPath = StringUtils .remove (jaxRsPath , ApplicationConfig .API_VERSIONED_BASE_PATH );
40+ String openApiPath = StringUtils .remove (jaxRsPath , ApplicationConfig .APPLICATION_ROOT_VERSIONED );
4141 log .info ("JAX-RS Path : {} converted to OpenAPI Path : {}" , jaxRsPath , openApiPath );
4242 newMap .put (openApiPath , entry .getValue ());
4343 }
Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ quarkus.log.category."fr.fxjavadevblog.qjg".level=INFO
1414
1515
1616# health & metrics
17- quarkus.smallrye-health.root-path =/api/ v1/health
18- quarkus.smallrye-metrics.path =/api/ v1/metrics
17+ quarkus.smallrye-health.root-path =/v1/health
18+ quarkus.smallrye-metrics.path =/v1/metrics
1919
2020
2121# OpenAPI
22- quarkus.smallrye-openapi.path =/api/ v1/openapi
22+ quarkus.smallrye-openapi.path =/v1/openapi
2323quarkus.swagger-ui.path =/openapi-ui
2424quarkus.swagger-ui.always-include =true
2525
You can’t perform that action at this time.
0 commit comments