aboutsummaryrefslogtreecommitdiffstats
path: root/certService/src/main/java/org/onap/aaf/certservice/api/configuration/OpenApiConfig.java
diff options
context:
space:
mode:
authorBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2020-03-10 16:05:09 +0100
committerBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2020-03-10 16:05:09 +0100
commit0855846bc0ab2dcdadc5ef7ed9588f70124ce21e (patch)
tree9f1110345ea2f5042a04e9e2129d7ae333359e1c /certService/src/main/java/org/onap/aaf/certservice/api/configuration/OpenApiConfig.java
parent50ec01532a2c3816d964bf6b1b870968536a6fd7 (diff)
Add annotation for OpenAPI 3.0 documentation generation
Issue-ID: AAF-997 Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> Change-Id: I6dcbe2076d7e0095c210b1cae95309fe31ebf243
Diffstat (limited to 'certService/src/main/java/org/onap/aaf/certservice/api/configuration/OpenApiConfig.java')
-rw-r--r--certService/src/main/java/org/onap/aaf/certservice/api/configuration/OpenApiConfig.java44
1 files changed, 44 insertions, 0 deletions
diff --git a/certService/src/main/java/org/onap/aaf/certservice/api/configuration/OpenApiConfig.java b/certService/src/main/java/org/onap/aaf/certservice/api/configuration/OpenApiConfig.java
new file mode 100644
index 00000000..18327048
--- /dev/null
+++ b/certService/src/main/java/org/onap/aaf/certservice/api/configuration/OpenApiConfig.java
@@ -0,0 +1,44 @@
+/*
+ * ============LICENSE_START=======================================================
+ * PROJECT
+ * ================================================================================
+ * Copyright (C) 2020 Nokia. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.aaf.certservice.api.configuration;
+
+import io.swagger.v3.oas.models.Components;
+import io.swagger.v3.oas.models.OpenAPI;
+import io.swagger.v3.oas.models.info.Info;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class OpenApiConfig {
+
+ @Bean
+ public OpenAPI customOpenAPI() {
+ return new OpenAPI()
+ .components(new Components())
+ .info(
+ new Info()
+ .title("CertService Documentation")
+ .description("Certification service API documentation")
+ .version("1.0.0")
+ );
+ }
+
+}