2 * ========================LICENSE_START=================================
3 * Copyright (C) 2020-2023 Nordix Foundation. All rights reserved.
4 * ======================================================================
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 * ========================LICENSE_END===================================
19 package org.onap.ccsdk.oran.a1policymanagementservice.controllers.v3;
21 import io.swagger.v3.oas.annotations.tags.Tag;
22 import org.onap.ccsdk.oran.a1policymanagementservice.controllers.api.v3.ConfigurationApi;
23 import org.onap.ccsdk.oran.a1policymanagementservice.controllers.v2.ConfigurationController;
24 import org.springframework.beans.factory.annotation.Autowired;
25 import org.springframework.http.ResponseEntity;
26 import org.springframework.web.bind.annotation.RequestMapping;
27 import org.springframework.web.bind.annotation.RestController;
28 import org.springframework.web.server.ServerWebExchange;
29 import reactor.core.publisher.Mono;
31 @RestController("ConfigurationControllerV3")
33 name = ConfigurationControllerV3.API_NAME, //
34 description = ConfigurationControllerV3.API_DESCRIPTION //
36 @RequestMapping("/a1policymanagement/v1")
37 public class ConfigurationControllerV3 implements ConfigurationApi {
39 public static final String API_NAME = "Management of configuration";
40 public static final String API_DESCRIPTION = "API used to create or fetch the application configuration";
43 private ConfigurationController configurationController;
46 public Mono<ResponseEntity<String>> getConfiguration(ServerWebExchange exchange) throws Exception {
47 return configurationController.getConfiguration(exchange);
51 public Mono<ResponseEntity<Object>> putConfiguration(Mono<Object> body, ServerWebExchange exchange) throws Exception {
52 return configurationController.putConfiguration(body, exchange);