generating swagger-ui and controller interface using openapi.yml
[cps/cps-temporal.git] / src / main / resources / application.yml
1 # ============LICENSE_START=======================================================
2 # Copyright (c) 2021 Bell Canada.
3 # Modifications Copyright (C) 2021 Nordix Foundation.
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
8 #
9 #       http://www.apache.org/licenses/LICENSE-2.0
10 #
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 #
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19
20 server:
21     port: 8080
22
23 rest:
24     api:
25         base-path: /cps-temporal/api
26
27 spring:
28     datasource:
29         url: jdbc:postgresql://${DB_HOST}:${DB_PORT}/cpstemporaldb
30         username: ${DB_USERNAME}
31         password: ${DB_PASSWORD}
32     liquibase:
33         change-log: classpath:/db/changelog/changelog-master.xml
34     jpa:
35         properties:
36             hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
37             hibernate.format_sql: true
38             hibernate.generate_statistics: false
39     kafka:
40         bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER}
41         security:
42             protocol: PLAINTEXT
43         consumer:
44             group-id: ${KAFKA_CONSUMER_GROUP_ID:cps-temporal-group}
45             # Configures the Spring Kafka ErrorHandlingDeserializer that delegates to the 'real' deserializers
46             # See https://docs.spring.io/spring-kafka/docs/2.5.11.RELEASE/reference/html/#error-handling-deserializer
47             # and https://www.confluent.io/blog/spring-kafka-can-your-kafka-consumers-handle-a-poison-pill/
48             key-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
49             value-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
50             properties:
51                 spring.deserializer.key.delegate.class: org.apache.kafka.common.serialization.StringDeserializer
52                 spring.deserializer.value.delegate.class: org.springframework.kafka.support.serializer.JsonDeserializer
53                 spring.json.value.default.type: org.onap.cps.event.model.CpsDataUpdatedEvent
54
55 app:
56     listener:
57         data-updated:
58             topic: ${CPS_CHANGE_EVENT_TOPIC:cps.cfg-state-events}
59
60 springdoc:
61     swagger-ui:
62         disable-swagger-default-url: true
63         urlsPrimaryName: query
64         urls:
65             - name: query
66               url: /swagger/openapi.yml